2018-01-01 15:59:53 -05:00
|
|
|
# P2P Config
|
|
|
|
|
|
|
|
Here we describe configuration options around the Peer Exchange.
|
2018-01-25 05:02:26 +00:00
|
|
|
These can be set using flags or via the `$TMHOME/config/config.toml` file.
|
2018-01-01 15:59:53 -05:00
|
|
|
|
|
|
|
## Seed Mode
|
|
|
|
|
|
|
|
`--p2p.seed_mode`
|
|
|
|
|
2018-01-09 12:44:49 -05:00
|
|
|
The node operates in seed mode. In seed mode, a node continuously crawls the network for peers,
|
|
|
|
and upon incoming connection shares some peers and disconnects.
|
2018-01-01 15:59:53 -05:00
|
|
|
|
|
|
|
## Seeds
|
|
|
|
|
p2p: make persistent prop independent of conn direction (#3593)
## Description
Previously only outbound peers can be persistent.
Now, even if the peer is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect. This part is actually optional and can be reverted.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
## Commits
* make persistent prop independent of conn direction
Previously only outbound peers can be persistent. Now, even if the peer
is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
* fix TestPEXReactorDialPeer test
* add a changelog entry
* update changelog
* add two tests
* reformat code
* test UnsafeDialPeers and UnsafeDialSeeds
* add TestSwitchDialPeersAsync
* spec: update p2p/config spec
* fixes after Ismail's review
* Apply suggestions from code review
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
* fix merge conflict
* remove sleep from TestPEXReactorDoesNotDisconnectFromPersistentPeerInSeedMode
We don't need it actually.
2019-05-03 17:21:56 +04:00
|
|
|
`--p2p.seeds “id100000000000000000000000000000000@1.2.3.4:26656,id200000000000000000000000000000000@2.3.4.5:4444”`
|
2018-01-01 15:59:53 -05:00
|
|
|
|
2018-01-09 12:44:49 -05:00
|
|
|
Dials these seeds when we need more peers. They should return a list of peers and then disconnect.
|
2018-01-01 15:59:53 -05:00
|
|
|
If we already have enough peers in the address book, we may never need to dial them.
|
|
|
|
|
|
|
|
## Persistent Peers
|
|
|
|
|
p2p: make persistent prop independent of conn direction (#3593)
## Description
Previously only outbound peers can be persistent.
Now, even if the peer is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect. This part is actually optional and can be reverted.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
## Commits
* make persistent prop independent of conn direction
Previously only outbound peers can be persistent. Now, even if the peer
is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
* fix TestPEXReactorDialPeer test
* add a changelog entry
* update changelog
* add two tests
* reformat code
* test UnsafeDialPeers and UnsafeDialSeeds
* add TestSwitchDialPeersAsync
* spec: update p2p/config spec
* fixes after Ismail's review
* Apply suggestions from code review
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
* fix merge conflict
* remove sleep from TestPEXReactorDoesNotDisconnectFromPersistentPeerInSeedMode
We don't need it actually.
2019-05-03 17:21:56 +04:00
|
|
|
`--p2p.persistent_peers “id100000000000000000000000000000000@1.2.3.4:26656,id200000000000000000000000000000000@2.3.4.5:26656”`
|
2018-01-01 15:59:53 -05:00
|
|
|
|
|
|
|
Dial these peers and auto-redial them if the connection fails.
|
|
|
|
These are intended to be trusted persistent peers that can help
|
2018-01-25 05:02:26 +00:00
|
|
|
anchor us in the p2p network. The auto-redial uses exponential
|
|
|
|
backoff and will give up after a day of trying to connect.
|
2018-01-01 15:59:53 -05:00
|
|
|
|
2018-01-25 05:02:26 +00:00
|
|
|
**Note:** If `seeds` and `persistent_peers` intersect,
|
|
|
|
the user will be warned that seeds may auto-close connections
|
|
|
|
and that the node may not be able to keep the connection persistent.
|
2018-01-01 15:59:53 -05:00
|
|
|
|
p2p: make persistent prop independent of conn direction (#3593)
## Description
Previously only outbound peers can be persistent.
Now, even if the peer is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect. This part is actually optional and can be reverted.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
## Commits
* make persistent prop independent of conn direction
Previously only outbound peers can be persistent. Now, even if the peer
is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
* fix TestPEXReactorDialPeer test
* add a changelog entry
* update changelog
* add two tests
* reformat code
* test UnsafeDialPeers and UnsafeDialSeeds
* add TestSwitchDialPeersAsync
* spec: update p2p/config spec
* fixes after Ismail's review
* Apply suggestions from code review
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
* fix merge conflict
* remove sleep from TestPEXReactorDoesNotDisconnectFromPersistentPeerInSeedMode
We don't need it actually.
2019-05-03 17:21:56 +04:00
|
|
|
## Private Peers
|
2018-01-01 15:59:53 -05:00
|
|
|
|
p2p: make persistent prop independent of conn direction (#3593)
## Description
Previously only outbound peers can be persistent.
Now, even if the peer is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect. This part is actually optional and can be reverted.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
## Commits
* make persistent prop independent of conn direction
Previously only outbound peers can be persistent. Now, even if the peer
is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
* fix TestPEXReactorDialPeer test
* add a changelog entry
* update changelog
* add two tests
* reformat code
* test UnsafeDialPeers and UnsafeDialSeeds
* add TestSwitchDialPeersAsync
* spec: update p2p/config spec
* fixes after Ismail's review
* Apply suggestions from code review
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
* fix merge conflict
* remove sleep from TestPEXReactorDoesNotDisconnectFromPersistentPeerInSeedMode
We don't need it actually.
2019-05-03 17:21:56 +04:00
|
|
|
`--p2p.private_peer_ids “id100000000000000000000000000000000,id200000000000000000000000000000000”`
|
2018-01-01 15:59:53 -05:00
|
|
|
|
p2p: make persistent prop independent of conn direction (#3593)
## Description
Previously only outbound peers can be persistent.
Now, even if the peer is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect. This part is actually optional and can be reverted.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
## Commits
* make persistent prop independent of conn direction
Previously only outbound peers can be persistent. Now, even if the peer
is inbound, if it's marked as persistent, when/if conn is lost,
Tendermint will try to reconnect.
Plus, seed won't disconnect from inbound peer if it's marked as
persistent. Fixes #3362
* fix TestPEXReactorDialPeer test
* add a changelog entry
* update changelog
* add two tests
* reformat code
* test UnsafeDialPeers and UnsafeDialSeeds
* add TestSwitchDialPeersAsync
* spec: update p2p/config spec
* fixes after Ismail's review
* Apply suggestions from code review
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
* fix merge conflict
* remove sleep from TestPEXReactorDoesNotDisconnectFromPersistentPeerInSeedMode
We don't need it actually.
2019-05-03 17:21:56 +04:00
|
|
|
These are IDs of the peers that we do not add to the address book or gossip to
|
|
|
|
other peers. They stay private to us.
|