Skip to content

Commit

Permalink
Add mainnet config (#33)
Browse files Browse the repository at this point in the history
* Mainnet config

* Update version.go
  • Loading branch information
qqqeck authored Dec 9, 2024
1 parent f1b2738 commit d702459
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 30 deletions.
7 changes: 3 additions & 4 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,9 @@ func (g *Genesis) MustCommit(db ethdb.Database, triedb *triedb.Database) *types.
func DefaultGenesisBlock() *Genesis {
return &Genesis{
Config: params.MainnetChainConfig,
Nonce: 66,
ExtraData: hexutil.MustDecode("0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"),
GasLimit: 5000,
Difficulty: big.NewInt(17179869184),
Timestamp: 1733529600,
GasLimit: 30000000,
Difficulty: big.NewInt(1),
Alloc: decodePrealloc(mainnetAllocData),
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/genesis_alloc.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions params/bootnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ var MainnetBootnodes = []string{}
var DolphinBootnodes = []string{}

var MainnetV5Bootnodes = []string{
"enr:-JS4QHQ9Aq02CgtUe2bjoup1YWn6QB0Db8OVXvCeTijDRPKsSqibt5OfJpz3Veg0-9S6eJZmm883gpztfslUErat_M2GAZGN3iCVgmlkgnY0gmlwhI_GbfmEb3ZlcoQAAAAAiXNlY3AyNTZrMaEDri_DUGOyWhykON3vR5XhyTV9HwYhp1_NG-ctM9X5fNqDdWRwgsc4",
"enr:-JS4QCMC2ZdcJJHIeErB0nsKoMQpBglHOEYhoGlogZpjNo7QeRj0VK14R1Qaovq7QUJKcFqa7shYtnhWokuXsALuUUSGAZGN3iBdgmlkgnY0gmlwhJgq4mWEb3ZlcoQAAAAAiXNlY3AyNTZrMaECVAeRN5aXm2G-E4EWrZTa7zsaoUpnl_WcFjghDQ-XJZSDdWRwgsc4",
"enr:-JS4QD70J7PbKC-9XB5sYn-SWcoudeDYZeDqAE1efA6bX8FMdNSaJeYajFMiDcwWcloGrg0CyhU0Wy64LfI_TlDeVPCGAZOdApnxgmlkgnY0gmlwhJ31NHqEb3ZlcoQAAAAAiXNlY3AyNTZrMaEDL9b2ICPLhD22-nErr68hNE_Pgc7JTfQfKYqG9h6jXWWDdWRwgsc4",
"enr:-JS4QHLj47rvFV0jnZH3KxJ3K__ZhsmcW1Ueg4dI50tzNtiEBRnk4UZ7u1r-OSlkS-yEgSGbsTmcZf-16_QlYwZ6ENGGAZOdApnxgmlkgnY0gmlwhJ31MLmEb3ZlcoQAAAAAiXNlY3AyNTZrMaEDzDrmOEX8MOD5AA_tJpVE7D1PpggFdhU_eiMEvTq949mDdWRwgsc4",
}

var DolphinV5Bootnodes = []string{
Expand Down
42 changes: 22 additions & 20 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

// Genesis hashes to enforce below configs on.
var (
MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
MainnetGenesisHash = common.HexToHash("0x27444642f22cd527746a7263de5a3d025edcebac726897469dff37874c3715cc")
DolphinGenesisHash = common.HexToHash("0xccec2da84333da0edd9694552c77c81efdf3c0c225aa137c97c52baa20e56ee5")
)

Expand All @@ -37,27 +37,29 @@ var (

// MainnetChainConfig is the chain parameters to run a node on the main network.
MainnetChainConfig = &ChainConfig{
ChainID: big.NewInt(1),
HomesteadBlock: big.NewInt(1_150_000),
DAOForkBlock: big.NewInt(1_920_000),
ChainID: big.NewInt(54176),
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
EIP150Block: big.NewInt(2_463_000),
EIP155Block: big.NewInt(2_675_000),
EIP158Block: big.NewInt(2_675_000),
ByzantiumBlock: big.NewInt(4_370_000),
ConstantinopleBlock: big.NewInt(7_280_000),
PetersburgBlock: big.NewInt(7_280_000),
IstanbulBlock: big.NewInt(9_069_000),
MuirGlacierBlock: big.NewInt(9_200_000),
BerlinBlock: big.NewInt(12_244_000),
LondonBlock: big.NewInt(12_965_000),
ArrowGlacierBlock: big.NewInt(13_773_000),
GrayGlacierBlock: big.NewInt(15_050_000),
TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(0),
ConstantinopleBlock: big.NewInt(0),
PetersburgBlock: big.NewInt(0),
IstanbulBlock: big.NewInt(0),
MuirGlacierBlock: big.NewInt(0),
BerlinBlock: big.NewInt(0),
LondonBlock: big.NewInt(0),
ArrowGlacierBlock: nil,
GrayGlacierBlock: nil,
TerminalTotalDifficulty: big.NewInt(0),
TerminalTotalDifficultyPassed: true,
ShanghaiTime: newUint64(1681338455),
CancunTime: newUint64(1710338135),
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
MergeNetsplitBlock: big.NewInt(0),
ShanghaiTime: newUint64(1733529600),
CancunTime: newUint64(1733529600),
PragueTime: newUint64(1733529600),
DepositContractAddress: common.HexToAddress("0x000000000000000000000000000000000beac017"),
Ethash: new(EthashConfig),
}
// DolphinChainConfig contains the chain parameters to run a node on the Dolphin test network.
Expand Down
6 changes: 3 additions & 3 deletions params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release
VersionPatch = 6 // Patch version component of the current release
VersionMeta = "alpaca" // Version metadata to append to the version string
VersionMinor = 4 // Minor version component of the current release
VersionPatch = 3 // Patch version component of the current release
VersionMeta = "stable" // Version metadata to append to the version string
)

// Version holds the textual version string.
Expand Down

0 comments on commit d702459

Please sign in to comment.