Skip to content

Commit 958f9d6

Browse files
MariusVanDerWijdenblakehhuynh
authored andcommitted
params: set mainnet terminal total difficulty for the merge (ethereum#25528)
* params: set mainnet ttd to 58_750_000_000_000_000_000_000 * params: set mainnet ttd to 58_750_000_000_000_000_000_000
1 parent 2ab85df commit 958f9d6

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

params/config.go

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,29 @@ var CheckpointOracles = map[common.Hash]*CheckpointOracleConfig{
5555
}
5656

5757
var (
58+
MainnetTerminalTotalDifficulty, _ = new(big.Int).SetString("58_750_000_000_000_000_000_000", 0)
59+
5860
// MainnetChainConfig is the chain parameters to run a node on the main network.
5961
MainnetChainConfig = &ChainConfig{
60-
ChainID: big.NewInt(1),
61-
HomesteadBlock: big.NewInt(1_150_000),
62-
DAOForkBlock: big.NewInt(1_920_000),
63-
DAOForkSupport: true,
64-
EIP150Block: big.NewInt(2_463_000),
65-
EIP150Hash: common.HexToHash("0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0"),
66-
EIP155Block: big.NewInt(2_675_000),
67-
EIP158Block: big.NewInt(2_675_000),
68-
ByzantiumBlock: big.NewInt(4_370_000),
69-
ConstantinopleBlock: big.NewInt(7_280_000),
70-
PetersburgBlock: big.NewInt(7_280_000),
71-
IstanbulBlock: big.NewInt(9_069_000),
72-
MuirGlacierBlock: big.NewInt(9_200_000),
73-
BerlinBlock: big.NewInt(12_244_000),
74-
LondonBlock: big.NewInt(12_965_000),
75-
ArrowGlacierBlock: big.NewInt(13_773_000),
76-
GrayGlacierBlock: big.NewInt(15_050_000),
77-
Ethash: new(EthashConfig),
62+
ChainID: big.NewInt(1),
63+
HomesteadBlock: big.NewInt(1_150_000),
64+
DAOForkBlock: big.NewInt(1_920_000),
65+
DAOForkSupport: true,
66+
EIP150Block: big.NewInt(2_463_000),
67+
EIP150Hash: common.HexToHash("0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0"),
68+
EIP155Block: big.NewInt(2_675_000),
69+
EIP158Block: big.NewInt(2_675_000),
70+
ByzantiumBlock: big.NewInt(4_370_000),
71+
ConstantinopleBlock: big.NewInt(7_280_000),
72+
PetersburgBlock: big.NewInt(7_280_000),
73+
IstanbulBlock: big.NewInt(9_069_000),
74+
MuirGlacierBlock: big.NewInt(9_200_000),
75+
BerlinBlock: big.NewInt(12_244_000),
76+
LondonBlock: big.NewInt(12_965_000),
77+
ArrowGlacierBlock: big.NewInt(13_773_000),
78+
GrayGlacierBlock: big.NewInt(15_050_000),
79+
TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000
80+
Ethash: new(EthashConfig),
7881
}
7982

8083
// MainnetTrustedCheckpoint contains the light client trusted checkpoint for the main network.
@@ -471,10 +474,10 @@ func (c *ChainConfig) String() string {
471474
// Add a special section for the merge as it's non-obvious
472475
if c.TerminalTotalDifficulty == nil {
473476
banner += "The Merge is not yet available for this network!\n"
474-
banner += " - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md)"
477+
banner += " - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md"
475478
} else {
476479
banner += "Merge configured:\n"
477-
banner += " - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md)\n"
480+
banner += " - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md\n"
478481
banner += fmt.Sprintf(" - Network known to be merged: %v\n", c.TerminalTotalDifficultyPassed)
479482
banner += fmt.Sprintf(" - Total terminal difficulty: %v\n", c.TerminalTotalDifficulty)
480483
banner += fmt.Sprintf(" - Merge netsplit block: %-8v", c.MergeNetsplitBlock)

0 commit comments

Comments
 (0)