Skip to content

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.

1 participant