-listen reverts while running #7860

issue y opened this issue on April 11, 2016
  1. y commented at 2:38 PM on April 11, 2016: none

    I started bitcoind with listen=0 and for good measure maxuploadtarget=0 in my bitcoin.conf. After 4 days of running using minimal bandwidth, it started using all my available bandwidth, without any indication in the log. Restarting bitcoind made it return to the expected behavior. I remember this happened in an earlier version, but only a single time and I could never reproduce it. The log startup shows the settings were correctly set in the conf file:

    2016-04-07 21:02:11 Bitcoin version v0.12.0 (2016-02-17 09:40:03 +0100)
    2016-04-07 21:02:11 InitParameterInteraction: parameter interaction: -listen=0 -> setting -upnp=0
    2016-04-07 21:02:11 InitParameterInteraction: parameter interaction: -listen=0 -> setting -discover=0
    2016-04-07 21:02:11 InitParameterInteraction: parameter interaction: -listen=0 -> setting -listenonion=0
    2016-04-07 21:02:11 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
    2016-04-07 21:02:11 Using OpenSSL version OpenSSL 1.0.2g  1 Mar 2016
    2016-04-07 21:02:11 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2016-04-07 21:02:11 Default data directory /Users/y/Library/Application Support/Bitcoin
    2016-04-07 21:02:11 Using data directory /Users/y/Library/Application Support/Bitcoin
    2016-04-07 21:02:11 Using config file /Users/y/Library/Application Support/Bitcoin/bitcoin.conf
    2016-04-07 21:02:11 Using at most 125 connections (8192 file descriptors available)
    2016-04-07 21:02:11 Using 2 threads for script verification
    2016-04-07 21:02:11 scheduler thread start
    2016-04-07 21:02:11 HTTP: creating work queue of depth 16
    2016-04-07 21:02:11 No rpcpassword set - using random cookie authentication
    2016-04-07 21:02:11 Generated RPC authentication cookie /Users/y/Library/Application Support/Bitcoin/.cookie
    2016-04-07 21:02:11 HTTP: starting 4 worker threads
    
  2. MarcoFalke commented at 2:49 PM on April 11, 2016: member

    Could you describe the expected behaviour after setting those options and the actual behaviour?

    bitcoind -? should list what those args are doing.

  3. y commented at 3:33 PM on April 11, 2016: none

    The expected behavior is that when listen=0 is set, the node doesn't relay blocks and hence uses minimal bandwidth. This is documented in many places, including https://bitcoin.org/en/full-node#disable-listening. I see now that maxuploadtarget=0 means unlimited bandwidth, when I added it to my conf that setting wasn't documented, so I'm now removing it. But listen=0 should have still overridden that.

  4. MarcoFalke commented at 3:36 PM on April 11, 2016: member

    According to your link, listen=0 will make the node connect to at most 8 other nodes and reject any incoming connection.

  5. MarcoFalke commented at 3:40 PM on April 11, 2016: member
  6. sipa commented at 3:48 PM on April 11, 2016: member

    Disabling listening does not in any way prevent other nodes from requesting blocks from you, it just results in fewer connections, and it makes it much less likely (but not impossible) that other nodes synchronize their history from you.

    If you want to reduce bandwidth usage, the limiter is the way to go.

  7. NicolasDorier commented at 6:11 AM on April 12, 2016: contributor
  8. jonasschnelli commented at 7:16 AM on April 13, 2016: contributor

    @y IIRC maxuploadtarget=0 is the default and will result to not limit the upload traffic. Try using maxuploadtarget=1.

  9. MarcoFalke commented at 9:46 AM on April 13, 2016: member

    blocksonly

    This is more considered a developer feature, not sure if this should be mentioned in the docs.

    maxuploadtarget=1

    May not work. I think you have to put in the minimum (144)

  10. laanwj commented at 9:05 AM on April 15, 2016: member

    Closing this, it seems misunderstanding not bug.

  11. laanwj closed this on Apr 15, 2016

  12. MarcoFalke 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-04-21 18:15 UTC

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