Skip to content

Commit 6f55437

Browse files
ensi321nflaigrolfyone
authored
Add Deneb and Electra light client spec (#468)
Co-authored-by: Nico Flaig <[email protected]> Co-authored-by: Paul Harris <[email protected]>
1 parent 78380ff commit 6f55437

File tree

7 files changed

+166
-1
lines changed

7 files changed

+166
-1
lines changed

apis/beacon/light_client/bootstrap.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ get:
3232
anyOf:
3333
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientBootstrap'
3434
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientBootstrap'
35+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientBootstrap'
36+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientBootstrap'
3537
application/octet-stream:
3638
schema:
3739
description: "SSZ serialized `LightClientBootstrap` bytes. Use Accept header to choose this response type"

apis/beacon/light_client/finality_update.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ get:
2727
anyOf:
2828
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientFinalityUpdate'
2929
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientFinalityUpdate'
30+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientFinalityUpdate'
31+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientFinalityUpdate'
3032
application/octet-stream:
3133
schema:
3234
description: "SSZ serialized `LightClientFinalityUpdate` bytes. Use Accept header to choose this response type"

apis/beacon/light_client/optimistic_update.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ get:
2727
anyOf:
2828
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientOptimisticUpdate'
2929
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientOptimisticUpdate'
30+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientOptimisticUpdate'
31+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientOptimisticUpdate'
3032
application/octet-stream:
3133
schema:
3234
description: "SSZ serialized `LightClientOptimisticUpdate` bytes. Use Accept header to choose this response type"

apis/beacon/light_client/updates.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ get:
3737
anyOf:
3838
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.LightClientUpdate'
3939
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Capella.LightClientUpdate'
40+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Deneb.LightClientUpdate'
41+
- $ref: '../../../beacon-node-oapi.yaml#/components/schemas/Electra.LightClientUpdate'
4042
application/octet-stream:
4143
schema:
4244
description: |
@@ -60,7 +62,9 @@ get:
6062
| ------------------------------------------------------------------- | ------------------------------------- |
6163
| `GENESIS_FORK_VERSION` | n/a |
6264
| <nobr>`ALTAIR_FORK_VERSION` through `BELLATRIX_FORK_VERSION`</nobr> | `altair.LightClientUpdate` |
63-
| <nobr>`CAPELLA_FORK_VERSION` and later</nobr> | `capella.LightClientUpdate` |
65+
| <nobr>`CAPELLA_FORK_VERSION` </nobr> | `capella.LightClientUpdate` |
66+
| <nobr>`DENEB_FORK_VERSION` </nobr> | `deneb.LightClientUpdate` |
67+
| <nobr>`ELECTRA_FORK_VERSION` and later</nobr> | `electra.LightClientUpdate` |
6468
"400":
6569
description: Malformed or missing request parameter
6670
content:

beacon-node-oapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,14 @@ components:
383383
$ref: './types/deneb/block.yaml#/Deneb/BlindedBeaconBlock'
384384
Deneb.SignedBlindedBeaconBlock:
385385
$ref: './types/deneb/block.yaml#/Deneb/SignedBlindedBeaconBlock'
386+
Deneb.LightClientBootstrap:
387+
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientBootstrap'
388+
Deneb.LightClientUpdate:
389+
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientUpdate'
390+
Deneb.LightClientFinalityUpdate:
391+
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientFinalityUpdate'
392+
Deneb.LightClientOptimisticUpdate:
393+
$ref: './types/deneb/light_client.yaml#/Deneb/LightClientOptimisticUpdate'
386394
Blob:
387395
$ref: './types/primitive.yaml#/Blob'
388396
Deneb.BlobSidecars:
@@ -393,6 +401,14 @@ components:
393401
$ref: './types/electra/attester_slashing.yaml#/Electra/AttesterSlashing'
394402
Electra.SignedAggregateAndProof:
395403
$ref: './types/electra/validator.yaml#/Electra/SignedAggregateAndProof'
404+
Electra.LightClientBootstrap:
405+
$ref: './types/electra/light_client.yaml#/Electra/LightClientBootstrap'
406+
Electra.LightClientUpdate:
407+
$ref: './types/electra/light_client.yaml#/Electra/LightClientUpdate'
408+
Electra.LightClientFinalityUpdate:
409+
$ref: './types/electra/light_client.yaml#/Electra/LightClientFinalityUpdate'
410+
Electra.LightClientOptimisticUpdate:
411+
$ref: './types/electra/light_client.yaml#/Electra/LightClientOptimisticUpdate'
396412
Node:
397413
$ref: './types/fork_choice.yaml#/Node'
398414
ExtraData:

types/deneb/light_client.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
Deneb:
2+
LightClientHeader:
3+
type: object
4+
required: [beacon, execution, execution_branch]
5+
properties:
6+
beacon:
7+
$ref: '../block.yaml#/BeaconBlockHeader'
8+
execution:
9+
$ref: './execution_payload.yaml#/Deneb/ExecutionPayloadHeader'
10+
execution_branch:
11+
$ref: '../capella/light_client.yaml#/Capella/ExecutionBranch'
12+
13+
LightClientBootstrap:
14+
type: object
15+
required: [header, current_sync_committee, current_sync_committee_branch]
16+
properties:
17+
header:
18+
$ref: '#/Deneb/LightClientHeader'
19+
current_sync_committee:
20+
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
21+
current_sync_committee_branch:
22+
$ref: '../altair/light_client.yaml#/Altair/CurrentSyncCommitteeBranch'
23+
LightClientUpdate:
24+
type: object
25+
required: [attested_header, next_sync_committee, next_sync_committee_branch, finalized_header, finality_branch, sync_aggregate, signature_slot]
26+
properties:
27+
attested_header:
28+
$ref: '#/Deneb/LightClientHeader'
29+
next_sync_committee:
30+
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
31+
next_sync_committee_branch:
32+
$ref: '../altair/light_client.yaml#/Altair/NextSyncCommitteeBranch'
33+
finalized_header:
34+
$ref: '#/Deneb/LightClientHeader'
35+
finality_branch:
36+
$ref: '../altair/light_client.yaml#/Altair/FinalityBranch'
37+
sync_aggregate:
38+
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
39+
signature_slot:
40+
$ref: '../primitive.yaml#/Uint64'
41+
LightClientFinalityUpdate:
42+
type: object
43+
required: [attested_header, finalized_header, finality_branch, sync_aggregate, signature_slot]
44+
properties:
45+
attested_header:
46+
$ref: '#/Deneb/LightClientHeader'
47+
finalized_header:
48+
$ref: '#/Deneb/LightClientHeader'
49+
finality_branch:
50+
$ref: '../altair/light_client.yaml#/Altair/FinalityBranch'
51+
sync_aggregate:
52+
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
53+
signature_slot:
54+
$ref: '../primitive.yaml#/Uint64'
55+
LightClientOptimisticUpdate:
56+
type: object
57+
required: [attested_header, sync_aggregate, signature_slot]
58+
properties:
59+
attested_header:
60+
$ref: '#/Deneb/LightClientHeader'
61+
sync_aggregate:
62+
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
63+
signature_slot:
64+
$ref: '../primitive.yaml#/Uint64'

types/electra/light_client.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
Electra:
2+
FinalityBranch:
3+
type: array
4+
items:
5+
$ref: '../primitive.yaml#/Root'
6+
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"
7+
minItems: 7
8+
maxItems: 7
9+
CurrentSyncCommitteeBranch:
10+
type: array
11+
items:
12+
$ref: '../primitive.yaml#/Root'
13+
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"
14+
minItems: 6
15+
maxItems: 6
16+
NextSyncCommitteeBranch:
17+
type: array
18+
items:
19+
$ref: '../primitive.yaml#/Root'
20+
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"
21+
minItems: 6
22+
maxItems: 6
23+
24+
LightClientBootstrap:
25+
type: object
26+
required: [header, current_sync_committee, current_sync_committee_branch]
27+
properties:
28+
header:
29+
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
30+
current_sync_committee:
31+
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
32+
current_sync_committee_branch:
33+
$ref: '#/Electra/CurrentSyncCommitteeBranch'
34+
LightClientUpdate:
35+
type: object
36+
required: [attested_header, next_sync_committee, next_sync_committee_branch, finalized_header, finality_branch, sync_aggregate, signature_slot]
37+
properties:
38+
attested_header:
39+
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
40+
next_sync_committee:
41+
$ref: '../altair/sync_committee.yaml#/Altair/SyncCommittee'
42+
next_sync_committee_branch:
43+
$ref: '#/Electra/NextSyncCommitteeBranch'
44+
finalized_header:
45+
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
46+
finality_branch:
47+
$ref: '#/Electra/FinalityBranch'
48+
sync_aggregate:
49+
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
50+
signature_slot:
51+
$ref: '../primitive.yaml#/Uint64'
52+
LightClientFinalityUpdate:
53+
type: object
54+
required: [attested_header, finalized_header, finality_branch, sync_aggregate, signature_slot]
55+
properties:
56+
attested_header:
57+
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
58+
finalized_header:
59+
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
60+
finality_branch:
61+
$ref: '#/Electra/FinalityBranch'
62+
sync_aggregate:
63+
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
64+
signature_slot:
65+
$ref: '../primitive.yaml#/Uint64'
66+
LightClientOptimisticUpdate:
67+
type: object
68+
required: [attested_header, sync_aggregate, signature_slot]
69+
properties:
70+
attested_header:
71+
$ref: '../deneb/light_client.yaml#/Deneb/LightClientHeader'
72+
sync_aggregate:
73+
$ref: '../altair/sync_aggregate.yaml#/Altair/SyncAggregate'
74+
signature_slot:
75+
$ref: '../primitive.yaml#/Uint64'

0 commit comments

Comments
 (0)