config: complete removal of seed addresses in config (#8654)

This commit is contained in:
Callum Waters
2022-06-01 12:35:31 +02:00
committed by GitHub
parent d2ca0b868d
commit 7ffc872dd7
7 changed files with 12 additions and 25 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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")

View File

@@ -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 cant 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

View File

@@ -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 cant 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

View File

@@ -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,
},
}

View File

@@ -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 {