mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
change: mumbai to bor-mumbai
This commit is contained in:
parent
0c4366ea6a
commit
00b5788793
7 changed files with 12 additions and 16 deletions
|
|
@ -235,7 +235,7 @@ func ethFilter(args []string) (nodeFilter, error) {
|
||||||
filter = forkid.NewStaticFilter(params.GoerliChainConfig, params.GoerliGenesisHash)
|
filter = forkid.NewStaticFilter(params.GoerliChainConfig, params.GoerliGenesisHash)
|
||||||
case "ropsten":
|
case "ropsten":
|
||||||
filter = forkid.NewStaticFilter(params.RopstenChainConfig, params.RopstenGenesisHash)
|
filter = forkid.NewStaticFilter(params.RopstenChainConfig, params.RopstenGenesisHash)
|
||||||
case "mumbai":
|
case "bor-mumbai":
|
||||||
filter = forkid.NewStaticFilter(params.MumbaiChainConfig, params.MumbaiGenesisHash)
|
filter = forkid.NewStaticFilter(params.MumbaiChainConfig, params.MumbaiGenesisHash)
|
||||||
case "bor-mainnet":
|
case "bor-mainnet":
|
||||||
filter = forkid.NewStaticFilter(params.BorMainnetChainConfig, params.BorMainnetGenesisHash)
|
filter = forkid.NewStaticFilter(params.BorMainnetChainConfig, params.BorMainnetGenesisHash)
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ var (
|
||||||
|
|
||||||
goerliFlag = flag.Bool("goerli", false, "Initializes the faucet with Görli network config")
|
goerliFlag = flag.Bool("goerli", false, "Initializes the faucet with Görli network config")
|
||||||
rinkebyFlag = flag.Bool("rinkeby", false, "Initializes the faucet with Rinkeby network config")
|
rinkebyFlag = flag.Bool("rinkeby", false, "Initializes the faucet with Rinkeby network config")
|
||||||
mumbaiFlag = flag.Bool("mumbai", false, "Initializes the faucet with Mumbai network config")
|
mumbaiFlag = flag.Bool("bor-mumbai", false, "Initializes the faucet with Bor-Mumbai network config")
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ func prepare(ctx *cli.Context) {
|
||||||
log.Info("Starting Geth on Ethereum mainnet...")
|
log.Info("Starting Geth on Ethereum mainnet...")
|
||||||
}
|
}
|
||||||
// If we're a full node on mainnet without --cache specified, bump default cache allowance
|
// If we're a full node on mainnet without --cache specified, bump default cache allowance
|
||||||
if ctx.GlobalString(utils.SyncModeFlag.Name) != "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.BorMainnetFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) {
|
if ctx.GlobalString(utils.SyncModeFlag.Name) != "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) {
|
||||||
// Make sure we're not on any supported preconfigured testnet either
|
// Make sure we're not on any supported preconfigured testnet either
|
||||||
if !ctx.GlobalIsSet(utils.RopstenFlag.Name) && !ctx.GlobalIsSet(utils.RinkebyFlag.Name) && !ctx.GlobalIsSet(utils.GoerliFlag.Name) && !ctx.GlobalIsSet(utils.MumbaiFlag.Name) && !ctx.GlobalIsSet(utils.DeveloperFlag.Name) {
|
if !ctx.GlobalIsSet(utils.RopstenFlag.Name) && !ctx.GlobalIsSet(utils.RinkebyFlag.Name) && !ctx.GlobalIsSet(utils.GoerliFlag.Name) && !ctx.GlobalIsSet(utils.MumbaiFlag.Name) && !ctx.GlobalIsSet(utils.DeveloperFlag.Name) {
|
||||||
// Nope, we're really on mainnet. Bump that cache up!
|
// Nope, we're really on mainnet. Bump that cache up!
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ var (
|
||||||
Usage: "Ropsten network: pre-configured proof-of-work test network",
|
Usage: "Ropsten network: pre-configured proof-of-work test network",
|
||||||
}
|
}
|
||||||
MumbaiFlag = cli.BoolFlag{
|
MumbaiFlag = cli.BoolFlag{
|
||||||
Name: "mumbai",
|
Name: "bor-mumbai",
|
||||||
Usage: "Mumbai network: pre-configured proof-of-stake test network",
|
Usage: "Mumbai network: pre-configured proof-of-stake test network",
|
||||||
}
|
}
|
||||||
BorMainnetFlag = cli.BoolFlag{
|
BorMainnetFlag = cli.BoolFlag{
|
||||||
|
|
@ -805,7 +805,7 @@ func MakeDataDir(ctx *cli.Context) string {
|
||||||
if ctx.GlobalBool(GoerliFlag.Name) {
|
if ctx.GlobalBool(GoerliFlag.Name) {
|
||||||
return filepath.Join(path, "goerli")
|
return filepath.Join(path, "goerli")
|
||||||
}
|
}
|
||||||
if ctx.GlobalBool(MumbaiFlag.Name) {
|
if ctx.GlobalBool(MumbaiFlag.Name) || ctx.GlobalBool(BorMainnetFlag.Name) {
|
||||||
homeDir, _ := os.UserHomeDir()
|
homeDir, _ := os.UserHomeDir()
|
||||||
return filepath.Join(homeDir, "/.bor/data")
|
return filepath.Join(homeDir, "/.bor/data")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -423,16 +423,13 @@ func DefaultMumbaiGenesisBlock() *Genesis {
|
||||||
func DefaultBorMainnetGenesisBlock() *Genesis {
|
func DefaultBorMainnetGenesisBlock() *Genesis {
|
||||||
return &Genesis{
|
return &Genesis{
|
||||||
Config: params.BorMainnetChainConfig,
|
Config: params.BorMainnetChainConfig,
|
||||||
Nonce: 0x0,
|
Nonce: 0,
|
||||||
Timestamp: 0x5ED20F84,
|
Timestamp: 1590824836,
|
||||||
GasLimit: 0x989680,
|
GasLimit: 10000000,
|
||||||
Difficulty: big.NewInt(1),
|
Difficulty: big.NewInt(1),
|
||||||
Mixhash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
|
Mixhash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
|
||||||
Coinbase: common.HexToAddress("0x0000000000000000000000000000000000000000"),
|
Coinbase: common.HexToAddress("0x0000000000000000000000000000000000000000"),
|
||||||
Alloc: readPrealloc("allocs/bor_mainnet.json"),
|
Alloc: readPrealloc("allocs/bor_mainnet.json"),
|
||||||
Number: 0x0,
|
|
||||||
GasUsed: 0x0,
|
|
||||||
ParentHash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -246,10 +246,7 @@ func Setup(ctx *cli.Context) error {
|
||||||
// This context value ("metrics.addr") represents the utils.MetricsHTTPFlag.Name.
|
// This context value ("metrics.addr") represents the utils.MetricsHTTPFlag.Name.
|
||||||
// It cannot be imported because it will cause a cyclical dependency.
|
// It cannot be imported because it will cause a cyclical dependency.
|
||||||
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
|
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
|
||||||
} else if ctx.GlobalIsSet("mumbai") {
|
} else if ctx.GlobalIsSet("bor-mumbai") || ctx.GlobalIsSet("bor-mainnet") {
|
||||||
address := fmt.Sprintf("%s:%d", "0.0.0.0", 7071)
|
|
||||||
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
|
|
||||||
} else if ctx.GlobalIsSet("bor-mainnet") {
|
|
||||||
address := fmt.Sprintf("%s:%d", "0.0.0.0", 7071)
|
address := fmt.Sprintf("%s:%d", "0.0.0.0", 7071)
|
||||||
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
|
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,8 +251,10 @@ var (
|
||||||
BorMainnetChainConfig = &ChainConfig{
|
BorMainnetChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(137),
|
ChainID: big.NewInt(137),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
EIP150Block: big.NewInt(0),
|
DAOForkBlock: nil,
|
||||||
|
DAOForkSupport: true,
|
||||||
EIP150Hash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
|
EIP150Hash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"),
|
||||||
|
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),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue