Seeding (DNS and fixed) on regtest #5397

issue ghost opened this issue on November 30, 2014
  1. ghost commented at 11:53 PM on November 30, 2014: none

    Regtest has neither DNS nor fixed seeds. The net.cpp 1229-1237 block in ThreadOpenConnections() acts oblivious to this, and attempts to add fixed nodes, assuming DNS seeds are down. While this may not necessarily be entirely inappropriate (in terms of 'path invariants'), this also may not remain harmless indefinitely, if we are assuming the possibility of an 'infrastructure attack' as the comment does (legitimate in the context of mainnet, or even testnet). At the very least, the comment itself needs to be updated to call out the regtest use case.

  2. laanwj commented at 11:22 AM on December 5, 2014: member

    What attack would you imagine on this? regtest is - by definition - local-only so any type of DNS seeding or fixed seeding would be actively harmful. You could add a check that those stages are skipped entirely iff there are no seeds, but in practice nothing would change?

  3. laanwj added the label Priority Low on Dec 5, 2014
  4. laanwj added the label Tests on Dec 5, 2014
  5. ghost commented at 3:34 AM on December 6, 2014: none

    I agree completely. The concern would be any future mods to this block, should they overlook the regtest use case (and therefore possibly take more dramatic measures operating under the assumption of an infrastructure attack). So, what say you? Is a comment update in order, or a comment update + skip the block entirely if there are no seeds? I have to say the code has managed to handle the different modes remarkably uniformly so far...

  6. unknown cross-referenced this on Mar 24, 2015 from issue Countermeasures against eclipse attacks by sipa
  7. unknown cross-referenced this on Jan 8, 2016 from issue POTENTIAL DEADLOCK FYI by ghost
  8. laanwj removed the label Priority Low on Dec 6, 2017
  9. meshcollider closed this on Mar 7, 2018

  10. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:55 UTC