Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34812. ReviewsSee the guideline and AI policy for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
99b1006 to
0513c9f
Compare
|
To reproduce the error and verify the fix manually, run On master, the |
|
Why wouldn't this also apply to Tor? |
|
Tor onion services are handled differently. The automatically created onion service is added in |
|
@w0xlt can you rebase this? |
0513c9f to
dbabe2f
Compare
|
@sedited Done. |
dbabe2f to
8d6df90
Compare
|
Rebased again. |
When -externalip is set, -discover is implicitly disabled. This prevented CJDNS addresses from being registered in mapLocalHost (shown in the localaddresses RPC field), even though CJDNS operates on a separate overlay network unrelated to the node's public IPv4/IPv6 address. Note: registering in mapLocalHost is a prerequisite for address advertisement, but GetLocal() already ensures CJDNS addresses are only advertised to CJDNS peers (privacy network isolation). Fix three code paths that blocked CJDNS when fDiscover was false: - Discover(): skip the early return for CJDNS-prefix addresses - AddLocal(): allow CJDNS addresses regardless of discovery score - Bind(): register bound CJDNS addresses even without discovery
Verify that a CJDNS address bound via -bind is registered in localaddresses even when -externalip is set (which disables -discover). The test creates a Docker network with an fc00::/8 subnet to provide a bindable CJDNS-prefix address.
8d6df90 to
636a515
Compare
| - Nodes configured with `-cjdnsreachable` now advertise their CJDNS address | ||
| even when `-externalip` is set. Previously, specifying `-externalip` |
There was a problem hiding this comment.
I commented on the issue #33471 (comment)
This will change bitcoind to run auto discovery for some networks (CJDNS) even if -externalip= is used but not for others (IPv4, IPv6). That seems non-intuitive.
There was a problem hiding this comment.
Thanks. I replied there. Better to keep the conversation in one place.
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
Closing this PR since CJDNS is being considered for removal from the project. |
Fixes #33471
When
-externalipis set,-discoveris implicitly disabled. This prevents CJDNS bound addresses from being added tolocaladdresses, so the node never advertises itself on the CJDNS network - even though outbound CJDNS connections work fine.CJDNS addresses live on a separate overlay network and don't conflict with manually specified external IPs, so there is no reason to suppress them. This PR adds CJDNS exceptions to the three code paths in
net.cppthat gate onfDiscover:AddLocal()— accept CJDNS regardless offDiscoverDiscover()— don't skip CJDNS-prefixed interfaces when!fDiscoverBind()— callAddLocal()for CJDNS bound addresses when!fDiscoverNote to reviewers: the functional test (
feature_cjdns_externalip.py) requires Docker to create anfc00::/8bridge interface and is skipped when Docker is unavailable. It is included so reviewers can easily verify the fix end-to-end, but can be easily dropped (it's in a separate commit) if the dependency is unwanted. Note that this test cannot be run in CI containers.