Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Persistent time-based peer disabling #8428

Closed
tomusdrw opened this issue Apr 18, 2018 · 3 comments
Closed

Persistent time-based peer disabling #8428

tomusdrw opened this issue Apr 18, 2018 · 3 comments
Labels
F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. P5-sometimesoon 🌲 Issue is worth doing soon.
Milestone

Comments

@tomusdrw
Copy link
Collaborator

Currently we only "ban" peers in memory, when we detect they are on some different forks or different networks.

Every time the node is started though we again make a dozen of useless connections and requests, cause that info is not persisted.

I think it would make sense to have a file similar to nodes.json where we store peers that are temporarily banned (for some speciifc amount of time).

It would also help with dealing with warp-sync issues, currently you may end up with 25 peers that cannot provide you snapshot data that you are requesting (with --warp-barrier) - in such case we just idle and hope new peers will connect to use, or the old ones will get disconnected. The solution would be to temporarily ban current peers (say for 5 minutes), disconnect them and try to discover more.

CC @andresilva @ngotchac

@rphmeier any thoughts?

@tomusdrw tomusdrw added F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. labels Apr 18, 2018
@rphmeier
Copy link
Contributor

Makes sense to me, but we should also limit the size of the file.

@andresilva
Copy link
Contributor

Also makes sense to me, I think we can have different ban periods depending on the cause (e.g. a peer that doesn't have an available snapshot should be ignored for a shorter period than a peer that is on a different network). Also do you think the ban period should be static or maybe increase (exponentially?) with the number of failures? If we adopt this scheme what do we do wrt to our current strategy of tracking failure ratio of each peer?

@5chdn 5chdn added this to the 1.12 milestone Apr 25, 2018
@5chdn 5chdn added the P5-sometimesoon 🌲 Issue is worth doing soon. label Apr 25, 2018
@5chdn 5chdn modified the milestones: 2.0, 2.1 Jul 17, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Sep 11, 2018
@5chdn 5chdn modified the milestones: 2.2, 2.3 Oct 29, 2018
@5chdn 5chdn modified the milestones: 2.3, 2.4 Jan 10, 2019
@5chdn 5chdn modified the milestones: 2.4, 2.5 Feb 21, 2019
@soc1c soc1c modified the milestones: 2.5, 2.6 Apr 2, 2019
@ordian ordian modified the milestones: 2.6, 2.7 Jul 12, 2019
@adria0
Copy link

adria0 commented Jul 27, 2020

Closing issue due to its stale state.

@adria0 adria0 closed this as completed Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. P5-sometimesoon 🌲 Issue is worth doing soon.
Projects
None yet
Development

No branches or pull requests

7 participants