Skip to content

Commit 62334a9

Browse files
authored
beacon: update beacon light client for fusaka (#33272)
This PR adds the "FULU" beacon chain config entries for all networks and fixes the select statements that choose the appropriate engine API call versions (no new version there but the "default" was always the first version; now it's the latest version so no need to change unless there is actually a new version). New beacon checkpoints are also added for mainnet, sepolia and hoodi (not for holesky because it's not finalizing at the moment). Note that though unrelated to fusaka, the log indexer checkpoints are also updated for mainnet (not for the other testnets, mainly because I only have mainnet synced here on my travel SSD; this should be fine though because the index is also reverse generated for a year by default so it does not really affect the indexing time) Links for the new checkpoints: https://beaconcha.in/slot/13108192 https://light-sepolia.beaconcha.in/slot/9032384 https://hoodi.beaconcha.in/slot/1825728
1 parent 960c87a commit 62334a9

File tree

6 files changed

+67
-37
lines changed

6 files changed

+67
-37
lines changed

beacon/blsync/engineclient.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,16 @@ func (ec *engineClient) callNewPayload(fork string, event types.ChainHeadEvent)
101101
params = []any{execData}
102102
)
103103
switch fork {
104-
case "electra":
104+
case "altair", "bellatrix":
105+
method = "engine_newPayloadV1"
106+
case "capella":
107+
method = "engine_newPayloadV2"
108+
case "deneb":
109+
method = "engine_newPayloadV3"
110+
parentBeaconRoot := event.BeaconHead.ParentRoot
111+
blobHashes := collectBlobHashes(event.Block)
112+
params = append(params, blobHashes, parentBeaconRoot)
113+
default: // electra, fulu and above
105114
method = "engine_newPayloadV4"
106115
parentBeaconRoot := event.BeaconHead.ParentRoot
107116
blobHashes := collectBlobHashes(event.Block)
@@ -110,15 +119,6 @@ func (ec *engineClient) callNewPayload(fork string, event types.ChainHeadEvent)
110119
hexRequests[i] = hexutil.Bytes(event.ExecRequests[i])
111120
}
112121
params = append(params, blobHashes, parentBeaconRoot, hexRequests)
113-
case "deneb":
114-
method = "engine_newPayloadV3"
115-
parentBeaconRoot := event.BeaconHead.ParentRoot
116-
blobHashes := collectBlobHashes(event.Block)
117-
params = append(params, blobHashes, parentBeaconRoot)
118-
case "capella":
119-
method = "engine_newPayloadV2"
120-
default:
121-
method = "engine_newPayloadV1"
122122
}
123123

124124
ctx, cancel := context.WithTimeout(ec.rootCtx, time.Second*5)
@@ -145,12 +145,12 @@ func (ec *engineClient) callForkchoiceUpdated(fork string, event types.ChainHead
145145

146146
var method string
147147
switch fork {
148-
case "deneb", "electra":
149-
method = "engine_forkchoiceUpdatedV3"
148+
case "altair", "bellatrix":
149+
method = "engine_forkchoiceUpdatedV1"
150150
case "capella":
151151
method = "engine_forkchoiceUpdatedV2"
152-
default:
153-
method = "engine_forkchoiceUpdatedV1"
152+
default: // deneb, electra, fulu and above
153+
method = "engine_forkchoiceUpdatedV3"
154154
}
155155

156156
ctx, cancel := context.WithTimeout(ec.rootCtx, time.Second*5)

beacon/params/checkpoint_hoodi.hex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0x1bbf958008172591b6cbdb3d8d52e26998258e83d4bdb9eec10969d84519a6bd
1+
0xbb7a7f3c40d8ea0b450f91587db65d0f1c079669277e01a0426c8911702a863a
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0x2fe39a39b6f7cbd549e0f74d259de6db486005a65bd3bd92840dd6ce21d6f4c8
1+
0x2af778d703186526a1b6304b423f338f11556206f618643c3f7fa0d7b1ef5c9b
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0x86686b2b366e24134e0e3969a9c5f3759f92e5d2b04785b42e22cc7d468c2107
1+
0x48a89c9ea7ba19de2931797974cf8722344ab231c0edada278b108ef74125478

beacon/params/networks.go

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,39 @@ var (
4040
GenesisTime: 1606824023,
4141
Checkpoint: common.HexToHash(checkpointMainnet),
4242
}).
43-
AddFork("GENESIS", 0, []byte{0, 0, 0, 0}).
44-
AddFork("ALTAIR", 74240, []byte{1, 0, 0, 0}).
45-
AddFork("BELLATRIX", 144896, []byte{2, 0, 0, 0}).
46-
AddFork("CAPELLA", 194048, []byte{3, 0, 0, 0}).
47-
AddFork("DENEB", 269568, []byte{4, 0, 0, 0}).
48-
AddFork("ELECTRA", 364032, []byte{5, 0, 0, 0})
43+
AddFork("GENESIS", 0, common.FromHex("0x00000000")).
44+
AddFork("ALTAIR", 74240, common.FromHex("0x01000000")).
45+
AddFork("BELLATRIX", 144896, common.FromHex("0x02000000")).
46+
AddFork("CAPELLA", 194048, common.FromHex("0x03000000")).
47+
AddFork("DENEB", 269568, common.FromHex("0x04000000")).
48+
AddFork("ELECTRA", 364032, common.FromHex("0x05000000")).
49+
AddFork("FULU", 411392, common.FromHex("0x06000000"))
4950

5051
SepoliaLightConfig = (&ChainConfig{
5152
GenesisValidatorsRoot: common.HexToHash("0xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078"),
5253
GenesisTime: 1655733600,
5354
Checkpoint: common.HexToHash(checkpointSepolia),
5455
}).
55-
AddFork("GENESIS", 0, []byte{144, 0, 0, 105}).
56-
AddFork("ALTAIR", 50, []byte{144, 0, 0, 112}).
57-
AddFork("BELLATRIX", 100, []byte{144, 0, 0, 113}).
58-
AddFork("CAPELLA", 56832, []byte{144, 0, 0, 114}).
59-
AddFork("DENEB", 132608, []byte{144, 0, 0, 115}).
60-
AddFork("ELECTRA", 222464, []byte{144, 0, 0, 116})
56+
AddFork("GENESIS", 0, common.FromHex("0x90000069")).
57+
AddFork("ALTAIR", 50, common.FromHex("0x90000070")).
58+
AddFork("BELLATRIX", 100, common.FromHex("0x90000071")).
59+
AddFork("CAPELLA", 56832, common.FromHex("0x90000072")).
60+
AddFork("DENEB", 132608, common.FromHex("0x90000073")).
61+
AddFork("ELECTRA", 222464, common.FromHex("0x90000074")).
62+
AddFork("FULU", 272640, common.FromHex("0x90000075"))
6163

6264
HoleskyLightConfig = (&ChainConfig{
6365
GenesisValidatorsRoot: common.HexToHash("0x9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1"),
6466
GenesisTime: 1695902400,
6567
Checkpoint: common.HexToHash(checkpointHolesky),
6668
}).
67-
AddFork("GENESIS", 0, []byte{1, 1, 112, 0}).
68-
AddFork("ALTAIR", 0, []byte{2, 1, 112, 0}).
69-
AddFork("BELLATRIX", 0, []byte{3, 1, 112, 0}).
70-
AddFork("CAPELLA", 256, []byte{4, 1, 112, 0}).
71-
AddFork("DENEB", 29696, []byte{5, 1, 112, 0}).
72-
AddFork("ELECTRA", 115968, []byte{6, 1, 112, 0})
69+
AddFork("GENESIS", 0, common.FromHex("0x01017000")).
70+
AddFork("ALTAIR", 0, common.FromHex("0x02017000")).
71+
AddFork("BELLATRIX", 0, common.FromHex("0x03017000")).
72+
AddFork("CAPELLA", 256, common.FromHex("0x04017000")).
73+
AddFork("DENEB", 29696, common.FromHex("0x05017000")).
74+
AddFork("ELECTRA", 115968, common.FromHex("0x06017000")).
75+
AddFork("FULU", 165120, common.FromHex("0x07017000"))
7376

7477
HoodiLightConfig = (&ChainConfig{
7578
GenesisValidatorsRoot: common.HexToHash("0x212f13fc4df078b6cb7db228f1c8307566dcecf900867401a92023d7ba99cb5f"),
@@ -82,5 +85,5 @@ var (
8285
AddFork("CAPELLA", 0, common.FromHex("0x40000910")).
8386
AddFork("DENEB", 0, common.FromHex("0x50000910")).
8487
AddFork("ELECTRA", 2048, common.FromHex("0x60000910")).
85-
AddFork("FULU", 18446744073709551615, common.FromHex("0x70000910"))
88+
AddFork("FULU", 50688, common.FromHex("0x70000910"))
8689
)

core/filtermaps/checkpoints_mainnet.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,5 +288,32 @@
288288
{"blockNumber": 22958100, "blockId": "0xe38e0ff7b0c4065ca42ea577bc32f2566ca46f2ddeedcc4bc1f8fb00e7f26329", "firstIndex": 19260242424},
289289
{"blockNumber": 22988600, "blockId": "0x04ca74758b22e0ea54b8c992022ff21c16a2af9c45144c3b0f80de921a7eee82", "firstIndex": 19327351273},
290290
{"blockNumber": 23018392, "blockId": "0x61cc979b00bc97b48356f986a5b9ec997d674bc904c2a2e4b0f17de08e50b3bb", "firstIndex": 19394459627},
291-
{"blockNumber": 23048524, "blockId": "0x489de15d95739ede4ab15e8b5151d80d4dc85ae10e7be800b1a4723094a678df", "firstIndex": 19461570073}
291+
{"blockNumber": 23048524, "blockId": "0x489de15d95739ede4ab15e8b5151d80d4dc85ae10e7be800b1a4723094a678df", "firstIndex": 19461570073},
292+
{"blockNumber": 23078983, "blockId": "0xd64da4fe45a0a349101b8ce1a6336fb099d8b00cc274d0eb59356e134190b8f2", "firstIndex": 19528679292},
293+
{"blockNumber": 23109224, "blockId": "0xbb6c29f91820fcf6caef881bdfe61eb690f9796f8f139c56eaf27aa601fe5ed2", "firstIndex": 19595787850},
294+
{"blockNumber": 23136690, "blockId": "0xc1915739edff731d469ec1500ad05102c0d68cc1ef062411d2e9741b8ebdc571", "firstIndex": 19662896969},
295+
{"blockNumber": 23164324, "blockId": "0x97d0078f2a22a8fbde4660d5f11846d00a669c606e42291df55e863190914a9f", "firstIndex": 19730004997},
296+
{"blockNumber": 23192975, "blockId": "0x8463749ec09f55fccdd962498f93d6468d744faedc35da8097642cd4609e08f2", "firstIndex": 19797111604},
297+
{"blockNumber": 23219805, "blockId": "0x76ca51d01b5724f1b0f6c3acb50dfcdb00e1648a475dd7599174b301c25e5517", "firstIndex": 19864222312},
298+
{"blockNumber": 23236331, "blockId": "0x388f9e36b3ec2120d2b4adfdcdb0c0b8de139eef107e327670dd77fc581c2c5f", "firstIndex": 19931331831},
299+
{"blockNumber": 23260849, "blockId": "0xe4a467164dbc8f9beebf0c8478a9e7ee16dfce65e2da423b1048601831222ba7", "firstIndex": 19998441286},
300+
{"blockNumber": 23282795, "blockId": "0x74ad210aa1bfdd4bcf61298ebff622da758c36c38d62d001f2440d09e73ef6c7", "firstIndex": 20065548083},
301+
{"blockNumber": 23300759, "blockId": "0xa405f5ea21a5207d3cde718a1e3fb7f0ce3dd87ac6040a0db52da0e9488e63f6", "firstIndex": 20132623334},
302+
{"blockNumber": 23319772, "blockId": "0xafae645dd057af450eddf69c7604bde0136524abc5b7d6697426427ef2d30724", "firstIndex": 20199767615},
303+
{"blockNumber": 23342113, "blockId": "0x8482c4be13294cfd862d500051c8b4efb95b50f4a79717da6aeabb2a6ff3e199", "firstIndex": 20266874986},
304+
{"blockNumber": 23366974, "blockId": "0xf6047cafea5da7aaf20691df700d759fe84f5aa2176d9dd42c6ae138899a29ea", "firstIndex": 20333983351},
305+
{"blockNumber": 23397579, "blockId": "0xe94815fe0278659a26e15b023c0c3877abf6f1265710c5dfddf161ee8af01b40", "firstIndex": 20401094335},
306+
{"blockNumber": 23425940, "blockId": "0xa98d6d48b93d9ef848c340b47cf9d191f36e76375dd747d8adcb39d72251822d", "firstIndex": 20468200506},
307+
{"blockNumber": 23452402, "blockId": "0x5f26ff308c0883a04f4a92411bcd05e50538d95a96532452f43b71fde4af908d", "firstIndex": 20535311178},
308+
{"blockNumber": 23478884, "blockId": "0x23a81186c21218f7034ee81dcd72db71edcbc0e97da26703b8026b6d4a81f693", "firstIndex": 20602384106},
309+
{"blockNumber": 23507136, "blockId": "0xb1d4a2bd836c5d78b678f0bfffd651bdfeae8b7965639b640f8745193b142323", "firstIndex": 20669529935},
310+
{"blockNumber": 23535463, "blockId": "0x1886a719a6376352753242ec5093c434938b9a90356facdbdaafd2670da97d82", "firstIndex": 20736637374},
311+
{"blockNumber": 23564278, "blockId": "0xcdc5a1349f45430771fa2080555f20b80b2d84f575728dbb8bd3b633fbb0a00b", "firstIndex": 20803747399},
312+
{"blockNumber": 23594711, "blockId": "0xbbf41e407367feeb865b305e38aee8bef84ba62b66efbd6fcd3b16a5d50cc055", "firstIndex": 20870854523},
313+
{"blockNumber": 23627417, "blockId": "0x1b3c6bd39c5aa7c73101e7e946964b3d7afecf3f253efda8de5610dd99cbee82", "firstIndex": 20937963176},
314+
{"blockNumber": 23660347, "blockId": "0xadc8ac88c281f50c3aaf1d08149100e8f91a16bbe09b28ac86665bcea681d41b", "firstIndex": 21005072865},
315+
{"blockNumber": 23692228, "blockId": "0xeb4040468161d9d5b6863eb62e4f21f72a1944f910ecfa95ee6a9dbc39e92ef0", "firstIndex": 21072181753},
316+
{"blockNumber": 23722331, "blockId": "0xdfc9be1b43488148868da0c8ac56e99e0ffde18bcc418755c4765e745fe74024", "firstIndex": 21139291342},
317+
{"blockNumber": 23752866, "blockId": "0xb9cf0dfee429a1450f5fb7a237729cf7d0c49e7e35c00dc3709f197c091f8b39", "firstIndex": 21206399901},
318+
{"blockNumber": 23784485, "blockId": "0x92f5f119078b4ef7ad99273e2ae6f874cfb663e80d741a821e0bb7c25c0369c7", "firstIndex": 21273505141}
292319
]

0 commit comments

Comments
 (0)