Skip to content

p2p: dial addrs which came from seed instead of calling ensurePeers#3762

Merged
melekes merged 4 commits intomasterfrom
3338-pex-too-soon
Jul 2, 2019
Merged

p2p: dial addrs which came from seed instead of calling ensurePeers#3762
melekes merged 4 commits intomasterfrom
3338-pex-too-soon

Conversation

@melekes
Copy link
Contributor

@melekes melekes commented Jun 28, 2019

Calling ensurePeers outside of ensurePeersRoutine can lead to nodes
disconnecting from us due to "sent next PEX request too soon" error.

Solution is to just dial addrs we got from src instead of calling
ensurePeers.

Refs #2093

Fixes #3338

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests (manually tested by KamiD p2p: sent next PEX request too soon #3338 (comment))
  • Updated CHANGELOG_PENDING.md

Calling ensurePeers outside of ensurePeersRoutine can lead to nodes
disconnecting from us due to "sent next PEX request too soon" error.

Solution is to just dial addrs we got from src instead of calling
ensurePeers.

Refs #2093

Fixes #3338
@codecov-io
Copy link

codecov-io commented Jun 28, 2019

Codecov Report

Merging #3762 into master will increase coverage by 0.04%.
The diff coverage is 86.66%.

@@            Coverage Diff             @@
##           master    #3762      +/-   ##
==========================================
+ Coverage   63.94%   63.98%   +0.04%     
==========================================
  Files         217      217              
  Lines       18009    18094      +85     
==========================================
+ Hits        11516    11578      +62     
- Misses       5526     5546      +20     
- Partials      967      970       +3
Impacted Files Coverage Δ
p2p/pex/pex_reactor.go 81.53% <86.66%> (-1.71%) ⬇️
libs/db/remotedb/remotedb.go 35.89% <0%> (-4.94%) ⬇️
privval/signer_service_endpoint.go 85.45% <0%> (-3.64%) ⬇️
libs/db/mem_db.go 82.9% <0%> (-2.39%) ⬇️
state/execution.go 73.41% <0%> (-1.44%) ⬇️
blockchain/reactor.go 70.56% <0%> (-0.94%) ⬇️
blockchain/pool.go 79.6% <0%> (-0.66%) ⬇️
consensus/reactor.go 72.33% <0%> (-0.24%) ⬇️
privval/socket_listeners.go 89.65% <0%> (ø) ⬆️
... and 1 more

@melekes melekes added C:p2p Component: P2P pkg ready-for-review labels Jun 28, 2019
@melekes melekes self-assigned this Jun 30, 2019
@melekes melekes removed the C:p2p Component: P2P pkg label Jun 30, 2019
Copy link
Contributor

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡️

@melekes melekes merged commit d041476 into master Jul 2, 2019
@melekes melekes deleted the 3338-pex-too-soon branch July 2, 2019 17:20
@melekes melekes mentioned this pull request Jul 16, 2019
ruseinov pushed a commit to ruseinov/tendermint that referenced this pull request Jul 26, 2019
…endermint#3762)

Calling ensurePeers outside of ensurePeersRoutine can lead to nodes
disconnecting from us due to "sent next PEX request too soon" error.

Solution is to just dial addrs we got from src instead of calling
ensurePeers.

Refs tendermint#2093

Fixes tendermint#3338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

p2p: sent next PEX request too soon

4 participants