Skip to content

p2p: implement adr-050#4176

Merged
melekes merged 13 commits intotendermint:masterfrom
dongsam:ADR-050-Improved-Trusted-Peering
Dec 4, 2019
Merged

p2p: implement adr-050#4176
melekes merged 13 commits intotendermint:masterfrom
dongsam:ADR-050-Improved-Trusted-Peering

Conversation

@dongsam
Copy link
Contributor

@dongsam dongsam commented Nov 21, 2019

  • implementation spec of Improved Trusted Peering ADR-050 by B-Harvest
  • Add unconditional_peer_ids and persistent_peers_max_dial_period to config
  • Add unconditionalOutbound, unconditionalInbound arguments to func (sw *Switch) NumPeers() for get unconditional count of outbound/inbound peers
  • Add unconditionalPeerIDs map to Switch struct

default config value of persistent_peers_max_dial_period is 0s(disabled) It could be changed through discussion

Refs

@codecov-io
Copy link

codecov-io commented Nov 25, 2019

Codecov Report

Merging #4176 into master will increase coverage by <.01%.
The diff coverage is 78.26%.

@@            Coverage Diff             @@
##           master    #4176      +/-   ##
==========================================
+ Coverage   67.33%   67.33%   +<.01%     
==========================================
  Files         223      223              
  Lines       19298    19338      +40     
==========================================
+ Hits        12994    13022      +28     
- Misses       5329     5336       +7     
- Partials      975      980       +5
Impacted Files Coverage Δ
rpc/core/pipe.go 25% <ø> (ø) ⬆️
config/toml.go 65.95% <ø> (ø) ⬆️
cmd/tendermint/commands/run_node.go 0% <0%> (ø) ⬆️
rpc/core/net.go 36.84% <0%> (ø) ⬆️
p2p/pex/pex_reactor.go 83.42% <50%> (-1.01%) ⬇️
node/node.go 62.95% <60%> (-0.09%) ⬇️
p2p/switch.go 69.57% <87.87%> (+0.87%) ⬆️
config/config.go 83.97% <90.9%> (-0.46%) ⬇️
consensus/ticker.go 91.66% <0%> (-4.17%) ⬇️
consensus/replay.go 71.76% <0%> (-0.79%) ⬇️
... and 6 more

@dongsam dongsam force-pushed the ADR-050-Improved-Trusted-Peering branch from 73fcd9a to 06f2699 Compare November 25, 2019 10:18
@dongsam dongsam marked this pull request as ready for review November 25, 2019 10:24
@Hyung-bharvest
Copy link
Contributor

@tessr @melekes @ebuchman
review requested from B-Harvest.

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution 👍 I've left a few comments.

@tac0turtle tac0turtle changed the title [ADR] ADR-050 spec implementation p2p: implement adr-050 Dec 2, 2019
dongsam and others added 3 commits December 3, 2019 12:55
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
# Conflicts:
#	docs/spec/p2p/config.md
#	docs/spec/reactors/pex/pex.md
@dongsam dongsam force-pushed the ADR-050-Improved-Trusted-Peering branch from 74e289d to a607dbc Compare December 3, 2019 04:28
dongsam and others added 2 commits December 3, 2019 17:45
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
@dongsam
Copy link
Contributor Author

dongsam commented Dec 3, 2019

Is there non-decisive test failures in ci/circleci: test_cover?
It didn't fail when running in my local env

p2p/switch.go Outdated
// NumPeers returns the count of outbound/inbound and outbound-dialing peers.
func (sw *Switch) NumPeers() (outbound, inbound, dialing int) {
// NumPeers returns the count of outbound/inbound, outbound-dialing and unconditional peers.
func (sw *Switch) NumPeers() (outbound, inbound, dialing, unconditionalOutbound, unconditionalInbound int) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can revert this change now

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.

5 participants

Comments