diff --git a/builder/files/config.toml b/builder/files/config.toml index ce448103a7..a59fad1324 100644 --- a/builder/files/config.toml +++ b/builder/files/config.toml @@ -39,7 +39,7 @@ syncmode = "full" # nodekeyhex = "" [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true bootnodes = ["enode://b8f1cc9c5d4403703fbf377116469667d2b1823c0daf16b7250aa576bacf399e42c3930ccfcb02c5df6879565a2b8931335565f0e8d3f8e72385ecf4a4bf160a@3.36.224.80:30303", "enode://8729e0c825f3d9cad382555f3e46dcff21af323e89025a0e6312df541f4a9e73abfa562d64906f5e59c51fe6f0501b3e61b07979606c56329c020ed739910759@54.194.245.5:30303"] # Uncomment below `bootnodes` field for Amoy # bootnodes = ["enode://bce861be777e91b0a5a49d58a51e14f32f201b4c6c2d1fbea6c7a1f14756cbb3f931f3188d6b65de8b07b53ff28d03b6e366d09e56360d2124a9fc5a15a0913d@54.217.171.196:30303", "enode://4a3dc0081a346d26a73d79dd88216a9402d2292318e2db9947dbc97ea9c4afb2498dc519c0af04420dc13a238c279062da0320181e7c1461216ce4513bfd40bf@13.251.184.185:30303"] diff --git a/docs/cli/example_config.toml b/docs/cli/example_config.toml index da4fc1455d..0485ac36a6 100644 --- a/docs/cli/example_config.toml +++ b/docs/cli/example_config.toml @@ -45,7 +45,7 @@ devfakeauthor = false # Run miner without validator set authorization txannouncementonly = false # Whether to only announce transactions to peers [p2p.discovery] v4disc = true # Enables the V4 discovery mechanism - v5disc = false # Enables the experimental RLPx V5 (Topic Discovery) mechanism + v5disc = true # Enables the V5 discovery mechanism bootnodes = [] # Comma separated enode URLs for P2P discovery bootstrap bootnodesv4 = [] # List of initial v4 bootnodes bootnodesv5 = [] # List of initial v5 bootnodes diff --git a/docs/cli/server.md b/docs/cli/server.md index 9163d67d47..de54441bfb 100644 --- a/docs/cli/server.md +++ b/docs/cli/server.md @@ -8,10 +8,10 @@ The ```bor server``` command runs the Bor client. - ```bor.heimdall```: URL of Heimdall service (default: http://localhost:1317) -- ```bor.heimdalltimeout```: Timeout of Heimdall service (default: 5s) - - ```bor.heimdallgRPC```: Address of Heimdall gRPC service +- ```bor.heimdalltimeout```: Timeout period for bor's outgoing requests to heimdall (default: 5s) + - ```bor.logs```: Enables bor log retrieval (default: false) - ```bor.runheimdall```: Run Heimdall service as a child process (default: false) @@ -22,7 +22,7 @@ The ```bor server``` command runs the Bor client. - ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false) -- ```chain```: Name of the chain to sync ('amoy', 'mainnet') or path to a genesis file (default: mainnet) +- ```chain```: Name of the chain to sync ('amoy', 'mumbai', 'mainnet') or path to a genesis file (default: mainnet) - ```config```: Path to the TOML configuration file @@ -240,13 +240,13 @@ The ```bor server``` command runs the Bor client. - ```port```: Network listening port (default: 30303) -- ```txarrivalwait```: Maximum duration to wait for a transaction before explicitly requesting it (default: 500ms) - - ```txannouncementonly```: Whether to only announce transactions to peers (default: false) +- ```txarrivalwait```: Maximum duration to wait for a transaction before explicitly requesting it (default: 500ms) + - ```v4disc```: Enables the V4 discovery mechanism (default: true) -- ```v5disc```: Enables the experimental RLPx V5 (Topic Discovery) mechanism (default: false) +- ```v5disc```: Enables the V5 discovery mechanism (default: true) ### Sealer Options diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 676af0db56..f6326254f8 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -231,8 +231,9 @@ type P2PDiscovery struct { // DiscoveryV4 specifies whether V4 discovery should be started. DiscoveryV4 bool `hcl:"v4disc,optional" toml:"v4disc,optional"` - // V5Enabled is used to enable disc v5 discovery mode - V5Enabled bool `hcl:"v5disc,optional" toml:"v5disc,optional"` + // DiscoveryV5 specifies whether the new topic-discovery based V5 discovery + // protocol should be started or not. + DiscoveryV5 bool `hcl:"v5disc,optional" toml:"v5disc,optional"` // Bootnodes is the list of initial bootnodes Bootnodes []string `hcl:"bootnodes,optional" toml:"bootnodes,optional"` @@ -639,7 +640,7 @@ func DefaultConfig() *Config { TxAnnouncementOnly: false, Discovery: &P2PDiscovery{ DiscoveryV4: true, - V5Enabled: false, + DiscoveryV5: true, Bootnodes: []string{}, BootnodesV4: []string{}, BootnodesV5: []string{}, @@ -1351,7 +1352,7 @@ func (c *Config) buildNode() (*node.Config, error) { MaxPendingPeers: int(c.P2P.MaxPendPeers), ListenAddr: c.P2P.Bind + ":" + strconv.Itoa(int(c.P2P.Port)), DiscoveryV4: c.P2P.Discovery.DiscoveryV4, - DiscoveryV5: c.P2P.Discovery.V5Enabled, + DiscoveryV5: c.P2P.Discovery.DiscoveryV5, TxArrivalWait: c.P2P.TxArrivalWait, TxAnnouncementOnly: c.P2P.TxAnnouncementOnly, }, diff --git a/internal/cli/server/flags.go b/internal/cli/server/flags.go index 47d2448243..5110c22cba 100644 --- a/internal/cli/server/flags.go +++ b/internal/cli/server/flags.go @@ -800,9 +800,9 @@ func (c *Command) Flags(config *Config) *flagset.Flagset { }) f.BoolFlag(&flagset.BoolFlag{ Name: "v5disc", - Usage: "Enables the experimental RLPx V5 (Topic Discovery) mechanism", - Value: &c.cliConfig.P2P.Discovery.V5Enabled, - Default: c.cliConfig.P2P.Discovery.V5Enabled, + Usage: "Enables the V5 discovery mechanism", + Value: &c.cliConfig.P2P.Discovery.DiscoveryV5, + Default: c.cliConfig.P2P.Discovery.DiscoveryV5, Group: "P2P", }) f.DurationFlag(&flagset.DurationFlag{ diff --git a/internal/cli/server/testdata/default.toml b/internal/cli/server/testdata/default.toml index 7ab9490c8b..90b0d635bc 100644 --- a/internal/cli/server/testdata/default.toml +++ b/internal/cli/server/testdata/default.toml @@ -39,7 +39,7 @@ devfakeauthor = false txannouncementonly = false [p2p.discovery] v4disc = true - v5disc = false + v5disc = true bootnodes = [] bootnodesv4 = [] bootnodesv5 = [] diff --git a/packaging/templates/mainnet-v1/archive/config.toml b/packaging/templates/mainnet-v1/archive/config.toml index 086534cd25..c4d0c0f21c 100644 --- a/packaging/templates/mainnet-v1/archive/config.toml +++ b/packaging/templates/mainnet-v1/archive/config.toml @@ -38,7 +38,7 @@ gcmode = "archive" # txannouncementonly = false # [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303", "enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303" ] diff --git a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml index c32bb06522..d610d37c0a 100644 --- a/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml @@ -37,7 +37,7 @@ syncmode = "full" # txannouncementonly = false [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303", "enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303" ] diff --git a/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml b/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml index b771c34a50..81f5e19f52 100644 --- a/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml +++ b/packaging/templates/mainnet-v1/sentry/sentry/bor/pbss_config.toml @@ -39,7 +39,7 @@ syncmode = "full" # txannouncementonly = false [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303", "enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303" ] diff --git a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml index e9cd776ed9..3f435e61d5 100644 --- a/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml +++ b/packaging/templates/mainnet-v1/sentry/validator/bor/config.toml @@ -39,7 +39,7 @@ syncmode = "full" # txannouncementonly = false [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303", "enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303" ] diff --git a/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml b/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml index 6dfe0d7ccb..c36b6a8d5a 100644 --- a/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml +++ b/packaging/templates/mainnet-v1/sentry/validator/bor/pbss_config.toml @@ -41,7 +41,7 @@ syncmode = "full" # txannouncementonly = false [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303", "enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303" ] diff --git a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml index a7b04732e5..d2da74ef0b 100644 --- a/packaging/templates/mainnet-v1/without-sentry/bor/config.toml +++ b/packaging/templates/mainnet-v1/without-sentry/bor/config.toml @@ -39,7 +39,7 @@ syncmode = "full" # txannouncementonly = false [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303", "enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303" ] diff --git a/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml b/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml index 8f8020808a..0eca1d5598 100644 --- a/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml +++ b/packaging/templates/mainnet-v1/without-sentry/bor/pbss_config.toml @@ -40,7 +40,7 @@ syncmode = "full" # txannouncementonly = false [p2p.discovery] # v4disc = true - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303", "enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303" ] diff --git a/packaging/templates/testnet-amoy/archive/config.toml b/packaging/templates/testnet-amoy/archive/config.toml index 22761bbd7b..f706516a7e 100644 --- a/packaging/templates/testnet-amoy/archive/config.toml +++ b/packaging/templates/testnet-amoy/archive/config.toml @@ -36,7 +36,7 @@ gcmode = "archive" # txarrivalwait = "500ms" # txannouncementonly = false [p2p.discovery] - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://0ef8758cafc0063405f3f31fe22f2a3b566aa871bd7cd405e35954ec8aa7237c21e1ccc1f65f1b6099ab36db029362bc2fecf001a771b3d9803bbf1968508cef@35.197.249.21:30303", "enode://c9c8c18cde48b41d46ced0c564496aef721a9b58f8724025a0b1f3f26f1b826f31786f890f8f8781e18b16dbb3c7bff805c7304d1273ac11630ed25a3f0dc41c@34.89.39.114:30303" ] diff --git a/packaging/templates/testnet-amoy/sentry/sentry/bor/config.toml b/packaging/templates/testnet-amoy/sentry/sentry/bor/config.toml index 6a52180ca4..2124d27c31 100644 --- a/packaging/templates/testnet-amoy/sentry/sentry/bor/config.toml +++ b/packaging/templates/testnet-amoy/sentry/sentry/bor/config.toml @@ -35,7 +35,7 @@ syncmode = "full" # txarrivalwait = "500ms" # txannouncementonly = false [p2p.discovery] - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://0ef8758cafc0063405f3f31fe22f2a3b566aa871bd7cd405e35954ec8aa7237c21e1ccc1f65f1b6099ab36db029362bc2fecf001a771b3d9803bbf1968508cef@35.197.249.21:30303", "enode://c9c8c18cde48b41d46ced0c564496aef721a9b58f8724025a0b1f3f26f1b826f31786f890f8f8781e18b16dbb3c7bff805c7304d1273ac11630ed25a3f0dc41c@34.89.39.114:30303" ] diff --git a/packaging/templates/testnet-amoy/sentry/sentry/bor/pbss_config.toml b/packaging/templates/testnet-amoy/sentry/sentry/bor/pbss_config.toml index dba4a6b075..ba06777be4 100644 --- a/packaging/templates/testnet-amoy/sentry/sentry/bor/pbss_config.toml +++ b/packaging/templates/testnet-amoy/sentry/sentry/bor/pbss_config.toml @@ -36,7 +36,7 @@ syncmode = "full" # txarrivalwait = "500ms" # txannouncementonly = false [p2p.discovery] - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://0ef8758cafc0063405f3f31fe22f2a3b566aa871bd7cd405e35954ec8aa7237c21e1ccc1f65f1b6099ab36db029362bc2fecf001a771b3d9803bbf1968508cef@35.197.249.21:30303", "enode://c9c8c18cde48b41d46ced0c564496aef721a9b58f8724025a0b1f3f26f1b826f31786f890f8f8781e18b16dbb3c7bff805c7304d1273ac11630ed25a3f0dc41c@34.89.39.114:30303" ] diff --git a/packaging/templates/testnet-amoy/sentry/validator/bor/config.toml b/packaging/templates/testnet-amoy/sentry/validator/bor/config.toml index 11f0999b4f..bb51afc3e7 100644 --- a/packaging/templates/testnet-amoy/sentry/validator/bor/config.toml +++ b/packaging/templates/testnet-amoy/sentry/validator/bor/config.toml @@ -37,7 +37,7 @@ syncmode = "full" # txarrivalwait = "500ms" # txannouncementonly = false [p2p.discovery] - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://0ef8758cafc0063405f3f31fe22f2a3b566aa871bd7cd405e35954ec8aa7237c21e1ccc1f65f1b6099ab36db029362bc2fecf001a771b3d9803bbf1968508cef@35.197.249.21:30303", "enode://c9c8c18cde48b41d46ced0c564496aef721a9b58f8724025a0b1f3f26f1b826f31786f890f8f8781e18b16dbb3c7bff805c7304d1273ac11630ed25a3f0dc41c@34.89.39.114:30303" ] diff --git a/packaging/templates/testnet-amoy/sentry/validator/bor/pbss_config.toml b/packaging/templates/testnet-amoy/sentry/validator/bor/pbss_config.toml index f8711db138..7e13a7c663 100644 --- a/packaging/templates/testnet-amoy/sentry/validator/bor/pbss_config.toml +++ b/packaging/templates/testnet-amoy/sentry/validator/bor/pbss_config.toml @@ -38,7 +38,7 @@ syncmode = "full" # txarrivalwait = "500ms" # txannouncementonly = false [p2p.discovery] - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://0ef8758cafc0063405f3f31fe22f2a3b566aa871bd7cd405e35954ec8aa7237c21e1ccc1f65f1b6099ab36db029362bc2fecf001a771b3d9803bbf1968508cef@35.197.249.21:30303", "enode://c9c8c18cde48b41d46ced0c564496aef721a9b58f8724025a0b1f3f26f1b826f31786f890f8f8781e18b16dbb3c7bff805c7304d1273ac11630ed25a3f0dc41c@34.89.39.114:30303" ] diff --git a/packaging/templates/testnet-amoy/without-sentry/bor/config.toml b/packaging/templates/testnet-amoy/without-sentry/bor/config.toml index bde03bdbcc..a9231b4af0 100644 --- a/packaging/templates/testnet-amoy/without-sentry/bor/config.toml +++ b/packaging/templates/testnet-amoy/without-sentry/bor/config.toml @@ -37,7 +37,7 @@ syncmode = "full" # txarrivalwait = "500ms" # txannouncementonly = false [p2p.discovery] - # v5disc = false + # v5disc = true # bootnodesv4 = [] # bootnodesv5 = [] bootnodes = [ "enode://0ef8758cafc0063405f3f31fe22f2a3b566aa871bd7cd405e35954ec8aa7237c21e1ccc1f65f1b6099ab36db029362bc2fecf001a771b3d9803bbf1968508cef@35.197.249.21:30303", "enode://c9c8c18cde48b41d46ced0c564496aef721a9b58f8724025a0b1f3f26f1b826f31786f890f8f8781e18b16dbb3c7bff805c7304d1273ac11630ed25a3f0dc41c@34.89.39.114:30303" ] diff --git a/packaging/templates/testnet-amoy/without-sentry/bor/pbss_config.toml b/packaging/templates/testnet-amoy/without-sentry/bor/pbss_config.toml index 19435285b0..79f2bbb991 100644 --- a/packaging/templates/testnet-amoy/without-sentry/bor/pbss_config.toml +++ b/packaging/templates/testnet-amoy/without-sentry/bor/pbss_config.toml @@ -38,7 +38,7 @@ syncmode = "full" # txarrivalwait = "500ms" # txannouncementonly = false [p2p.discovery] - # v5disc = false + # v5disc = true # bootnodesv5 = [] # bootnodesv4 = [] bootnodes = [ "enode://0ef8758cafc0063405f3f31fe22f2a3b566aa871bd7cd405e35954ec8aa7237c21e1ccc1f65f1b6099ab36db029362bc2fecf001a771b3d9803bbf1968508cef@35.197.249.21:30303", "enode://c9c8c18cde48b41d46ced0c564496aef721a9b58f8724025a0b1f3f26f1b826f31786f890f8f8781e18b16dbb3c7bff805c7304d1273ac11630ed25a3f0dc41c@34.89.39.114:30303" ]