github bitcoin-cash-node/bitcoin-cash-node v23.1.0
23.1.0

latest releases: v27.0.0, v26.1.0, v26.0.0...
2 years ago

Release Notes for Bitcoin Cash Node version 23.1.0

Bitcoin Cash Node version 23.1.0 is now available from:

https://bitcoincashnode.org

Overview

This is a minor release of Bitcoin Cash Node (BCHN) containing several minor bugfixes and some performance improvements, such as:

  • Mempool: 40% performance speedup in removing confirmed txs and multiple speedups for other operations as well.
  • Mempool: removal of all pre-May 15 2021 logic and data structures, including structures dealing with unconfirmed ancestor limits, saving memory and CPU cycles.
  • Scalenet: Ensure the "disconnected block transactions" pool has enough memory.
  • Added the JSON-RPC command: getdsproofscore.
  • Save known DSProofs across restarts to dsproofs.dat.
  • Fixed misspelling of "hexstring" param name in the "signrawtransactionwithwallet" method.
  • Fix bug where -txbroadcastinterval=0 would lead to a numerical singularity where no txs were sent. Instead, with this arg at 0, txs are now just sent as quickly as possible.
  • Remove -tachyonactivationtime from CLI args & consensus rules.
  • DSProofs: Bug fix where sometimes nodes would "discourage" each other incorrectly after they clean up expired proofs.
  • Mining: Add -gbtcheckvalidity arg to CLI; "checkvalidity" arg to GBT/GBTL.
  • Mining: Fix potential crash in submitblock if 2 RPC threads are submitting a block simultaneously.
  • Speedup to block validation and tx validation by removing a redundant map lookup when checking inputs.

Usage recommendations

Users who are running v22.x.x or earlier are strongly urged to upgrade to v23.1.0, since the v22 series (and previous) do not implement the recent May 15, 2021 Network Upgrade. Users running v23.0.0 may also wish to upgrade to this version, since it does improve performance and does fix some minor bugs.

Network changes

A minor bug has been corrected where in some corner cases P2P nodes may end up "discouraging" each other incorrectly when an old DSProof is removed after a block is confirmed.

Added functionality

  • Double-spend proofs now are persisted across restarts to a file in the data directory called dsproofs.dat. The mechanism for this is similar to how the mempool is already persisted across restarts. Double-spend proofs are not persisted if the node was started with -persistmempool=0 or -doublespendproof=0.

gbtcheckvalidity configuration option and checkvalidity RPC arg

This new command-line option (as well as its counterpart RPC arg) may be of interest to miners. With -gbtcheckvalidity=0 (or RPC arg checkvalidity=false to the getblocktemplate/getblocktemplatelight RPC), all validity checks on a new block template are skipped. This saves significant time in generating a new block template (50% or greater speedup for large blocks).

The validity checks are redundant "belt-and-suspenders" checks -- and it should never be the case that this codebase produces an "invalid" block in getblocktemplate. Producing an invalid block that fails these checks would be a serious bug in this codebase. As such, these checks can be optionally skipped for the intrepid miner wishing to maximize performance and minimize latency to getblocktemplate and/or getblocktemplatelight.

The default for these options is to preserve the status-quo (default: -gbtcheckvalidity=1 and/or checkvalidity=true to the RPC), and perform these (redundant) validity checks on new block templates.

Deprecated functionality

In the getmempoolentry RPC call, the verbose modes of the getrawmempool/getmempoolancestors/getmempooldescendants RPC calls, and the JSON mode of the mempool REST call, the height field is deprecated and will be removed in a subsequent release. This field indicates the block height upon mempool acceptance.

The bip125-replaceable field in the result of gettransaction is deprecated and will be removed in a subsequent release.

The arc lint linting is deprecated and developers should use the ninja check-lint target instead.

Modified functionality

The CLI/conf arg -txbroadcastinterval=0 would previously lead to a situation where the node would never relay transactions. This is considered a bug and has been corrected. Now, if the node operator specifies -txbroadcastinterval=0, the node relays transactions as quickly as possible.

Removed functionality

The CLI arg -tachyonactivationtime has been removed. All relay rules behave as if "tachyon" (the internal name for the May 15, 2021 network upgrade) has always been active.

The following CLI args (all related to the now-removed ancestor limit) have been removed: -walletrejectlongchains, -limitdescendantcount, -limitancestorcount, -limitdescendantsize, -limitancestorsize.

New RPC methods

getdsproofscore

getdsproofscore returns a double-spend confidence score for a mempool transaction.

This new method should help merchant or wallet server implementors quickly decide if a transaction is reliable for 0-conf (1.0: has no DSProofs and is eligible for DSProof mechanism), or is unreliable for 0-conf (<1.0: has DSProofs, or is ineligible for the DSProof mechanism, or has a very long ancestor chain).

Please refer to the documentation pages for getdsproofscore for details about additional arguments and the returned data.

Low-level RPC changes

The getmempoolancestors and getmempooldescendants RPC methods now return a list of transactions that are sorted topologically (with parents coming before children). Previously they were sorted by transaction ID.

Mempool entries from the verbose versions of: getrawmempool, getmempoolentry, getmempoolancestors, and getmempooldescendants which contain a spentby key now have the transactions in the spentby list sorted topologically (with parents coming before children). Previously this list was sorted by transaction ID.

The getblocktemplate and getblocktemplatelight template-request dictionary now accepts an additional key: checkvalidity (default if unspecified: true). If set to false, then validity checks for the generated block template are skipped (thus leading to a faster return from the RPC call).

User interface changes

Bitcoin Cash Node 23.1.0 does not introduce any user interface changes as compared to 23.0.0.

Regressions

Bitcoin Cash Node 23.1.0 does not introduce any known regressions as compared to 23.0.0.

Known Issues

Some issues could not be closed in time for release, but we are tracking all of them on our GitLab repository.

  • MacOS versions earlier than 10.12 are no longer supported. Additionally, Bitcoin Cash Node does not yet change appearance when macOS "dark mode" is activated.

  • Windows users are recommended not to run multiple instances of bitcoin-qt or bitcoind on the same machine if the wallet feature is enabled. There is risk of data corruption if instances are configured to use the same wallet folder.

  • Some users have encountered unit tests failures when running in WSL environments (e.g. WSL/Ubuntu). At this time, WSL is not considered a supported environment for the software. This may change in future. The functional failure on WSL is tracked in Issue #33. It arises when competing node program instances are not prevented from opening the same wallet folder. Running multiple program instances with the same configured walletdir could potentially lead to data corruption. The failure has not been observed on other operating systems so far.

  • doc/dependencies.md needs revision (Issue #65).

  • test_bitcoin can collide with temporary files if used by more than one user on the same system simultaneously. (Issue #43)

  • For users running from sources built with BerkeleyDB releases newer than the 5.3 which is used in this release, please take into consideration the database format compatibility issues described in Issue #34. When building from source it is recommended to use BerkeleyDB 5.3 as this avoids wallet database incompatibility issues with the official release.

  • The test_bitcoin-qt test executable fails on Linux Mint 20 (see Issue #144). This does not otherwise appear to impact the functioning of the BCHN software on that platform.

  • An 'autotools' build (the old build method) fails on OSX when using Clang. (Issue #129)

  • With a certain combination of build flags that included disabling the QR code library, a build failure was observed where an erroneous linking against the QR code library (not present) was attempted (Issue #138).

  • The 'autotools' build is known to require some workarounds in order to use the 'fuzzing' build feature (Issue #127).

  • Some functional tests are known to fail spuriously with varying probability. (see e.g. issue #148, and a fuller listing in #162).

  • Possible out-of-memory error when starting bitcoind with high excessiveblocksize value (Issue #156)

  • There are obstacles building the current version on Ubuntu 16.04 (see #187). These are worked around by our packaging system, but users trying to build the software from scratch are advised to either upgrade to more recent Ubuntu, or retrofit the necessary toolchains and perform the same build steps for Xenial as registered in our packaging repository, or build in a VM using the gitian build instructions, or run our reproducible binary release builds. There is ongoing work on the build system to address underlying issues, but the related code changes were not ready in time for the v23.1.0 release.

  • A problem was observed on scalenet where nodes would sometimes hang for around 10 minutes, accepting RPC connections but not responding to them (see #210).

  • In the getmempoolentry RPC call, the verbose modes of the getrawmempool/getmempoolancestors/getmempooldescendants RPC calls, and the JSON mode of the mempool REST call, the height field shows an incorrect block height after a node restart. Note the field is deprecated and will be removed in a subsequent release.

  • On some platforms, the splash screen can be maximized, but it cannot be unmaximized again (see #255). This has only been observed on Mac OSX, not on Linux or Windows builds.


Changes since Bitcoin Cash Node 23.0.0

New documents

  • doc/build-unix-alpine.md: Alpine Linux build instructions.

Removed documents

There are no removed documents in the BCHN software repository.

Notable commits grouped by functionality

Security or consensus relevant fixes

  • 6d17407 Ensure the DisconnectedBlockTransactions pool has enough space
  • 48ce9ee Remove -tachyonactivationtime from CLI args & consensus rules
  • 3944570 dsproof: When an orphan is claimed, clear the nodeId
  • e3d6f75 update checkpoints for main, test3, and test4 nets
  • 6a358cc Update default assume valid and minimum chain work params

Misc. bugfixes

  • e877fe4 Fix -txbroadcastinterval=0 leading to no txs sent + add functional test
  • 6a8892b [mining] Fix potential crash bug in submitblock

Interfaces / RPC

  • 12d34cc Fix "hexstring" param name in "signrawtransactionwithwallet" method
  • e43045a Added RPC method getdsproofscore
  • fd29ab6 Add -gbtcheckvalidity arg to CLI;"checkvalidity" arg to GBT(L)

Performance optimizations

  • bf6e231 mempool: optimization of removeForBlock + general optimizations
  • 431374d Remove pre-tachyon logic and code from txmempool and related tests
  • 44150d7 Removed remaining unconf. ancestor limit args & logic
  • 837452d Speedup Consensus::CheckTxInputs by removing a redundant coin lookup

GUI

Data directory changes

  • 62c6527 Save dsproofs across restarts to datadir/dsproofs.dat

Code quality

  • 7119bbf util: Refactor the Defer class to a header to be reusable
  • d20a0d2 Prefer emplace to insert in CTxMemPool::addUnchecked for map insertion
  • 2a651f3 Avoid double copy when emplacing into DisconnectedBlockTransactons::txInfo
  • 9919f92 Fix fcntl warnings on alpine build
  • c52df0e Nit: Fix compiler warning for g++-8 in txmempool.cpp

Documentation updates

  • c53c106 [doc] Add -DENABLE_MAN=OFF to cross-build instructions
  • baab4c2 [qa] Remove Win32 cmake build file and target reference in doc
  • 479d565 [doc] Add a clarification about SDK_PATH to depends/README.md
  • dffef9d Add alpine build instructions
  • 4499999 [doc] Call out additional dependencies that contributers likely need

Build / general

  • 8f6ccf6 Add more build options
  • 8181d27 Update ZeroMQ library to 4.3.4

Build / Linux

None.

Build / Windows

None.

Build / MacOSX

None.

Tests / test framework

  • 4f1cc47 Fix rare timing-related failures in dsproof functional tests
  • b1d47fa Fix randomly failing scheduler_tests test
  • 3e79059 Reduce bchn-rpc-getblocktemplate-timing success threshold to 50%
  • 7e00116 Fix for rare failure in the bchn-rpc-getblocktemplatelight functional test
  • 446deaf Add mempool_fee_delta functional test
  • cb6b037 Disable test: bchn-rpc-getblocktemplate-timing.py
  • e2ba753 Added Unit test that exercises the Consensus::CheckTxInputs function

Benchmarks

  • 305f402 bench: Add removeForBlock benchmark
  • cc4d85c bench: Benchmark CCheckQueue using real block data
  • bac0a4e Added CLI args to bench: -par and -maxsigcachesize
  • aff593f bench: Add CheckTxInputs bench

Seeds / seeder software

  • a20b80e Add Bitcoin Unlimited operated seeder for testnet3
  • 378b2bb Update mainnet seeds

Maintainer tools

  • 67cb583 Update the chainparams update scripts to NOT touch scalenet chainwork
  • 3d94dff Add VSCode settings to gitignore
  • 8e806b3 Fix fuzz-libfuzzer undefined references for IsPayToPubKeyHash / IsPayToScriptHash

Infrastructure

  • cd854c9 Remove personal disclosure contact
  • 1a0a328 Add personal disclosure contact
  • 23fcaa2 New Crowdin updates

Cleanup

  • 14dcc05 mempool: Remove BatchUpdater classes, consolidate & clean-up removeForBlock
  • dbbc51d Remove allowMultipOpReturn flag
  • ae2c2fb Remove g_parallel_script_checks global variable
  • 4c6aaf3 Nit: Undo some of the changes of core#18710

Continuous Integration (GitLab CI)

None.

Backports

  • 44d102f [depends] ZeroMQ 4.2.2
  • 2dc2916 depends: zeromq 4.2.3
  • d66713f [tests] Remove rpc_zmq.py
  • 323a004 [depends, zmq, doc] upgrade zeromq to 4.2.5 and avoid deprecated zeromq
  • 55c001e Update zmq to 4.3.1
  • ca284da depends: expat 2.2.6 and qt 5.9.7
  • 076e67d depends: Purge libtool archives
  • 1612a62 depends: cleanup package configure flags
  • 7638688 depends: expat 2.2.7
  • d97fbb7 Only pass --disable-dependency-tracking to packages that understand it
  • 2a7dc8f build: prune dbus from depends
  • 66c8e65 depends: Prune X packages
  • ed7706e build: Drop all of the ZeroMQ patches
  • 354e500 build: improve sed robustness by not using sed
  • d0f97c0 [refactor] Replace global int nScriptCheckThreads with bool
  • ad49f4f [tests] Don't use TestingSetup in the checkqueue_tests
  • 9151ce2 Add WITH_LOCK macro: run code while locking a mutex
  • 6d5e21a sync: Use decltype(auto) return type for WITH_LOCK
  • 0e94c77 Add local thread pool to CCheckQueue

Don't miss a new bitcoin-cash-node release

NewReleases is sending notifications on new releases.