Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apis/beacon/blocks/blinded_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get:
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb, electra]
enum: [phase0, altair, bellatrix, capella, deneb, electra, fulu]
example: "electra"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand Down
2 changes: 1 addition & 1 deletion apis/beacon/blocks/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ get:
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella, deneb, electra]
enum: [phase0, altair, bellatrix, capella, deneb, electra, fulu]
example: "electra"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand Down
1 change: 1 addition & 0 deletions apis/beacon/blocks/blocks.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ post:
application/json:
schema:
anyOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Fulu.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock"
Expand Down
1 change: 1 addition & 0 deletions apis/beacon/blocks/blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ post:
application/json:
schema:
anyOf:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Fulu.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Electra.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlockContents"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock"
Expand Down
8 changes: 8 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,14 @@ components:
$ref: './types/electra/consolidation.yaml#/Electra/PendingConsolidation'
Electra.PendingPartialWithdrawal:
$ref: './types/electra/withdrawal.yaml#/Electra/PendingPartialWithdrawal'
Fulu.BlockContents:
Copy link
Contributor

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.BlobSidecars for the getBlobSidecars endpoint? Could be in a separate PR though.

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Member

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.BlobSidecars for the getBlobSidecars endpoint? Could be in a separate PR though.

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 apis

Copy link
Contributor

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 getBlobsSidecarV2 for blob consumers (L2s). DataColumnSidecars is 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.

Copy link
Member

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 getBlobsSidecarV2 for blob consumers (L2s)

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

Copy link
Contributor Author

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

$ref: "./types/fulu/block_contents.yaml#/Fulu/BlockContents"
Fulu.SignedBlockContents:
$ref: "./types/fulu/block_contents.yaml#/Fulu/SignedBlockContents"
Fulu.BeaconBlock:
$ref: "./types/fulu/block.yaml#/Fulu/BeaconBlock"
Fulu.SignedBeaconBlock:
$ref: "./types/fulu/block.yaml#/Fulu/SignedBeaconBlock"
Node:
$ref: './types/fork_choice.yaml#/Node'
ExtraData:
Expand Down
127 changes: 127 additions & 0 deletions types/fulu/block.yaml
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"
26 changes: 26 additions & 0 deletions types/fulu/block_contents.yaml
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"
blobs:
$ref: "../deneb/block_contents.yaml#/Deneb/Blobs"
81 changes: 81 additions & 0 deletions types/fulu/execution_payload.yaml
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the only field that actually changes compared to Electra which requires to update BeaconBlockBody? I can't find that in the CL spec

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is the only field change, also cc @jtraglia to see if we want to add that to CL spec

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also cc @jtraglia to see if we want to add that to CL spec

that would be good otherwise I am not sure how to merge this as beacon-api generally follows the consensus spec, but we can merge this soon, just wanna do another minor release for Electra before that in a few days

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry just now seeing this. I will make a PR for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0x00101010 why do we have the proof version here?

the proof version byte is just to disambiguate the EL wrapper, i don't see where it leaks into the CL at all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed Fulu BeaconBlock / SignedBeaconBlock / ExecutionPayload, since it does not change, we can reuse the Electra definition

$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."
allOf:
- $ref: "#/Fulu/ExecutionPayloadCommon"
- type: object
required: [transactions_root, withdrawals_root]
properties:
transactions_root:
$ref: "../primitive.yaml#/Root"
withdrawals_root:
$ref: "../primitive.yaml#/Root"