From 73b62db59977859123b9682485fcd3eb7dfeea0b Mon Sep 17 00:00:00 2001 From: yperbasis Date: Mon, 15 May 2023 17:29:35 +0200 Subject: [PATCH 1/2] Schedule Shapella on Chiado --- cl/clparams/config.go | 2 ++ core/forkid/forkid_test.go | 8 +++++--- params/chainspecs/chiado.json | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cl/clparams/config.go b/cl/clparams/config.go index 4b188151df8..d23a3e14297 100644 --- a/cl/clparams/config.go +++ b/cl/clparams/config.go @@ -832,6 +832,8 @@ func chiadoConfig() BeaconChainConfig { cfg.AltairForkVersion = 0x0100006f cfg.BellatrixForkEpoch = 180 cfg.BellatrixForkVersion = 0x0200006f + cfg.CapellaForkEpoch = 3907584 + cfg.CapellaForkVersion = 0x0300006f cfg.TerminalTotalDifficulty = "231707791542740786049188744689299064356246512" cfg.DepositContractAddress = "0xb97036A26259B7147018913bD58a774cf91acf25" cfg.BaseRewardFactor = 25 diff --git a/core/forkid/forkid_test.go b/core/forkid/forkid_test.go index a347cc227a4..d18fdaf0cc0 100644 --- a/core/forkid/forkid_test.go +++ b/core/forkid/forkid_test.go @@ -74,8 +74,8 @@ func TestCreation(t *testing.T) { {13773000, 1639079723, ID{Hash: checksumToBytes(0x20c327fc), Next: 15050000}}, // First Arrow Glacier block {15049999, 1656586434, ID{Hash: checksumToBytes(0x20c327fc), Next: 15050000}}, // Last Arrow Glacier block {15050000, 1656586444, ID{Hash: checksumToBytes(0xf0afd0e3), Next: 1681338455}}, // First Gray Glacier block - {17037484, 1681338443, ID{Hash: checksumToBytes(0xf0afd0e3), Next: 1681338455}}, // Last pre-Shanghai block (approx) - {17037485, 1681338455, ID{Hash: checksumToBytes(0xdce96c2d), Next: 0}}, // First Shanghai block (approx) + {17034869, 1681338443, ID{Hash: checksumToBytes(0xf0afd0e3), Next: 1681338455}}, // Last pre-Shanghai block + {17034870, 1681338455, ID{Hash: checksumToBytes(0xdce96c2d), Next: 0}}, // First Shanghai block {19000000, 1700000000, ID{Hash: checksumToBytes(0xdce96c2d), Next: 0}}, // Future Shanghai block (mock) }, }, @@ -159,7 +159,9 @@ func TestCreation(t *testing.T) { params.ChiadoChainConfig, params.ChiadoGenesisHash, []testcase{ - {0, 0, ID{Hash: checksumToBytes(0x50d39d7b), Next: 0}}, // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople, Petersburg, Istanbul, Berlin and first London block + {0, 0, ID{Hash: checksumToBytes(0x50d39d7b), Next: 1684930320}}, + {4101957, 1684930315, ID{Hash: checksumToBytes(0x50d39d7b), Next: 1684930320}}, // Last pre-Shanghai block (approx) + {4101958, 1684930320, ID{Hash: checksumToBytes(0xcc663128), Next: 0}}, // First Shanghai block (approx) }, }, } diff --git a/params/chainspecs/chiado.json b/params/chainspecs/chiado.json index fac44bbd3f1..db2bef5c653 100644 --- a/params/chainspecs/chiado.json +++ b/params/chainspecs/chiado.json @@ -15,6 +15,7 @@ "eip1559FeeCollector": "0x1559000000000000000000000000000000000000", "terminalTotalDifficulty": 231707791542740786049188744689299064356246512, "terminalTotalDifficultyPassed": true, + "shanghaiTime": 1684930320, "aura": { "stepDuration": 5, "blockReward": 0, @@ -23,7 +24,9 @@ "validators": { "multi": { "0": { - "list": ["0x14747a698Ec1227e6753026C08B29b4d5D3bC484"] + "list": [ + "0x14747a698Ec1227e6753026C08B29b4d5D3bC484" + ] }, "67334": { "list": [ @@ -47,6 +50,7 @@ "blockGasLimitContractTransitions": { "0": "0x4000000000000000000000000000000000000001" }, - "registrar": "0x6000000000000000000000000000000000000000" + "registrar": "0x6000000000000000000000000000000000000000", + "withdrawalContractAddress": "0xb97036A26259B7147018913bD58a774cf91acf25" } } From c36323d7e812d3e5d65fb0993ebd58dca0380c3c Mon Sep 17 00:00:00 2001 From: yperbasis Date: Mon, 15 May 2023 18:37:51 +0200 Subject: [PATCH 2/2] Correct CapellaForkEpoch --- cl/clparams/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl/clparams/config.go b/cl/clparams/config.go index d23a3e14297..9f7c4f2461c 100644 --- a/cl/clparams/config.go +++ b/cl/clparams/config.go @@ -832,7 +832,7 @@ func chiadoConfig() BeaconChainConfig { cfg.AltairForkVersion = 0x0100006f cfg.BellatrixForkEpoch = 180 cfg.BellatrixForkVersion = 0x0200006f - cfg.CapellaForkEpoch = 3907584 + cfg.CapellaForkEpoch = 244224 cfg.CapellaForkVersion = 0x0300006f cfg.TerminalTotalDifficulty = "231707791542740786049188744689299064356246512" cfg.DepositContractAddress = "0xb97036A26259B7147018913bD58a774cf91acf25"