-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Revert "Do not consider blocked networks local" #24835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 1653f97.
That's a commit from 2012 👀 We probably need some discussion here what would be the impact of this change to behavior other than |
@mzumsande @jnewbery @sipa any opinions here? |
I agree with @laanwj that the focus should be on the behavioral changes, not so much If removing the I'm unsure about this, but remember a discussion about the same topic with @vasild in #22834:
vasild's answer:
|
Interesting. Looks like there was no PR. One (or the) descendant commit (5e794a9) with unrelated content is not a merge commit, indicating (but not proving) that a merge commit may not exist. The commit itself (1653f97) was likely written at 3pm. While an unrelated pull on the same day (#1284) was opened at 11am, possibly rebased(?), merged at 6pm, and included 1653f97 in its base. |
apparently, this is not the case for @dergoegge. If we bind and listen on an address that is omitted from
I prefer 1. because the "bad" is only a display issue. Other options could be to include a new section in the display: "listening but not advertised addresses". Or to stop bind/listening on addresses omitted from PS: actually, we don't know if peers can even reach our address that is omitted from |
@vasild for context: I was playing around with
Would we though? afaict we try to announce the address that is best reachable for our peer. So for example, if we connect to a peer through IPv4 and we have a local IPv4 and IPv6 address, we won't announce the IPv6 address to that peer (See GetLocal and GetReachable, we sort by reachability). TBH it does not seem super obvious to me which address we choose for advertising so i might be wrong. The description of I think my main problem was the display issue and adding a "listening but not advertised addresses" section seems OK to me. |
We would at least for any existing inbound peers. So there could be the effect that if your address that is known to the network and you use Current behavior is that once you switch to -onlynet, you won't advertise other addresses at all, so inbound connections could become more infrequent over time (although GETDATA relay of the existing address by others is not affected). |
I'm afraid I don't remember 1653f97 or its rationale at all. It appears to even have committed directly to the master branch without going through a pull request... |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
Closing this because, based on the feedback here, it looks like my approach isn't the right one. Addressing the |
Concept ACK Thinking about this more, it looks now to me that it makes sense to remove To answer myself:
In this case the operator, in addition to I guess the initial semantic of This PR (plus adjusting
A duplicate of this PR: |
This reverts commit 1653f97.
The output of
bitcoin-cli -netinfo
does not show local addresses for networks that the node itself would not make connections to, however the node might still receive incoming connections on addresses not shown by-netinfo
. I would have expected-netinfo
to list all local addresses that can receive incoming connections.This can be observed when running a node that listens on multiple networks but also uses
-onlynet
. The local addresses of the networks not specified by-onlynet
will be excluded from the output of-netinfo
.