Skip to content

Commit 5eee1ea

Browse files
fjlgeoknee
authored andcommitted
1 parent a09f538 commit 5eee1ea

File tree

3 files changed

+334
-6
lines changed

3 files changed

+334
-6
lines changed

core/forkid/forkid_test.go

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,14 @@ func TestCreation(t *testing.T) {
9595
{1735372, 1706655071, ID{Hash: checksumToBytes(0xf7f9bc08), Next: 1706655072}}, // Last Shanghai block
9696
{1735372, 1706655072, ID{Hash: checksumToBytes(0x88cf81d9), Next: 1741159776}}, // First Cancun block
9797
{1735372, 1741159775, ID{Hash: checksumToBytes(0x88cf81d9), Next: 1741159776}}, // Last Cancun block
98-
{1735372, 1741159776, ID{Hash: checksumToBytes(0xed88b5fd), Next: 0}}, // First Prague block
99-
{1735372, 2741159776, ID{Hash: checksumToBytes(0xed88b5fd), Next: 0}}, // Future Prague block
98+
{1735372, 1741159776, ID{Hash: checksumToBytes(0xed88b5fd), Next: 1760427360}}, // First Prague block
99+
{1735372, 1760427359, ID{Hash: checksumToBytes(0xed88b5fd), Next: 1760427360}}, // Last Prague block
100+
{1735372, 1760427360, ID{Hash: checksumToBytes(0xe2ae4999), Next: 1761017184}}, // First Osaka block
101+
{1735372, 1761017183, ID{Hash: checksumToBytes(0xe2ae4999), Next: 1761017184}}, // Last Osaka block
102+
{1735372, 1761017184, ID{Hash: checksumToBytes(0x56078a1e), Next: 1761607008}}, // First BPO1 block
103+
{1735372, 1761607007, ID{Hash: checksumToBytes(0x56078a1e), Next: 1761607008}}, // Last BPO1 block
104+
{1735372, 1761607008, ID{Hash: checksumToBytes(0x268956b6), Next: 0}}, // First BPO2 block
105+
{1735372, 2000000000, ID{Hash: checksumToBytes(0x268956b6), Next: 0}}, // Future BPO2 block
100106
},
101107
},
102108
// Holesky test cases
@@ -110,8 +116,14 @@ func TestCreation(t *testing.T) {
110116
{123, 1707305663, ID{Hash: checksumToBytes(0xfd4f016b), Next: 1707305664}}, // Last Shanghai block
111117
{123, 1707305664, ID{Hash: checksumToBytes(0x9b192ad0), Next: 1740434112}}, // First Cancun block
112118
{123, 1740434111, ID{Hash: checksumToBytes(0x9b192ad0), Next: 1740434112}}, // Last Cancun block
113-
{123, 1740434112, ID{Hash: checksumToBytes(0xdfbd9bed), Next: 0}}, // First Prague block
114-
{123, 2740434112, ID{Hash: checksumToBytes(0xdfbd9bed), Next: 0}}, // Future Prague block
119+
{123, 1740434112, ID{Hash: checksumToBytes(0xdfbd9bed), Next: 1759308480}}, // First Prague block
120+
{123, 1759308479, ID{Hash: checksumToBytes(0xdfbd9bed), Next: 1759308480}}, // Last Prague block
121+
{123, 1759308480, ID{Hash: checksumToBytes(0x783def52), Next: 1759800000}}, // First Osaka block
122+
{123, 1759799999, ID{Hash: checksumToBytes(0x783def52), Next: 1759800000}}, // Last Osaka block
123+
{123, 1759800000, ID{Hash: checksumToBytes(0xa280a45c), Next: 1760389824}}, // First BPO1 block
124+
{123, 1760389823, ID{Hash: checksumToBytes(0xa280a45c), Next: 1760389824}}, // Last BPO1 block
125+
{123, 1760389824, ID{Hash: checksumToBytes(0x9bc6cb31), Next: 0}}, // First BPO2 block
126+
{123, 2000000000, ID{Hash: checksumToBytes(0x9bc6cb31), Next: 0}}, // Future BPO1 block
115127
},
116128
},
117129
// Hoodi test cases
@@ -121,8 +133,14 @@ func TestCreation(t *testing.T) {
121133
[]testcase{
122134
{0, 0, ID{Hash: checksumToBytes(0xbef71d30), Next: 1742999832}}, // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople, Petersburg, Istanbul, Berlin, London, Paris, Shanghai, Cancun block
123135
{123, 1742999831, ID{Hash: checksumToBytes(0xbef71d30), Next: 1742999832}}, // Last Cancun block
124-
{123, 1742999832, ID{Hash: checksumToBytes(0x0929e24e), Next: 0}}, // First Prague block
125-
{123, 2740434112, ID{Hash: checksumToBytes(0x0929e24e), Next: 0}}, // Future Prague block
136+
{123, 1742999832, ID{Hash: checksumToBytes(0x0929e24e), Next: 1761677592}}, // First Prague block
137+
{123, 1761677591, ID{Hash: checksumToBytes(0x0929e24e), Next: 1761677592}}, // Last Prague block
138+
{123, 1761677592, ID{Hash: checksumToBytes(0xe7e0e7ff), Next: 1762365720}}, // First Osaka block
139+
{123, 1762365719, ID{Hash: checksumToBytes(0xe7e0e7ff), Next: 1762365720}}, // Last Osaka block
140+
{123, 1762365720, ID{Hash: checksumToBytes(0x3893353e), Next: 1762955544}}, // First BPO1 block
141+
{123, 1762955543, ID{Hash: checksumToBytes(0x3893353e), Next: 1762955544}}, // Last BPO1 block
142+
{123, 1762955544, ID{Hash: checksumToBytes(0x23aa1351), Next: 0}}, // First BPO2 block
143+
{123, 2000000000, ID{Hash: checksumToBytes(0x23aa1351), Next: 0}}, // Future BPO2 block
126144
},
127145
},
128146
}

params/config.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,17 @@ var (
9898
ShanghaiTime: newUint64(1696000704),
9999
CancunTime: newUint64(1707305664),
100100
PragueTime: newUint64(1740434112),
101+
OsakaTime: newUint64(1759308480),
102+
BPO1Time: newUint64(1759800000),
103+
BPO2Time: newUint64(1760389824),
101104
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
102105
Ethash: new(EthashConfig),
103106
BlobScheduleConfig: &BlobScheduleConfig{
104107
Cancun: DefaultCancunBlobConfig,
105108
Prague: DefaultPragueBlobConfig,
109+
Osaka: DefaultOsakaBlobConfig,
110+
BPO1: DefaultBPO1BlobConfig,
111+
BPO2: DefaultBPO2BlobConfig,
106112
},
107113
}
108114
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
@@ -128,11 +134,17 @@ var (
128134
ShanghaiTime: newUint64(1677557088),
129135
CancunTime: newUint64(1706655072),
130136
PragueTime: newUint64(1741159776),
137+
OsakaTime: newUint64(1760427360),
138+
BPO1Time: newUint64(1761017184),
139+
BPO2Time: newUint64(1761607008),
131140
DepositContractAddress: common.HexToAddress("0x7f02c3e3c98b133055b8b348b2ac625669ed295d"),
132141
Ethash: new(EthashConfig),
133142
BlobScheduleConfig: &BlobScheduleConfig{
134143
Cancun: DefaultCancunBlobConfig,
135144
Prague: DefaultPragueBlobConfig,
145+
Osaka: DefaultOsakaBlobConfig,
146+
BPO1: DefaultBPO1BlobConfig,
147+
BPO2: DefaultBPO2BlobConfig,
136148
},
137149
}
138150
// HoodiChainConfig contains the chain parameters to run a node on the Hoodi test network.
@@ -158,11 +170,17 @@ var (
158170
ShanghaiTime: newUint64(0),
159171
CancunTime: newUint64(0),
160172
PragueTime: newUint64(1742999832),
173+
OsakaTime: newUint64(1761677592),
174+
BPO1Time: newUint64(1762365720),
175+
BPO2Time: newUint64(1762955544),
161176
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
162177
Ethash: new(EthashConfig),
163178
BlobScheduleConfig: &BlobScheduleConfig{
164179
Cancun: DefaultCancunBlobConfig,
165180
Prague: DefaultPragueBlobConfig,
181+
Osaka: DefaultOsakaBlobConfig,
182+
BPO1: DefaultBPO1BlobConfig,
183+
BPO2: DefaultBPO2BlobConfig,
166184
},
167185
}
168186
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
@@ -394,6 +412,30 @@ var (
394412
Max: 9,
395413
UpdateFraction: 5007716,
396414
}
415+
// DefaultBPO1BlobConfig is the default blob configuration for the Osaka fork.
416+
DefaultBPO1BlobConfig = &BlobConfig{
417+
Target: 10,
418+
Max: 15,
419+
UpdateFraction: 8346193,
420+
}
421+
// DefaultBPO1BlobConfig is the default blob configuration for the Osaka fork.
422+
DefaultBPO2BlobConfig = &BlobConfig{
423+
Target: 14,
424+
Max: 21,
425+
UpdateFraction: 11684671,
426+
}
427+
// DefaultBPO1BlobConfig is the default blob configuration for the Osaka fork.
428+
DefaultBPO3BlobConfig = &BlobConfig{
429+
Target: 21,
430+
Max: 32,
431+
UpdateFraction: 20609697,
432+
}
433+
// DefaultBPO1BlobConfig is the default blob configuration for the Osaka fork.
434+
DefaultBPO4BlobConfig = &BlobConfig{
435+
Target: 14,
436+
Max: 21,
437+
UpdateFraction: 13739630,
438+
}
397439
// DefaultBlobSchedule is the latest configured blob schedule for Ethereum mainnet.
398440
DefaultBlobSchedule = &BlobScheduleConfig{
399441
Cancun: DefaultCancunBlobConfig,

0 commit comments

Comments
 (0)