-
Notifications
You must be signed in to change notification settings - Fork 201
PeerDAS - cell proof computation changes #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
28bb9fb
830696c
75d0336
a323f9f
24ac5cf
c5ccb8b
ca2af3f
2b314d5
937383b
1eda435
0923d3c
9fd03a4
a9134b6
19b8630
388af88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| Fulu: | ||
| BeaconBlockBodyCommon: | ||
| # An abstract object to collect the common fields between the BeaconBlockBody and the BlindedBeaconBlockBody objects | ||
| type: object | ||
| # TODO: update link once confirmed. | ||
| description: "The [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/fulu/beacon-chain.md#beaconblockbody) object from the CL Fulu spec." | ||
| required: | ||
| [ | ||
| randao_reveal, | ||
| eth1_data, | ||
| graffiti, | ||
| proposer_slashings, | ||
| attester_slashings, | ||
| attestations, | ||
| deposits, | ||
| voluntary_exits, | ||
| sync_aggregate, | ||
| bls_to_execution_changes, | ||
| blob_kzg_commitments, | ||
| ] | ||
| properties: | ||
| randao_reveal: | ||
| allOf: | ||
| - $ref: "../primitive.yaml#/Signature" | ||
| - description: "The RANDAO reveal value provided by the validator." | ||
| eth1_data: | ||
| $ref: "../phase0/eth1.yaml#/Phase0/Eth1Data" | ||
| graffiti: | ||
| $ref: "../primitive.yaml#/Graffiti" | ||
| proposer_slashings: | ||
| type: array | ||
| items: | ||
| $ref: "../phase0/proposer_slashing.yaml#/Phase0/ProposerSlashing" | ||
| attester_slashings: | ||
| type: array | ||
| items: | ||
| $ref: "./attester_slashing.yaml#/Electra/AttesterSlashing" | ||
| attestations: | ||
| type: array | ||
| items: | ||
| $ref: "./attestation.yaml#/Electra/Attestation" | ||
| deposits: | ||
| type: array | ||
| items: | ||
| $ref: "../phase0/deposit.yaml#/Phase0/Deposit" | ||
| voluntary_exits: | ||
| type: array | ||
| items: | ||
| $ref: "../phase0/voluntary_exit.yaml#/Phase0/SignedVoluntaryExit" | ||
| sync_aggregate: | ||
| $ref: "../altair/sync_aggregate.yaml#/Altair/SyncAggregate" | ||
| bls_to_execution_changes: | ||
| type: array | ||
| items: | ||
| $ref: "../capella/bls_to_execution_change.yaml#/Capella/SignedBLSToExecutionChange" | ||
| blob_kzg_commitments: | ||
| type: array | ||
| items: | ||
| $ref: "../primitive.yaml#/KZGCommitment" | ||
|
|
||
| BeaconBlockBody: | ||
| allOf: | ||
| - $ref: "#/Fulu/BeaconBlockBodyCommon" | ||
| - type: object | ||
| required: [execution_payload, execution_requests] | ||
| properties: | ||
| execution_payload: | ||
| $ref: "../fulu/execution_payload.yaml#/Fulu/ExecutionPayload" | ||
| execution_requests: | ||
| $ref: "./electra/execution_requests.yaml#/Electra/ExecutionRequests" | ||
|
|
||
| BeaconBlock: | ||
| # TODO: update link once confirmed. | ||
| description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/phase0/beacon-chain.md#beaconblock) object from the CL Fulu spec." | ||
| allOf: | ||
| - $ref: "../altair/block.yaml#/Altair/BeaconBlockCommon" | ||
| - type: object | ||
| required: [body] | ||
| properties: | ||
| body: | ||
| $ref: "#/Fulu/BeaconBlockBody" | ||
|
|
||
| SignedBeaconBlock: | ||
| type: object | ||
| # TODO: update link once confirmed. | ||
| description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Fulu spec." | ||
| required: [message, signature] | ||
| properties: | ||
| message: | ||
| $ref: "#/Fulu/BeaconBlock" | ||
| signature: | ||
| $ref: "../primitive.yaml#/Signature" | ||
|
|
||
| BlindedBeaconBlockBody: | ||
| # TODO: update link once confirmed. | ||
| description: "A variant of the [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/electra/beacon-chain.md#beaconblockbody) object from the CL Fulu spec, which contains a transactions root rather than a full transactions list." | ||
| allOf: | ||
| - $ref: "#/Fulu/BeaconBlockBodyCommon" | ||
| - type: object | ||
| required: [execution_payload_header, execution_requests] | ||
| properties: | ||
| execution_payload_header: | ||
| $ref: "../fulu/execution_payload.yaml#/Fulu/ExecutionPayloadHeader" | ||
| execution_requests: | ||
| $ref: "./electra/execution_requests.yaml#/Electra/ExecutionRequests" | ||
|
|
||
| BlindedBeaconBlock: | ||
| # TODO: update link once confirmed. | ||
| description: "A variant of the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/phase0/beacon-chain.md#beaconblock) object from the CL Fulu spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`." | ||
| allOf: | ||
| - $ref: "../altair/block.yaml#/Altair/BeaconBlockCommon" | ||
| - type: object | ||
| required: [body] | ||
| properties: | ||
| body: | ||
| $ref: "#/Fulu/BlindedBeaconBlockBody" | ||
|
|
||
| SignedBlindedBeaconBlock: | ||
| type: object | ||
| # TODO: update link once confirmed. | ||
| description: "A variant of the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/phase0/beacon-chain.md#signedbeaconblock) object envelope from the CL Fulu spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`." | ||
| required: [message, signature] | ||
| properties: | ||
| message: | ||
| $ref: "#/Fulu/BlindedBeaconBlock" | ||
| signature: | ||
| $ref: "../primitive.yaml#/Signature" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Fulu: | ||
| BlockContents: | ||
| type: object | ||
| description: "The required object for block production according to the Fulu CL spec." | ||
| required: [block, kzg_proofs, blobs] | ||
| properties: | ||
| block: | ||
| $ref: "../electra/block.yaml#/Electra/BeaconBlock" | ||
| kzg_proofs: | ||
| description: "Cell proofs of the blobs as defined in EIP-7594" | ||
| $ref: "../deneb/block_contents.yaml#/Deneb/KZGProofs" | ||
| blobs: | ||
| $ref: "../deneb/block_contents.yaml#/Deneb/Blobs" | ||
|
|
||
| SignedBlockContents: | ||
| type: object | ||
| description: "The required signed components of block production according to the Fulu CL spec." | ||
| required: [signed_block, kzg_proofs, blobs] | ||
| properties: | ||
| signed_block: | ||
| $ref: "../electra/block.yaml#/Electra/SignedBeaconBlock" | ||
| kzg_proofs: | ||
| description: "Cell proofs of the blobs as defined in EIP-7594" | ||
| $ref: "../deneb/block_contents.yaml#/Deneb/KZGProofs" | ||
nflaig marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| blobs: | ||
| $ref: "../deneb/block_contents.yaml#/Deneb/Blobs" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| Fulu: | ||
| ExecutionPayloadCommon: | ||
| # An abstract object to collect the common fields between the ExecutionPayload and the ExecutionPayloadHeader objects. | ||
| type: object | ||
| # TODO: update link once confirmed. | ||
| description: "The [`ExecutionPayload`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/fulu/beacon-chain.md#executionpayload) object from the CL Fulu spec." | ||
| required: | ||
| [ | ||
| parent_hash, | ||
| fee_recipient, | ||
| state_root, | ||
| receipts_root, | ||
| logs_bloom, | ||
| prev_randao, | ||
| block_number, | ||
| gas_limit, | ||
| gas_used, | ||
| timestamp, | ||
| extra_data, | ||
| base_fee_per_gas, | ||
| blob_gas_used, | ||
| excess_blob_gas, | ||
| block_hash, | ||
| ] | ||
| properties: | ||
| parent_hash: | ||
| $ref: "../primitive.yaml#/Root" | ||
| fee_recipient: | ||
| $ref: "../primitive.yaml#/ExecutionAddress" | ||
| state_root: | ||
| $ref: "../primitive.yaml#/Root" | ||
| receipts_root: | ||
| $ref: "../primitive.yaml#/Root" | ||
| logs_bloom: | ||
| $ref: "../primitive.yaml#/LogsBloom" | ||
| prev_randao: | ||
| $ref: "../primitive.yaml#/Bytes32" | ||
| block_number: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| gas_limit: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| gas_used: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| timestamp: | ||
| $ref: "../primitive.yaml#/Uint64" | ||
| extra_data: | ||
| $ref: "../primitive.yaml#/ExtraData" | ||
| base_fee_per_gas: | ||
| $ref: "../primitive.yaml#/Uint256" | ||
| blob_gas_used: | ||
| $ref: "../primitive.yaml#/Uint256" | ||
| excess_blob_gas: | ||
| $ref: "../primitive.yaml#/Uint256" | ||
| block_hash: | ||
| $ref: "../primitive.yaml#/Root" | ||
|
|
||
| ExecutionPayload: | ||
| allOf: | ||
| - $ref: "#/Fulu/ExecutionPayloadCommon" | ||
| - type: object | ||
| required: [transactions, withdrawals, proof_version] | ||
| properties: | ||
| transactions: | ||
| $ref: "../bellatrix/transactions.yaml#/Bellatrix/Transactions" | ||
| withdrawals: | ||
| $ref: "../capella/withdrawals.yaml#/Capella/Withdrawals" | ||
| proof_version: | ||
|
||
| $ref: "../primitive.yaml#/Uint8" | ||
|
|
||
| ExecutionPayloadHeader: | ||
| # TODO: update link once confirmed. | ||
| description: "The [`ExecutionPayloadHeader`](https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/beacon-chain.md#executionpayloadheader) object from the CL Deneb spec." | ||
0x00101010 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| allOf: | ||
| - $ref: "#/Fulu/ExecutionPayloadCommon" | ||
| - type: object | ||
| required: [transactions_root, withdrawals_root] | ||
| properties: | ||
| transactions_root: | ||
| $ref: "../primitive.yaml#/Root" | ||
| withdrawals_root: | ||
| $ref: "../primitive.yaml#/Root" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need a
Fulu.BlobSidecarsfor thegetBlobSidecarsendpoint? Could be in a separate PR though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, since max blob number is not determined, prefer to do it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blob count is not the only thing that changes - each blob sidecar has a KzgProof field that should be changed to plurals with cell proofs. I reckon we could set a high but realistic blob count for the current PeerDAS, to avoid having to update this endpoint on every BPO hard fork?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, will update it tomorrow with other changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or we could deprecate the current one and at a new
getDataColumnSidecars? I feel like this is something consumers should give feedback on before doing something, afaik, L2 clients use those apisThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'd probably want
getBlobsSidecarV2for blob consumers (L2s).DataColumnSidecarsis unlikely useful to end users - it's a CL-specific structure used for sample distribution and requires extra effort to convert into blobs, which L2 users are unlikely interested in. There could be use cases I'm missing though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how would a CL be able to reconstruct the blob if it's not a supernode? and is there any reason why we need a v2 api, the current api is fork-aware so can change the type if required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's kick off the discussion on getBlobsSidecar/V2 api, let's do it in a separate PR to speed up merging this one