Skip to content

Commit a1787c6

Browse files
Add and update types for Capella (#60)
* Add and update types for Capella * Fix schema validation by adding discriminator to response * Add builder api types for Capella * Fix incorrect comments * Regenerate builder.md TOC * Update beacon block examples to be more realistic * Fix bid schema field ordering Co-authored-by: Alex Stokes <[email protected]> * Fix capella bid field ordering * Restructure spec files * Add consensus version header to submitBlindedBlock request * Revert "Fix schema validation by adding discriminator to response" This reverts commit 702791c. * Fix validator spec heading Co-authored-by: Alex Stokes <[email protected]> * Update beacon API submodule to latest --------- Co-authored-by: Alex Stokes <[email protected]>
1 parent 540bcca commit a1787c6

File tree

15 files changed

+397
-15
lines changed

15 files changed

+397
-15
lines changed

apis/builder/blinded_blocks.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ post:
1111
`ExecutionPayloadHeader`, it must error.
1212
tags:
1313
- Builder
14+
parameters:
15+
- in: header
16+
schema:
17+
$ref: '../../beacon-apis/beacon-node-oapi.yaml#/components/schemas/ConsensusVersion'
18+
required: false
19+
name: Eth-Consensus-Version
20+
description: "Version of the block being submitted"
1421
requestBody:
1522
description: A `SignedBlindedBeaconBlock`.
1623
required: true
@@ -19,9 +26,12 @@ post:
1926
schema:
2027
oneOf:
2128
- $ref: "../../builder-oapi.yaml#/components/schemas/Bellatrix.SignedBlindedBeaconBlock"
29+
- $ref: "../../builder-oapi.yaml#/components/schemas/Capella.SignedBlindedBeaconBlock"
2230
examples:
2331
bellatrix:
2432
$ref: "../../builder-oapi.yaml#/components/examples/Bellatrix.SignedBlindedBeaconBlock"
33+
capella:
34+
$ref: "../../builder-oapi.yaml#/components/examples/Capella.SignedBlindedBeaconBlock"
2535

2636
responses:
2737
"200":
@@ -34,14 +44,17 @@ post:
3444
properties:
3545
version:
3646
type: string
37-
enum: [ bellatrix ]
47+
enum: [ bellatrix, capella ]
3848
example: "bellatrix"
3949
data:
4050
oneOf:
4151
- $ref: "../../builder-oapi.yaml#/components/schemas/Bellatrix.ExecutionPayload"
52+
- $ref: "../../builder-oapi.yaml#/components/schemas/Capella.ExecutionPayload"
4253
examples:
4354
bellatrix:
4455
$ref: "../../builder-oapi.yaml#/components/examples/Bellatrix.ExecutionPayload"
56+
capella:
57+
$ref: "../../builder-oapi.yaml#/components/examples/Capella.ExecutionPayload"
4558
"400":
4659
description: Error response.
4760
content:

apis/builder/header.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,17 @@ get:
5050
properties:
5151
version:
5252
type: string
53-
enum: [ bellatrix ]
53+
enum: [ bellatrix, capella ]
5454
example: "bellatrix"
5555
data:
5656
oneOf:
5757
- $ref: "../../builder-oapi.yaml#/components/schemas/Bellatrix.SignedBuilderBid"
58+
- $ref: "../../builder-oapi.yaml#/components/schemas/Capella.SignedBuilderBid"
5859
examples:
5960
bellatrix:
6061
$ref: "../../builder-oapi.yaml#/components/examples/Bellatrix.SignedBuilderBid"
62+
capella:
63+
$ref: "../../builder-oapi.yaml#/components/examples/Capella.SignedBuilderBid"
6164
"204":
6265
description: No header is available.
6366
"400":

beacon-apis

Submodule beacon-apis updated 96 files

builder-oapi.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ components:
6161
$ref: "./beacon-apis/types/bellatrix/execution_payload.yaml#/Bellatrix/ExecutionPayload"
6262
Bellatrix.SignedBlindedBeaconBlock:
6363
$ref: "./beacon-apis/types/bellatrix/block.yaml#/Bellatrix/SignedBlindedBeaconBlock"
64-
6564
Bellatrix.SignedBuilderBid:
6665
$ref: "./types/bellatrix/bid.yaml#/Bellatrix/SignedBuilderBid"
66+
Capella.ExecutionPayload:
67+
$ref: "./beacon-apis/types/capella/execution_payload.yaml#/Capella/ExecutionPayload"
68+
Capella.SignedBlindedBeaconBlock:
69+
$ref: "./beacon-apis/types/capella/block.yaml#/Capella/SignedBlindedBeaconBlock"
70+
Capella.SignedBuilderBid:
71+
$ref: "./types/capella/bid.yaml#/Capella/SignedBuilderBid"
6772
SignedValidatorRegistration:
6873
$ref: "./beacon-apis/types/registration.yaml#/SignedValidatorRegistration"
6974

70-
7175
responses:
7276
InternalError:
7377
$ref: "./types/http.yaml#/InternalError"
@@ -79,3 +83,9 @@ components:
7983
$ref: "./examples/bellatrix/execution_payload.json"
8084
Bellatrix.SignedBuilderBid:
8185
$ref: "./examples/bellatrix/signed_builder_bid.json"
86+
Capella.SignedBlindedBeaconBlock:
87+
$ref: "./examples/capella/signed_blinded_beacon_block.json"
88+
Capella.ExecutionPayload:
89+
$ref: "./examples/capella/execution_payload.json"
90+
Capella.SignedBuilderBid:
91+
$ref: "./examples/capella/signed_builder_bid.json"

examples/bellatrix/signed_blinded_beacon_block.json

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"deposit_count": "1",
1313
"block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
1414
},
15-
"graffiti": "0xdeadbeefc0ffee",
15+
"graffiti": "0xdeadbeefc0ffeedeadbeefc0ffeedeadbeefc0ffeedeadbeefc0ffeedeadbeef",
1616
"proposer_slashings": [
1717
{
1818
"signed_header_1": {
@@ -101,7 +101,39 @@
101101
"deposits": [
102102
{
103103
"proof": [
104-
"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
104+
"0xeeffb6c21a01d3abf09cd6c56e5d48f5ea0fc3bb0de906e3beea3e73776329cb",
105+
"0x601c3b24a99d023224d50811bed19449890febb719a31d09ac414c4632f3c0ba",
106+
"0xbb5e485e0a366e16510de33731d71204ad2fe0f7c600861fc2ac4685212c34e3",
107+
"0x0006964745296a3e6ebf3954a1541e73205f1eefaddfc48ca9dc856bf159bca2",
108+
"0x2c6020f1f9712b89f59550aec05b7c23cb1b113762399c0ca5b8fdd2fa85ce57",
109+
"0x1c15634783e1d9d2cb969da66fd72cafca5026191d911b83211318d183c5ea59",
110+
"0xdfbdf99a1fde57899df1545be1f91bc8a8a9f46c4bac619e28e92aff276de41f",
111+
"0xfe9b0f0c05fde6bd26ce63d394058844ad4451f70b6d2547f49c5c2a5c7891a1",
112+
"0x165f84ee467d18dbafdb07275dc42fb988ab696b0a7ad94c52f4d7a27144b994",
113+
"0x506d86582d252405b840018792cad2bf1259f1ef5aa5f887e13cb2f0094f51e1",
114+
"0xecdbe5e5056b968aa726a08f1aa33f5d41540eed42f59ace020431cf38a5144e",
115+
"0xc4498c5eb1feeb0b225a3f332bdf523dbc013a5b336a851fce1c055b4019a457",
116+
"0xb7d05f875f140027ef5118a2247bbb84ce8f2f0f1123623085daf7960c329f5f",
117+
"0x8a9b66ad79116c9fc6eed14bde76e8f486669e59b0b5bb0c60a6b3caea38b83d",
118+
"0x267c5455e4806b5d0ad5573552d0162e0983595bac25dacd9078174a2766643a",
119+
"0x27e0c6357985de4d6026d6da14f31e8bfe14524056fec69dc06d6f8a239344af",
120+
"0xf8455aebc24849bea870fbcef1235e2d27c8fd27db24e26d30d0173f3b207874",
121+
"0xaba01bf7fe57be4373f47ff8ea6adc4348fab087b69b2518ce630820f95f4150",
122+
"0xd47152335d9460f2b6fb7aba05ced32a52e9f46659ccd3daa2059661d75a6308",
123+
"0xf893e908917775b62bff23294dbbe3a1cd8e6cc1c35b4801887b646a6f81f17f",
124+
"0xcddba7b592e3133393c16194fac7431abf2f5485ed711db282183c819e08ebaa",
125+
"0x8a8d7fe3af8caa085a7639a832001457dfb9128a8061142ad0335629ff23ff9c",
126+
"0xfeb3c337d7a51a6fbf00b9e34c52e1c9195c969bd4e7a0bfd51d5c5bed9c1167",
127+
"0xe71f0aa83cc32edfbefa9f4d3e0174ca85182eec9f3a09f6a6c0df6377a510d7",
128+
"0x31206fa80a50bb6abe29085058f16212212a60eec8f049fecb92d8c8e0a84bc0",
129+
"0x21352bfecbeddde993839f614c3dac0a3ee37543f9b412b16199dc158e23b544",
130+
"0x619e312724bb6d7c3153ed9de791d764a366b389af13c58bf8a8d90481a46765",
131+
"0x7cdd2986268250628d0c10e385c58c6191e6fbe05191bcc04f133f2cea72c1c4",
132+
"0x848930bd7ba8cac54661072113fb278869e07bb8587f91392933374d017bcbe1",
133+
"0x8869ff2c22b28cc10510d9853292803328be4fb0e80495e8bb8d271f5b889636",
134+
"0xb5fe28e79f1b850f8658246ce9b6a1e7b49fc06db7143e8fe0b4f2b0c5523a5c",
135+
"0x985e929f70af28d0bdd1a90a808f977f597c7c778c489e98d3bd8910d31ac0f7",
136+
"0xf7ed070000000000000000000000000000000000000000000000000000000000"
105137
],
106138
"data": {
107139
"pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
@@ -144,4 +176,4 @@
144176
},
145177
"signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
146178
}
147-
}
179+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"value": {
3+
"version": "capella",
4+
"data": {
5+
"parent_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
6+
"fee_recipient": "0xabcf8e0d4e9587369b2301d0790347320302cc09",
7+
"state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
8+
"receipts_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
9+
"logs_bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
10+
"prev_randao": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
11+
"block_number": "1",
12+
"gas_limit": "1",
13+
"gas_used": "1",
14+
"timestamp": "1",
15+
"extra_data": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
16+
"base_fee_per_gas": "1",
17+
"block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
18+
"transactions": [
19+
"0x02f878831469668303f51d843b9ac9f9843b9aca0082520894c93269b73096998db66be0441e836d873535cb9c8894a19041886f000080c001a031cc29234036afbf9a1fb9476b463367cb1f957ac0b919b69bbc798436e604aaa018c4e9c3914eb27aadd0b91e10b18655739fcf8c1fc398763a9f1beecb8ddc86"
20+
],
21+
"withdrawals": [
22+
{
23+
"index": "1",
24+
"validator_index": "1",
25+
"address": "0xabcf8e0d4e9587369b2301d0790347320302cc09",
26+
"amount": "32000000000"
27+
}
28+
]
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)