Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable User Agent Filtering for IBD #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cfromknecht
Copy link

@cfromknecht cfromknecht commented Jan 10, 2018

This PR adds a hybrid black/whitelist in order to filter for suitable user agents. Btcd's initial block download can stall intermittently due to targeting a bcash node as the primary sync peer, and not detecting that the sync has been blocked. This provides a temporary solution in order to get a btcd node fully synced, after which it is less imperative to continue filtering by user agents.

The black and whitelists can be modified in the configuration file using the tags agentblacklist and agentwhitelist. The blacklist is applied before the whitelist, using the following procedure:

  1. Reject the peer if it contains a blacklisted agent substring.
  2. If no whitelist is provided, accept all other peers.
  3. Accept the peer if it contains a whitelisted agent substring.
  4. Otherwise, reject all other peers.

An example configuration that seems to remedy the problem:

agentblacklist=ABC,Cash
agentwhitelist=Satoshi:0.15.,Satoshi:0.16.,btcd:0.12.,neutrino:0.0.1-alpha

wakiyamap pushed a commit to wakiyamap/monad that referenced this pull request Nov 26, 2020
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.

None yet

1 participant