# Geth Statement on EIP-8070
- Geth has implemented an initial prototype of EIP-8070 (Sparse blobpool).
- We hope EIP-8070 to be SFIed. The main advantage of this proposal is that it reduces bandwidth usage for non-proposer nodes while preserving the current role of the blobpool, which is the pre-propagation of custody columns.
- We have reviewed scenarios involving attackers pretending as providers, and developed local heuristics to defend against them.
## Prototype
https://github.com/ethereum/go-ethereum/pull/34047
<!-- ### Simulation results
* Parameters
* Fetch probability p = 0.3
* Availability peer threshold k = 2
* 16 nodes, fully connected each other
* Blob spamoor endpoint: el 01
* Proposer lookahead: 2 slots
* Since the simulation network was small, following adjustments were applied
* Clients had a higher probability of being selected as proposers
* Clients had a higher probability of being providers (0.15 → 0.3)
* These factors can increase the measured bandwidth consumption, as clients attempt to fetch all data columns in both cases
* Some unexpected fluctuations were observed and will be addressed on the implementation side
-->
### Key Changes
- The blobpool[^1] stores custody cells instead of full blobs.
- There is no change to the format of blob transactions submitted by users; cells are computed and stored internally.
- Accordingly, the Get operation has two modes: returning a transaction without blobs, or returning cells.
- Blob fetcher[^2] has been introduced to schedule cell exchange.
- There are two possible approaches:
1) Fetching cells and transactions asynchronously
2) Fetching transactions first, then fetching cells
- The issue with the first approach is that validation of cells depends on commitments and proofs exchanged along with transactions. Conversely, transaction validation also depends on the presence of cells. The current prototype adopts the first approach, adding a buffer to temporarily store each component.[^*]
- When a custody update occurs, all cells corresponding to the union of the two custody sets are retained for a certain period (TBD).
- For transactions selected for partial fetch, if k providers cannot be secured, the process switches to full fetch.
- This acts as a safeguard against this rare event (e.g., p=0.15, k=2 results in 0.3%).
---
[^1]: Geth’s mempool consists of multiple sub-pools, including a dedicated sub-pool (blobpool) for storing blob transactions.
[^2]: Geth uses a module called tx fetcher to schedule transaction exchange in the eth protocol.
[^*]: Would it be beneficial to integrate https://eips.ethereum.org/EIPS/eip-8094? For example, PooledTransactionHash could include vhash, and GetCells could use vhash as an identifier. While this would increase the amount of metadata in announcements, it would enable more accurate request scheduling. (Currently, since the number of blobs is unknown, requests may be larger or smaller than expected. The original idea of using tx hash was based on the assumption that custody requests would be identical for all blobs of a given transaction.) If this is included in EIP-8070, clients could internally implement the functionality intended in EIP-8094 using this message type.
## Security Evaluation
- As outlined in Security Considerations section, the EIP itself considers multiple attack scenarios.
- Additionally, we analyzed [this attack](https://hackmd.io/@yZzECM-fQt2ePeYIwC4CUw/ByufNL90le), and considered the following local heuristics as possible candidates to defend against it:
- Scoring for detecting malicious peers, based on
1. How many of their announced transactions are included in blocks.
2. How frequently they respond to GetPooledTransactions and GetCells requests.
*Those ideas are currently being explored by @Csaba
- Removal of transactions injected by malicious peers:
1. If the lowest nonce transaction is a partial blob transaction, limit the number of transactions that account can accumulate. Also limit transactions from such accounts to a certain percentage of the entire blobpool. See [here](https://hackmd.io/@bosulmun/SJ_g80k5Wg) for a more detailed analysis.
2. Partial blobs are periodically selected at random for full fetches. If a fetch fails, the blob is dropped. The longer a partial blob stays in the pool, the less likely it is to avoid these checks.
## Future Considerations
### Rollout Strategy
Although the eth protocol itself does not require a fork, eth72 depends on the number of peers signaling availability. Therefore, it is necessary to simulate network behavior in environments where eth71 and eth72 coexist. For example, the following rules could be applied:
- Always perform full fetch for eth71 peers, and only announce transactions with full availability for them.
<!-- - Treat blob transaction announcements from eth71 peers as provider signals. // actually it doesn't make sense because we cannot pull from them -->
- For partial blob transactions, if the number of providers exceeds k, check whether there are eth72 peers that have announced overlapping availability for the transaction. Otherwise, switch to full fetch.
### Block Building
The safest option under this EIP is to build blocks based on full blobs. Risk profiling is required for building blocks based on partial blobs.
## Questions
We would like to ask other client teams the following:
- Is it realistic to implement this, assuming snap/2 is being worked on?
- Do you think this proposal should move to SFI? If not, what are your reasons?
- Besu and Nethermind have assigned this proposal an A-tier rating, while Erigon and Reth have not assigned any tier. Therefore, this question is mainly directed at Erigon and Reth.
<!---
# Geth statement on EIP 8070
- Geth는 Geth는 EIP-8070 (Sparse blobpool)의 초기 프로토타입을 수행하였습니다.
- 우리는 이것이 SFI로 이동되어야 한다고 생각합니다. 해당 제안의 주요 장점은 커스터디 컬럼의 사전 전파라는 블롭풀의 현재 역할을 보존하면서, 제안자가 아닌 노드들의 대역폭 사용량을 줄일 수 있다는 것입니다.
- Provider로 위장한 공격자의 사례들을 검토하였으며 이를 방어하기 위한 휴리스틱이 존재합니다.
## Prototype
TODO: link
### 시뮬레이션 결과
TODO
### 주요 변경 사항
- 블롭풀[^1]은 전체 블롭이 아닌 커스터디 셀을 저장합니다
- 사용자가 제출하는 블롭 트랜잭션의 형식에는 변화가 없으며 내부적으로 cell을 계산하여 저장합니다
- 이에 따라 Get 동작은 트랜잭션 without blob 을 리턴하는 동작과 cell을 리턴하는 동작 두가지를 갖습니다.
- 셀 교환 스케쥴링을 위한 blob fetcher[^2]가 추가되었습니다.
- 여기에서 두 가지 선택지가 있습니다.
1) 셀과 트랜잭션을 비동기적으로 fetch하는 것
2) 트랜잭션을 먼저 fetch하고 셀을 fetch는 것
- 첫번째 방법의 문제는 셀의 검증이 트랜잭션과 함께 교환되는 commitment와 proof에 의존한다는 점입니다. 반대로 트랜잭션의 검증 역시 셀의 존재에 의존합니다. 현재 프로토타입은 각 부분을 임시 저장하는 버퍼를 추가한 첫번째 방법을 채택했습니다.[^*]
- Custody update가 발생한 경우 일정 기간(TBD) 동안 두 custody의 합집합에 해당하는 셀들을 모두 보존합니다.
- Partial fetch를 하기로 결정된 트랜잭션에 대해, k개의 provider를 확보할 수 없는 경우 full fetch로 전환합니다.
- 이는 아주 낮은 확률(p=0.15, k=2 일때 0.3%)로 발생 가능한 사건에 대한 안전장치입니다.
[^1]: Geth의 멤풀은 여러 개의 서브풀로 이루어져 있으며, 블롭 트랜잭션을 저장하기 위한 별도의 서브풀(블롭풀)이 있습니다.
[^2]: Geth는 eth 프로토콜에서 트랜잭션 교환을 스케쥴링하기 위해 tx fetcher라는 모듈을 사용합니다.
[^*]: https://eips.ethereum.org/EIPS/eip-8094 를 통합하는 것이 좋을까요? 예를 들어, PooledTransactionHash는 vhash를 포함하고, GetCells 는 vhash를 identifier로 사용하는 식입니다. announcement의 메타데이터 양은 증가하지만, 더 정확한 request 스케쥴링이 가능합니다. (현재는 블롭의 개수를 모르기 때문에 예상보다 더 크거나 작은 요청을 보낼 수 있습니다. 제가 처음 tx hash를 이용하고자 한 것은 모든 경우에서 같은 트랜잭션의 블롭들에 대해 동일한 custody를 요청할 것이라 생각되었기 때문입니다.) EIP 8070에서 이 부분을 포함하면 해당 메시지 타입을 이용해 EIP 8094에서 하고자 했던 것들을 각 클라이언트 내부적으로 구현할 수 있을 것입니다.
## 안전 평가
- (TODO: link) 여기서 제시되어 있듯이 EIP 자체는 여러 공격 시나리오를 고려하고 있습니다.
- 저는 특히 [이 공격](https://hackmd.io/@yZzECM-fQt2ePeYIwC4CUw/ByufNL90le)을 주로 고려했으며, 이에 대해 다음과 같은 로컬 휴리스틱을 주요 후보로 고려하기로 했습니다.
- 악의적 피어 탐지를 위한 스코어링
1. 연결된 피어들에 대해, 해당 피어가 발표한 트랜잭션이 얼마나 많이 블록에 포함되었는가를 기반으로 점수를 매깁니다.
2. 연결된 피어들에 대해, 해당 피어가 얼마나 자주 GetPooledTransactions 및 GetCells 요청에 응답하였는지를 기반으로 점수를 매깁니다.
- 악의적 피어에 의해 주입된 트랜잭션 삭제
1. 가장 낮은 논스 트랜잭션이 partial 블롭 트랜잭션인 경우, 해당 계정이 누적할 수 있는 거래의 수를 제한합니다. 또한, 이러한 계정에서 발생한 거래를 전체 블롭풀의 특정 비율로 제한합니다. 보다 자세한 분석은 [여기](https://hackmd.io/@bosulmun/SJ_g80k5Wg)를 참고하세요.
## Future considerations
### Rollout strategy
eth 프로토콜 자체는 포크를 필요로 하지 않지만, eth72는 availability를 신호하는 피어들의 수에 의존하므로 eth71과 eth72가 섞여 있는 상황에서의 네트워크 동작을 시뮬레이션할 필요가 있습니다. 예를 들어 다음과 같은 규칙을 적용할 수 있습니다.
- eth71 피어에 대해서는 반드시 full fetch를 수행하며, full availability가 있는 트랜잭션들만 announce합니다.
- eth71 피어의 블롭 트랜잭션 announcement에 대해서는 provider signal로 간주합니다.
- Partial blob transaction에 대해 provider의 수가 k를 넘긴 경우, 해당 트랜잭션에 대해 겹치는 availability를 announce한 eth72 피어를 가지고 있는지를 확인합니다. 그렇지 않은 경우, full fetch로 전환합니다.
### Block building
해당 EIP 하에서 가장 안전한 옵션은 블록을 full blob에 기반하여 빌딩하는 것입니다. partial blob에 기반하여 블록을 빌딩하는 것에 대한 risk profiling 이 필요합니다.
## 질문들
다른 클라이언트 팀에게 묻고 싶은 사항은 다음과 같습니다.
- Rollout strategy 가 포크를 필요로 하지 않을 때, 이것을 구현하는 것이 현실적인가요? (snap/2를 구현하고 있다는 가정 하에)
- 이 제안이 SFI되어야 한다고 생각합니까? 동의하지 않는다면 그 이유는 무엇입니까?
- Besu, Nethermind는 해당 제안을 A 티어에 배정하였고 Erigon, Reth는 어떠한 티어도 주지 않았습니다. 따라서 이 질문은 대개 Erigon과 Reth를 향한 것입니다.
-->