diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index e436d556d..8b064f5e4 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -2017,7 +2017,7 @@ func SetDNSDiscoveryDefaults(cfg *ethconfig.Config, genesis common.Hash) { if cfg.SyncMode == downloader.LightSync { protocol = "les" } - if url := params.KnownDNSNetwork(genesis, protocol); url != "" { + if url := params.KnownDNSNetwork(genesis, cfg.NetworkId, protocol); url != "" { cfg.EthDiscoveryURLs = []string{url} cfg.SnapDiscoveryURLs = cfg.EthDiscoveryURLs } diff --git a/params/bootnodes.go b/params/bootnodes.go index 4ac9baee7..f84cc2eac 100644 --- a/params/bootnodes.go +++ b/params/bootnodes.go @@ -34,7 +34,11 @@ var PulseChainBootnodes []string // TODO // PulseChainTestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on // the main PulseChain network. -var PulseChainTestnetBootnodes []string // TODO +var PulseChainTestnetBootnodes = []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 +} // SepoliaBootnodes are the enode URLs of the P2P bootstrap nodes running on the // Sepolia test network. @@ -89,16 +93,27 @@ var V5Bootnodes = []string{ "enr:-Ku4QEWzdnVtXc2Q0ZVigfCGggOVB2Vc1ZCPEc6j21NIFLODSJbvNaef1g4PxhPwl_3kax86YPheFUSLXPRs98vvYsoBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhDZBrP2Jc2VjcDI1NmsxoQM6jr8Rb1ktLEsVcKAPa08wCsKUmvoQ8khiOl_SLozf9IN1ZHCCIyg", } -const dnsPrefix = "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@" - // KnownDNSNetwork returns the address of a public DNS-based node list for the given // genesis hash and protocol. See https://github.com/ethereum/discv4-dns-lists for more // information. -func KnownDNSNetwork(genesis common.Hash, protocol string) string { +func KnownDNSNetwork(genesis common.Hash, networkId uint64, protocol string) string { var net string + var dnsPrefix = "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@" + var tld = ".ethdisco.net" + + if networkId == PulseChainConfig.ChainID.Uint64() || networkId == PulseChainTestnetConfig.ChainID.Uint64() { + tld = ".pulsedisco.net" + dnsPrefix = "enrtree://APFXO36RU3TWV7XFGWI2TYF5IDA3WM2GPTRL3TCZINWHZX4R6TAOK@" + } + switch genesis { case MainnetGenesisHash: - net = "mainnet" + switch networkId { + case PulseChainTestnetConfig.ChainID.Uint64(): + net = "testnet-v3" + default: + net = "mainnet" + } case RinkebyGenesisHash: net = "rinkeby" case GoerliGenesisHash: @@ -108,5 +123,5 @@ func KnownDNSNetwork(genesis common.Hash, protocol string) string { default: return "" } - return dnsPrefix + protocol + "." + net + ".ethdisco.net" + return dnsPrefix + protocol + "." + net + tld }