@@ -43,24 +43,26 @@ func TestCreation(t *testing.T) {
43
43
params .MainnetChainConfig ,
44
44
params .MainnetGenesisHash ,
45
45
[]testcase {
46
- {0 , ID {Hash : checksumToBytes (0xfc64ec04 ), Next : 1150000 }}, // Unsynced
47
- {1149999 , ID {Hash : checksumToBytes (0xfc64ec04 ), Next : 1150000 }}, // Last Frontier block
48
- {1150000 , ID {Hash : checksumToBytes (0x97c2c34c ), Next : 1920000 }}, // First Homestead block
49
- {1919999 , ID {Hash : checksumToBytes (0x97c2c34c ), Next : 1920000 }}, // Last Homestead block
50
- {1920000 , ID {Hash : checksumToBytes (0x91d1f948 ), Next : 2463000 }}, // First DAO block
51
- {2462999 , ID {Hash : checksumToBytes (0x91d1f948 ), Next : 2463000 }}, // Last DAO block
52
- {2463000 , ID {Hash : checksumToBytes (0x7a64da13 ), Next : 2675000 }}, // First Tangerine block
53
- {2674999 , ID {Hash : checksumToBytes (0x7a64da13 ), Next : 2675000 }}, // Last Tangerine block
54
- {2675000 , ID {Hash : checksumToBytes (0x3edd5b10 ), Next : 4370000 }}, // First Spurious block
55
- {4369999 , ID {Hash : checksumToBytes (0x3edd5b10 ), Next : 4370000 }}, // Last Spurious block
56
- {4370000 , ID {Hash : checksumToBytes (0xa00bc324 ), Next : 7280000 }}, // First Byzantium block
57
- {7279999 , ID {Hash : checksumToBytes (0xa00bc324 ), Next : 7280000 }}, // Last Byzantium block
58
- {7280000 , ID {Hash : checksumToBytes (0x668db0af ), Next : 9069000 }}, // First and last Constantinople, first Petersburg block
59
- {9068999 , ID {Hash : checksumToBytes (0x668db0af ), Next : 9069000 }}, // Last Petersburg block
60
- {9069000 , ID {Hash : checksumToBytes (0x879d6e30 ), Next : 9200000 }}, // First Istanbul and first Muir Glacier block
61
- {9199999 , ID {Hash : checksumToBytes (0x879d6e30 ), Next : 9200000 }}, // Last Istanbul and first Muir Glacier block
62
- {9200000 , ID {Hash : checksumToBytes (0xe029e991 ), Next : 0 }}, // First Muir Glacier block
63
- {10000000 , ID {Hash : checksumToBytes (0xe029e991 ), Next : 0 }}, // Future Muir Glacier block
46
+ {0 , ID {Hash : checksumToBytes (0xfc64ec04 ), Next : 1150000 }}, // Unsynced
47
+ {1149999 , ID {Hash : checksumToBytes (0xfc64ec04 ), Next : 1150000 }}, // Last Frontier block
48
+ {1150000 , ID {Hash : checksumToBytes (0x97c2c34c ), Next : 1920000 }}, // First Homestead block
49
+ {1919999 , ID {Hash : checksumToBytes (0x97c2c34c ), Next : 1920000 }}, // Last Homestead block
50
+ {1920000 , ID {Hash : checksumToBytes (0x91d1f948 ), Next : 2463000 }}, // First DAO block
51
+ {2462999 , ID {Hash : checksumToBytes (0x91d1f948 ), Next : 2463000 }}, // Last DAO block
52
+ {2463000 , ID {Hash : checksumToBytes (0x7a64da13 ), Next : 2675000 }}, // First Tangerine block
53
+ {2674999 , ID {Hash : checksumToBytes (0x7a64da13 ), Next : 2675000 }}, // Last Tangerine block
54
+ {2675000 , ID {Hash : checksumToBytes (0x3edd5b10 ), Next : 4370000 }}, // First Spurious block
55
+ {4369999 , ID {Hash : checksumToBytes (0x3edd5b10 ), Next : 4370000 }}, // Last Spurious block
56
+ {4370000 , ID {Hash : checksumToBytes (0xa00bc324 ), Next : 7280000 }}, // First Byzantium block
57
+ {7279999 , ID {Hash : checksumToBytes (0xa00bc324 ), Next : 7280000 }}, // Last Byzantium block
58
+ {7280000 , ID {Hash : checksumToBytes (0x668db0af ), Next : 9069000 }}, // First and last Constantinople, first Petersburg block
59
+ {9068999 , ID {Hash : checksumToBytes (0x668db0af ), Next : 9069000 }}, // Last Petersburg block
60
+ {9069000 , ID {Hash : checksumToBytes (0x879d6e30 ), Next : 9200000 }}, // First Istanbul and first Muir Glacier block
61
+ {9199999 , ID {Hash : checksumToBytes (0x879d6e30 ), Next : 9200000 }}, // Last Istanbul and first Muir Glacier block
62
+ {9200000 , ID {Hash : checksumToBytes (0xe029e991 ), Next : 12244000 }}, // First Muir Glacier block
63
+ {12243999 , ID {Hash : checksumToBytes (0xe029e991 ), Next : 12244000 }}, // Last Muir Glacier block
64
+ {12244000 , ID {Hash : checksumToBytes (0x0eb440f6 ), Next : 0 }}, // First Berlin block
65
+ {20000000 , ID {Hash : checksumToBytes (0x0eb440f6 ), Next : 0 }}, // Future Berlin block
64
66
},
65
67
},
66
68
// Ropsten test cases
@@ -80,8 +82,10 @@ func TestCreation(t *testing.T) {
80
82
{6485845 , ID {Hash : checksumToBytes (0xd6e2149b ), Next : 6485846 }}, // Last Petersburg block
81
83
{6485846 , ID {Hash : checksumToBytes (0x4bc66396 ), Next : 7117117 }}, // First Istanbul block
82
84
{7117116 , ID {Hash : checksumToBytes (0x4bc66396 ), Next : 7117117 }}, // Last Istanbul block
83
- {7117117 , ID {Hash : checksumToBytes (0x6727ef90 ), Next : 0 }}, // First Muir Glacier block
84
- {7500000 , ID {Hash : checksumToBytes (0x6727ef90 ), Next : 0 }}, // Future
85
+ {7117117 , ID {Hash : checksumToBytes (0x6727ef90 ), Next : 9812189 }}, // First Muir Glacier block
86
+ {9812188 , ID {Hash : checksumToBytes (0x6727ef90 ), Next : 9812189 }}, // Last Muir Glacier block
87
+ {9812189 , ID {Hash : checksumToBytes (0xa157d377 ), Next : 0 }}, // First Berlin block
88
+ {10000000 , ID {Hash : checksumToBytes (0xa157d377 ), Next : 0 }}, // Future Berlin block
85
89
},
86
90
},
87
91
// Rinkeby test cases
@@ -100,8 +104,10 @@ func TestCreation(t *testing.T) {
100
104
{4321233 , ID {Hash : checksumToBytes (0xe49cab14 ), Next : 4321234 }}, // Last Constantinople block
101
105
{4321234 , ID {Hash : checksumToBytes (0xafec6b27 ), Next : 5435345 }}, // First Petersburg block
102
106
{5435344 , ID {Hash : checksumToBytes (0xafec6b27 ), Next : 5435345 }}, // Last Petersburg block
103
- {5435345 , ID {Hash : checksumToBytes (0xcbdb8838 ), Next : 0 }}, // First Istanbul block
104
- {6000000 , ID {Hash : checksumToBytes (0xcbdb8838 ), Next : 0 }}, // Future Istanbul block
107
+ {5435345 , ID {Hash : checksumToBytes (0xcbdb8838 ), Next : 8290928 }}, // First Istanbul block
108
+ {8290927 , ID {Hash : checksumToBytes (0xcbdb8838 ), Next : 8290928 }}, // Last Istanbul block
109
+ {8290928 , ID {Hash : checksumToBytes (0x6910c8bd ), Next : 0 }}, // First Berlin block
110
+ {10000000 , ID {Hash : checksumToBytes (0x6910c8bd ), Next : 0 }}, // Future Berlin block
105
111
},
106
112
},
107
113
// Goerli test cases
@@ -111,8 +117,10 @@ func TestCreation(t *testing.T) {
111
117
[]testcase {
112
118
{0 , ID {Hash : checksumToBytes (0xa3f5ab08 ), Next : 1561651 }}, // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople and first Petersburg block
113
119
{1561650 , ID {Hash : checksumToBytes (0xa3f5ab08 ), Next : 1561651 }}, // Last Petersburg block
114
- {1561651 , ID {Hash : checksumToBytes (0xc25efa5c ), Next : 0 }}, // First Istanbul block
115
- {2000000 , ID {Hash : checksumToBytes (0xc25efa5c ), Next : 0 }}, // Future Istanbul block
120
+ {1561651 , ID {Hash : checksumToBytes (0xc25efa5c ), Next : 4460644 }}, // First Istanbul block
121
+ {4460643 , ID {Hash : checksumToBytes (0xc25efa5c ), Next : 4460644 }}, // Last Istanbul block
122
+ {4460644 , ID {Hash : checksumToBytes (0x757a1c47 ), Next : 0 }}, // First Berlin block
123
+ {5000000 , ID {Hash : checksumToBytes (0x757a1c47 ), Next : 0 }}, // Future Berlin block
116
124
},
117
125
},
118
126
}
@@ -185,11 +193,11 @@ func TestValidation(t *testing.T) {
185
193
// Local is mainnet Petersburg, remote is Rinkeby Petersburg.
186
194
{7987396 , ID {Hash : checksumToBytes (0xafec6b27 ), Next : 0 }, ErrLocalIncompatibleOrStale },
187
195
188
- // Local is mainnet Muir Glacier , far in the future. Remote announces Gopherium (non existing fork)
196
+ // Local is mainnet Berlin , far in the future. Remote announces Gopherium (non existing fork)
189
197
// at some future block 88888888, for itself, but past block for local. Local is incompatible.
190
198
//
191
199
// This case detects non-upgraded nodes with majority hash power (typical Ropsten mess).
192
- {88888888 , ID {Hash : checksumToBytes (0xe029e991 ), Next : 88888888 }, ErrLocalIncompatibleOrStale },
200
+ {88888888 , ID {Hash : checksumToBytes (0x0eb440f6 ), Next : 88888888 }, ErrLocalIncompatibleOrStale },
193
201
194
202
// Local is mainnet Byzantium. Remote is also in Byzantium, but announces Gopherium (non existing
195
203
// fork) at block 7279999, before Petersburg. Local is incompatible.
0 commit comments