@@ -76,8 +76,10 @@ func TestCreation(t *testing.T) {
76
76
{20000000 , 1681338454 , ID {Hash : checksumToBytes (0xf0afd0e3 ), Next : 1681338455 }}, // Last Gray Glacier block
77
77
{20000000 , 1681338455 , ID {Hash : checksumToBytes (0xdce96c2d ), Next : 1710338135 }}, // First Shanghai block
78
78
{30000000 , 1710338134 , ID {Hash : checksumToBytes (0xdce96c2d ), Next : 1710338135 }}, // Last Shanghai block
79
- {40000000 , 1710338135 , ID {Hash : checksumToBytes (0x9f3d2254 ), Next : 0 }}, // First Cancun block
80
- {50000000 , 2000000000 , ID {Hash : checksumToBytes (0x9f3d2254 ), Next : 0 }}, // Future Cancun block
79
+ {40000000 , 1710338135 , ID {Hash : checksumToBytes (0x9f3d2254 ), Next : 1746612311 }}, // First Cancun block
80
+ {30000000 , 1746022486 , ID {Hash : checksumToBytes (0x9f3d2254 ), Next : 1746612311 }}, // Last Cancun block
81
+ {30000000 , 1746612311 , ID {Hash : checksumToBytes (0xc376cf8b ), Next : 0 }}, // First Prague block
82
+ {50000000 , 2000000000 , ID {Hash : checksumToBytes (0xc376cf8b ), Next : 0 }}, // Future Prague block
81
83
},
82
84
},
83
85
// Sepolia test cases
@@ -137,9 +139,11 @@ func TestCreation(t *testing.T) {
137
139
// fork ID.
138
140
func TestValidation (t * testing.T ) {
139
141
// Config that has not timestamp enabled
142
+ // TODO(lightclient): this always needs to be updated when a mainnet timestamp is set.
140
143
legacyConfig := * params .MainnetChainConfig
141
144
legacyConfig .ShanghaiTime = nil
142
145
legacyConfig .CancunTime = nil
146
+ legacyConfig .PragueTime = nil
143
147
144
148
tests := []struct {
145
149
config * params.ChainConfig
@@ -314,18 +318,15 @@ func TestValidation(t *testing.T) {
314
318
315
319
// Local is mainnet Prague, remote announces Shanghai + knowledge about Cancun. Remote
316
320
// is definitely out of sync. It may or may not need the Prague update, we don't know yet.
317
- //
318
- // TODO(karalabe): Enable this when Cancun **and** Prague is specced, update all the numbers
319
- //{params.MainnetChainConfig, 0, 0, ID{Hash: checksumToBytes(0x3edd5b10), Next: 4370000}, nil},
321
+ {params .MainnetChainConfig , 0 , 0 , ID {Hash : checksumToBytes (0x3edd5b10 ), Next : 1710338135 }, nil },
320
322
321
323
// Local is mainnet Shanghai, remote announces Cancun. Local is out of sync, accept.
322
324
{params .MainnetChainConfig , 21000000 , 1700000000 , ID {Hash : checksumToBytes (0x9f3d2254 ), Next : 0 }, nil },
323
325
324
326
// Local is mainnet Shanghai, remote announces Cancun, but is not aware of Prague. Local
325
327
// out of sync. Local also knows about a future fork, but that is uncertain yet.
326
328
//
327
- // TODO(karalabe): Enable this when Cancun **and** Prague is specced, update remote checksum
328
- //{params.MainnetChainConfig, 21000000, 1678000000, ID{Hash: checksumToBytes(0x00000000), Next: 0}, nil},
329
+ {params .MainnetChainConfig , 21000000 , 1678000000 , ID {Hash : checksumToBytes (0xc376cf8b ), Next : 0 }, nil },
329
330
330
331
// Local is mainnet Cancun. remote announces Shanghai but is not aware of further forks.
331
332
// Remote needs software update.
@@ -342,11 +343,11 @@ func TestValidation(t *testing.T) {
342
343
// Local is mainnet Shanghai, remote is random Shanghai.
343
344
{params .MainnetChainConfig , 20000000 , 1681338455 , ID {Hash : checksumToBytes (0x12345678 ), Next : 0 }, ErrLocalIncompatibleOrStale },
344
345
345
- // Local is mainnet Cancun , far in the future. Remote announces Gopherium (non existing fork)
346
+ // Local is mainnet Prague , far in the future. Remote announces Gopherium (non existing fork)
346
347
// at some future timestamp 8888888888, for itself, but past block for local. Local is incompatible.
347
348
//
348
349
// This case detects non-upgraded nodes with majority hash power (typical Ropsten mess).
349
- {params .MainnetChainConfig , 88888888 , 8888888888 , ID {Hash : checksumToBytes (0x9f3d2254 ), Next : 8888888888 }, ErrLocalIncompatibleOrStale },
350
+ {params .MainnetChainConfig , 88888888 , 8888888888 , ID {Hash : checksumToBytes (0xc376cf8b ), Next : 8888888888 }, ErrLocalIncompatibleOrStale },
350
351
351
352
// Local is mainnet Shanghai. Remote is also in Shanghai, but announces Gopherium (non existing
352
353
// fork) at timestamp 1668000000, before Cancun. Local is incompatible.
0 commit comments