diff options
-rw-r--r-- | .github/workflows/ci.yml | 60 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | doc/man/bitcoin-cli.1 | 6 | ||||
-rw-r--r-- | doc/man/bitcoin-qt.1 | 8 | ||||
-rw-r--r-- | doc/man/bitcoin-tx.1 | 6 | ||||
-rw-r--r-- | doc/man/bitcoin-util.1 | 6 | ||||
-rw-r--r-- | doc/man/bitcoin-wallet.1 | 6 | ||||
-rw-r--r-- | doc/man/bitcoind.1 | 8 | ||||
-rw-r--r-- | doc/release-notes.md | 336 | ||||
-rw-r--r-- | share/examples/bitcoin.conf | 2 | ||||
-rw-r--r-- | src/bench/pool.cpp | 3 | ||||
-rw-r--r-- | src/coins.h | 3 | ||||
-rw-r--r-- | src/init.cpp | 4 | ||||
-rw-r--r-- | src/net.cpp | 22 | ||||
-rw-r--r-- | src/net.h | 1 | ||||
-rw-r--r-- | src/support/allocators/pool.h | 2 | ||||
-rw-r--r-- | src/test/pool_tests.cpp | 24 |
17 files changed, 440 insertions, 61 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1e171c0e3..e8564c3a28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,9 @@ jobs: # ancestors from the rev-list output as described in: # https://git-scm.com/docs/git-rev-list echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD ^$(git rev-list -n1 --merges HEAD)^@ | head -1)" >> "$GITHUB_ENV" - - run: sudo apt install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y + - run: | + sudo apt-get update + sudo apt-get install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y - name: Compile and run tests run: | # Run tests on commits after the last merge commit and before the PR head commit @@ -137,29 +139,47 @@ jobs: uses: actions/checkout@v4 - name: Fix Visual Studio installation - # See: https://github.com/actions/runner-images/issues/7832#issuecomment-1617585694. + # Avoid toolset ambiguity that MSVC can't handle. run: | Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" $componentsToRemove= @( - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM64.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.x86.x64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.x86.x64.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM64.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM.Spectre" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM64" - "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ARM64" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.ARM64" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.ATL" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.ARM64" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.MFC" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.x86.x64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.37.17.7.x86.x64" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM64" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM64" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.ATL.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM64" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.MFC.Spectre" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64" + "Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64.Spectre" ) [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_} $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache') diff --git a/configure.ac b/configure.ac index 11b40c31e1..c60322434d 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 26) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_RC, 2) +define(_CLIENT_VERSION_RC, 3) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2023) define(_COPYRIGHT_HOLDERS,[The %s developers]) @@ -584,7 +584,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ CXXFLAGS="$TEMP_CXXFLAGS" # ARM -AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc"], [], [$CXXFLAG_WERROR]) +AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR]) AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crypto"], [], [$CXXFLAG_WERROR]) TEMP_CXXFLAGS="$CXXFLAGS" diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index b70f532c05..33ddf36a3b 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-CLI "1" "October 2023" "bitcoin-cli v26.0.0rc2" "User Commands" +.TH BITCOIN-CLI "1" "November 2023" "bitcoin-cli v26.0.0rc3" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v26.0.0rc2 +bitcoin-cli \- manual page for bitcoin-cli v26.0.0rc3 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Bitcoin Core\/\fR @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v26.0.0rc2 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v26.0.0rc2 +Bitcoin Core RPC client version v26.0.0rc3 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index b45b4ff027..1e074e3ee1 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-QT "1" "October 2023" "bitcoin-qt v26.0.0rc2" "User Commands" +.TH BITCOIN-QT "1" "November 2023" "bitcoin-qt v26.0.0rc3" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v26.0.0rc2 +bitcoin-qt \- manual page for bitcoin-qt v26.0.0rc3 .SH SYNOPSIS .B bitcoin-qt [\fI\,command-line options\/\fR] .SH DESCRIPTION -Bitcoin Core version v26.0.0rc2 +Bitcoin Core version v26.0.0rc3 .SH OPTIONS .HP \-? @@ -121,7 +121,7 @@ Do not keep transactions in the mempool longer than <n> hours (default: .HP \fB\-par=\fR<n> .IP -Set the number of script verification threads (\fB\-10\fR to 15, 0 = auto, <0 = +Set the number of script verification threads (0 = auto, up to 15, <0 = leave that many cores free, default: 0) .HP \fB\-persistmempool\fR diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index 52f1e6e73c..d9020b4685 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-TX "1" "October 2023" "bitcoin-tx v26.0.0rc2" "User Commands" +.TH BITCOIN-TX "1" "November 2023" "bitcoin-tx v26.0.0rc3" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v26.0.0rc2 +bitcoin-tx \- manual page for bitcoin-tx v26.0.0rc3 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded bitcoin transaction\/\fR @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v26.0.0rc2 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded bitcoin transaction\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v26.0.0rc2 +Bitcoin Core bitcoin\-tx utility version v26.0.0rc3 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index bd96107e09..5ba672b010 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "October 2023" "bitcoin-util v26.0.0rc2" "User Commands" +.TH BITCOIN-UTIL "1" "November 2023" "bitcoin-util v26.0.0rc3" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v26.0.0rc2 +bitcoin-util \- manual page for bitcoin-util v26.0.0rc3 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v26.0.0rc2 +Bitcoin Core bitcoin\-util utility version v26.0.0rc3 .SH OPTIONS .HP \-? diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index da856035a7..5bf09f1db4 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "October 2023" "bitcoin-wallet v26.0.0rc2" "User Commands" +.TH BITCOIN-WALLET "1" "November 2023" "bitcoin-wallet v26.0.0rc3" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v26.0.0rc2 +bitcoin-wallet \- manual page for bitcoin-wallet v26.0.0rc3 .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet version v26.0.0rc2 +Bitcoin Core bitcoin\-wallet version v26.0.0rc3 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. By default bitcoin\-wallet will act on wallets in the default mainnet wallet directory in the datadir. diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index d44c9bb6c4..01b2ea4858 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIND "1" "October 2023" "bitcoind v26.0.0rc2" "User Commands" +.TH BITCOIND "1" "November 2023" "bitcoind v26.0.0rc3" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v26.0.0rc2 +bitcoind \- manual page for bitcoind v26.0.0rc3 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] \fI\,Start Bitcoin Core\/\fR .SH DESCRIPTION -Bitcoin Core version v26.0.0rc2 +Bitcoin Core version v26.0.0rc3 .SH OPTIONS .HP \-? @@ -121,7 +121,7 @@ Do not keep transactions in the mempool longer than <n> hours (default: .HP \fB\-par=\fR<n> .IP -Set the number of script verification threads (\fB\-10\fR to 15, 0 = auto, <0 = +Set the number of script verification threads (0 = auto, up to 15, <0 = leave that many cores free, default: 0) .HP \fB\-persistmempool\fR diff --git a/doc/release-notes.md b/doc/release-notes.md index b40e1296d0..23bdfd7dd6 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1 +1,335 @@ -See https://github.com/bitcoin-core/bitcoin-devwiki/wiki/26.0%E2%80%90Release%E2%80%90Notes%E2%80%90Draft.
\ No newline at end of file +26.0 rc3 Release Notes +====================== + +Bitcoin Core version 26.0 is now available from: + + <https://bitcoincore.org/bin/bitcoin-core-26.0/> + +This release includes new features, various bug fixes and performance +improvements, as well as updated translations. + +Please report bugs using the issue tracker at GitHub: + + <https://github.com/bitcoin/bitcoin/issues> + +To receive security and update notifications, please subscribe to: + + <https://bitcoincore.org/en/list/announcements/join/> + +How to Upgrade +============== + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes in some cases), then run the +installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on macOS) +or `bitcoind`/`bitcoin-qt` (on Linux). + +Upgrading directly from a version of Bitcoin Core that has reached its EOL is +possible, but it might take some time if the data directory needs to be migrated. Old +wallet versions of Bitcoin Core are generally supported. + +Compatibility +============== + +Bitcoin Core is supported and extensively tested on operating systems +using the Linux kernel, macOS 11.0+, and Windows 7 and newer. Bitcoin +Core should also work on most other Unix-like systems but is not as +frequently tested on them. It is not recommended to use Bitcoin Core on +unsupported systems. + +Notable changes +=============== + +P2P and network changes +----------------------- + +- Experimental support for the v2 transport protocol defined in + [BIP324](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki) was added. + It is off by default, but when enabled using `-v2transport` it will be negotiated + on a per-connection basis with other peers that support it too. The existing + v1 transport protocol remains fully supported. + +- Nodes with multiple reachable networks will actively try to have at least one + outbound connection to each network. This improves individual resistance to + eclipse attacks and network level resistance to partition attacks. Users no + longer need to perform active measures to ensure being connected to multiple + enabled networks. (#27213) + +Pruning +------- + +- When using assumeutxo with `-prune`, the prune budget may be exceeded if it is set + lower than 1100MB (i.e. `MIN_DISK_SPACE_FOR_BLOCK_FILES * 2`). Prune budget is normally + split evenly across each chainstate, unless the resulting prune budget per chainstate + is beneath `MIN_DISK_SPACE_FOR_BLOCK_FILES` in which case that value will be used. (#27596) + +Updated RPCs +------------ + +- Setting `-rpcserialversion=0` is deprecated and will be removed in + a future release. It can currently still be used by also adding + the `-deprecatedrpc=serialversion` option. (#28448) + +- The `hash_serialized_2` value has been removed from `gettxoutsetinfo` since the value it + calculated contained a bug and did not take all data into account. It is superseded by + `hash_serialized_3` which provides the same functionality but serves the correctly calculated hash. (#28685) + +- New fields `transport_protocol_type` and `session_id` were added to the `getpeerinfo` RPC to indicate + whether the v2 transport protocol is in use, and if so, what the session id is. + +- A new argument `v2transport` was added to the `addnode` RPC to indicate whether a v2 transaction connection + is to be attempted with the peer. + +- [Miniscript](https://bitcoin.sipa.be/miniscript/) expressions can now be used in Taproot descriptors for all RPCs working with descriptors. (#27255) + +- `finalizepsbt` is now able to finalize a PSBT with inputs spending [Miniscript](https://bitcoin.sipa.be/miniscript/)-compatible Taproot leaves. (#27255) + +Changes to wallet related RPCs can be found in the Wallet section below. + +New RPCs +-------- + +- `loadtxoutset` has been added, which allows loading a UTXO snapshot of the format + generated by `dumptxoutset`. Once this snapshot is loaded, its contents will be + deserialized into a second chainstate data structure, which is then used to sync to + the network's tip. + + Meanwhile, the original chainstate will complete the initial block download process in + the background, eventually validating up to the block that the snapshot is based upon. + + The result is a usable bitcoind instance that is current with the network tip in a + matter of minutes rather than hours. UTXO snapshot are typically obtained via + third-party sources (HTTP, torrent, etc.) which is reasonable since their contents + are always checked by hash. + + You can find more information on this process in the `assumeutxo` design + document (<https://github.com/bitcoin/bitcoin/blob/master/doc/design/assumeutxo.md>). + + `getchainstates` has been added to aid in monitoring the assumeutxo sync process. + +- A new `getprioritisedtransactions` RPC has been added. It returns a map of all fee deltas created by the + user with prioritisetransaction, indexed by txid. The map also indicates whether each transaction is + present in the mempool. (#27501) + +- A new RPC, `submitpackage`, has been added. It can be used to submit a list of raw hex +transactions to the mempool to be evaluated as a package using consensus and mempool policy rules. +These policies include package CPFP, allowing a child with high fees to bump a parent below the +mempool minimum feerate (but not minimum relay feerate). (#27609) + + - Warning: successful submission does not mean the transactions will propagate throughout the + network, as package relay is not supported. + + - Not all features are available. The package is limited to a child with all of its + unconfirmed parents, and no parent may spend the output of another parent. Also, package + RBF is not supported. Refer to doc/policy/packages.md for more details on package policies + and limitations. + + - This RPC is experimental. Its interface may change. + +- A new RPC `getaddrmaninfo` has been added to view the distribution of addresses in the new and tried table of the + node's address manager across different networks(ipv4, ipv6, onion, i2p, cjdns). The RPC returns count of addresses + in new and tried table as well as their sum for all networks. (#27511) + +- A new `importmempool` RPC has been added. It loads a valid `mempool.dat` file and attempts to + add its contents to the mempool. This can be useful to import mempool data from another node + without having to modify the datadir contents and without having to restart the node. (#27460) + - Warning: Importing untrusted files is dangerous, especially if metadata from the file is taken over. + - If you want to apply fee deltas, it is recommended to use the `getprioritisedtransactions` and + `prioritisetransaction` RPCs instead of the `apply_fee_delta_priority` option to avoid + double-prioritising any already-prioritised transactions in the mempool. + +Updated settings +---------------- + +- `bitcoind` and `bitcoin-qt` will now raise an error on startup + if a datadir that is being used contains a bitcoin.conf file that + will be ignored, which can happen when a datadir= line is used in + a bitcoin.conf file. The error message is just a diagnostic intended + to prevent accidental misconfiguration, and it can be disabled to + restore the previous behavior of using the datadir while ignoring + the bitcoin.conf contained in it. (#27302) + +- Passing an invalid `-debug`, `-debugexclude`, or `-loglevel` logging configuration + option now raises an error, rather than logging an easily missed warning. (#27632) + +Changes to GUI or wallet related settings can be found in the GUI or Wallet section below. + +New settings +------------ + +Tools and Utilities +------------------- + +- A new `bitcoinconsensus_verify_script_with_spent_outputs` function is available in libconsensus which optionally accepts the spent outputs of the transaction being verified. +- A new `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_TAPROOT` flag is available in libconsensus that will verify scripts with the Taproot spending rules. + +Wallet +------ + +- Wallet loading has changed in this release. Wallets with some corrupted records that could be + previously loaded (with warnings) may no longer load. For example, wallets with corrupted + address book entries may no longer load. If this happens, it is recommended + load the wallet in a previous version of Bitcoin Core and import the data into a new wallet. + Please also report an issue to help improve the software and make wallet loading more robust + in these cases. (#24914) + +- The `gettransaction`, `listtransactions`, `listsinceblock` RPCs now return + the `abandoned` field for all transactions. Previously, the "abandoned" field + was only returned for sent transactions. (#25158) + +- The `listdescriptors`, `decodepsbt` and similar RPC methods now show `h` rather than apostrophe (`'`) to indicate + hardened derivation. This does not apply when using the `private` parameter, which + matches the marker used when descriptor was generated or imported. Newly created + wallets use `h`. This change makes it easier to handle descriptor strings manually. + E.g. the `importdescriptors` RPC call is easiest to use `h` as the marker: `'["desc": ".../0h/..."]'`. + With this change `listdescriptors` will use `h`, so you can copy-paste the result, + without having to add escape characters or switch `'` to 'h' manually. + Note that this changes the descriptor checksum. + For legacy wallets the `hdkeypath` field in `getaddressinfo` is unchanged, + nor is the serialization format of wallet dumps. (#26076) + +- The `getbalances` RPC now returns a `lastprocessedblock` JSON object which contains the wallet's last processed block + hash and height at the time the balances were calculated. This result shouldn't be cached because importing new keys could invalidate it. (#26094) + +- The `gettransaction` RPC now returns a `lastprocessedblock` JSON object which contains the wallet's last processed block + hash and height at the time the transaction information was generated. (#26094) + +- The `getwalletinfo` RPC now returns a `lastprocessedblock` JSON object which contains the wallet's last processed block + hash and height at the time the wallet information was generated. (#26094) + +- Coin selection and transaction building now accounts for unconfirmed low-feerate ancestor transactions. When it is necessary to spend unconfirmed outputs, the wallet will add fees to ensure that the new transaction with its ancestors will achieve a mining score equal to the feerate requested by the user. (#26152) + +- For RPC methods which accept `options` parameters ((`importmulti`, `listunspent`, + `fundrawtransaction`, `bumpfee`, `send`, `sendall`, `walletcreatefundedpsbt`, + `simulaterawtransaction`), it is now possible to pass the options as named + parameters without the need for a nested object. (#26485) + +This means it is possible make calls like: + +```sh +src/bitcoin-cli -named bumpfee txid fee_rate=100 +``` + +instead of + +```sh +src/bitcoin-cli -named bumpfee txid options='{"fee_rate": 100}' +``` + +- The `deprecatedrpc=walletwarningfield` configuration option has been removed. + The `createwallet`, `loadwallet`, `restorewallet` and `unloadwallet` RPCs no + longer return the "warning" string field. The same information is provided + through the "warnings" field added in v25.0, which returns a JSON array of + strings. The "warning" string field was deprecated also in v25.0. (#27757) + +- The `signrawtransactionwithkey`, `signrawtransactionwithwallet`, + `walletprocesspsbt` and `descriptorprocesspsbt` calls now return the more + specific RPC_INVALID_PARAMETER error instead of RPC_MISC_ERROR if their + sighashtype argument is malformed. (#28113) + +- RPC `walletprocesspsbt`, and `descriptorprocesspsbt` return + object now includes field `hex` (if the transaction + is complete) containing the serialized transaction + suitable for RPC `sendrawtransaction`. (#28414) + +- It's now possible to use [Miniscript](https://bitcoin.sipa.be/miniscript/) inside Taproot leaves for descriptor wallets. (#27255) + +GUI changes +----------- + +- The transaction list in the GUI no longer provides a special category for "payment to yourself". Now transactions that have both inputs and outputs that affect the wallet are displayed on separate lines for spending and receiving. (gui#119) + +- A new menu option allows migrating a legacy wallet based on keys and implied output script types stored in BerkeleyDB (BDB) to a modern wallet that uses descriptors stored in SQLite. (gui#738) + +- The PSBT operations dialog marks outputs paying your own wallet with "own address". (gui#740) + +- The ability to create legacy wallets is being removed. (gui#764) + +Low-level changes +================= + +Tests +----- + +- Non-standard transactions are now disabled by default on testnet + for relay and mempool acceptance. The previous behaviour can be + re-enabled by setting `-acceptnonstdtxn=1`. (#28354) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- 0xb10c +- Amiti Uttarwar +- Andrew Chow +- Andrew Toth +- Anthony Towns +- Antoine Poinsot +- Antoine Riard +- Ari +- Aurèle Oulès +- Ayush Singh +- Ben Woosley +- Brandon Odiwuor +- Brotcrunsher +- brunoerg +- Bufo +- Carl Dong +- Casey Carter +- Cory Fields +- David Álvarez Rosa +- dergoegge +- dhruv +- dimitaracev +- Erik Arvstedt +- Erik McKelvey +- Fabian Jahr +- furszy +- glozow +- Greg Sanders +- Harris +- Hennadii Stepanov +- Hernan Marino +- ishaanam +- ismaelsadeeq +- Jake Rawsthorne +- James O'Beirne +- John Moffett +- Jon Atack +- josibake +- kevkevin +- Kiminuo +- Larry Ruane +- Luke Dashjr +- MarcoFalke +- Marnix +- Martin Leitner-Ankerl +- Martin Zumsande +- Matthew Zipkin +- Michael Ford +- Michael Tidwell +- mruddy +- Murch +- ns-xvrn +- pablomartin4btc +- Pieter Wuille +- Reese Russell +- Rhythm Garg +- Ryan Ofsky +- Sebastian Falbesoner +- Sjors Provoost +- stickies-v +- stratospher +- Suhas Daftuar +- TheCharlatan +- Tim Neubauer +- Tim Ruffing +- Vasil Dimov +- virtu +- vuittont60 +- willcl-ark +- Yusuf Sahin HAMZA + +As well as to everyone that helped with translations on +[Transifex](https://www.transifex.com/bitcoin/bitcoin/). diff --git a/share/examples/bitcoin.conf b/share/examples/bitcoin.conf index fe1e8be09a..0470acd300 100644 --- a/share/examples/bitcoin.conf +++ b/share/examples/bitcoin.conf @@ -98,7 +98,7 @@ # 336) #mempoolexpiry=<n> -# Set the number of script verification threads (-10 to 15, 0 = auto, <0 = +# Set the number of script verification threads (0 = auto, up to 15, <0 = # leave that many cores free, default: 0) #par=<n> diff --git a/src/bench/pool.cpp b/src/bench/pool.cpp index b3e54d85a2..b2a5f8debf 100644 --- a/src/bench/pool.cpp +++ b/src/bench/pool.cpp @@ -37,8 +37,7 @@ static void PoolAllocator_StdUnorderedMapWithPoolResource(benchmark::Bench& benc std::hash<uint64_t>, std::equal_to<uint64_t>, PoolAllocator<std::pair<const uint64_t, uint64_t>, - sizeof(std::pair<const uint64_t, uint64_t>) + 4 * sizeof(void*), - alignof(void*)>>; + sizeof(std::pair<const uint64_t, uint64_t>) + 4 * sizeof(void*)>>; // make sure the resource supports large enough pools to hold the node. We do this by adding the size of a few pointers to it. auto pool_resource = Map::allocator_type::ResourceType(); diff --git a/src/coins.h b/src/coins.h index a6cbb03133..bbf9e3895f 100644 --- a/src/coins.h +++ b/src/coins.h @@ -145,8 +145,7 @@ using CCoinsMap = std::unordered_map<COutPoint, SaltedOutpointHasher, std::equal_to<COutPoint>, PoolAllocator<std::pair<const COutPoint, CCoinsCacheEntry>, - sizeof(std::pair<const COutPoint, CCoinsCacheEntry>) + sizeof(void*) * 4, - alignof(void*)>>; + sizeof(std::pair<const COutPoint, CCoinsCacheEntry>) + sizeof(void*) * 4>>; using CCoinsMapMemoryResource = CCoinsMap::allocator_type::ResourceType; diff --git a/src/init.cpp b/src/init.cpp index 42331d37e8..8baa642d30 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -455,8 +455,8 @@ void SetupServerArgs(ArgsManager& argsman) argsman.AddArg("-maxorphantx=<n>", strprintf("Keep at most <n> unconnectable transactions in memory (default: %u)", DEFAULT_MAX_ORPHAN_TRANSACTIONS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-mempoolexpiry=<n>", strprintf("Do not keep transactions in the mempool longer than <n> hours (default: %u)", DEFAULT_MEMPOOL_EXPIRY_HOURS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-minimumchainwork=<hex>", strprintf("Minimum work assumed to exist on a valid chain in hex (default: %s, testnet: %s, signet: %s)", defaultChainParams->GetConsensus().nMinimumChainWork.GetHex(), testnetChainParams->GetConsensus().nMinimumChainWork.GetHex(), signetChainParams->GetConsensus().nMinimumChainWork.GetHex()), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS); - argsman.AddArg("-par=<n>", strprintf("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)", - -GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); + argsman.AddArg("-par=<n>", strprintf("Set the number of script verification threads (0 = auto, up to %d, <0 = leave that many cores free, default: %d)", + MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-persistmempool", strprintf("Whether to save the mempool on shutdown and load on restart (default: %u)", DEFAULT_PERSIST_MEMPOOL), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-pid=<file>", strprintf("Specify pid file. Relative paths will be prefixed by a net-specific datadir location. (default: %s)", BITCOIN_PID_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); argsman.AddArg("-prune=<n>", strprintf("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex. " diff --git a/src/net.cpp b/src/net.cpp index 09a3d8617a..5305e1148a 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2714,6 +2714,17 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect) continue; } + // Do not make automatic outbound connections to addnode peers, to + // not use our limited outbound slots for them and to ensure + // addnode connections benefit from their intended protections. + if (AddedNodesContain(addr)) { + LogPrintLevel(BCLog::NET, BCLog::Level::Debug, "Not making automatic %s%s connection to %s peer selected for manual (addnode) connection%s\n", + preferred_net.has_value() ? "network-specific " : "", + ConnectionTypeAsString(conn_type), GetNetworkName(addr.GetNetwork()), + fLogIPs ? strprintf(": %s", addr.ToStringAddrPort()) : ""); + continue; + } + addrConnect = addr; break; } @@ -3447,6 +3458,17 @@ bool CConnman::RemoveAddedNode(const std::string& strNode) return false; } +bool CConnman::AddedNodesContain(const CAddress& addr) const +{ + AssertLockNotHeld(m_added_nodes_mutex); + const std::string addr_str{addr.ToStringAddr()}; + const std::string addr_port_str{addr.ToStringAddrPort()}; + LOCK(m_added_nodes_mutex); + return (m_added_node_params.size() < 24 // bound the query to a reasonable limit + && std::any_of(m_added_node_params.cbegin(), m_added_node_params.cend(), + [&](const auto& p) { return p.m_added_node == addr_str || p.m_added_node == addr_port_str; })); +} + size_t CConnman::GetNodeCount(ConnectionDirection flags) const { LOCK(m_nodes_mutex); @@ -1189,6 +1189,7 @@ public: bool AddNode(const AddedNodeParams& add) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex); bool RemoveAddedNode(const std::string& node) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex); + bool AddedNodesContain(const CAddress& addr) const EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex); std::vector<AddedNodeInfo> GetAddedNodeInfo() const EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex); /** diff --git a/src/support/allocators/pool.h b/src/support/allocators/pool.h index c8e70ebacf..873e260b65 100644 --- a/src/support/allocators/pool.h +++ b/src/support/allocators/pool.h @@ -272,7 +272,7 @@ public: /** * Forwards all allocations/deallocations to the PoolResource. */ -template <class T, std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES> +template <class T, std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES = alignof(T)> class PoolAllocator { PoolResource<MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>* m_resource; diff --git a/src/test/pool_tests.cpp b/src/test/pool_tests.cpp index 8a07e09a44..5ad4afa3a1 100644 --- a/src/test/pool_tests.cpp +++ b/src/test/pool_tests.cpp @@ -156,21 +156,20 @@ BOOST_AUTO_TEST_CASE(random_allocations) BOOST_AUTO_TEST_CASE(memusage_test) { - auto std_map = std::unordered_map<int, int>{}; - - using Map = std::unordered_map<int, - int, - std::hash<int>, - std::equal_to<int>, - PoolAllocator<std::pair<const int, int>, - sizeof(std::pair<const int, int>) + sizeof(void*) * 4, - alignof(void*)>>; + auto std_map = std::unordered_map<int64_t, int64_t>{}; + + using Map = std::unordered_map<int64_t, + int64_t, + std::hash<int64_t>, + std::equal_to<int64_t>, + PoolAllocator<std::pair<const int64_t, int64_t>, + sizeof(std::pair<const int64_t, int64_t>) + sizeof(void*) * 4>>; auto resource = Map::allocator_type::ResourceType(1024); PoolResourceTester::CheckAllDataAccountedFor(resource); { - auto resource_map = Map{0, std::hash<int>{}, std::equal_to<int>{}, &resource}; + auto resource_map = Map{0, std::hash<int64_t>{}, std::equal_to<int64_t>{}, &resource}; // can't have the same resource usage BOOST_TEST(memusage::DynamicUsage(std_map) != memusage::DynamicUsage(resource_map)); @@ -182,6 +181,11 @@ BOOST_AUTO_TEST_CASE(memusage_test) // Eventually the resource_map should have a much lower memory usage because it has less malloc overhead BOOST_TEST(memusage::DynamicUsage(resource_map) <= memusage::DynamicUsage(std_map) * 90 / 100); + + // Make sure the pool is actually used by the nodes + auto max_nodes_per_chunk = resource.ChunkSizeBytes() / sizeof(Map::value_type); + auto min_num_allocated_chunks = resource_map.size() / max_nodes_per_chunk + 1; + BOOST_TEST(resource.NumAllocatedChunks() >= min_num_allocated_chunks); } PoolResourceTester::CheckAllDataAccountedFor(resource); |