Repository navigation
Conversation
File
|
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
Refine EIP-8479 LeanDA challenge derivation
…ng-commitment Separate LeanDA blob binding from challenge seed
healthykim
left a comment
There was a problem hiding this comment.
Hi I am bosul from geth, I was reading this EIP and left a few small comments and questions. Feel free to check whenever you have time
| ] | ||
| ``` | ||
|
|
||
| The transaction hashes and `TransactionCells` values MUST have equal lengths and matching order. For each transaction, its `BlobCells` values MUST have the same length and order as its signed `blob_commitments` list. Within each `BlobCells`, cells MUST be ordered by ascending set-bit index in the response `cell_mask`. The response mask MUST be nonzero and MUST be a subset of the requested mask. It applies uniformly to every returned `BlobCells` value. |
There was a problem hiding this comment.
The response mask MUST be nonzero
Does this mean that empty responses are not allowed? Since transactions can be evicted from the pool at any time, I think we would like to allow empty responses so that the requester can complete the pending request and retry with another peer.
Alternatively, we could say that "cell_mask can be zero only when both the transaction hash list and the transaction_cells list are empty."
There was a problem hiding this comment.
Agreed, we should allow empty responses. Keeping the response structure with both lists empty seems consistent with existing devp2p responses. I'll clarify the mask rule for that case.
|
|
||
| For each returned cell, the receiver MUST derive its expected byte length as `commitment.blob_byte_length // NUMBER_OF_COLUMNS` and reject a cell with any other length. | ||
|
|
||
| If the response mask is not all ones, each `authentication_paths` list MUST contain one path per returned cell in the same order. Every path MUST contain exactly `MERKLE_DEPTH` ordered `Bytes32` sibling hashes, and the receiver MUST verify each cell against the corresponding `blob_merkle_root`. |
There was a problem hiding this comment.
Since we can reconstruct the full blob from enough (64) cells, can we also allow omitting authentication_paths when at least 64 cells are returned?
If so, the receiver side would -> reconstruct 128 cells and verify the result merkel root against the blob merkle root.
This could save up to 14KB ($log_2(128)32byte64$?) of authentication data per blob for 64 cell response.
It could also encourage nodes custodying >= 64 columns to perform recovery more and act as a provider, which can make our backbone stronger.
There was a problem hiding this comment.
Good catch, this seems like a useful optimisation!
|
|
||
| This EIP introduces `eth/73`, extending the [EIP-8070](./eip-8070.md) `eth/72` protocol. The 128-bit `cell_mask` continues to identify available or requested column indices. In `NewPooledTransactionHashes`, the mask applies to every blob of every announced blob-carrying frame transaction. | ||
|
|
||
| `GetPooledTransactions` and `PooledTransactions` use the ordinary signed [EIP-8141](./eip-8141.md) frame-transaction encoding. The signed `blob_commitments` list supplies the Merkle roots and blob byte lengths. The [EIP-7594](./eip-7594.md) type-3 transaction wrapper and its `blobs`, `commitments`, and `cell_proofs` fields are not used. |
There was a problem hiding this comment.
I have a question here, how are STARK proofs propagated over the network? This seems important because IIUC we would need them to validate the cells received from peers.
I assume this is related to EIP-8288, but am not sure how they are actually transmitted over devp2p. Do we have a separate message type for this? or would they be attached to PooledTransactions?
There was a problem hiding this comment.
I have a question here, how are STARK proofs propagated over the network? This seems important because IIUC we would need them to validate the cells received from peers.
I assume this is related to EIP-8288, but am not sure how they are actually transmitted over devp2p. Do we have a separate message type for this? or would they be attached to
PooledTransactions?
Correct, this is related to EIP-8288, and proof propagation is intentionally left unspecified in this PR. I’m not sufficiently familiar with the devp2p mempool protocol to propose a concrete approach yet. We’d welcome input on how best to request proofs and the associated metadata covering the transactions and cells we want to fetch from a peer.
There was a problem hiding this comment.
I see. I think if the goal is just to propagate proofs, we could simply introduce a new message type. However we are going to rely on EIP-8288's design of mempool wrapper propagation because we want to integrate with EIP-8288 and support proof aggregation. 8288 will anyway change the transaction exchange significantly I think ... I will take a look into 8288 more !
There was a problem hiding this comment.
Noted, most appreciated
| The `GetCells` request retains the EIP-8070 schema: | ||
|
|
||
| ```text | ||
| [[transaction_hash_0: B_32, ...], cell_mask: B_16] |
There was a problem hiding this comment.
Just a very small nitpick, but we would need request_id here. I omitted it by mistake from the eip but added it to the devp2p spec when I was working on sparse blobpool sorry
https://github.com/ethereum/devp2p/blob/master/caps/eth.md#getcells-0x14
There was a problem hiding this comment.
Just a very small nitpick, but we would need
request_idhere. I omitted it by mistake from the eip but added it to the devp2p spec when I was working on sparse blobpool sorryhttps://github.com/ethereum/devp2p/blob/master/caps/eth.md#getcells-0x14
noted, I'll get it added - thanks for flagging.
Hey, nice to meet you 🙂 Thanks for the review! Added to backlog, will get to this asap |
rewuorb-mehcoj
left a comment
There was a problem hiding this comment.
Written with LLM assistance. Mergeable verdict: ❌
Blocking: 2 blocking comments below.
EIP-8479 replaces KZG commitments and proofs in PeerDAS with per-blob Keccak-256 Merkle trees over 128 cells. A LeanDA STARK guest program proves the Reed–Solomon encoding and commitment derivation, and is declared as an EIP-8288 dependency (LEANDA_SCHEME = 0x12) folded into the block-level recursive STARK. Blobs may have power-of-two sizes from 2 KiB to 512 KiB. Blob-carrying transactions become EIP-8141 frame transactions with a signed blob_commitments list. The EIP charges blob gas per byte plus a fixed Merkle-tree allowance, rescales the EIP-7892 schedule, and defines eth/73 blobpool messages, engine_getBlobsV5, and Merkle-path versions of DataColumnSidecar and PartialDataColumnSidecar.
Checked and found correct:
- Preamble, scope and CI. Field order, title and description are within limits and correct. Number 8479 was assigned by an associate editor and is applied. The PR author is listed with a handle. The PR adds one file only. All CI jobs pass, and the discussions-to topic exists and matches.
- Requirements and links. Every proposal in
requiresexists on master and is linked in the text. The two RFC links resolve. - Constants. These values recompute:
127 * 32 = 4064,131072 + 4064 = 135136,6 * 131072 = 786432,524288 / 128 = 4096and depth 7.GAS_PER_BLOB = 2**17matches EIP-4844.MAX_BLOBS_PER_TX = 6matches the EIP-7594 limit. - Identifiers.
LEANDA_SCHEME = 0x12does not collide with EIP-8288's0x10/0x11or with any open pull request that changes EIP-8288.engine_getBlobsV5is not defined elsewhere.TXPARAM_BLOB_COUNTexists in EIP-8141. TheExecutionPayloadBidandDataColumnSidecarfields matchspecs/heze/beacon-chain.mdandspecs/gloas/p2p-interface.mdin the consensus-specs snapshot.
Not tied to a line: the PR description ("early architectural draft") matches the text.
Earlier review items: 0 open, 1 answered, 5 addressed.
- Not listed: 1 open or answered item on threads opened by others.
| At and after activation: | ||
|
|
||
| - [EIP-4844](./eip-4844.md) type-3 KZG transactions and legacy KZG blob-carrying frame transactions are invalid for inclusion; | ||
| - transaction pools MUST remove those ineligible transactions; |
There was a problem hiding this comment.
Question (blocking): Normative keywords belong only in the Specification. Backwards Compatibility uses MUST / MUST NOT here and at lines 665, 666, 667, 671 and 673. Several of these rules are stated nowhere in the Specification:
- transaction pools removing ineligible transactions;
- a block not mixing KZG and post-quantum blobs;
- KZG sidecars being rejected after the fork;
- consensus clients using
engine_getBlobsV5; - partial messages not falling back to KZG.
Move each binding rule into the Specification, then describe the incompatibility here in lowercase prose.
There was a problem hiding this comment.
Moved the binding rules into Specification and lowercased the compatibility summary.
| Activation requires vectors covering binding-commitment and challenge-seed encoding and domain separation, commitment ordering and count, Merkle authentication, serialization, fee accounting, and fork boundaries. Tests MUST cover proof rejection when the guest return value differs from the expected hash because the private blobs or host-supplied challenge seed have changed, rejection when the binding commitment and seed are hashed in the wrong order, reuse of one challenge seed across the batch, and independent rejection of each invalid Reed–Solomon relation. Activation also requires end-to-end LeanDA and EIP-8288 proof tests and benchmarks for proof generation, aggregation, validation, and PeerDAS network roles. | ||
|
|
||
| Sparse blobpool tests MUST cover request-ID matching, empty responses with two empty lists and an all-zero mask, rejection of zero masks with non-empty lists, and mismatched transaction-list lengths. Path-omission vectors MUST cover 63, 64, 65, 127, and 128 returned cells per blob, including non-contiguous column indices and multiple blobs of different supported sizes. Receivers MUST reject missing paths below the reconstruction threshold, non-empty paths at or above it, failed reconstruction, inconsistent returned cells, and reconstructed Merkle roots that differ from the signed commitments. |
There was a problem hiding this comment.
Suggestion (blocking): Normative keywords belong only in the Specification. Lowercase them in Test Cases. The receiver rules are already stated normatively in lines 404–406.
| Activation requires vectors covering binding-commitment and challenge-seed encoding and domain separation, commitment ordering and count, Merkle authentication, serialization, fee accounting, and fork boundaries. Tests MUST cover proof rejection when the guest return value differs from the expected hash because the private blobs or host-supplied challenge seed have changed, rejection when the binding commitment and seed are hashed in the wrong order, reuse of one challenge seed across the batch, and independent rejection of each invalid Reed–Solomon relation. Activation also requires end-to-end LeanDA and EIP-8288 proof tests and benchmarks for proof generation, aggregation, validation, and PeerDAS network roles. | |
| Sparse blobpool tests MUST cover request-ID matching, empty responses with two empty lists and an all-zero mask, rejection of zero masks with non-empty lists, and mismatched transaction-list lengths. Path-omission vectors MUST cover 63, 64, 65, 127, and 128 returned cells per blob, including non-contiguous column indices and multiple blobs of different supported sizes. Receivers MUST reject missing paths below the reconstruction threshold, non-empty paths at or above it, failed reconstruction, inconsistent returned cells, and reconstructed Merkle roots that differ from the signed commitments. | |
| Activation requires vectors covering binding-commitment and challenge-seed encoding and domain separation, commitment ordering and count, Merkle authentication, serialization, fee accounting, and fork boundaries. Tests must cover proof rejection when the guest return value differs from the expected hash because the private blobs or host-supplied challenge seed have changed, rejection when the binding commitment and seed are hashed in the wrong order, reuse of one challenge seed across the batch, and independent rejection of each invalid Reed–Solomon relation. Activation also requires end-to-end LeanDA and EIP-8288 proof tests and benchmarks for proof generation, aggregation, validation, and PeerDAS network roles. | |
| Sparse blobpool tests must cover request-ID matching, empty responses with two empty lists and an all-zero mask, rejection of zero masks with non-empty lists, and mismatched transaction-list lengths. Path-omission vectors must cover 63, 64, 65, 127, and 128 returned cells per blob, including non-contiguous column indices and multiple blobs of different supported sizes. Receivers must reject missing paths below the reconstruction threshold, non-empty paths at or above it, failed reconstruction, inconsistent returned cells, and reconstructed Merkle roots that differ from the signed commitments. |
There was a problem hiding this comment.
Lowercased these. Kept the current Boolean-return/public-input wording, as the guest interface has changed since this suggestion.
|
|
||
| #### Sparse Blobpool | ||
|
|
||
| This EIP introduces `eth/73`, extending the [EIP-8070](./eip-8070.md) `eth/72` protocol. The 128-bit `cell_mask` continues to identify available or requested column indices. In `NewPooledTransactionHashes`, the mask applies to every blob of every announced blob-carrying frame transaction. |
There was a problem hiding this comment.
Question (non-blocking): eth/73 is already defined by EIP-8408 ("eth/73 - Indexed Cell Requests", EIPS/eip-8408.md lines 3, 16 and 32). EIP-8408 extends eth/72 with indexed GetCells/Cells forms. EIP-8512 then defines eth/74 on top of EIP-8408's eth/73. This text gives eth/73 a different Cells response (lines 378–394), and line 669 relies on the same name. Which protocol version does this EIP define, and does it extend EIP-8408's indexed forms or replace them? Open pull request 12423 in ethereum/EIPs (EIP-8437) also builds an eth/74 on EIP-8408.
There was a problem hiding this comment.
Switched to provisional eth/76, inheriting proposed eth/75, including indexed cell requests and wrapper propagation. I'll add the formal wrapper-proposal reference once it lands; the version number still needs coordination.
| ) | ||
| ``` | ||
|
|
||
| EIP-8288's `get_deps_hash` is extended to dependency lists containing `LEANDA_SCHEME`. LeanDA dependencies use EIP-8288's existing `(data_hash, verification_key_hash)` dependency-digest encoding. For EIP-8288 gas accounting and dependency limits, `LEANDA_SCHEME` is treated as a leanSTARK dependency. |
There was a problem hiding this comment.
Question (non-blocking): The merged EIP-8288 does not support this extension as written:
- Its frame rule says "
scheme(byte 31) must beLEANSPHINCS_SCHEME.LEANSTARK_SCHEMEis reserved: a frame that uses it is invalid untilget_deps_hashis defined for it."
-get_deps_hash"is defined for lists ofLEANSPHINCS_SCHEMEdependencies". - Its recursive circuit ends in
else: assert Falsefor any other scheme.
This line says get_deps_hash "is extended" but does not say how. Also, get_deps_hash hashes only data_hash + verification_key_hash, without the scheme byte. A LEANDA_SCHEME triple and a LEANSTARK_SCHEME triple with the same two hashes would then produce the same digest.
Please state normatively:
- the
get_deps_hashdefinition forLEANDA_SCHEME; - the change to EIP-8288's frame validity constraint;
- the new branch of the recursive circuit.
The same applies to the limits.execution formula, whose else-branch would charge LEANSTARK_VERIFICATION_GAS.
There was a problem hiding this comment.
Agreed. Let's revisit these rules once EIP-8288 is more fully specified; this integration is still incomplete.
| ) | ||
| ``` | ||
|
|
||
| EIP-8288's `get_deps_hash` is extended to dependency lists containing `LEANDA_SCHEME`. LeanDA dependencies use EIP-8288's existing `(data_hash, verification_key_hash)` dependency-digest encoding. For EIP-8288 gas accounting and dependency limits, `LEANDA_SCHEME` is treated as a leanSTARK dependency. |
There was a problem hiding this comment.
Question (non-blocking): "For EIP-8288 gas accounting and dependency limits, LEANDA_SCHEME is treated as a leanSTARK dependency." EIP-8288 sets MAX_STARKS_PER_TX = 1 and MAX_LEANSTARK_DEPS_PER_WRAPPER = 1. Read literally, a blob-carrying transaction could then carry no other leanSTARK dependency, and a mode 0 mempool wrapper could hold only one blob-carrying transaction. Is that intended? If not, say which limits apply to LEANDA_SCHEME.
There was a problem hiding this comment.
I'll defer these limits along with the other EIP-8288 integration details until its specification is fuller.
| | `LEANDA_CHALLENGE_V1` | `0x15000000` | Domain-separation prefix for deriving the LeanDA challenge seed | | ||
| | `LEANDA_GUEST_VERIFICATION_KEY_HASH` | `TBD` | EIP-8288 verification-key hash for the LeanDA guest program | | ||
|
|
||
| ### Cryptographic primitives |
There was a problem hiding this comment.
Suggestion: Headings are in Title Case. The same applies at lines 178 (Guest Validation), 582 (Cell-Level Deltas), 641 (Post-Quantum Commitments), 645 (Constant-Size Guest Return Value), 649 (Blob-Local Merkle Trees) and 653 (Variable-Size Blobs).
| ### Cryptographic primitives | |
| ### Cryptographic Primitives |
There was a problem hiding this comment.
Updated those headings.
|
|
||
| ## Abstract | ||
|
|
||
| This EIP introduces a post-quantum data-availability construction for PeerDAS. It replaces KZG blob commitments with hash-based Merkle commitments and uses a STARK to prove both the Reed–Solomon encoding relation and the correct derivation of each Merkle commitment. PeerDAS retains its existing column custody and sampling mechanisms, but sampled cells are authenticated using Merkle authentication paths instead of KZG proofs. This EIP also allows blobs to have power-of-two byte lengths. It represents blob-carrying transactions as [EIP-8141](./eip-8141.md) frame transactions and introduces a LeanDA scheme for [EIP-8288](./eip-8288.md) to instantiate data-availability dependency frames. These dependency frames are satisfied using the block-level recursive STARK construction defined in [EIP-8288](./eip-8288.md). |
There was a problem hiding this comment.
Suggestion: Expand PeerDAS, KZG and STARK at their first use in the body. They are combined into one suggestion because all three first occur on this line.
| This EIP introduces a post-quantum data-availability construction for PeerDAS. It replaces KZG blob commitments with hash-based Merkle commitments and uses a STARK to prove both the Reed–Solomon encoding relation and the correct derivation of each Merkle commitment. PeerDAS retains its existing column custody and sampling mechanisms, but sampled cells are authenticated using Merkle authentication paths instead of KZG proofs. This EIP also allows blobs to have power-of-two byte lengths. It represents blob-carrying transactions as [EIP-8141](./eip-8141.md) frame transactions and introduces a LeanDA scheme for [EIP-8288](./eip-8288.md) to instantiate data-availability dependency frames. These dependency frames are satisfied using the block-level recursive STARK construction defined in [EIP-8288](./eip-8288.md). | |
| This EIP introduces a post-quantum data-availability construction for Peer Data Availability Sampling (PeerDAS). It replaces Kate-Zaverucha-Goldberg (KZG) blob commitments with hash-based Merkle commitments and uses a scalable transparent argument of knowledge (STARK) to prove both the Reed–Solomon encoding relation and the correct derivation of each Merkle commitment. PeerDAS retains its existing column custody and sampling mechanisms, but sampled cells are authenticated using Merkle authentication paths instead of KZG proofs. This EIP also allows blobs to have power-of-two byte lengths. It represents blob-carrying transactions as [EIP-8141](./eip-8141.md) frame transactions and introduces a LeanDA scheme for [EIP-8288](./eip-8288.md) to instantiate data-availability dependency frames. These dependency frames are satisfied using the block-level recursive STARK construction defined in [EIP-8288](./eip-8288.md). |
There was a problem hiding this comment.
Expanded all three at first use.
|
|
||
| - **Challenge Seed.** A domain-separated Keccak-256 hash of the canonical encoding of the ordered blob commitment list, computed outside the circuit. One seed is supplied per guest invocation to derive Reed–Solomon challenges for the batch. | ||
|
|
||
| - **Versioned Hash.** A 32-byte identifier derived from a blob commitment and returned by the EVM `BLOBHASH` opcode. |
There was a problem hiding this comment.
Suggestion: Expand EVM at its first use.
| - **Versioned Hash.** A 32-byte identifier derived from a blob commitment and returned by the EVM `BLOBHASH` opcode. | |
| - **Versioned Hash.** A 32-byte identifier derived from a blob commitment and returned by the Ethereum Virtual Machine (EVM) `BLOBHASH` opcode. |
There was a problem hiding this comment.
Expanded at first use.
| blob_commitments: list[BlobCommitment] | ||
| ``` | ||
|
|
||
| The RLP payload encodes these fields in the order shown, with `blob_commitments` occupying the final field position previously occupied by `blob_versioned_hashes`. Each `BlobCommitment` is encoded as the RLP list `[blob_merkle_root, blob_byte_length]`, where `blob_merkle_root` is exactly 32 bytes and `blob_byte_length` is a `uint64` encoded as a canonical RLP integer. The list MUST preserve blob order. EIP-8141's existing transaction signature hash therefore commits to each blob Merkle root and byte length. An empty `blob_commitments` list denotes a frame transaction that carries no blobs. A blob-carrying frame transaction is valid only if: |
There was a problem hiding this comment.
Suggestion: Expand RLP at its first use.
| The RLP payload encodes these fields in the order shown, with `blob_commitments` occupying the final field position previously occupied by `blob_versioned_hashes`. Each `BlobCommitment` is encoded as the RLP list `[blob_merkle_root, blob_byte_length]`, where `blob_merkle_root` is exactly 32 bytes and `blob_byte_length` is a `uint64` encoded as a canonical RLP integer. The list MUST preserve blob order. EIP-8141's existing transaction signature hash therefore commits to each blob Merkle root and byte length. An empty `blob_commitments` list denotes a frame transaction that carries no blobs. A blob-carrying frame transaction is valid only if: | |
| The Recursive Length Prefix (RLP) payload encodes these fields in the order shown, with `blob_commitments` occupying the final field position previously occupied by `blob_versioned_hashes`. Each `BlobCommitment` is encoded as the RLP list `[blob_merkle_root, blob_byte_length]`, where `blob_merkle_root` is exactly 32 bytes and `blob_byte_length` is a `uint64` encoded as a canonical RLP integer. The list MUST preserve blob order. EIP-8141's existing transaction signature hash therefore commits to each blob Merkle root and byte length. An empty `blob_commitments` list denotes a frame transaction that carries no blobs. A blob-carrying frame transaction is valid only if: |
There was a problem hiding this comment.
Expanded at first use.
|
|
||
| The builder MUST set `bid.blob_commitments` to the commitments returned with the execution payload, preserving transaction and blob order. Every commitment MUST satisfy `is_valid_blob_byte_length` and the sum of `blob_gas(commitment)` over the bid MUST NOT exceed the active `max_blob_gas`. | ||
|
|
||
| The maximum number of commitments that consensus-layer SSZ containers and networking limits must support is: |
There was a problem hiding this comment.
Suggestion: Expand SSZ at its first use.
| The maximum number of commitments that consensus-layer SSZ containers and networking limits must support is: | |
| The maximum number of commitments that consensus-layer Simple Serialize (SSZ) containers and networking limits must support is: |
There was a problem hiding this comment.
Expanded at first use.
* Specify LeanDA guest inputs and Reed–Solomon membership checks * Name the LeanDA field element type explicitly * Define FieldElement limbs and canonical byte encoding * Remove implementation link disallowed by EIP validation * Separate host challenge derivation and guest input steps * Simplify Reed–Solomon challenge terminology * Clarify hash primitives and simplify host step wording * Simplify guest membership-check wording * Remove redundant challenge-derivation sentence * Shorten field-element construction explanation * Describe challenge derivation without implementation comparison * State challenge rules independently of implementation details * Remove unnecessary proof serialization delegation * Name the Reed–Solomon challenge explicitly * Domain-separate the LeanDA public-input digest * Use layer-neutral host wording in security considerations * Use host terminology for general guest verification flow * Simplify guest public-input overview wording * Remove conditional post-quantum claim from security discussion * State the heuristic for complete challenge derivation * Simplify Reed-Solomon derivation to two seed-half challenges * Simplify challenge security assumptions and public-input prose * Remove repeated public-input security overview
|
The commit 2fd200b (as a parent of 1ed7f15) contains errors. |
|
We'll split the variable-size blob changes into a separate EIP and keep this proposal focused on post-quantum data availability. |
Early architectural draft for review. This proposal replaces PeerDAS KZG commitments and proofs with Merkle authentication and a LeanDA STARK, preserves column custody and sampling, introduces variable-size blobs, and integrates with EIP-8141 and EIP-8288.