diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index 9ed1467052..077c736926 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -46,8 +46,7 @@ var ( // calcDifficultyEip2384 is the difficulty adjustment algorithm as specified by EIP 2384. // It offsets the bomb 4M blocks from Constantinople, so in total 9M blocks. - // Specification EIP-2384 :https://github.com/ethereum/EIPs/pull/2384 - // TODO: change link once it's merged + // Specification EIP-2384: https://eips.ethereum.org/EIPS/eip-2384 calcDifficultyEip2384 = makeDifficultyCalculator(big.NewInt(9000000)) // calcDifficultyConstantinople is the difficulty adjustment algorithm for Constantinople. diff --git a/params/config.go b/params/config.go index d84c4e954c..62554cc8fb 100644 --- a/params/config.go +++ b/params/config.go @@ -66,6 +66,7 @@ var ( ConstantinopleBlock: big.NewInt(7280000), PetersburgBlock: big.NewInt(7280000), IstanbulBlock: big.NewInt(9069000), + EIP2384Block: big.NewInt(9200000), Ethash: new(EthashConfig), } @@ -104,6 +105,7 @@ var ( ConstantinopleBlock: big.NewInt(4230000), PetersburgBlock: big.NewInt(4939394), IstanbulBlock: big.NewInt(6485846), + EIP2384Block: big.NewInt(7117117), Ethash: new(EthashConfig), } @@ -292,7 +294,7 @@ type ChainConfig struct { ConstantinopleBlock *big.Int `json:"constantinopleBlock,omitempty"` // Constantinople switch block (nil = no fork, 0 = already activated) PetersburgBlock *big.Int `json:"petersburgBlock,omitempty"` // Petersburg switch block (nil = same as Constantinople) IstanbulBlock *big.Int `json:"istanbulBlock,omitempty"` // Istanbul switch block (nil = no fork, 0 = already on istanbul) - EIP2384Block *big.Int `json:"eip2384Block,omitempty"` // Eip-2384 (bomb delay) switch block (nil = no fork, 0 = already activated) + EIP2384Block *big.Int `json:"muirGlacierBlock,omitempty"` // Eip-2384 (bomb delay) switch block (nil = no fork, 0 = already activated) EWASMBlock *big.Int `json:"ewasmBlock,omitempty"` // EWASM switch block (nil = no fork, 0 = already activated) // Various consensus engines @@ -382,6 +384,7 @@ func (c *ChainConfig) IsConstantinople(num *big.Int) bool { return isForked(c.ConstantinopleBlock, num) } +// IsEip2384 returns whether num is equal or greater than the EIP 2384 block func (c *ChainConfig) IsEip2384(num *big.Int) bool { return isForked(c.EIP2384Block, num) }