Skip to content

Commit

Permalink
Introduce Deneb to remove EIP-4844 references (#289)
Browse files Browse the repository at this point in the history
* Update types to support EIP-4844 (#271)

Co-authored-by: 0xGabi <[email protected]>
Co-authored-by: Paul Harris <[email protected]>

Co-authored-by: Jimmy Chen <[email protected]>
Co-authored-by: 0xGabi <[email protected]>
  • Loading branch information
3 people authored May 2, 2023
1 parent ec5f935 commit 435c140
Show file tree
Hide file tree
Showing 17 changed files with 319 additions and 17 deletions.
11 changes: 8 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ These endpoints have been added or updated since the last release.

There are likely to be descriptions etc outside of the list below, but new query parameters, changes to headers, new endpoints should be listed.

| Endpoint | [Lighthouse](https://github.com/sigp/lighthouse) | [Lodestar](https://github.com/ChainSafe/lodestar) | [Nimbus](https://github.com/status-im/nimbus-eth2) | [Prysm](https://github.com/prysmaticlabs/prysm) | [Teku](https://github.com/ConsenSys/teku) |
|---------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------|----------------------------------------------------|-------------------------------------------------|-------------------------------------------|
| [#316](https://github.com/ethereum/beacon-APIs/pull/316) `/eth/v2/debug/beacon/states` added `historical_summaries` to response | | | | | |
| Endpoint | [Lighthouse](https://github.com/sigp/lighthouse) | [Lodestar](https://github.com/ChainSafe/lodestar) | [Nimbus](https://github.com/status-im/nimbus-eth2) | [Prysm](https://github.com/prysmaticlabs/prysm) | [Teku](https://github.com/ConsenSys/teku) |
|---------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------|----------------------------------------------------|-------------------------------------------------|-------------------------------------------|
| [#316](https://github.com/ethereum/beacon-APIs/pull/316) `/eth/v2/debug/beacon/states` added `historical_summaries` to response | | | | | |
| [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v2/debug/beacon/states` added `deneb` state to response | | | | | |
| [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v1/beacon/blinded_blocks/{block_id}` added `deneb` blinded block to response | | | | | |
| [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v2/beacon/blocks/{block_id}` added `deneb` block to response | | | | | |
| [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v1/validator/blinded_blocks/{slot}` added `deneb` blinded block | | | | | |
| [#289](https://github.com/ethereum/beacon-APIs/pull/289) `/eth/v1/validator/blocks/{slot}` added `deneb` block | | | | | |

The Following are no longer in the Standard API, removed since the latest version.

Expand Down
3 changes: 2 additions & 1 deletion apis/beacon/blocks/blinded_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ get:
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella]
enum: [phase0, altair, bellatrix, capella, deneb]
example: "phase0"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand All @@ -37,6 +37,7 @@ get:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use Accept header to choose this response type"
Expand Down
1 change: 1 addition & 0 deletions apis/beacon/blocks/blinded_blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ post:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body."
Expand Down
3 changes: 2 additions & 1 deletion apis/beacon/blocks/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ get:
properties:
version:
type: string
enum: [phase0, altair, bellatrix, capella]
enum: [phase0, altair, bellatrix, capella, deneb]
example: "phase0"
execution_optimistic:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand All @@ -37,6 +37,7 @@ get:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBeaconBlock"
application/octet-stream:
schema:

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 @@ -30,6 +30,7 @@ post:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Capella.SignedBeaconBlock"
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Deneb.SignedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use content type header to indicate that SSZ data is contained in the request body."
Expand Down
3 changes: 2 additions & 1 deletion apis/debug/state.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ get:
properties:
version:
type: string
enum: [ phase0, altair, bellatrix, capella ]
enum: [ phase0, altair, bellatrix, capella, deneb ]
example: "phase0"
execution_optimistic:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic"
Expand All @@ -37,6 +37,7 @@ get:
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconState"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BeaconState"
application/octet-stream:
schema:
description: "SSZ serialized state bytes. Use Accept header to choose this response type"
Expand Down
3 changes: 2 additions & 1 deletion apis/validator/blinded_block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ get:
properties:
version:
type: string
enum: [ phase0, altair, bellatrix, capella ]
enum: [ phase0, altair, bellatrix, capella, deneb ]
example: "bellatrix"
data:
oneOf:
- $ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock'
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BlindedBeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BlindedBeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BlindedBeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`."
Expand Down
3 changes: 2 additions & 1 deletion apis/validator/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ get:
properties:
version:
type: string
enum: [ phase0, altair, bellatrix, capella ]
enum: [ phase0, altair, bellatrix, capella, deneb ]
example: "phase0"
data:
oneOf:
- $ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconBlock'
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Altair.BeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.BeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Capella.BeaconBlock"
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/Deneb.BeaconBlock"
application/octet-stream:
schema:
description: "SSZ serialized block bytes. Use Accept header to choose this response type, version string is sent in header `Eth-Consensus-Version`."
Expand Down
12 changes: 11 additions & 1 deletion beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ components:
Bellatrix.SignedBlindedBeaconBlock:
$ref: './types/bellatrix/block.yaml#/Bellatrix/SignedBlindedBeaconBlock'
ConsensusVersion:
enum: [phase0, altair, bellatrix, capella]
enum: [phase0, altair, bellatrix, capella, deneb]
example: "phase0"
SignedValidatorRegistration:
$ref: './types/registration.yaml#/SignedValidatorRegistration'
Expand All @@ -346,6 +346,16 @@ components:
$ref: './types/capella/light_client.yaml#/Capella/LightClientFinalityUpdate'
Capella.LightClientOptimisticUpdate:
$ref: './types/capella/light_client.yaml#/Capella/LightClientOptimisticUpdate'
Deneb.BeaconState:
$ref: './types/deneb/state.yaml#/Deneb/BeaconState'
Deneb.BeaconBlock:
$ref: './types/deneb/block.yaml#/Deneb/BeaconBlock'
Deneb.SignedBeaconBlock:
$ref: './types/deneb/block.yaml#/Deneb/SignedBeaconBlock'
Deneb.BlindedBeaconBlock:
$ref: './types/deneb/block.yaml#/Deneb/BlindedBeaconBlock'
Deneb.SignedBlindedBeaconBlock:
$ref: './types/deneb/block.yaml#/Deneb/SignedBlindedBeaconBlock'
Capella.Withdrawal:
$ref: './types/withdrawal.yaml#/Withdrawal'
Node:
Expand Down
1 change: 1 addition & 0 deletions types/bellatrix/execution_payload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Bellatrix:
allOf:
- $ref: '#/Bellatrix/ExecutionPayloadCommon'
- type: object
additionalProperties: false
properties:
transactions_root:
$ref: '../primitive.yaml#/Root'
12 changes: 4 additions & 8 deletions types/capella/block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Capella:
$ref: '../voluntary_exit.yaml#/SignedVoluntaryExit'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
bls_to_execution_changes:
type: array
items:
$ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange'

BeaconBlockBody:
allOf:
Expand All @@ -42,10 +46,6 @@ Capella:
properties:
execution_payload:
$ref: './execution_payload.yaml#/Capella/ExecutionPayload'
bls_to_execution_changes:
type: array
items:
$ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange'

BeaconBlock:
description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#beaconblock) object from the CL Capella spec."
Expand Down Expand Up @@ -73,10 +73,6 @@ Capella:
properties:
execution_payload_header:
$ref: './execution_payload.yaml#/Capella/ExecutionPayloadHeader'
bls_to_execution_changes:
type: array
items:
$ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange'

BlindedBeaconBlock:
description: "A variant of the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/phase0/beacon-chain.md#beaconblock) object from the CL Capella spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`."
Expand Down
1 change: 1 addition & 0 deletions types/capella/execution_payload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Capella:
allOf:
- $ref: '#/Capella/ExecutionPayloadCommon'
- type: object
additionalProperties: false
properties:
transactions_root:
$ref: '../primitive.yaml#/Root'
Expand Down
97 changes: 97 additions & 0 deletions types/deneb/block.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Deneb:
BeaconBlockBodyCommon:
# An abstract object to collect the common fields between the BeaconBlockBody and the BlindedBeaconBlockBody objects
type: object
description: "The [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#beaconblockbody) object from the CL Deneb spec."
properties:
randao_reveal:
allOf:
- $ref: '../primitive.yaml#/Signature'
- description: "The RanDAO reveal value provided by the validator."
eth1_data:
$ref: '../eth1.yaml#/Eth1Data'
graffiti:
$ref: '../primitive.yaml#/Graffiti'
proposer_slashings:
type: array
items:
$ref: '../proposer_slashing.yaml#/ProposerSlashing'
attester_slashings:
type: array
items:
$ref: '../attester_slashing.yaml#/AttesterSlashing'
attestations:
type: array
items:
$ref: '../attestation.yaml#/Attestation'
deposits:
type: array
items:
$ref: '../deposit.yaml#/Deposit'
voluntary_exits:
type: array
items:
$ref: '../voluntary_exit.yaml#/SignedVoluntaryExit'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
bls_to_execution_changes:
type: array
items:
$ref: '../bls_to_execution_change.yaml#/SignedBLSToExecutionChange'
blob_kzg_commitments:
type: array
items:
$ref: '../primitive.yaml#/KZGCommitment'

BeaconBlockBody:
allOf:
- $ref: '#/Deneb/BeaconBlockBodyCommon'
- type: object
properties:
execution_payload:
$ref: './execution_payload.yaml#/Deneb/ExecutionPayload'

BeaconBlock:
description: "The [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#beaconblock) object from the CL Deneb spec."
allOf:
- $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon'
- type: object
properties:
body:
$ref: '#/Deneb/BeaconBlockBody'

SignedBeaconBlock:
type: object
description: "The [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec."
properties:
message:
$ref: "#/Deneb/BeaconBlock"
signature:
$ref: "../primitive.yaml#/Signature"

BlindedBeaconBlockBody:
description: "A variant of the [`BeaconBlockBody`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#beaconblockbody) object from the CL Deneb spec, which contains a transactions root rather than a full transactions list."
allOf:
- $ref: '#/Deneb/BeaconBlockBodyCommon'
- type: object
properties:
execution_payload_header:
$ref: './execution_payload.yaml#/Deneb/ExecutionPayloadHeader'

BlindedBeaconBlock:
description: "A variant of the the [`BeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#beaconblock) object from the CL Deneb spec, which contains a `BlindedBeaconBlockBody` rather than a `BeaconBlockBody`."
allOf:
- $ref: '../altair/block.yaml#/Altair/BeaconBlockCommon'
- type: object
properties:
body:
$ref: '#/Deneb/BlindedBeaconBlockBody'

SignedBlindedBeaconBlock:
type: object
description: "A variant of the the the [`SignedBeaconBlock`](https://github.com/ethereum/consensus-specs/blob/master/specs/deneb/beacon-chain.md#signedbeaconblock) object envelope from the CL Deneb spec, which contains a `BlindedBeaconBlock` rather than a `BeaconBlock`."
properties:
message:
$ref: "#/Deneb/BlindedBeaconBlock"
signature:
$ref: "../primitive.yaml#/Signature"
29 changes: 29 additions & 0 deletions types/deneb/block_and_blobs_sidecar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Deneb:
BlobsSidecar:
type: object
description: "The `BlobsSidecar` object from the Deneb CL spec."
properties:
beacon_block_root:
$ref: "../primitive.yaml#/Root"
beacon_block_slot:
$ref: "../primitive.yaml#/Uint64"
blobs:
type: array
maxItems: 4
minItems: 0
items:
$ref: "#/Deneb/Blob"
kzg_aggregated_proof:
$ref: "#/Deneb/KZGProof"

KZGProof:
type: string
format: hex
pattern: "^0x[a-fA-F0-9]{96}$"
description: "An aggregated KZG proof. Same check as `KZGCommitment`"

Blob:
type: string
format: hex
pattern: "^0x[a-fA-F0-9]{262144}$"
description: "A blob is `FIELD_ELEMENTS_PER_BLOB * size_of(BLSFieldElement) = 4096 * 32 = 131072` bytes (`DATA`) representing a SSZ-encoded Blob as defined in Deneb"
Loading

0 comments on commit 435c140

Please sign in to comment.