good morning!!!!

Skip to content
Snippets Groups Projects
Commit 6f54d66c authored by Krishna Upadhyaya's avatar Krishna Upadhyaya
Browse files

add: mumbai geth config updated

parent 2f40184d
Branches
Tags
No related merge requests found
...@@ -23,6 +23,7 @@ import ( ...@@ -23,6 +23,7 @@ import (
"math/big" "math/big"
"os" "os"
"reflect" "reflect"
"time"
"unicode" "unicode"
"gopkg.in/urfave/cli.v1" "gopkg.in/urfave/cli.v1"
...@@ -33,6 +34,7 @@ import ( ...@@ -33,6 +34,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/usbwallet" "github.com/ethereum/go-ethereum/accounts/usbwallet"
"github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/eth/catalyst" "github.com/ethereum/go-ethereum/eth/catalyst"
"github.com/ethereum/go-ethereum/eth/downloader"
"github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/internal/ethapi" "github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
...@@ -133,6 +135,10 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) { ...@@ -133,6 +135,10 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
} }
} }
if ctx.GlobalIsSet(utils.MumbaiFlag.Name) {
setDefaultMumbaiGethConfig(ctx, &cfg)
}
// Apply flags. // Apply flags.
utils.SetNodeConfig(ctx, &cfg.Node) utils.SetNodeConfig(ctx, &cfg.Node)
stack, err := node.New(&cfg.Node) stack, err := node.New(&cfg.Node)
...@@ -328,3 +334,26 @@ func setAccountManagerBackends(stack *node.Node) error { ...@@ -328,3 +334,26 @@ func setAccountManagerBackends(stack *node.Node) error {
return nil return nil
} }
func setDefaultMumbaiGethConfig(ctx *cli.Context, config *gethConfig) {
config.Node.P2P.ListenAddr = fmt.Sprintf(":%d", 30303)
config.Node.HTTPHost = "0.0.0.0"
config.Node.HTTPVirtualHosts = []string{"*"}
config.Node.HTTPCors = []string{"*"}
config.Node.HTTPPort = 8545
config.Node.IPCPath = utils.MakeDataDir(ctx) + "/bor.ipc"
config.Node.HTTPModules = []string{"eth", "net", "web3", "txpool", "bor"}
config.Eth.SyncMode = downloader.FullSync
config.Eth.NetworkId = 80001
config.Eth.Miner.GasCeil = 20000000
//--miner.gastarget is depreceated, No longed used
config.Eth.TxPool.NoLocals = true
config.Eth.TxPool.AccountSlots = 16
config.Eth.TxPool.GlobalSlots = 131072
config.Eth.TxPool.AccountQueue = 64
config.Eth.TxPool.GlobalQueue = 131072
config.Eth.TxPool.Lifetime = 90 * time.Minute
config.Node.P2P.MaxPeers = 200
config.Metrics.Enabled = true
// --pprof is enabled in 'internal/debug/flags.go'
}
...@@ -135,7 +135,8 @@ func remoteConsole(ctx *cli.Context) error { ...@@ -135,7 +135,8 @@ func remoteConsole(ctx *cli.Context) error {
} else if ctx.GlobalBool(utils.GoerliFlag.Name) { } else if ctx.GlobalBool(utils.GoerliFlag.Name) {
path = filepath.Join(path, "goerli") path = filepath.Join(path, "goerli")
} else if ctx.GlobalBool(utils.MumbaiFlag.Name) { } else if ctx.GlobalBool(utils.MumbaiFlag.Name) {
path = filepath.Join(path, "mumbai") homeDir, _ := os.UserHomeDir()
path = filepath.Join(homeDir, "/.bor/data")
} }
} }
endpoint = fmt.Sprintf("%s/geth.ipc", path) endpoint = fmt.Sprintf("%s/geth.ipc", path)
......
...@@ -284,7 +284,7 @@ func prepare(ctx *cli.Context) { ...@@ -284,7 +284,7 @@ func prepare(ctx *cli.Context) {
log.Info("Starting Geth on Görli testnet...") log.Info("Starting Geth on Görli testnet...")
case ctx.GlobalIsSet(utils.MumbaiFlag.Name): case ctx.GlobalIsSet(utils.MumbaiFlag.Name):
log.Info("Starting Geth on Mumbai testnet...") log.Info("Starting Bor on Mumbai testnet...")
case ctx.GlobalIsSet(utils.DeveloperFlag.Name): case ctx.GlobalIsSet(utils.DeveloperFlag.Name):
log.Info("Starting Geth in ephemeral dev mode...") log.Info("Starting Geth in ephemeral dev mode...")
......
...@@ -802,7 +802,8 @@ func MakeDataDir(ctx *cli.Context) string { ...@@ -802,7 +802,8 @@ func MakeDataDir(ctx *cli.Context) string {
return filepath.Join(path, "goerli") return filepath.Join(path, "goerli")
} }
if ctx.GlobalBool(MumbaiFlag.Name) { if ctx.GlobalBool(MumbaiFlag.Name) {
return filepath.Join(path, "mumbai") homeDir, _ := os.UserHomeDir()
return filepath.Join(homeDir, "/.bor/data")
} }
return path return path
} }
...@@ -1302,7 +1303,8 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) { ...@@ -1302,7 +1303,8 @@ func setDataDir(ctx *cli.Context, cfg *node.Config) {
case ctx.GlobalBool(GoerliFlag.Name) && cfg.DataDir == node.DefaultDataDir(): case ctx.GlobalBool(GoerliFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli") cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli")
case ctx.GlobalBool(MumbaiFlag.Name) && cfg.DataDir == node.DefaultDataDir(): case ctx.GlobalBool(MumbaiFlag.Name) && cfg.DataDir == node.DefaultDataDir():
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "mumbai") homeDir, _ := os.UserHomeDir()
cfg.DataDir = filepath.Join(homeDir, "/.bor/data")
} }
} }
......
...@@ -246,6 +246,9 @@ func Setup(ctx *cli.Context) error { ...@@ -246,6 +246,9 @@ 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") {
address := fmt.Sprintf("%s:%d", "0.0.0.0", 7071)
StartPProf(address, !ctx.GlobalIsSet("metrics.addr"))
} }
return nil return nil
} }
......
...@@ -71,6 +71,7 @@ var GoerliBootnodes = []string{ ...@@ -71,6 +71,7 @@ var GoerliBootnodes = []string{
// Mumbai test network. // Mumbai test network.
var MumbaiBootnodes = []string{ var MumbaiBootnodes = []string{
"enode://320553cda00dfc003f499a3ce9598029f364fbb3ed1222fdc20a94d97dcc4d8ba0cd0bfa996579dcc6d17a534741fb0a5da303a90579431259150de66b597251@54.147.31.250:30303", "enode://320553cda00dfc003f499a3ce9598029f364fbb3ed1222fdc20a94d97dcc4d8ba0cd0bfa996579dcc6d17a534741fb0a5da303a90579431259150de66b597251@54.147.31.250:30303",
"enode://f0f48a8781629f95ff02606081e6e43e4aebd503f3d07fc931fad7dd5ca1ba52bd849a6f6c3be0e375cf13c9ae04d859c4a9ae3546dc8ed4f10aa5dbb47d4998@34.226.134.117:30303",
} }
var V5Bootnodes = []string{ var V5Bootnodes = []string{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment