0e0d01913a mempool: disable full-RBF, require BIP125 opt-in signaling (Byron Hambly)
Pull request description:
Bitcoin Core defaults to accepting any fee-bumping replacement regardless of signaling (full-RBF). Revert this for Elements: only replace mempool transactions that explicitly opt in via BIP125 nSequence signaling (or TRUC), and report fullrbf=false in getmempoolinfo.
Update feature_rbf.py accordingly, and add a regression test for CVE-2021-31876 confirming that inherited signaling from an unconfirmed parent does not make a non-signaling child replaceable.
ACKs for top commit:
tomt1664:
Tested locally ACK 0e0d01913a
Tree-SHA512: 58847919c6a702fe3d5ea4065e07912684cce6f084ca2507d9ef24c6fe8fdb290bb08108d9e025f26a5674e731bf71a9bdbd262aaf78e4f991bcdf06b61228f7
e151cada58 test: update and re-enable trim headers functional test (Byron Hambly)
3824d7dd36 add guard to TryLowWorkHeadersSync to prevent assert_untrimmed (Tom Trevethan)
Pull request description:
When -trim_headers is enabled, TryLowWorkHeadersSync can receive a chain_start_header pointing to a trimmed block index entry. The `HeadersSyncState` constructor immediately calls `GetBlockHeader()` on it via the m_last_header_received initialiser, which hits `assert_untrimmed()` and aborts the node.
Conditional untrim_to guard added inside `TryLowWorkHeadersSync`, before `HeadersSyncState`.
For nodes running -trim_headers, in practice the crash path is not reachable on Elements because `already_validated_work` is always true on a federated chain (nChainWork == nMinimumChainWork == 0), so `TryLowWorkHeadersSync` is not entered. But this ensures consistency with guarded serving paths.
`TryLowWorkHeadersSync` and `HeadersSyncState` were introduced in Bitcoin v24 (bitcoin/bitcoin#25717) and so this is not applicable to Elements v23.
ACKs for top commit:
delta1:
ACK e151cada58; tested locally
Tree-SHA512: 824344079b2136f7e2005968eafa3ad4385ed13ee3b3f3f79b3f878ed7e7dd88c68c85c1d6dd6e989f8484561984e6350fa81a6a19c96550787d0e615b76e87c
The trim_headers test was previously moved to extended tests, and only
worked with legacy wallets. Update it to work with descriptor wallets,
and move it back to base scripts in functional tests.
Bitcoin Core defaults to accepting any fee-bumping replacement
regardless of signaling (full-RBF). Revert this for Elements: only
replace mempool transactions that explicitly opt in via BIP125
nSequence signaling (or TRUC), and report fullrbf=false in
getmempoolinfo.
Update feature_rbf.py accordingly, and add a regression test for
CVE-2021-31876 confirming that inherited signaling from an
unconfirmed parent does not make a non-signaling child replaceable.
fuzz test fixes
set -DPRODUCTION for simplicity in fuzz tests
set UNDEBUG for simplicity in fuzz tests
update wallet fuzz tests
update test script
fix msvc conversion issues
more msvc vector conversion fixes and substitution of boost libs
fix more hexstr calls
fix hexstr calls in init.cpp
default CMAKE_GENERATOR to Unix Makefiles
more span fixes
specify build bin directory
fix executable locations
fix fuzz tests for c11 and functional test fixes
fix fuzz test executable path
specify legacy wallet for elements functional tests
remove assertion for static initialization order issue
use elements fuzz corpus
print debug log on failure
use heap for blind and asset_blind
test: avoid disk space warning for non-regtest
feature_config_args.py incorrectly assumed that its testnet4 node
would not log a disk space warning.
0683b8ebf3 increased m_assumed_blockchain_size
on testnet4 from 1 to 11 GiB which triggers this bug on more
systems, e.g. a RAM disk.
Prevent the warning by setting -prune for these nodes.
Fix the same issue in feature_signet.py
Github-Pull: #32057
Rebased-From: 20fe41e9e83d510fd467f5a999d55a614b16ef89
6515f58351 change test order in feature_discount_ct to fix intermittent failure (Tom Trevethan)
Pull request description:
Prevents blinded output being selected intermittently and resulting in vszie and fee assertions failing.
ACKs for top commit:
delta1:
ACK 6515f58351; fixes discount_ct test flakiness
Tree-SHA512: 32d8c64011125e5531dd19ce84dbe39b2d4496a02c5bf5ece0cbc2f0c2bf6660816d6d61593fe32a615dd96a8632d94cba6bc09e792ffa6ea57fbdc4f52424da