From 7ffc872dd78a67b95feb1e5f93f8732f5937e830 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Wed, 1 Jun 2022 12:35:31 +0200 Subject: [PATCH] config: complete removal of seed addresses in config (#8654) --- CHANGELOG_PENDING.md | 1 + UPGRADING.md | 5 +++++ cmd/tendermint/commands/run_node.go | 1 - config/config.go | 9 --------- config/toml.go | 7 ------- scripts/confix/plan.go | 6 ++++++ test/e2e/runner/setup.go | 8 -------- 7 files changed, 12 insertions(+), 25 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 6f10f6bfd..797725bd7 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -23,6 +23,7 @@ Special thanks to external contributors on this release: - [config] \#8222 default indexer configuration to null. (@creachadair) - [rpc] \#8570 rework timeouts to be per-method instead of global. (@creachadair) - [rpc] \#8624 deprecate `broadcast_tx_commit` and `braodcast_tx_sync` and `broadcast_tx_async` in favor of `braodcast_tx`. (@tychoish) + - [config] \#8654 remove deprecated `seeds` field from config. Users should switch to `bootstrap-peers` instead. (@cmwaters) - Apps diff --git a/UPGRADING.md b/UPGRADING.md index 60bd9a10f..44e589888 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -62,6 +62,11 @@ applications remains correct. turned on are not affected. Operators who wish to enable indexing for a new node, however, must now edit the `config.toml` explicitly. +- The function of seed nodes was modified in the past release. Now, seed nodes + are treated identically to any other peer, however they only run the PEX + reactor. Because of this `seeds` has been removed from the config. Users + should add any seed nodes in the list of `bootstrap-peers`. + ### RPC Changes Tendermint v0.36 adds a new RPC event subscription API. The existing event diff --git a/cmd/tendermint/commands/run_node.go b/cmd/tendermint/commands/run_node.go index 347a04034..f4d49b91e 100644 --- a/cmd/tendermint/commands/run_node.go +++ b/cmd/tendermint/commands/run_node.go @@ -63,7 +63,6 @@ func AddNodeFlags(cmd *cobra.Command, conf *cfg.Config) { "p2p.laddr", conf.P2P.ListenAddress, "node listen address. (0.0.0.0:0 means any interface, any port)") - cmd.Flags().String("p2p.seeds", conf.P2P.Seeds, "comma-delimited ID@host:port seed nodes") //nolint: staticcheck cmd.Flags().String("p2p.persistent-peers", conf.P2P.PersistentPeers, "comma-delimited ID@host:port persistent peers") cmd.Flags().Bool("p2p.upnp", conf.P2P.UPNP, "enable/disable UPNP port forwarding") cmd.Flags().Bool("p2p.pex", conf.P2P.PexReactor, "enable/disable Peer-Exchange") diff --git a/config/config.go b/config/config.go index 7d0a4915e..43b3fc10f 100644 --- a/config/config.go +++ b/config/config.go @@ -612,15 +612,6 @@ type P2PConfig struct { //nolint: maligned // Address to advertise to peers for them to dial ExternalAddress string `mapstructure:"external-address"` - // Comma separated list of seed nodes to connect to - // We only use these if we can’t connect to peers in the addrbook - // - // Deprecated: This value is not used by the new PEX reactor. Use - // BootstrapPeers instead. - // - // TODO(#5670): Remove once the p2p refactor is complete. - Seeds string `mapstructure:"seeds"` - // Comma separated list of peers to be added to the peer store // on startup. Either BootstrapPeers or PersistentPeers are // needed for peer discovery diff --git a/config/toml.go b/config/toml.go index 0fac73cdd..4db4f4e65 100644 --- a/config/toml.go +++ b/config/toml.go @@ -295,13 +295,6 @@ laddr = "{{ .P2P.ListenAddress }}" # example: 159.89.10.97:26656 external-address = "{{ .P2P.ExternalAddress }}" -# Comma separated list of seed nodes to connect to -# We only use these if we can’t connect to peers in the addrbook -# NOTE: not used by the new PEX reactor. Please use BootstrapPeers instead. -# TODO: Remove once p2p refactor is complete -# ref: https:#github.com/tendermint/tendermint/issues/5670 -seeds = "{{ .P2P.Seeds }}" - # Comma separated list of peers to be added to the peer store # on startup. Either BootstrapPeers or PersistentPeers are # needed for peer discovery diff --git a/scripts/confix/plan.go b/scripts/confix/plan.go index a0ceef937..706343338 100644 --- a/scripts/confix/plan.go +++ b/scripts/confix/plan.go @@ -228,4 +228,10 @@ var plan = transform.Plan{ T: transform.Remove(parser.Key{"mempool", "recheck"}), ErrorOK: true, }, + { + // Since https://github.com/tendermint/tendermint/pull/8654. + Desc: "Remove the seeds option from the [p2p] section", + T: transform.Remove(parser.Key{"p2p", "seeds"}), + ErrorOK: true, + }, } diff --git a/test/e2e/runner/setup.go b/test/e2e/runner/setup.go index 5887f13ef..f3c1ddc0f 100644 --- a/test/e2e/runner/setup.go +++ b/test/e2e/runner/setup.go @@ -322,14 +322,6 @@ func MakeConfig(node *e2e.Node) (*config.Config, error) { } } - cfg.P2P.Seeds = "" //nolint: staticcheck - for _, seed := range node.Seeds { - if len(cfg.P2P.Seeds) > 0 { //nolint: staticcheck - cfg.P2P.Seeds += "," //nolint: staticcheck - } - cfg.P2P.Seeds += seed.AddressP2P(true) //nolint: staticcheck - } - cfg.P2P.PersistentPeers = "" for _, peer := range node.PersistentPeers { if len(cfg.P2P.PersistentPeers) > 0 {