Sepolia MergeNetsplit block (#4804)

This commit is contained in:
Andrew Ashikhmin 2022-07-23 18:02:31 +02:00 committed by GitHub
parent 68e35417fc
commit d2389a1f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -135,6 +135,16 @@ func TestCreation(t *testing.T) {
{6000000, ID{Hash: checksumToBytes(0xB8C6299D), Next: 0}}, // Future London block {6000000, ID{Hash: checksumToBytes(0xB8C6299D), Next: 0}}, // Future London block
}, },
}, },
// Sepolia test cases
{
params.SepoliaChainConfig,
params.SepoliaGenesisHash,
[]testcase{
{0, ID{Hash: checksumToBytes(0xfe3366e7), Next: 1735371}}, // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople, Petersburg, Istanbul, Berlin and first London block
{1735370, ID{Hash: checksumToBytes(0xfe3366e7), Next: 1735371}}, // Last pre-MergeNetsplit block
{1735371, ID{Hash: checksumToBytes(0xb96cbd13), Next: 0}}, // First MergeNetsplit block
},
},
} }
for i, tt := range tests { for i, tt := range tests {
for j, ttt := range tt.cases { for j, ttt := range tt.cases {

View File

@ -15,6 +15,6 @@
"berlinBlock": 0, "berlinBlock": 0,
"londonBlock": 0, "londonBlock": 0,
"terminalTotalDifficulty": 17000000000000000, "terminalTotalDifficulty": 17000000000000000,
"terminalBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "mergeNetsplitBlock": 1735371,
"ethash": {} "ethash": {}
} }

View File

@ -405,7 +405,7 @@ func (c *ChainConfig) String() string {
) )
} }
return fmt.Sprintf("{ChainID: %v, Homestead: %v, DAO: %v, DAO Support: %v, Tangerine Whistle: %v, Spurious Dragon: %v, Byzantium: %v, Constantinople: %v, Petersburg: %v, Istanbul: %v, Muir Glacier: %v, Berlin: %v, London: %v, Arrow Glacier: %v, Gray Glacier: %v, Terminal Total Difficulty: %v, Engine: %v}", return fmt.Sprintf("{ChainID: %v, Homestead: %v, DAO: %v, DAO Support: %v, Tangerine Whistle: %v, Spurious Dragon: %v, Byzantium: %v, Constantinople: %v, Petersburg: %v, Istanbul: %v, Muir Glacier: %v, Berlin: %v, London: %v, Arrow Glacier: %v, Gray Glacier: %v, Terminal Total Difficulty: %v, Merge Netsplit: %v, Engine: %v}",
c.ChainID, c.ChainID,
c.HomesteadBlock, c.HomesteadBlock,
c.DAOForkBlock, c.DAOForkBlock,
@ -422,6 +422,7 @@ func (c *ChainConfig) String() string {
c.ArrowGlacierBlock, c.ArrowGlacierBlock,
c.GrayGlacierBlock, c.GrayGlacierBlock,
c.TerminalTotalDifficulty, c.TerminalTotalDifficulty,
c.MergeNetsplitBlock,
engine, engine,
) )
} }
@ -615,6 +616,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
{name: "londonBlock", block: c.LondonBlock}, {name: "londonBlock", block: c.LondonBlock},
{name: "arrowGlacierBlock", block: c.ArrowGlacierBlock, optional: true}, {name: "arrowGlacierBlock", block: c.ArrowGlacierBlock, optional: true},
{name: "grayGlacierBlock", block: c.GrayGlacierBlock, optional: true}, {name: "grayGlacierBlock", block: c.GrayGlacierBlock, optional: true},
{name: "mergeNetsplitBlock", block: c.MergeNetsplitBlock, optional: true},
} { } {
if lastFork.name != "" { if lastFork.name != "" {
// Next one must be higher number // Next one must be higher number