diff --git a/common/paths/paths.go b/common/paths/paths.go index 176edf2c1..3032d698f 100644 --- a/common/paths/paths.go +++ b/common/paths/paths.go @@ -102,8 +102,8 @@ func DataDirForNetwork(datadir string, network string) string { return networkDataDirCheckingLegacy(datadir, "chiado") case networkname.PulsechainChainName: return networkDataDirCheckingLegacy(datadir, "pulsechain") - case networkname.PulsechainTestnetV3ChainName: - return networkDataDirCheckingLegacy(datadir, "pulsechain-testnet-v3") + case networkname.PulsechainTestnetV4ChainName: + return networkDataDirCheckingLegacy(datadir, "pulsechain-testnet-v4") default: return datadir diff --git a/core/genesis_write.go b/core/genesis_write.go index 2acdd6f14..d152eb381 100644 --- a/core/genesis_write.go +++ b/core/genesis_write.go @@ -479,9 +479,9 @@ func PulsechainGenesisBlock() *types.Genesis { } } -func PulsechainTestnetV3GenesisBlock() *types.Genesis { +func PulsechainTestnetV4GenesisBlock() *types.Genesis { return &types.Genesis{ - Config: params.PulsechainTestnetV3ChainConfig, + Config: params.PulsechainTestnetV4ChainConfig, Nonce: 66, ExtraData: hexutil.MustDecode("0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"), GasLimit: 5000, @@ -720,8 +720,8 @@ func GenesisBlockByChainName(chain string) *types.Genesis { return ChiadoGenesisBlock() case networkname.PulsechainChainName: return PulsechainGenesisBlock() - case networkname.PulsechainTestnetV3ChainName: - return PulsechainTestnetV3GenesisBlock() + case networkname.PulsechainTestnetV4ChainName: + return PulsechainTestnetV4GenesisBlock() case networkname.PulsechainDevnetChainName: return PulsechainDevnetGenesisBlock() default: diff --git a/core/skip_analysis.go b/core/skip_analysis.go index d7c23fd5f..b4b4c064a 100644 --- a/core/skip_analysis.go +++ b/core/skip_analysis.go @@ -39,7 +39,7 @@ var analysisBlocks = map[string][]uint64{ networkname.MainnetChainName: {5_800_596, 6_426_298, 6_426_432, 11_079_912, 13_119_520, 15_081_051}, networkname.BorMainnetChainName: {29_447_463}, networkname.PulsechainChainName: {5_800_596, 6_426_298, 6_426_432, 11_079_912, 13_119_520, 15_081_051}, - networkname.PulsechainTestnetV3ChainName: {5_800_596, 6_426_298, 6_426_432, 11_079_912, 13_119_520, 15_081_051}, + networkname.PulsechainTestnetV4ChainName: {5_800_596, 6_426_298, 6_426_432, 11_079_912, 13_119_520, 15_081_051}, } func SkipAnalysis(config *chain.Config, blockNumber uint64) bool { diff --git a/core/types/genesis.go b/core/types/genesis.go index a313d2c93..7177e0c50 100644 --- a/core/types/genesis.go +++ b/core/types/genesis.go @@ -173,12 +173,12 @@ func (g *Genesis) ConfigOrDefault(genesisHash common.Hash, chainId uint64) *chai var config *chain.Config pulseChainConfig := params.ChainConfigByChainName(networkname.PulsechainChainName) - pulseChainTestnetV3Config := params.ChainConfigByChainName(networkname.PulsechainTestnetV3ChainName) + pulseChainTestnetV4Config := params.ChainConfigByChainName(networkname.PulsechainTestnetV4ChainName) switch chainId { case pulseChainConfig.ChainID.Uint64(): config = pulseChainConfig - case pulseChainTestnetV3Config.ChainID.Uint64(): - config = pulseChainTestnetV3Config + case pulseChainTestnetV4Config.ChainID.Uint64(): + config = pulseChainTestnetV4Config default: config = params.ChainConfigByGenesisHash(genesisHash) } diff --git a/erigon-lib/chain/networkname/network_name.go b/erigon-lib/chain/networkname/network_name.go index 6cbcba996..8efbabac2 100644 --- a/erigon-lib/chain/networkname/network_name.go +++ b/erigon-lib/chain/networkname/network_name.go @@ -15,7 +15,7 @@ const ( ChiadoChainName = "chiado" PulsechainChainName = "pulsechain" PulsechainDevnetChainName = "pulsechain-devnet" - PulsechainTestnetV3ChainName = "pulsechain-testnet-v3" + PulsechainTestnetV4ChainName = "pulsechain-testnet-v4" ) var All = []string{ @@ -31,5 +31,5 @@ var All = []string{ ChiadoChainName, PulsechainChainName, PulsechainDevnetChainName, - PulsechainTestnetV3ChainName, + PulsechainTestnetV4ChainName, } diff --git a/erigon-lib/chain/snapcfg/util.go b/erigon-lib/chain/snapcfg/util.go index 81c8f1153..ad1bfe235 100644 --- a/erigon-lib/chain/snapcfg/util.go +++ b/erigon-lib/chain/snapcfg/util.go @@ -25,7 +25,7 @@ var ( Gnosis = fromToml(snapshothashes.Gnosis) Chiado = fromToml(snapshothashes.Chiado) PulseChainMainnet = fromToml(pulseSnapshotHashes.PulseChainMainnet) - PulseChainTestnetV3 = fromToml(pulseSnapshotHashes.PulseChainTestnetV3) + PulseChainTestnetV4 = fromToml(pulseSnapshotHashes.PulseChainTestnetV4) ) type PreverifiedItem struct { @@ -148,7 +148,7 @@ var knownPreverified = map[string]Preverified{ networkname.GnosisChainName: Gnosis, networkname.ChiadoChainName: Chiado, networkname.PulsechainChainName: PulseChainMainnet, - networkname.PulsechainTestnetV3ChainName: PulseChainTestnetV3, + networkname.PulsechainTestnetV4ChainName: PulseChainTestnetV4, } // KnownCfg return list of preverified hashes for given network, but apply whiteList filter if it's not empty diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index a66e54cf4..90fc20f6a 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -97,7 +97,7 @@ var Defaults = Config{ DeprecatedTxPool: DeprecatedDefaultTxPoolConfig, RPCGasCap: 50000000, GPO: FullNodeGPO, - RPCTxFeeCap: 1, // 1 ether + RPCTxFeeCap: 1000000, // 1 million ether ImportMode: false, Snapshot: BlocksFreezing{ diff --git a/go.mod b/go.mod index b1dd5bd69..1ba9d8b6d 100644 --- a/go.mod +++ b/go.mod @@ -88,7 +88,7 @@ require ( github.com/valyala/fastjson v1.6.4 github.com/vektah/gqlparser/v2 v2.5.10 github.com/xsleonard/go-merkle v1.1.0 - gitlab.com/pulsechaincom/erigon-pulse-snapshot v0.0.3 + gitlab.com/pulsechaincom/erigon-pulse-snapshot v0.0.4 go.uber.org/zap v1.26.0 golang.org/x/crypto v0.17.0 golang.org/x/exp v0.0.0-20230905200255-921286631fa9 diff --git a/go.sum b/go.sum index 14fc539d0..ce8fd452f 100644 --- a/go.sum +++ b/go.sum @@ -930,6 +930,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= gitlab.com/pulsechaincom/erigon-pulse-snapshot v0.0.3 h1:jB55xBCttoM2mxD6PCYQxf/es0WuBePQYfU+VH4v+d8= gitlab.com/pulsechaincom/erigon-pulse-snapshot v0.0.3/go.mod h1:U/W4jVFkJQ1XeXul9ng2MFGYRV2bBqTxVjSEojtm18c= +gitlab.com/pulsechaincom/erigon-pulse-snapshot v0.0.4 h1:i0X9LQINUyOUTb5Eak1bZzwyDzo9aS8hBbMOygXazdM= +gitlab.com/pulsechaincom/erigon-pulse-snapshot v0.0.4/go.mod h1:U/W4jVFkJQ1XeXul9ng2MFGYRV2bBqTxVjSEojtm18c= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= diff --git a/params/bootnodes.go b/params/bootnodes.go index 3c2cd294a..f01a5c2aa 100644 --- a/params/bootnodes.go +++ b/params/bootnodes.go @@ -152,12 +152,12 @@ var PulsechainBootnodes = []string{ // Pulsechain Go Bootnodes } -// PulsechainTestnetV3Bootnodes are the enode URLs of the P2P bootstrap nodes running on -// the Pulsechain Testnet V3 network. -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 +// PulsechainTestnetV4Bootnodes are the enode URLs of the P2P bootstrap nodes running on +// the Pulsechain Testnet V4 network. +var PulsechainTestnetV4Bootnodes = []string{ + "enode://499f821836b8fec272c0664e79b95e8ec50b4320d201e02ac83c5bf63bcff33869c411e8290b1774d74ed01b7a53e838e3689cfe46992243094886a0980a9c60@3.142.166.203:30303", // bootnode-aws-us-east-2-001 + "enode://133f45485d3b5221d10e5ed288bf1da827d5adbe454a9a9ae3cd4ae15d14b65d0b6d937b0a1a0ba3b9b2ebbf50c40e379573293f1ff51b553e997d843faa2c4b@18.118.188.165:30303", // bootnode-aws-us-east-2-002 + "enode://ef4bf6197515e2aa3290f5bf5e43e2b99022254fcbd540507d325d2de40e9c6fd87581d88e9affe97bc7c099946a84ca66de0c7752a1ab616c7b51ef1f10b2fb@3.138.107.144:30303", // bootnode-aws-us-east-2-003 } // KnownDNSNetwork returns the address of a public DNS-based node list for the given @@ -168,7 +168,7 @@ func KnownDNSNetwork(genesis libcommon.Hash, networkID uint64, protocol string) var dnsPrefix = "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@" var tld = ".ethdisco.net" - if networkID == NetworkIDByChainName(networkname.PulsechainChainName) || networkID == NetworkIDByChainName(networkname.PulsechainTestnetV3ChainName) { + if networkID == NetworkIDByChainName(networkname.PulsechainChainName) || networkID == NetworkIDByChainName(networkname.PulsechainTestnetV4ChainName) { tld = ".pulsedisco.net" dnsPrefix = "enrtree://APFXO36RU3TWV7XFGWI2TYF5IDA3WM2GPTRL3TCZINWHZX4R6TAOK@" } @@ -176,8 +176,10 @@ func KnownDNSNetwork(genesis libcommon.Hash, networkID uint64, protocol string) switch genesis { case MainnetGenesisHash: switch networkID { - case NetworkIDByChainName(networkname.PulsechainTestnetV3ChainName): - net = "testnet-v3" + case NetworkIDByChainName(networkname.PulsechainTestnetV4ChainName): + // Using short name here because the tld "pulsedisco" is + // unique, we don't need a pulsechain- prefix. + net = "testnet-v4" default: net = "mainnet" } @@ -213,8 +215,8 @@ func BootnodeURLsOfChain(chain string) []string { return ChiadoBootnodes case networkname.PulsechainChainName: return PulsechainBootnodes - case networkname.PulsechainTestnetV3ChainName: - return PulsechainTestnetV3Bootnodes + case networkname.PulsechainTestnetV4ChainName: + return PulsechainTestnetV4Bootnodes default: return []string{} } diff --git a/params/chainspecs/pulsechain-testnet-v3.json b/params/chainspecs/pulsechain-testnet-v4.json similarity index 87% rename from params/chainspecs/pulsechain-testnet-v3.json rename to params/chainspecs/pulsechain-testnet-v4.json index 6c227db37..89b74b3cc 100644 --- a/params/chainspecs/pulsechain-testnet-v3.json +++ b/params/chainspecs/pulsechain-testnet-v4.json @@ -1,6 +1,6 @@ { - "ChainName": "pulsechain-testnet-v3", - "chainId": 942, + "ChainName": "pulsechain-testnet-v4", + "chainId": 943, "consensus": "ethash", "homesteadBlock": 1150000, "daoForkBlock": 1920000, @@ -24,7 +24,7 @@ "pulseChain": { "treasury": { "addr": "0xA592ED65885bcbCeb30442F4902a0D1Cf3AcB8fC", - "balance": "0xc9f2c9cd04674edea40000000" + "balance": "0x314DC6448D9338C15B0A00000000" } } } \ No newline at end of file diff --git a/params/config.go b/params/config.go index a1cc056b1..00d5898fe 100644 --- a/params/config.go +++ b/params/config.go @@ -155,7 +155,7 @@ var ( PulsechainDevnetChainConfig = readChainSpec("chainspecs/pulsechain-devnet.json") - PulsechainTestnetV3ChainConfig = readChainSpec("chainspecs/pulsechain-testnet-v3.json") + PulsechainTestnetV4ChainConfig = readChainSpec("chainspecs/pulsechain-testnet-v4.json") CliqueSnapshot = NewSnapshotConfig(10, 1024, 16384, true, "") @@ -247,8 +247,8 @@ func ChainConfigByChainName(chain string) *chain.Config { return PulsechainChainConfig case networkname.PulsechainDevnetChainName: return PulsechainDevnetChainConfig - case networkname.PulsechainTestnetV3ChainName: - return PulsechainTestnetV3ChainConfig + case networkname.PulsechainTestnetV4ChainName: + return PulsechainTestnetV4ChainConfig default: return nil } @@ -280,7 +280,7 @@ func GenesisHashByChainName(chain string) *libcommon.Hash { return &PulsechainGenesisHash case networkname.PulsechainDevnetChainName: return &PulsechainDevnetGenesisHash - case networkname.PulsechainTestnetV3ChainName: + case networkname.PulsechainTestnetV4ChainName: return &PulsechainTetnetGenesisHash default: return nil diff --git a/turbo/node/node.go b/turbo/node/node.go index 04b9de032..3e2940e9b 100644 --- a/turbo/node/node.go +++ b/turbo/node/node.go @@ -88,8 +88,8 @@ func NewNodConfigUrfave(ctx *cli.Context, logger log.Logger) *nodecfg.Config { logger.Info("Starting Erigon on PulseChain...") case networkname.PulsechainDevnetChainName: logger.Info("Starting Erigon on PulseChain Devnet...") - case networkname.PulsechainTestnetV3ChainName: - logger.Info("Starting Erigon on PulseChain Testnet V3...") + case networkname.PulsechainTestnetV4ChainName: + logger.Info("Starting Erigon on PulseChain Testnet V4...") case "", networkname.MainnetChainName: if !ctx.IsSet(utils.NetworkIdFlag.Name) { logger.Info("Starting Erigon on Ethereum mainnet...")