`onlynet=onion` for pruned node results in no peers #22384

issue ghost opened this issue on July 1, 2021
  1. ghost commented at 3:58 PM on July 1, 2021: none

    onlynet=onion doesn't work for pruned node. Even after waiting for few minutes couldn't see any peers. Initially I thought it must be an issue because less onion nodes on testnet but it works fine for non-pruned node.

    Expected behavior

    Onion peers

    Actual behavior

    No peers

    To reproduce

    Node A (pruned) with bitcoin.conf:

    testnet=1
    prune=1024
    
    onlynet=onion
    

    Node B (non-pruned) with bitcoin.conf:

    testnet=1
    txindex=1
    
    onlynet=onion
    

    System information

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    • Master Branch

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    • Pop!_OS

    <!-- Any extra information that might be useful in the debugging process. -->

    Peers for Node B:

    image

    Peers for Node A:

    $ bitcoin-cli getpeerinfo
    
    [
    ]
    

    Is this a bug or expected behavior and I am missing something?

  2. MarcoFalke commented at 4:05 PM on July 1, 2021: member

    Please provide the relevant excerpts from the debug log with the appropriate logging enabled.

  3. ghost commented at 4:45 PM on July 1, 2021: none

    I could finally see some peers in pruned node but it took some time.

    image

    Maybe they got connected after DNS seed query which waits for 300 seconds. So the issue is resolved I guess but still things work differently in pruned node for some reason:

    debug.log for Node A(non-pruned): https://pastebin.com/1VrkvB52

    debug.log for Node B(pruned): https://pastebin.com/W577CZXZ

  4. MarcoFalke commented at 5:20 PM on July 1, 2021: member

    bootstrapping is non-deterministic, so a small delay is expected when the randomly picked bootstrap peers are currently unreachable.

  5. MarcoFalke closed this on Jul 1, 2021

  6. sipa referenced this in commit 03110246d7 on Jul 28, 2021
  7. sipa referenced this in commit b9f420246c on Jul 28, 2021
  8. sipa referenced this in commit f53cbc5323 on Jul 29, 2021
  9. DrahtBot locked this on Aug 18, 2022
Contributors

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-04-17 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me