Skip to content

Commit

Permalink
Schedule Pectra hard-fork for Holešky and Sepolia (#13722) (#13756)
Browse files Browse the repository at this point in the history
  • Loading branch information
somnathb1 authored Feb 10, 2025
1 parent 443f770 commit 997fa46
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cl/clparams/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,8 @@ func sepoliaConfig() BeaconChainConfig {
cfg.CapellaForkVersion = 0x90000072
cfg.DenebForkEpoch = 132608
cfg.DenebForkVersion = 0x90000073
cfg.ElectraForkEpoch = 222464
cfg.ElectraForkVersion = 0x90000074
cfg.TerminalTotalDifficulty = "17000000000000000"
cfg.DepositContractAddress = "0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D"
cfg.InitializeForkSchedule()
Expand Down Expand Up @@ -862,6 +864,8 @@ func holeskyConfig() BeaconChainConfig {
cfg.CapellaForkVersion = 0x04017000
cfg.DenebForkEpoch = 29696
cfg.DenebForkVersion = 0x05017000
cfg.ElectraForkEpoch = 115968
cfg.ElectraForkVersion = 0x06017000
cfg.TerminalTotalDifficulty = "0"
cfg.TerminalBlockHash = [32]byte{}
cfg.TerminalBlockHashActivationEpoch = math.MaxUint64
Expand Down
21 changes: 19 additions & 2 deletions core/forkid/forkid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,27 @@ func TestCreation(t *testing.T) {
{2990907, 1677557076, ID{Hash: checksumToBytes(0xb96cbd13), Next: 1677557088}}, // Last pre-Shanghai block
{2990908, 1677557088, ID{Hash: checksumToBytes(0xf7f9bc08), Next: 1706655072}}, // First Shanghai block
{5187022, 1706655060, ID{Hash: checksumToBytes(0xf7f9bc08), Next: 1706655072}}, // Last Shanghai block
{5187023, 1706655072, ID{Hash: checksumToBytes(0x88cf81d9), Next: 0}}, // First Cancun block
{8000000, 1800000000, ID{Hash: checksumToBytes(0x88cf81d9), Next: 0}}, // Future Cancun block (mock)
{5187023, 1706655072, ID{Hash: checksumToBytes(0x88cf81d9), Next: 1741159776}}, // First Cancun block
{7844466, 1741159764, ID{Hash: checksumToBytes(0x88cf81d9), Next: 1741159776}}, // Last Cancun block (approx)
{7844467, 1741159776, ID{Hash: checksumToBytes(0xed88b5fd), Next: 0}}, // First Prague block (approx)
{12000000, 1800000000, ID{Hash: checksumToBytes(0xed88b5fd), Next: 0}}, // Future Prague block (mock)
},
},

// Holesky test cases
{
params.HoleskyChainConfig,
params.HoleskyGenesisHash,
[]testcase{
{0, 1696000704, ID{Hash: checksumToBytes(0xfd4f016b), Next: 1707305664}}, // First Shanghai block
{0, 1707305652, ID{Hash: checksumToBytes(0xfd4f016b), Next: 1707305664}}, // Last Shanghai block
{894733, 1707305676, ID{Hash: checksumToBytes(0x9b192ad0), Next: 1740434112}}, // First Cancun block
{3655435, 1740434100, ID{Hash: checksumToBytes(0x9b192ad0), Next: 1740434112}}, // Last Cancun block (approx)
{3655436, 1740434112, ID{Hash: checksumToBytes(0xdfbd9bed), Next: 0}}, // First Prague block (approx)
{8000000, 1800000000, ID{Hash: checksumToBytes(0xdfbd9bed), Next: 0}}, // Future Prague block (mock)
},
},

// Gnosis test cases
{
params.GnosisChainConfig,
Expand Down
1 change: 1 addition & 0 deletions params/chainspecs/holesky.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"terminalTotalDifficultyPassed": true,
"shanghaiTime": 1696000704,
"cancunTime": 1707305664,
"pragueTime": 1740434112,
"blobSchedule": {
"cancun": {
"target": 3,
Expand Down
1 change: 1 addition & 0 deletions params/chainspecs/sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"mergeNetsplitBlock": 1735371,
"shanghaiTime": 1677557088,
"cancunTime": 1706655072,
"pragueTime": 1741159776,
"blobSchedule": {
"cancun": {
"target": 3,
Expand Down

0 comments on commit 997fa46

Please sign in to comment.