0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-04 13:55:23 -05:00
bitcoin-core/src
Ava Chow b042c4f053
Merge bitcoin/bitcoin#31223: net, init: derive default onion port if a user specified a -port
1dd3af8fbc Add release note for #31223 (Martin Zumsande)
997757dd2b test: add functional test for -port behavior (Martin Zumsande)
0e2b12b92a net, init: derive default onion port if a user specified a -port (Martin Zumsande)

Pull request description:

  This resolves #31133 (setups with multiple local nodes each using a different `-port` no longer working with v28.0, see the issue description for more details) by deriving the default onion listening port to be the value specified by `-port` incremented by 1 (idea by vasild / laanwj).
  Note that with this fix, the chosen `-port` values of two local nodes cannot be adjacent, otherwise there will be port collisions again.

  From the discussion in the linked issue, this was the most popular option, followed by doing nothing and telling affected users to change their setups to use `-bind` instead of `-port`. But more opinions are certainly welcome!

  I think that if we decide to do something about the problem described in the issue, we should do so soon (in 28.1.), so I opened this PR.
  Fixes #31133

ACKs for top commit:
  achow101:
    ACK 1dd3af8fbc
  laanwj:
    Tested ACK 1dd3af8fbc
  tdb3:
    Code review ACK 1dd3af8fbc

Tree-SHA512: 37fda2b23bbedcab5df3a401cf5afce66ae5318fb78f9660f83e3fd075b528e8156d7a0903f9a12ffe97ab5d83860587116b74af28670a1f4c2f0d1be4999f40
2024-12-13 18:56:37 -05:00
..
bench [checkqueue] support user-defined return type through std::optional 2024-12-02 16:25:13 -05:00
common args: Catch directories in place of config files 2024-12-03 11:04:10 +01:00
compat
consensus validation: Remove RECENT_CONSENSUS_CHANGE validation result 2024-11-11 10:24:38 +01:00
crc32c
crypto scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h 2024-10-10 12:22:12 +02:00
index scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
init scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
interfaces Set notifications m_tip_block in LoadChainTip() 2024-12-06 14:24:21 +07:00
ipc refactor: Fix "modernize-use-starts-ends-with" clang-tidy warning 2024-12-12 11:51:40 +00:00
kernel policy: Allow dust in transactions, spent in-mempool 2024-11-12 09:24:54 -05:00
leveldb
logging scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
minisketch
node Merge bitcoin/bitcoin#31346: Set notifications m_tip_block in LoadChainTip() 2024-12-13 08:25:25 -05:00
policy doc: ephemeral policy: add missing closing double quote 2024-11-25 21:05:11 +01:00
primitives
qt scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
rpc docs: remove repetitive words 2024-12-12 16:36:06 +08:00
script interpreter: Use the same type for SignatureHash in the definition 2024-11-25 15:36:05 +01:00
secp256k1 Update secp256k1 subtree to v0.6.0 2024-11-04 14:59:46 -05:00
support
test Merge bitcoin/bitcoin#30933: test: Prove+document ConstevalFormatString/tinyformat parity 2024-12-10 22:05:03 -05:00
univalue build: Remove Autotools-based build system 2024-08-30 21:31:39 +01:00
util util: use explicit cast in MultiIntBitSet::Fill() 2024-12-05 16:55:36 +01:00
wallet wallet: Migrate non-HD keys to combo() descriptor 2024-12-09 15:25:57 -05:00
zmq cmake: Add FindZeroMQ module 2024-10-25 18:09:36 +01:00
.clang-format
.clang-tidy tidy: add clang-tidy modernize-use-starts-ends-with check 2024-09-14 20:33:32 +03:00
addrdb.cpp scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
addrdb.h
addresstype.cpp policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
addresstype.h policy: Add OP_1 <0x4e73> as a standard output type 2024-07-30 14:06:58 -04:00
addrman.cpp addrman: cap the max_pct to not exceed the maximum number of addresses 2024-11-11 12:47:53 -03:00
addrman.h addrman: cap the max_pct to not exceed the maximum number of addresses 2024-11-11 12:47:53 -03:00
addrman_impl.h Merge bitcoin/bitcoin#30568: addrman: change internal id counting to int64_t 2024-09-20 12:55:22 -04:00
arith_uint256.cpp
arith_uint256.h doc + test: Correct uint256 hex string endianness 2024-08-03 21:59:54 +02:00
attributes.h
banman.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
banman.h
base58.cpp
base58.h
bech32.cpp fuzz: replace hardcoded numbers for bech32 limits 2024-08-06 11:03:31 +02:00
bech32.h fuzz: replace hardcoded numbers for bech32 limits 2024-08-06 11:03:31 +02:00
bip324.cpp
bip324.h
bitcoin-chainstate.cpp Merge bitcoin/bitcoin#31175: rpc: Remove submitblock pre-checks 2024-12-03 17:38:41 -05:00
bitcoin-cli-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-cli.cpp args: Disallow -nodatadir 2024-11-20 22:55:25 +01:00
bitcoin-tx-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-tx.cpp Merge bitcoin/bitcoin#31212: util: Improve documentation and negation of args 2024-12-04 13:20:46 -05:00
bitcoin-util-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-util.cpp scripted-diff: Avoid printing version information for -noversion 2024-11-20 22:55:23 +01:00
bitcoin-wallet-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoin-wallet.cpp args: Disallow -nodatadir 2024-11-20 22:55:25 +01:00
bitcoind-res.rc scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
bitcoind.cpp scripted-diff: Avoid printing version information for -noversion 2024-11-20 22:55:23 +01:00
blockencodings.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
blockencodings.h
blockfilter.cpp
blockfilter.h
chain.cpp
chain.h doc: update NeedsRedownload() comment 2024-09-17 09:54:18 +02:00
chainparams.cpp test: Don't enforce BIP94 on regtest unless specified by arg 2024-10-28 11:38:38 -04:00
chainparams.h
chainparamsbase.cpp net, init: derive default onion port if a user specified a -port 2024-11-14 13:41:02 -05:00
chainparamsbase.h net, init: derive default onion port if a user specified a -port 2024-11-14 13:41:02 -05:00
chainparamsseeds.h seeds: Regenerate mainnet seeds 2024-08-27 07:00:27 +02:00
checkqueue.h Merge bitcoin/bitcoin#31313: refactor: Clamp worker threads in ChainstateManager constructor 2024-12-03 18:02:37 -05:00
clientversion.cpp refactor: Pick translated string after format 2024-11-15 17:16:03 +01:00
clientversion.h scripted-diff: Clarify "user agent" variable name 2024-10-28 12:35:49 +00:00
cluster_linearize.h doc: correct typos 2024-11-11 14:14:39 +00:00
CMakeLists.txt cmake: Build secp256k1 only when required 2024-11-23 15:31:39 +00:00
coins.cpp Merge bitcoin/bitcoin#30906: refactor: prohibit direct flags access in CCoinsCacheEntry and remove invalid tests 2024-12-04 14:09:05 -05:00
coins.h coins, refactor: Remove direct GetFlags access 2024-12-02 13:52:34 +01:00
compressor.cpp
compressor.h
core_io.h rpc: add getdescriptoractivity 2024-11-26 20:47:08 -05:00
core_memusage.h
core_read.cpp ci: Update Clang in "tidy" job 2024-12-05 14:37:47 +00:00
core_write.cpp
cuckoocache.h
dbwrapper.cpp dbwrapper: Bump max file size to 32 MiB 2024-11-30 20:19:08 +01:00
dbwrapper.h dbwrapper: Bump max file size to 32 MiB 2024-11-30 20:19:08 +01:00
deploymentinfo.cpp
deploymentinfo.h
deploymentstatus.cpp
deploymentstatus.h
dummywallet.cpp
external_signer.cpp refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
external_signer.h
flatfile.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
flatfile.h
hash.cpp
hash.h Squashed 'src/secp256k1/' changes from 2f2ccc46954..0cdc758a563 2024-11-04 14:59:46 -05:00
headerssync.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
headerssync.h
httprpc.cpp args: Support -norpccookiefile for bitcoind and bitcoin-cli 2024-12-03 10:38:21 +01:00
httprpc.h
httpserver.cpp scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
httpserver.h
i2p.cpp
i2p.h
indirectmap.h
init.cpp Merge bitcoin/bitcoin#31223: net, init: derive default onion port if a user specified a -port 2024-12-13 18:56:37 -05:00
init.h multiprocess: Add -ipcbind option to bitcoin-node 2024-09-06 09:08:10 -04:00
key.cpp refactor: remove un-tested early returns 2024-08-04 08:52:22 +02:00
key.h refactor: move SignSchnorr to KeyPair 2024-08-04 08:51:36 +02:00
key_io.cpp key: clear out secret data in DecodeExtKey 2024-10-27 15:38:54 +01:00
key_io.h
logging.cpp log: Enforce trailing newline, Remove redundant m_started_new_line 2024-10-01 11:31:39 +02:00
logging.h log: Enforce trailing newline, Remove redundant m_started_new_line 2024-10-01 11:31:39 +02:00
mapport.cpp mapport: remove dead code in DispatchMapPort 2024-10-25 15:02:07 -04:00
mapport.h interfaces: remove now unused 'use_upnp' arg from 'mapPort' 2024-10-24 18:23:30 +02:00
memusage.h memusage: Add DynamicUsage for std::string 2024-11-04 18:46:40 +01:00
merkleblock.cpp
merkleblock.h
net.cpp scripted-diff: Replace strprintf(Untranslated) with Untranslated(strprintf) 2024-12-04 15:09:05 -04:00
net.h Merge bitcoin/bitcoin#31235: addrman: cap the max_pct to not exceed the maximum number of addresses 2024-11-13 12:13:17 +00:00
net_permissions.cpp
net_permissions.h
net_processing.cpp Merge bitcoin/bitcoin#31269: validation: Remove RECENT_CONSENSUS_CHANGE validation result 2024-11-14 09:43:47 +00:00
net_processing.h net: add GetOrphanTransactions() to PeerManager 2024-10-01 21:55:18 -04:00
net_types.cpp
net_types.h
netaddress.cpp refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
netaddress.h
netbase.cpp scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h 2024-10-10 12:22:12 +02:00
netbase.h net: add All() in ReachableNets 2024-09-10 11:20:40 -03:00
netgroup.cpp
netgroup.h
netmessagemaker.h
noui.cpp
noui.h
outputtype.cpp
outputtype.h
pow.cpp doc: correct typos 2024-11-11 14:14:39 +00:00
pow.h Add FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION in PoW check 2024-09-02 15:43:33 +01:00
prevector.h prevector: avoid GCC bogus warnings in insert method 2024-09-11 17:41:26 +02:00
protocol.cpp scripted-diff: get rid of remaining "command" terminology in protocol.{h,cpp} 2024-10-26 23:44:15 +02:00
protocol.h scripted-diff: get rid of remaining "command" terminology in protocol.{h,cpp} 2024-10-26 23:44:15 +02:00
psbt.cpp
psbt.h
pubkey.cpp refactor: Hand-replace some ParseHex -> ""_hex 2024-08-28 19:11:59 +02:00
pubkey.h refactor: Make XOnlyPubKey tolerate constexpr std::arrays 2024-08-28 19:09:51 +02:00
random.cpp Merge bitcoin/bitcoin#31124: util: Remove RandAddSeedPerfmon 2024-10-24 18:08:12 -04:00
random.h util: Remove RandAddSeedPerfmon 2024-10-21 23:24:17 +02:00
randomenv.cpp util: Remove RandAddSeedPerfmon 2024-10-21 23:24:17 +02:00
randomenv.h
rest.cpp scripted-diff: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:36:19 +00:00
rest.h
scheduler.cpp
scheduler.h
serialize.h
signet.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
signet.h
span.h refactor: Remove Span operator==, Use std::ranges::equal 2024-08-13 07:44:31 +02:00
streams.cpp streams: add DataStream::GetMemoryUsage 2024-11-04 18:46:40 +01:00
streams.h streams: add DataStream::GetMemoryUsage 2024-11-04 18:46:40 +01:00
sync.cpp
sync.h
threadsafety.h
tinyformat.h tinyformat: Add compile-time checking for literal format strings 2024-10-28 19:13:46 -04:00
torcontrol.cpp Merge bitcoin/bitcoin#31223: net, init: derive default onion port if a user specified a -port 2024-12-13 18:56:37 -05:00
torcontrol.h net, init: derive default onion port if a user specified a -port 2024-11-14 13:41:02 -05:00
txdb.cpp refactor: Rely on returned value of GetCoin instead of parameter 2024-09-18 20:03:47 +02:00
txdb.h refactor: Rely on returned value of GetCoin instead of parameter 2024-09-18 20:03:47 +02:00
txmempool.cpp Move CalculateChunksForRBF() to the mempool changeset 2024-11-13 13:27:01 -05:00
txmempool.h doc: add comments for CTxMemPool::ChangeSet 2024-11-13 13:27:01 -05:00
txorphanage.cpp net: add GetOrphanTransactions() to PeerManager 2024-10-01 21:55:18 -04:00
txorphanage.h [fuzz] txdownloadman and txdownload_impl 2024-10-24 21:23:56 -04:00
txrequest.cpp Merge bitcoin/bitcoin#30194: refactor: use recommended type hiding on multi_index types 2024-08-07 20:00:28 +01:00
txrequest.h
uint256.cpp
uint256.h test: remove test-only uint256S 2024-09-06 17:36:18 +02:00
undo.h
validation.cpp Merge bitcoin/bitcoin#31346: Set notifications m_tip_block in LoadChainTip() 2024-12-13 08:25:25 -05:00
validation.h Merge bitcoin/bitcoin#31313: refactor: Clamp worker threads in ChainstateManager constructor 2024-12-03 18:02:37 -05:00
validationinterface.cpp refactor: include the proper header rather than forward-declaring RemovalReasonToString 2024-10-08 15:25:47 +00:00
validationinterface.h
versionbits.cpp
versionbits.h
walletinitinterface.h