Rename -onlynet to -outboundnet #37048

Open
darosior wants to merge 3 commits from 2612_outboundnet into master AGit
darosior commented 2026-12-02 15:49:27 +00:00 (Migrated from github.com)

The -onlynet name is misleading, since that option only restricts automatic outbound connections. Manual and inbound connections may still be established on other networks. This has been a source of confusion, sometimes even among contributors to the software. Fix this by renaming the option to -outboundnet, which better suggests what the option achieves. The term "outbound" is already used in multiples places in our user interfaces.

The `-onlynet` name is misleading, since that option only restricts automatic outbound connections. Manual and inbound connections may still be established on other networks. This has been a source of confusion, sometimes even among contributors to the software. Fix this by renaming the option to `-outboundnet`, which better suggests what the option achieves. The term "outbound" is already used in multiples places in our user interfaces.
DrahtBot commented 2026-12-02 15:49:37 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #37055 (refactor: drop format calls on strings without arguments by fanquake)
  • #36540 (mempool: remove time-based transaction expiry by ismaelsadeeq)

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.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/37048 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/37048.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/37048#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. A summary of reviews will appear here. <!--174a7506f384e20aa4161008e828411d--> ### Conflicts Reviewers, this pull request conflicts with the following ones: * [#37055](https://github.com/bitcoin/bitcoin/pull/37055) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/37055.svg"></sub> (refactor: drop format calls on strings without arguments by fanquake) * [#36540](https://github.com/bitcoin/bitcoin/pull/36540) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36540.svg"></sub> (mempool: remove time-based transaction expiry by ismaelsadeeq) 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. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

🔵 Suggestion · -onlynet and -outboundnet reset independently

-nooutboundnet leaves a config-file onlynet= restriction active, and vice versa, but the migration note describes the names only as aliases.

Location: src/node/net_args.cpp:14 (head).

🔵 Suggestion · Migrated outboundnet= restrictions are ignored by older binaries

On downgrade or shared-config use, an older binary that does not recognize outboundnet= would ignore the migrated allowlist, potentially permitting direct IPv4/IPv6 connections without a general -proxy.

Location: doc/release-notes-37048.md:6 (head).

🔵 Suggestion · Tor SOCKS discovery lacks allowlist regression coverage

The callback correctly honors both spellings, but the functional tests do not check onion reachability after SOCKS discovery with -outboundnet or -onlynet.

Location: src/torcontrol.cpp:481 (head).


Reviewed: 1d511adaeeb9 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:e1a29e5e677c47d383756f0fcf8f3760725c91d1104dd3ccb2f333b6217eba26:47880f5569fd2047d249266f337c4f2a509adf7d96c3ccb1c7644c2c2a650bff --> <!-- ralph-base:e3a72a374435ad3266c8931846bbcdb7b0e5e7c2 --> <!-- ralph-head:1d511adaeeb994735cf2b028eea28e2a7660b07d --> <!-- ralph-case:824e5b7c2f0458c59ad59f8fdcf4d13e137e3083ec68d6dfad28b2c9b558d79d --> **🔵 Suggestion · `-onlynet` and `-outboundnet` reset independently** `-nooutboundnet` leaves a config-file `onlynet=` restriction active, and vice versa, but the migration note describes the names only as aliases. Location: [`src/node/net_args.cpp:14`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/1d511adaeeb994735cf2b028eea28e2a7660b07d/src/node/net_args.cpp#L14>) (head). **🔵 Suggestion · Migrated `outboundnet=` restrictions are ignored by older binaries** On downgrade or shared-config use, an older binary that does not recognize `outboundnet=` would ignore the migrated allowlist, potentially permitting direct IPv4/IPv6 connections without a general `-proxy`. Location: [`doc/release-notes-37048.md:6`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/1d511adaeeb994735cf2b028eea28e2a7660b07d/doc/release-notes-37048.md#L6>) (head). **🔵 Suggestion · Tor SOCKS discovery lacks allowlist regression coverage** The callback correctly honors both spellings, but the functional tests do not check onion reachability after SOCKS discovery with `-outboundnet` or `-onlynet`. Location: [`src/torcontrol.cpp:481`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/1d511adaeeb994735cf2b028eea28e2a7660b07d/src/torcontrol.cpp#L481>) (head). <!-- Review tier: sensitive --> --- Reviewed: [`1d511adaeeb9`](<https://git.fish.foo/bitcoin/bitcoin/commit/1d511adaeeb994735cf2b028eea28e2a7660b07d>) · [Review report](<https://review.fish.foo/report/37048-1d511adaeeb994735cf2b028eea28e2a7660b07d-3444-2.html>) · [Previous reports](<https://review.fish.foo/traces/37048/>) [permalink](<https://review.fish.foo/report/37048-1d511adaeeb994735cf2b028eea28e2a7660b07d-3444-2.html>)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!37048
No description provided.