From 4d8f29f79c194bd2ba5648a81b1c14074f4cc1f8 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 17 Dec 2018 20:52:33 +0400 Subject: [PATCH] set allow_duplicate_ip to false (#2992) * config: cors options are arrays of strings, not strings Fixes #2980 * docs: update tendermint-core/configuration.html page * set allow_duplicate_ip to false * in `tendermint testnet`, set allow_duplicate_ip to true Refs #2712 * fixes after Ismail's review --- CHANGELOG_PENDING.md | 2 ++ cmd/tendermint/commands/testnet.go | 1 + config/config.go | 2 +- docs/tendermint-core/configuration.md | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 022965bb8..e2b87f74d 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -9,6 +9,7 @@ Special thanks to external contributors on this release: * CLI/RPC/Config - [cli] Removed `node` `--proxy_app=dummy` option. Use `kvstore` (`persistent_kvstore`) instead. - [cli] Renamed `node` `--proxy_app=nilapp` to `--proxy_app=noop`. +- [config] \#2992 `allow_duplicate_ip` is now set to false * Apps @@ -17,6 +18,7 @@ Special thanks to external contributors on this release: * Blockchain Protocol * P2P Protocol +- multiple connections from the same IP are now disabled by default (see `allow_duplicate_ip` config option) ### FEATURES: diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index 7e5635ca6..10c7d9371 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -145,6 +145,7 @@ func testnetFiles(cmd *cobra.Command, args []string) error { nodeDir := filepath.Join(outputDir, fmt.Sprintf("%s%d", nodeDirPrefix, i)) config.SetRoot(nodeDir) config.P2P.AddrBookStrict = false + config.P2P.AllowDuplicateIP = true if populatePersistentPeers { config.P2P.PersistentPeers = persistentPeers } diff --git a/config/config.go b/config/config.go index 2b9c8758a..fd262f1e1 100644 --- a/config/config.go +++ b/config/config.go @@ -434,7 +434,7 @@ func DefaultP2PConfig() *P2PConfig { RecvRate: 5120000, // 5 mB/s PexReactor: true, SeedMode: false, - AllowDuplicateIP: true, // so non-breaking yet + AllowDuplicateIP: false, HandshakeTimeout: 20 * time.Second, DialTimeout: 3 * time.Second, TestDialFail: false, diff --git a/docs/tendermint-core/configuration.md b/docs/tendermint-core/configuration.md index e66dcf511..0d9a58c4b 100644 --- a/docs/tendermint-core/configuration.md +++ b/docs/tendermint-core/configuration.md @@ -170,7 +170,7 @@ seed_mode = false private_peer_ids = "" # Toggle to disable guard against peers connecting from the same ip. -allow_duplicate_ip = true +allow_duplicate_ip = false # Peer connection configuration. handshake_timeout = "20s"