Skip to content

Commit

Permalink
chore(network): rename to homer mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHansLee committed Dec 13, 2024
1 parent 10e7223 commit b4382cb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
32 changes: 16 additions & 16 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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")
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions params/bootnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

Expand Down Expand Up @@ -188,7 +188,7 @@ var (
Enable4844: false,
}

StoryChainConfig = &ChainConfig{
HomerChainConfig = &ChainConfig{
ChainID: big.NewInt(1415),
HomesteadBlock: big.NewInt(0),
EIP150Block: big.NewInt(0),
Expand Down

0 comments on commit b4382cb

Please sign in to comment.