Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
4 changes: 4 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ 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"
Node:
$ref: './types/fork_choice.yaml#/Node'
ExtraData:
Expand Down
33 changes: 33 additions & 0 deletions types/fulu/block_contents.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Fulu:
KZGProofs:
type: array
items:
$ref: "../primitive.yaml#/KZGProof"
minItems: 0
maxItems: 33554432 # FIELD_ELEMENTS_PER_EXT_BLOB * MAX_BLOB_COMMITMENTS_PER_BLOCK

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: "#/Fulu/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: "#/Fulu/KZGProofs"
blobs:
$ref: "../deneb/block_contents.yaml#/Deneb/Blobs"