net: multiple-node local setups with different -port don’t work anymore #31134

issue mzumsande openend this issue on October 22, 2024
  1. mzumsande commented at 2:59 pm on October 22, 2024: contributor

    With v28.0, (PR #22729), we now abort init on failed binds, as documented in the release notes. This also affects the default onion bind to port 8334, which is always done unless the user specifies the desired binds using the -bind command.

    As a result, setups with two local nodes that each use a different -port are not possible anymore - both of these nodes would attempt to create an onion bind to port 8334, and one of them would fail. In earlier versions, we would silently ignore the failed bind (bad if we were actually interested in receiving onion inbound peers, but convenient if we weren’t running Tor).

    I think that these kind of -port setups might be pretty widespread, especially in test setups where no inbound onion peers are desired, so this will likely affect multiple users. It has been reported on IRC multiple times (1, 2).

    There is a simple fix: Stop using -port, but instead specify a different -bind on each of the local nodes.

    Various possibilities how to deal with it (if at all) have been suggested on IRC by @vasild and @laanwj:

    1. Do nothing and tell affected users to switch to -bind - maybe even deprecate -port
    2. if -port is given, don’t attempt to bind to the default onion port
    3. if -port is given, derive an onion port from it (e.g. port+1) instead of always using 8334
    4. disable the automatic tor binding silently if the port is already used

    I think that if we decide to do something about this, we should do so quickly in 28.1, so I opened this issue! Thoughts?

  2. mzumsande commented at 3:01 pm on October 22, 2024: contributor
    closed, #31133 was opened at the same time, let’s discuss there.
  3. mzumsande closed this on Oct 22, 2024


mzumsande


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: 2024-11-21 12:12 UTC

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