@ -18,6 +18,7 @@ package params
import (
import (
"fmt"
"fmt"
"math"
"math/big"
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
@ -38,249 +39,240 @@ var (
// MainnetChainConfig is the chain parameters to run a node on the main network.
// MainnetChainConfig is the chain parameters to run a node on the main network.
MainnetChainConfig = & ChainConfig {
MainnetChainConfig = & ChainConfig {
ChainID : big . NewInt ( 1 ) ,
ChainID : big . NewInt ( 1 ) ,
HomesteadBlock : big . NewInt ( 1_150_000 ) ,
HomesteadBlock : big . NewInt ( 1_150_000 ) ,
DAOForkBlock : big . NewInt ( 1_920_000 ) ,
DAOForkBlock : big . NewInt ( 1_920_000 ) ,
DAOForkSupport : true ,
DAOForkSupport : true ,
EIP150Block : big . NewInt ( 2_463_000 ) ,
EIP150Block : big . NewInt ( 2_463_000 ) ,
EIP155Block : big . NewInt ( 2_675_000 ) ,
EIP155Block : big . NewInt ( 2_675_000 ) ,
EIP158Block : big . NewInt ( 2_675_000 ) ,
EIP158Block : big . NewInt ( 2_675_000 ) ,
ByzantiumBlock : big . NewInt ( 4_370_000 ) ,
ByzantiumBlock : big . NewInt ( 4_370_000 ) ,
ConstantinopleBlock : big . NewInt ( 7_280_000 ) ,
ConstantinopleBlock : big . NewInt ( 7_280_000 ) ,
PetersburgBlock : big . NewInt ( 7_280_000 ) ,
PetersburgBlock : big . NewInt ( 7_280_000 ) ,
IstanbulBlock : big . NewInt ( 9_069_000 ) ,
IstanbulBlock : big . NewInt ( 9_069_000 ) ,
MuirGlacierBlock : big . NewInt ( 9_200_000 ) ,
MuirGlacierBlock : big . NewInt ( 9_200_000 ) ,
BerlinBlock : big . NewInt ( 12_244_000 ) ,
BerlinBlock : big . NewInt ( 12_244_000 ) ,
LondonBlock : big . NewInt ( 12_965_000 ) ,
LondonBlock : big . NewInt ( 12_965_000 ) ,
ArrowGlacierBlock : big . NewInt ( 13_773_000 ) ,
ArrowGlacierBlock : big . NewInt ( 13_773_000 ) ,
GrayGlacierBlock : big . NewInt ( 15_050_000 ) ,
GrayGlacierBlock : big . NewInt ( 15_050_000 ) ,
TerminalTotalDifficulty : MainnetTerminalTotalDifficulty , // 58_750_000_000_000_000_000_000
TerminalTotalDifficulty : MainnetTerminalTotalDifficulty , // 58_750_000_000_000_000_000_000
TerminalTotalDifficultyPassed : true ,
ShanghaiTime : newUint64 ( 1681338455 ) ,
ShanghaiTime : newUint64 ( 1681338455 ) ,
CancunTime : newUint64 ( 1710338135 ) ,
CancunTime : newUint64 ( 1710338135 ) ,
DepositContractAddress : common . HexToAddress ( "0x00000000219ab540356cbb839cbe05303d7705fa" ) ,
DepositContractAddress : common . HexToAddress ( "0x00000000219ab540356cbb839cbe05303d7705fa" ) ,
Ethash : new ( EthashConfig ) ,
Ethash : new ( EthashConfig ) ,
}
}
// HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network.
// HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network.
HoleskyChainConfig = & ChainConfig {
HoleskyChainConfig = & ChainConfig {
ChainID : big . NewInt ( 17000 ) ,
ChainID : big . NewInt ( 17000 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
DAOForkBlock : nil ,
DAOForkBlock : nil ,
DAOForkSupport : true ,
DAOForkSupport : true ,
EIP150Block : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : nil ,
MuirGlacierBlock : nil ,
BerlinBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : nil ,
ArrowGlacierBlock : nil ,
GrayGlacierBlock : nil ,
GrayGlacierBlock : nil ,
TerminalTotalDifficulty : big . NewInt ( 0 ) ,
TerminalTotalDifficulty : big . NewInt ( 0 ) ,
TerminalTotalDifficultyPassed : true ,
MergeNetsplitBlock : nil ,
MergeNetsplitBlock : nil ,
ShanghaiTime : newUint64 ( 1696000704 ) ,
ShanghaiTime : newUint64 ( 1696000704 ) ,
CancunTime : newUint64 ( 1707305664 ) ,
CancunTime : newUint64 ( 1707305664 ) ,
Ethash : new ( EthashConfig ) ,
Ethash : new ( EthashConfig ) ,
}
}
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
SepoliaChainConfig = & ChainConfig {
SepoliaChainConfig = & ChainConfig {
ChainID : big . NewInt ( 11155111 ) ,
ChainID : big . NewInt ( 11155111 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
DAOForkBlock : nil ,
DAOForkBlock : nil ,
DAOForkSupport : true ,
DAOForkSupport : true ,
EIP150Block : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : nil ,
ArrowGlacierBlock : nil ,
GrayGlacierBlock : nil ,
GrayGlacierBlock : nil ,
TerminalTotalDifficulty : big . NewInt ( 17_000_000_000_000_000 ) ,
TerminalTotalDifficulty : big . NewInt ( 17_000_000_000_000_000 ) ,
TerminalTotalDifficultyPassed : true ,
MergeNetsplitBlock : big . NewInt ( 1735371 ) ,
MergeNetsplitBlock : big . NewInt ( 1735371 ) ,
ShanghaiTime : newUint64 ( 1677557088 ) ,
ShanghaiTime : newUint64 ( 1677557088 ) ,
CancunTime : newUint64 ( 1706655072 ) ,
CancunTime : newUint64 ( 1706655072 ) ,
Ethash : new ( EthashConfig ) ,
Ethash : new ( EthashConfig ) ,
}
}
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Ethash consensus.
// and accepted by the Ethereum core developers into the Ethash consensus.
AllEthashProtocolChanges = & ChainConfig {
AllEthashProtocolChanges = & ChainConfig {
ChainID : big . NewInt ( 1337 ) ,
ChainID : big . NewInt ( 1337 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
DAOForkBlock : nil ,
DAOForkBlock : nil ,
DAOForkSupport : false ,
DAOForkSupport : false ,
EIP150Block : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
MergeNetsplitBlock : nil ,
TerminalTotalDifficulty : big . NewInt ( math . MaxInt64 ) ,
ShanghaiTime : nil ,
MergeNetsplitBlock : nil ,
CancunTime : nil ,
ShanghaiTime : nil ,
PragueTime : nil ,
CancunTime : nil ,
VerkleTime : nil ,
PragueTime : nil ,
TerminalTotalDifficulty : nil ,
VerkleTime : nil ,
TerminalTotalDifficultyPassed : true ,
Ethash : new ( EthashConfig ) ,
Ethash : new ( EthashConfig ) ,
Clique : nil ,
Clique : nil ,
}
}
AllDevChainProtocolChanges = & ChainConfig {
AllDevChainProtocolChanges = & ChainConfig {
ChainID : big . NewInt ( 1337 ) ,
ChainID : big . NewInt ( 1337 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
ShanghaiTime : newUint64 ( 0 ) ,
ShanghaiTime : newUint64 ( 0 ) ,
CancunTime : newUint64 ( 0 ) ,
CancunTime : newUint64 ( 0 ) ,
PragueTime : newUint64 ( 0 ) ,
TerminalTotalDifficulty : big . NewInt ( 0 ) ,
TerminalTotalDifficulty : big . NewInt ( 0 ) ,
PragueTime : newUint64 ( 0 ) ,
TerminalTotalDifficultyPassed : true ,
}
}
// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Clique consensus.
// and accepted by the Ethereum core developers into the Clique consensus.
AllCliqueProtocolChanges = & ChainConfig {
AllCliqueProtocolChanges = & ChainConfig {
ChainID : big . NewInt ( 1337 ) ,
ChainID : big . NewInt ( 1337 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
DAOForkBlock : nil ,
DAOForkBlock : nil ,
DAOForkSupport : false ,
DAOForkSupport : false ,
EIP150Block : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : nil ,
ArrowGlacierBlock : nil ,
GrayGlacierBlock : nil ,
GrayGlacierBlock : nil ,
MergeNetsplitBlock : nil ,
MergeNetsplitBlock : nil ,
ShanghaiTime : nil ,
ShanghaiTime : nil ,
CancunTime : nil ,
CancunTime : nil ,
PragueTime : nil ,
PragueTime : nil ,
VerkleTime : nil ,
VerkleTime : nil ,
TerminalTotalDifficulty : nil ,
TerminalTotalDifficulty : big . NewInt ( math . MaxInt64 ) ,
TerminalTotalDifficultyPassed : false ,
Ethash : nil ,
Ethash : nil ,
Clique : & CliqueConfig { Period : 0 , Epoch : 30000 } ,
Clique : & CliqueConfig { Period : 0 , Epoch : 30000 } ,
}
}
// TestChainConfig contains every protocol change (EIPs) introduced
// TestChainConfig contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers for testing purposes.
// and accepted by the Ethereum core developers for testing purposes.
TestChainConfig = & ChainConfig {
TestChainConfig = & ChainConfig {
ChainID : big . NewInt ( 1 ) ,
ChainID : big . NewInt ( 1 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
DAOForkBlock : nil ,
DAOForkBlock : nil ,
DAOForkSupport : false ,
DAOForkSupport : false ,
EIP150Block : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
MergeNetsplitBlock : nil ,
MergeNetsplitBlock : nil ,
ShanghaiTime : nil ,
ShanghaiTime : nil ,
CancunTime : nil ,
CancunTime : nil ,
PragueTime : nil ,
PragueTime : nil ,
VerkleTime : nil ,
VerkleTime : nil ,
TerminalTotalDifficulty : nil ,
TerminalTotalDifficulty : big . NewInt ( math . MaxInt64 ) ,
TerminalTotalDifficultyPassed : false ,
Ethash : new ( EthashConfig ) ,
Ethash : new ( EthashConfig ) ,
Clique : nil ,
Clique : nil ,
}
}
// MergedTestChainConfig contains every protocol change (EIPs) introduced
// MergedTestChainConfig contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers for testing purposes.
// and accepted by the Ethereum core developers for testing purposes.
MergedTestChainConfig = & ChainConfig {
MergedTestChainConfig = & ChainConfig {
ChainID : big . NewInt ( 1 ) ,
ChainID : big . NewInt ( 1 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
DAOForkBlock : nil ,
DAOForkBlock : nil ,
DAOForkSupport : false ,
DAOForkSupport : false ,
EIP150Block : big . NewInt ( 0 ) ,
EIP150Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP155Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
EIP158Block : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ByzantiumBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
ConstantinopleBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
BerlinBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
LondonBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
ArrowGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
GrayGlacierBlock : big . NewInt ( 0 ) ,
MergeNetsplitBlock : big . NewInt ( 0 ) ,
MergeNetsplitBlock : big . NewInt ( 0 ) ,
ShanghaiTime : newUint64 ( 0 ) ,
ShanghaiTime : newUint64 ( 0 ) ,
CancunTime : newUint64 ( 0 ) ,
CancunTime : newUint64 ( 0 ) ,
PragueTime : newUint64 ( 0 ) ,
PragueTime : newUint64 ( 0 ) ,
VerkleTime : nil ,
VerkleTime : nil ,
TerminalTotalDifficulty : big . NewInt ( 0 ) ,
TerminalTotalDifficulty : big . NewInt ( 0 ) ,
TerminalTotalDifficultyPassed : true ,
Ethash : new ( EthashConfig ) ,
Ethash : new ( EthashConfig ) ,
Clique : nil ,
Clique : nil ,
}
}
// NonActivatedConfig defines the chain configuration without activating
// NonActivatedConfig defines the chain configuration without activating
// any protocol change (EIPs).
// any protocol change (EIPs).
NonActivatedConfig = & ChainConfig {
NonActivatedConfig = & ChainConfig {
ChainID : big . NewInt ( 1 ) ,
ChainID : big . NewInt ( 1 ) ,
HomesteadBlock : nil ,
HomesteadBlock : nil ,
DAOForkBlock : nil ,
DAOForkBlock : nil ,
DAOForkSupport : false ,
DAOForkSupport : false ,
EIP150Block : nil ,
EIP150Block : nil ,
EIP155Block : nil ,
EIP155Block : nil ,
EIP158Block : nil ,
EIP158Block : nil ,
ByzantiumBlock : nil ,
ByzantiumBlock : nil ,
ConstantinopleBlock : nil ,
ConstantinopleBlock : nil ,
PetersburgBlock : nil ,
PetersburgBlock : nil ,
IstanbulBlock : nil ,
IstanbulBlock : nil ,
MuirGlacierBlock : nil ,
MuirGlacierBlock : nil ,
BerlinBlock : nil ,
BerlinBlock : nil ,
LondonBlock : nil ,
LondonBlock : nil ,
ArrowGlacierBlock : nil ,
ArrowGlacierBlock : nil ,
GrayGlacierBlock : nil ,
GrayGlacierBlock : nil ,
MergeNetsplitBlock : nil ,
MergeNetsplitBlock : nil ,
ShanghaiTime : nil ,
ShanghaiTime : nil ,
CancunTime : nil ,
CancunTime : nil ,
PragueTime : nil ,
PragueTime : nil ,
VerkleTime : nil ,
VerkleTime : nil ,
TerminalTotalDifficulty : nil ,
TerminalTotalDifficulty : big . NewInt ( math . MaxInt64 ) ,
TerminalTotalDifficultyPassed : false ,
Ethash : new ( EthashConfig ) ,
Ethash : new ( EthashConfig ) ,
Clique : nil ,
Clique : nil ,
}
}
TestRules = TestChainConfig . Rules ( new ( big . Int ) , false , 0 )
TestRules = TestChainConfig . Rules ( new ( big . Int ) , false , 0 )
)
)
@ -332,13 +324,6 @@ type ChainConfig struct {
// the network that triggers the consensus upgrade.
// the network that triggers the consensus upgrade.
TerminalTotalDifficulty * big . Int ` json:"terminalTotalDifficulty,omitempty" `
TerminalTotalDifficulty * big . Int ` json:"terminalTotalDifficulty,omitempty" `
// TerminalTotalDifficultyPassed is a flag specifying that the network already
// passed the terminal total difficulty. Its purpose is to disable legacy sync
// even without having seen the TTD locally (safer long term).
//
// TODO(karalabe): Drop this field eventually (always assuming PoS mode)
TerminalTotalDifficultyPassed bool ` json:"terminalTotalDifficultyPassed,omitempty" `
DepositContractAddress common . Address ` json:"depositContractAddress,omitempty" `
DepositContractAddress common . Address ` json:"depositContractAddress,omitempty" `
// Various consensus engines
// Various consensus engines
@ -377,21 +362,9 @@ func (c *ChainConfig) Description() string {
banner += fmt . Sprintf ( "Chain ID: %v (%s)\n" , c . ChainID , network )
banner += fmt . Sprintf ( "Chain ID: %v (%s)\n" , c . ChainID , network )
switch {
switch {
case c . Ethash != nil :
case c . Ethash != nil :
if c . TerminalTotalDifficulty == nil {
banner += "Consensus: Beacon (proof-of-stake), merged from Ethash (proof-of-work)\n"
banner += "Consensus: Ethash (proof-of-work)\n"
} else if ! c . TerminalTotalDifficultyPassed {
banner += "Consensus: Beacon (proof-of-stake), merging from Ethash (proof-of-work)\n"
} else {
banner += "Consensus: Beacon (proof-of-stake), merged from Ethash (proof-of-work)\n"
}
case c . Clique != nil :
case c . Clique != nil :
if c . TerminalTotalDifficulty == nil {
banner += "Consensus: Beacon (proof-of-stake), merged from Clique (proof-of-authority)\n"
banner += "Consensus: Clique (proof-of-authority)\n"
} else if ! c . TerminalTotalDifficultyPassed {
banner += "Consensus: Beacon (proof-of-stake), merging from Clique (proof-of-authority)\n"
} else {
banner += "Consensus: Beacon (proof-of-stake), merged from Clique (proof-of-authority)\n"
}
default :
default :
banner += "Consensus: unknown\n"
banner += "Consensus: unknown\n"
}
}
@ -426,17 +399,12 @@ func (c *ChainConfig) Description() string {
banner += "\n"
banner += "\n"
// Add a special section for the merge as it's non-obvious
// Add a special section for the merge as it's non-obvious
if c . TerminalTotalDifficulty == nil {
banner += "Merge configured:\n"
banner += "The Merge is not yet available for this network!\n"
banner += " - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md\n"
banner += " - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md\n"
banner += " - Network known to be merged\n"
} else {
banner += fmt . Sprintf ( " - Total terminal difficulty: %v\n" , c . TerminalTotalDifficulty )
banner += "Merge configured:\n"
if c . MergeNetsplitBlock != nil {
banner += " - Hard-fork specification: https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/paris.md\n"
banner += fmt . Sprintf ( " - Merge netsplit block: #%-8v\n" , c . MergeNetsplitBlock )
banner += fmt . Sprintf ( " - Network known to be merged: %v\n" , c . TerminalTotalDifficultyPassed )
banner += fmt . Sprintf ( " - Total terminal difficulty: %v\n" , c . TerminalTotalDifficulty )
if c . MergeNetsplitBlock != nil {
banner += fmt . Sprintf ( " - Merge netsplit block: #%-8v\n" , c . MergeNetsplitBlock )
}
}
}
banner += "\n"
banner += "\n"