diff --git a/README.md b/README.md index 11c61385a..0f19109e2 100644 --- a/README.md +++ b/README.md @@ -115,12 +115,12 @@ use separate accounts for play and real money. Unless you manually move accounts, `geth` will by default correctly separate the two networks and will not make any accounts available between them.* -### **Full node on the PulseChain testnet** +### **Full node on PulseChain Testnet V3** -To connect to the PulseChain testnet: +To connect to the PulseChain Testnet V3: ```shell -$ geth --pulsechain-testnet console +$ geth --pulsechain-testnet-v3 console ``` ### Configuration @@ -149,7 +149,7 @@ Docker: ```shell docker run -d --name pulsechain-execution-node -v /Users/alice/pulse:/root \ -p 8545:8545 -p 30303:30303 \ - registry.gitlab.com/pulsechaincom/go-pulse --pulsechain-testnet + registry.gitlab.com/pulsechaincom/go-pulse --pulsechain-testnet-v3 ``` This will start `geth` in snap-sync mode with a DB memory allowance of 1GB, as the diff --git a/cmd/devp2p/nodesetcmd.go b/cmd/devp2p/nodesetcmd.go index 4b73987c9..c0389e3bb 100644 --- a/cmd/devp2p/nodesetcmd.go +++ b/cmd/devp2p/nodesetcmd.go @@ -232,8 +232,8 @@ func ethFilter(args []string) (nodeFilter, error) { filter = forkid.NewStaticFilter(params.MainnetChainConfig, core.DefaultGenesisBlock().ToBlock()) case "PulseChain": filter = forkid.NewStaticFilter(params.PulseChainConfig, core.DefaultGenesisBlock().ToBlock()) - case "PulseChainTestnet": - filter = forkid.NewStaticFilter(params.PulseChainTestnetConfig, core.DefaultGenesisBlock().ToBlock()) + case "PulseChainTestnetV3": + filter = forkid.NewStaticFilter(params.PulseChainTestnetV3Config, core.DefaultGenesisBlock().ToBlock()) case "goerli": filter = forkid.NewStaticFilter(params.GoerliChainConfig, core.DefaultGoerliGenesisBlock().ToBlock()) case "sepolia": diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 7dc2bd11b..9101b4d4a 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -290,8 +290,8 @@ func prepare(ctx *cli.Context) { case ctx.IsSet(utils.HoleskyFlag.Name): log.Info("Starting Geth on Holesky testnet...") - case ctx.IsSet(utils.PulseChainTestnetFlag.Name): - log.Info("Starting Geth on PulseChain testnet...") + case ctx.IsSet(utils.PulseChainTestnetV3Flag.Name): + log.Info("Starting Geth on PulseChain Testnet V3...") case ctx.IsSet(utils.DeveloperFlag.Name): log.Info("Starting Geth in ephemeral dev mode...") diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 775face97..0cfd42b45 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -159,9 +159,9 @@ var ( Usage: "Holesky network: pre-configured proof-of-stake test network", Category: flags.EthCategory, } - PulseChainTestnetFlag = &cli.BoolFlag{ - Name: "pulsechain-testnet", - Usage: "PulseChain testnet", + PulseChainTestnetV3Flag = &cli.BoolFlag{ + Name: "pulsechain-testnet-v3", + Usage: "PulseChain Testnet V3: pre-configured proof-of-stake test network", } // Dev mode @@ -925,7 +925,7 @@ var ( GoerliFlag, SepoliaFlag, HoleskyFlag, - PulseChainTestnetFlag, + PulseChainTestnetV3Flag, } // NetworkFlags is the flag group of all built-in supported networks. NetworkFlags = append([]cli.Flag{ @@ -961,8 +961,8 @@ func MakeDataDir(ctx *cli.Context) string { if ctx.Bool(HoleskyFlag.Name) { return filepath.Join(path, "holesky") } - if ctx.Bool(PulseChainTestnetFlag.Name) { - return filepath.Join(path, "pulsechain-testnet") + if ctx.Bool(PulseChainTestnetV3Flag.Name) { + return filepath.Join(path, "pulsechain-testnet-v3") } return path } @@ -1028,8 +1028,8 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) { urls = params.SepoliaBootnodes case ctx.Bool(GoerliFlag.Name): urls = params.GoerliBootnodes - case ctx.Bool(PulseChainTestnetFlag.Name): - urls = params.PulseChainTestnetBootnodes + case ctx.Bool(PulseChainTestnetV3Flag.Name): + urls = params.PulseChainTestnetV3Bootnodes } } cfg.BootstrapNodes = mustParseBootnodes(urls) @@ -1459,8 +1459,8 @@ func SetDataDir(ctx *cli.Context, cfg *node.Config) { cfg.DataDir = filepath.Join(node.DefaultDataDir(), "sepolia") case ctx.Bool(HoleskyFlag.Name) && cfg.DataDir == node.DefaultDataDir(): cfg.DataDir = filepath.Join(node.DefaultDataDir(), "holesky") - case ctx.Bool(PulseChainTestnetFlag.Name) && cfg.DataDir == node.DefaultDataDir(): - cfg.DataDir = filepath.Join(node.DefaultDataDir(), "pulsechain-testnet") + case ctx.Bool(PulseChainTestnetV3Flag.Name) && cfg.DataDir == node.DefaultDataDir(): + cfg.DataDir = filepath.Join(node.DefaultDataDir(), "pulsechain-testnet-v3") } } @@ -1612,7 +1612,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, PulseChainFlag, DeveloperFlag, GoerliFlag, SepoliaFlag, HoleskyFlag, PulseChainTestnetFlag) + CheckExclusive(ctx, MainnetFlag, PulseChainFlag, DeveloperFlag, GoerliFlag, SepoliaFlag, HoleskyFlag, PulseChainTestnetV3Flag) CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer // Set configurations from CLI flags @@ -1787,11 +1787,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { } cfg.Genesis = core.DefaultGoerliGenesisBlock() SetDNSDiscoveryDefaults(cfg, params.GoerliGenesisHash) - case ctx.Bool(PulseChainTestnetFlag.Name): + case ctx.Bool(PulseChainTestnetV3Flag.Name): if !ctx.IsSet(NetworkIdFlag.Name) { cfg.NetworkId = 942 } - cfg.Genesis = core.DefaultPulseChainTestnetGenesisBlock() + cfg.Genesis = core.DefaultPulseChainTestnetV3GenesisBlock() SetDNSDiscoveryDefaults(cfg, params.MainnetGenesisHash) case ctx.Bool(DeveloperFlag.Name): if !ctx.IsSet(NetworkIdFlag.Name) { @@ -2104,8 +2104,8 @@ func MakeGenesis(ctx *cli.Context) *core.Genesis { genesis = core.DefaultSepoliaGenesisBlock() case ctx.Bool(GoerliFlag.Name): genesis = core.DefaultGoerliGenesisBlock() - case ctx.Bool(PulseChainTestnetFlag.Name): - genesis = core.DefaultPulseChainTestnetGenesisBlock() + case ctx.Bool(PulseChainTestnetV3Flag.Name): + genesis = core.DefaultPulseChainTestnetV3GenesisBlock() case ctx.Bool(DeveloperFlag.Name): Fatalf("Developer chains are ephemeral") } diff --git a/core/genesis.go b/core/genesis.go index 78c9af199..dfa6b0bdf 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -380,8 +380,8 @@ func (g *Genesis) configOrDefault(ghash common.Hash, chainId uint64) *params.Cha switch chainId { case params.PulseChainConfig.ChainID.Uint64(): return params.PulseChainConfig - case params.PulseChainTestnetConfig.ChainID.Uint64(): - return params.PulseChainTestnetConfig + case params.PulseChainTestnetV3Config.ChainID.Uint64(): + return params.PulseChainTestnetV3Config default: return params.MainnetChainConfig } @@ -566,10 +566,10 @@ func DefaultHoleskyGenesisBlock() *Genesis { } } -// DefaultPulseChainTestnetGenesisBlock returns the PulseChain testnet genesis block. -func DefaultPulseChainTestnetGenesisBlock() *Genesis { +// DefaultPulseChainTestnetV3GenesisBlock returns the PulseChain Testnet V3 genesis block. +func DefaultPulseChainTestnetV3GenesisBlock() *Genesis { return &Genesis{ - Config: params.PulseChainTestnetConfig, + Config: params.PulseChainTestnetV3Config, Nonce: 66, ExtraData: hexutil.MustDecode("0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"), GasLimit: 5000, diff --git a/params/bootnodes.go b/params/bootnodes.go index aac48f1a2..337d5447d 100644 --- a/params/bootnodes.go +++ b/params/bootnodes.go @@ -40,9 +40,9 @@ var HoleskyBootnodes = []string{ // the main PulseChain network. var PulseChainBootnodes []string // TODO -// PulseChainTestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on +// PulseChainTestnetV3Bootnodes are the enode URLs of the P2P bootstrap nodes running on // the main PulseChain network. -var PulseChainTestnetBootnodes = []string{ +var PulseChainTestnetV3Bootnodes = []string{ "enode://5942169e5173992b2bab93e36bb2773e82b0fe91f2e70239a48232e85da6023673e2fab608f5b7fad4b8dcd2a29c4f2a6f800522aa00262a1b371fb80c7ec620@3.236.202.85:30303", // bootnode-aws-us-east-1-001 "enode://fa1420f97362e6c3e86dfcd38c3877748860b51c021de2662e46daf007d6de22c7668a838c9bf3468496fd10c2374544d16911dd2e2554aef7981e2858349952@44.202.85.131:30303", // bootnode-aws-us-east-1-002 "enode://eee9a1665c202b7fec55be2a5c1106b283f5694a426d727215d3cb0287074d3c72bc7943282b2492b0d39246daad28032d09a2adbeddd43a3e7d4da0e40fd840@174.129.96.223:30303", // bootnode-aws-us-east-1-003 @@ -107,7 +107,7 @@ func KnownDNSNetwork(genesis common.Hash, networkId uint64, protocol string) str var dnsPrefix = "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@" var tld = ".ethdisco.net" - if networkId == PulseChainConfig.ChainID.Uint64() || networkId == PulseChainTestnetConfig.ChainID.Uint64() { + if networkId == PulseChainConfig.ChainID.Uint64() || networkId == PulseChainTestnetV3Config.ChainID.Uint64() { tld = ".pulsedisco.net" dnsPrefix = "enrtree://APFXO36RU3TWV7XFGWI2TYF5IDA3WM2GPTRL3TCZINWHZX4R6TAOK@" } @@ -115,7 +115,7 @@ func KnownDNSNetwork(genesis common.Hash, networkId uint64, protocol string) str switch genesis { case MainnetGenesisHash: switch networkId { - case PulseChainTestnetConfig.ChainID.Uint64(): + case PulseChainTestnetV3Config.ChainID.Uint64(): net = "testnet-v3" default: net = "mainnet" diff --git a/params/pulse.go b/params/pulse.go index bd90b4afe..c464cf569 100644 --- a/params/pulse.go +++ b/params/pulse.go @@ -44,7 +44,7 @@ var ( PrimordialPulseBlock: big.NewInt(15_700_000), // TODO: UPDATE FORK BLOCK } - PulseChainTestnetConfig = &ChainConfig{ + PulseChainTestnetV3Config = &ChainConfig{ ChainID: big.NewInt(942), HomesteadBlock: big.NewInt(1_150_000), DAOForkBlock: big.NewInt(1_920_000),