Skip to content
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

Add Deneb and Electra light client spec #468

Merged
merged 5 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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: 2 additions & 0 deletions apis/beacon/light_client/bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ get:
anyOf:
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientBootstrap'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientBootstrap'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientBootstrap'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientBootstrap'
application/octet-stream:
schema:
description: "SSZ serialized `LightClientBootstrap` bytes. Use Accept header to choose this response type"
Expand Down
2 changes: 2 additions & 0 deletions apis/beacon/light_client/finality_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ get:
anyOf:
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientFinalityUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientFinalityUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientFinalityUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientFinalityUpdate'
application/octet-stream:
schema:
description: "SSZ serialized `LightClientFinalityUpdate` bytes. Use Accept header to choose this response type"
Expand Down
2 changes: 2 additions & 0 deletions apis/beacon/light_client/optimistic_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ get:
anyOf:
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientOptimisticUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientOptimisticUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientOptimisticUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientOptimisticUpdate'
application/octet-stream:
schema:
description: "SSZ serialized `LightClientOptimisticUpdate` bytes. Use Accept header to choose this response type"
Expand Down
6 changes: 5 additions & 1 deletion apis/beacon/light_client/updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ get:
anyOf:
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientUpdate'
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientUpdate'
application/octet-stream:
schema:
description: |
Expand All @@ -60,7 +62,9 @@ get:
| ------------------------------------------------------------------- | ------------------------------------- |
| `GENESIS_FORK_VERSION` | n/a |
| <nobr>`ALTAIR_FORK_VERSION` through `BELLATRIX_FORK_VERSION`</nobr> | `altair.LightClientUpdate` |
| <nobr>`CAPELLA_FORK_VERSION` and later</nobr> | `capella.LightClientUpdate` |
| <nobr>`CAPELLA_FORK_VERSION` </nobr> | `capella.LightClientUpdate` |
| <nobr>`DENEB_FORK_VERSION` </nobr> | `deneb.LightClientUpdate` |
| <nobr>`ELECTRA_FORK_VERSION` and later</nobr> | `electra.LightClientUpdate` |
"400":
description: Malformed or missing request parameter
content:
Expand Down
16 changes: 16 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,14 @@ components:
$ref: './types/deneb/block.yaml#/Deneb/BlindedBeaconBlock'
Deneb.SignedBlindedBeaconBlock:
$ref: './types/deneb/block.yaml#/Deneb/SignedBlindedBeaconBlock'
Deneb.LightClientBootstrap:
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientBootstrap'
Deneb.LightClientUpdate:
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientUpdate'
Deneb.LightClientFinalityUpdate:
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientFinalityUpdate'
Deneb.LightClientOptimisticUpdate:
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientOptimisticUpdate'
Blob:
$ref: './types/primitive.yaml#/Blob'
Deneb.BlobSidecars:
Expand All @@ -393,6 +401,14 @@ components:
$ref: './types/electra/attester_slashing.yaml#/Electra/AttesterSlashing'
Electra.SignedAggregateAndProof:
$ref: './types/electra/validator.yaml#/Electra/SignedAggregateAndProof'
Electra.LightClientBootstrap:
$ref: './types/electra/light_client.yaml#/Electra/LightClientBootstrap'
Electra.LightClientUpdate:
$ref: './types/electra/light_client.yaml#/Electra/LightClientUpdate'
Electra.LightClientFinalityUpdate:
$ref: './types/electra/light_client.yaml#/Electra/LightClientFinalityUpdate'
Electra.LightClientOptimisticUpdate:
$ref: './types/electra/light_client.yaml#/Electra/LightClientOptimisticUpdate'
Node:
$ref: './types/fork_choice.yaml#/Node'
ExtraData:
Expand Down
64 changes: 64 additions & 0 deletions types/deneb/light_client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Deneb:
LightClientHeader:
type: object
required: [beacon, execution, execution_branch]
properties:
beacon:
$ref: '../block.yaml#/BeaconBlockHeader'
execution:
$ref: './execution_payload.yaml#/Deneb/ExecutionPayloadHeader'
execution_branch:
$ref: '../capella/light_client.yaml#/Capella/ExecutionBranch'

LightClientBootstrap:
type: object
required: [header, current_sync_committee, current_sync_committee_branch]
properties:
header:
$ref: '#/Deneb/LightClientHeader'
current_sync_committee:
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
current_sync_committee_branch:
$ref: '../altair/light_client.yaml#/Altair/CurrentSyncCommitteeBranch'
LightClientUpdate:
type: object
required: [attested_header, next_sync_committee, next_sync_committee_branch, finalized_header, finality_branch, sync_aggregate, signature_slot]
properties:
attested_header:
$ref: '#/Deneb/LightClientHeader'
next_sync_committee:
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
next_sync_committee_branch:
$ref: '../altair/light_client.yaml#/Altair/NextSyncCommitteeBranch'
finalized_header:
$ref: '#/Deneb/LightClientHeader'
finality_branch:
$ref: '../altair/light_client.yaml#/Altair/FinalityBranch'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
signature_slot:
$ref: '../primitive.yaml#/Uint64'
LightClientFinalityUpdate:
type: object
required: [attested_header, finalized_header, finality_branch, sync_aggregate, signature_slot]
properties:
attested_header:
$ref: '#/Deneb/LightClientHeader'
finalized_header:
$ref: '#/Deneb/LightClientHeader'
finality_branch:
$ref: '../altair/light_client.yaml#/Altair/FinalityBranch'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
signature_slot:
$ref: '../primitive.yaml#/Uint64'
LightClientOptimisticUpdate:
type: object
required: [attested_header, sync_aggregate, signature_slot]
properties:
attested_header:
$ref: '#/Deneb/LightClientHeader'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
signature_slot:
$ref: '../primitive.yaml#/Uint64'
75 changes: 75 additions & 0 deletions types/electra/light_client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Electra:
FinalityBranch:
type: array
items:
$ref: '../primitive.yaml#/Root'
description: "Merkle proof consisting of [`log2trunc(FINALIZED_ROOT_GINDEX_ELECTRA])`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/electra/light-client/sync-protocol.md#constants) roots"
minItems: 7
maxItems: 7
CurrentSyncCommitteeBranch:
type: array
items:
$ref: '../primitive.yaml#/Root'
description: "Merkle proof consisting of [`log2trunc(CURRENT_SYNC_COMMITTEE_GINDEX_ELECTRA])`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/electra/light-client/sync-protocol.md#constants) roots"
minItems: 6
maxItems: 6
NextSyncCommitteeBranch:
type: array
items:
$ref: '../primitive.yaml#/Root'
description: "Merkle proof consisting of [`log2trunc(NEXT_SYNC_COMMITTEE_GINDEX_ELECTRA])`](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/electra/light-client/sync-protocol.md#constants) roots"
minItems: 6
maxItems: 6

LightClientBootstrap:
type: object
required: [header, current_sync_committee, current_sync_committee_branch]
properties:
header:
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
current_sync_committee:
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
current_sync_committee_branch:
$ref: '#/Electra/CurrentSyncCommitteeBranch'
LightClientUpdate:
type: object
required: [attested_header, next_sync_committee, next_sync_committee_branch, finalized_header, finality_branch, sync_aggregate, signature_slot]
properties:
attested_header:
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
next_sync_committee:
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
next_sync_committee_branch:
$ref: '#/Electra/NextSyncCommitteeBranch'
finalized_header:
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
finality_branch:
$ref: '#/Electra/FinalityBranch'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
signature_slot:
$ref: '../primitive.yaml#/Uint64'
LightClientFinalityUpdate:
type: object
required: [attested_header, finalized_header, finality_branch, sync_aggregate, signature_slot]
properties:
attested_header:
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
finalized_header:
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
finality_branch:
$ref: '#/Electra/FinalityBranch'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
signature_slot:
$ref: '../primitive.yaml#/Uint64'
LightClientOptimisticUpdate:
type: object
required: [attested_header, sync_aggregate, signature_slot]
properties:
attested_header:
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
sync_aggregate:
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
signature_slot:
$ref: '../primitive.yaml#/Uint64'