From b4382cbbe4d74be4e3a79844a8944ad0ca857c1b Mon Sep 17 00:00:00 2001 From: 0xHansLee Date: Fri, 13 Dec 2024 11:21:37 +0900 Subject: [PATCH] chore(network): rename to homer mainnet --- cmd/utils/flags.go | 32 ++++++++++++++++---------------- core/genesis.go | 6 +++--- params/bootnodes.go | 6 +++--- params/config.go | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index ff66e5aec..d986ab518 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -627,9 +627,9 @@ var ( Usage: "odyssey test network: pre-configured proof-of-stake test network", Category: flags.MiscCategory, } - StoryMainnetFlag = &cli.BoolFlag{ - Name: "story", - Usage: "story mainnet: pre-configured proof of stake network", + HomerFlag = &cli.BoolFlag{ + Name: "homer", + Usage: "homer main network: pre-configured proof of stake main network", Category: flags.MiscCategory, } LocalFlag = &cli.BoolFlag{ @@ -998,7 +998,7 @@ var ( LocalFlag, } // NetworkFlags is the flag group of all built-in supported networks. - NetworkFlags = append([]cli.Flag{MainnetFlag, StoryMainnetFlag}, TestnetFlags...) + NetworkFlags = append([]cli.Flag{MainnetFlag, HomerFlag}, TestnetFlags...) // DatabaseFlags is the flag group of all database flags. DatabaseFlags = []cli.Flag{ @@ -1031,8 +1031,8 @@ func MakeDataDir(ctx *cli.Context) string { if ctx.Bool(OdysseyFlag.Name) { return filepath.Join(path, "odyssey") } - if ctx.Bool(StoryMainnetFlag.Name) { - return filepath.Join(path, "story") + if ctx.Bool(HomerFlag.Name) { + return filepath.Join(path, "homer") } if ctx.Bool(LocalFlag.Name) { return filepath.Join(path, "local") @@ -1103,8 +1103,8 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { urls = params.IliadBootnodes case ctx.Bool(OdysseyFlag.Name): urls = params.OdysseyBootnodes - case ctx.Bool(StoryMainnetFlag.Name): - urls = params.StoryMainnetBootnodes + case ctx.Bool(HomerFlag.Name): + urls = params.HomerBootnodes case ctx.Bool(LocalFlag.Name): urls = params.LocalBootnodes } @@ -1542,8 +1542,8 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) { cfg.DataDir = filepath.Join(node.DefaultDataDir(), "iliad") case ctx.Bool(OdysseyFlag.Name) && cfg.DataDir == node.DefaultDataDir(): cfg.DataDir = filepath.Join(node.DefaultDataDir(), "odyssey") - case ctx.Bool(StoryMainnetFlag.Name) && cfg.DataDir == node.DefaultDataDir(): - cfg.DataDir = filepath.Join(node.DefaultDataDir(), "story") + case ctx.Bool(HomerFlag.Name) && cfg.DataDir == node.DefaultDataDir(): + cfg.DataDir = filepath.Join(node.DefaultDataDir(), "homer") case ctx.Bool(LocalFlag.Name) && cfg.DataDir == node.DefaultDataDir(): cfg.DataDir = filepath.Join(node.DefaultDataDir(), "local") } @@ -1701,7 +1701,7 @@ func CheckExclusive(ctx *cli.Context, args ...interface{}) { // SetEthConfig applies eth-related command line flags to the config. func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { // Avoid conflicting network flags - CheckExclusive(ctx, MainnetFlag, DeveloperFlag, GoerliFlag, SepoliaFlag, HoleskyFlag, IliadFlag, OdysseyFlag, StoryMainnetFlag, LocalFlag) + CheckExclusive(ctx, MainnetFlag, DeveloperFlag, GoerliFlag, SepoliaFlag, HoleskyFlag, IliadFlag, OdysseyFlag, HomerFlag, LocalFlag) CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer // Set configurations from CLI flags @@ -1889,12 +1889,12 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { cfg.Genesis = core.DefaultOdysseyGenesisBlock() SetDNSDiscoveryDefaults(cfg, params.OdysseyGenesisHash) cfg.Miner.GasPrice = big.NewInt(params.GWei * 16) - case ctx.Bool(StoryMainnetFlag.Name): + case ctx.Bool(HomerFlag.Name): if !ctx.IsSet(NetworkIdFlag.Name) { cfg.NetworkId = 1415 } - cfg.Genesis = core.DefaultStoryGenesisBlock() - SetDNSDiscoveryDefaults(cfg, params.StoryGenesisHash) + cfg.Genesis = core.DefaultHomerGenesisBlock() + SetDNSDiscoveryDefaults(cfg, params.HomerGenesisHash) cfg.Miner.GasPrice = big.NewInt(params.GWei * 16) case ctx.Bool(LocalFlag.Name): if !ctx.IsSet(NetworkIdFlag.Name) { @@ -2228,8 +2228,8 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis { genesis = core.DefaultIliadGenesisBlock() case ctx.Bool(OdysseyFlag.Name): genesis = core.DefaultOdysseyGenesisBlock() - case ctx.Bool(StoryMainnetFlag.Name): - genesis = core.DefaultStoryGenesisBlock() + case ctx.Bool(HomerFlag.Name): + genesis = core.DefaultHomerGenesisBlock() case ctx.Bool(LocalFlag.Name): genesis = core.DefaultLocalGenesisBlock() case ctx.Bool(DeveloperFlag.Name): diff --git a/core/genesis.go b/core/genesis.go index 3cdcb72f1..be87ce066 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -608,10 +608,10 @@ func DefaultOdysseyGenesisBlock() *Genesis { } } -// DefaultStoryGenesisBlock returns the story mainnet genesis block. -func DefaultStoryGenesisBlock() *Genesis { +// DefaultHomerGenesisBlock returns the homer network genesis block. +func DefaultHomerGenesisBlock() *Genesis { return &Genesis{ - Config: params.StoryChainConfig, + Config: params.HomerChainConfig, Difficulty: big.NewInt(0x20000), GasLimit: 0x7A1200, Nonce: 0x42, diff --git a/params/bootnodes.go b/params/bootnodes.go index 4f2df046a..fa8c92178 100644 --- a/params/bootnodes.go +++ b/params/bootnodes.go @@ -66,9 +66,9 @@ var OdysseyBootnodes = []string{ "enode://298bc05889e120e50e7a344e31adb72901caaff9e747b3e8f57c5786e6167452857cbd0ff7d5e0f849a8dfd26efcc3da1795e28d7cb05d120e97a89e79ec4b18@b2.odyssey-testnet.storyrpc.io:30303", } -// StoryMainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the -// Story mainnet. -var StoryMainnetBootnodes = []string{ +// HomerBootnodes are the enode URLs of the P2P bootstrap nodes running on the +// Homer main network. +var HomerBootnodes = []string{ // Upstream bootnodes "enode://077aa94a5bf388adda35e0d5a7bd8cb5e9741ea5c18381fd14b16018e112497b7c0a400f50677deb4271af3bc0a1b74f093067a398257b76e3a0d7387a432110@b1.odyssey-testnet.storyrpc.io:30303", "enode://298bc05889e120e50e7a344e31adb72901caaff9e747b3e8f57c5786e6167452857cbd0ff7d5e0f849a8dfd26efcc3da1795e28d7cb05d120e97a89e79ec4b18@b2.odyssey-testnet.storyrpc.io:30303", diff --git a/params/config.go b/params/config.go index 7cbac76c1..c93f6e130 100644 --- a/params/config.go +++ b/params/config.go @@ -32,7 +32,7 @@ var ( GoerliGenesisHash = common.HexToHash("0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a") IliadGenesisHash = common.HexToHash("0xf5ebc6f0982e8bf7fd532b3f959f84d12b3dedd2827af8d31f5389447bedafc6") OdysseyGenesisHash = common.HexToHash("0xf5ebc6f0982e8bf7fd532b3f959f84d12b3dedd2827af8d31f5389447bedafc6") - StoryGenesisHash = common.HexToHash("0xf5ebc6f0982e8bf7fd532b3f959f84d12b3dedd2827af8d31f5389447bedafc6") + HomerGenesisHash = common.HexToHash("0xf5ebc6f0982e8bf7fd532b3f959f84d12b3dedd2827af8d31f5389447bedafc6") LocalGenesisHash = common.HexToHash("0x16152175edd8931dbf10912ea3e09c8bb2ffe8ce60e4ff5d3c4a973276e614e9") ) @@ -188,7 +188,7 @@ var ( Enable4844: false, } - StoryChainConfig = &ChainConfig{ + HomerChainConfig = &ChainConfig{ ChainID: big.NewInt(1415), HomesteadBlock: big.NewInt(0), EIP150Block: big.NewInt(0),