forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
CI and Test Fixes for BIP-110 (REDUCED_DATA) #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Rob1Ham
wants to merge
7
commits into
Retropex:29.2.knots20251110+UASF-BIP110
from
Rob1Ham:bip-110-ci-and-test-fixes-by-claude
Closed
CI and Test Fixes for BIP-110 (REDUCED_DATA) #17
Rob1Ham
wants to merge
7
commits into
Retropex:29.2.knots20251110+UASF-BIP110
from
Rob1Ham:bip-110-ci-and-test-fixes-by-claude
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix assertion failure and potential undefined behavior when calculating transaction priority during chain reorganizations where the spend height is lower than the cached height. Changes: - Add GetCachedHeight() getter to CTxMemPoolEntry to allow callers to detect when cached priority data is stale due to chain rewinds - Guard GetPriority() against unsigned integer underflow when spendheight < cachedHeight (legitimate during reorgs) - Move priority calculation methods from coin_age_priority.cpp to their proper locations (txmempool.cpp, node/miner.cpp) to resolve circular dependency: kernel/mempool_entry -> policy/coin_age_priority - Simplify coin_age_priority.cpp to contain only pure utility functions This fixes a crash that could occur during block disconnection when mempool entries had cached priority from a higher block height. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Address various linting errors and build configuration issues discovered during CI runs. Build fixes: - Consolidate duplicate sys/auxv.h include in src/crypto/sha256.cpp (included separately for ARM SHANI and POWER8, now shared) Circular dependency linter: - Add Knots-specific circular dependencies to expected list in test/lint/lint-circular-dependencies.py to prevent false positives: * kernel/mempool_options -> policy/policy * policy/policy -> policy/settings * qt/bitcoinunits -> qt/guiutil * qt/guiutil -> qt/qvalidatedlineedit * qt/psbtoperationsdialog -> qt/walletmodel * script/interpreter -> script/script - Remove unreachable dead code (empty EXPECTED_CIRCULAR_DEPENDENCIES override) in contrib/devtools/circular-dependencies.py Code cleanup: - Remove unnecessary 'if True:' block in contrib/devtools/gen-manpages.py - Remove duplicate #include statements in 5 source files: * src/node/types.h * src/qt/optionsmodel.cpp * src/rpc/blockchain.cpp * src/rpc/mempool.cpp * src/rpc/rawtransaction_util.h Spelling: - Add 'optin' and 'OptIn' to spelling.ignore-words.txt for RBF opt-in replacement naming conventions 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Update functional tests and fuzz tests to work correctly with BIP-110 REDUCED_DATA restrictions that are enforced as consensus rules. Miniscript tests (src/test/fuzz/miniscript.cpp, src/test/miniscript_tests.cpp): - Add UsesOpIf() helper to detect fragments using OP_IF/OP_NOTIF opcodes (WRAP_D, WRAP_J, OR_C, OR_D, OR_I, ANDOR) - Under REDUCED_DATA, OP_IF/OP_NOTIF are forbidden in tapscript but allowed in P2WSH/P2SH - Update assertions to accept SCRIPT_ERR_TAPSCRIPT_MINIMALIF when script uses OP_IF fragments in tapscript context - Add handling for additional REDUCED_DATA error types: SCRIPT_ERR_PUSH_SIZE, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION, SCRIPT_ERR_DISCOURAGE_OP_SUCCESS mempool_sigoplimit.py: - Rewrite test_sigops_package to use P2WSH spending instead of bare multisig - Bare multisig outputs (37 bytes) exceed MAX_OUTPUT_SCRIPT_SIZE=34 under REDUCED_DATA, so P2WSH (34 bytes) is used instead - Test now creates P2WSH outputs with high-sigop witness scripts to verify sigops counting still works correctly validation.cpp: - Fix ConsensusScriptChecks to properly handle per-input script validation flags when REDUCED_DATA height-based enforcement is active Test framework (test_node.py): - Add handling for datacarriersize parameter to auto-enable acceptnonstdtxn when needed for tests using large OP_RETURN outputs Other test adaptations: - p2p_segwit.py: Skip test_segwit_versions subtest (conflicts with REDUCED_DATA DISCOURAGE flags being consensus-enforced) - feature_uasf_reduced_data.py: Improve test stability - feature_reduced_data_utxo_height.py: Fix test assertions - wallet_createwallet.py: Remove dead code from skipped tests - mempool_dust.py: Fix encoding parameter - feature_fee_estimates_persist.py: Fix encoding parameter 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Remove test_mid_package_eviction and test_rbf_carveout_disallowed tests from mempool_limit.py, following upstream Bitcoin Core commits: - f3a613a ("[cleanup] delete brittle test_mid_package_eviction") - 89ae38f ("test: remove rbf carveout test from mempool_limit.py") test_mid_package_eviction was identified as brittle because it: - Requires evaluation of package parents in a specific order - Uses "magic numbers" that work only on certain platforms/configurations - Relies on precise mempool capacity that differs across environments - Causes intermittent "mempool full" errors when the test tries to send transactions at mempoolmin_feerate after fill_mempool() The test coverage these provided is available in other tests, and the scenarios they tested are edge cases unlikely to occur in practice. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add a step to free disk space on GitHub-hosted runners before running CI jobs. This prevents "No space left on device" errors during build and test phases. The cleanup removes: - Android SDK (~8GB) - .NET SDK (~2GB) - Haskell GHC (~5GB) - Pre-installed Docker images This is particularly important for jobs that build with debug symbols or run extensive test suites that generate large artifacts. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Move the validation for invalid -nowallet values (like -nowallet=0 or -nowallet=not_a_boolean) from VerifyWallets to ParameterInteraction. This ensures the error is caught early in the startup process, before any wallet loading or interactive dialogs occur. Previously, on systems with interactive UI support, invalid -nowallet values could cause the node to hang waiting for user input from modal dialogs during wallet error handling. The validation checks that all wallet settings are strings, since -nowallet=0 (double negative) results in a boolean true value being stored, which is not a valid wallet path. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…t-fixes-by-claude
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR offers the CI and test fixes from dathonohm/bitcoin#2 directly to your branch, in case you'd like to incorporate them into your PR #3 to dathonohm.
These changes address the CI failures observed in your recent CI run.
What This Fixes
1. Unsigned Integer Overflow in
GetPriority()(Runtime Crash)Your CI failed with:
This PR guards against underflow when
spendheight < cachedHeightduring chain reorganizations.2. Brittle
mempool_limit.pyTestsYour CI failed with:
This PR removes
test_mid_package_evictionandtest_rbf_carveout_disallowedfollowing upstream Bitcoin Core.3. CI Disk Space / Timeout
The CentOS job timed out after 2 hours. This PR adds a cleanup step to free ~15GB of disk space on GitHub-hosted runners.
4. Miniscript Fuzz Test Fixes
Adds a
UsesOpIf()helper for conditional error handling rather than unconditionally whitelisting all REDUCED_DATA errors. This preserves the fuzz test's ability to catch unexpected failures.5. Lint Fixes
Files Changed
src/kernel/mempool_entry.h,src/node/miner.cpp,src/policy/coin_age_priority.cpp,src/txmempool.cpp.github/workflows/ci.ymltest/functional/mempool_limit.py,test/functional/mempool_sigoplimit.py,test/functional/p2p_segwit.pysrc/test/fuzz/miniscript.cpp,src/test/miniscript_tests.cppHow to Use
You can either:
All commits were generated using Claude Code.
🤖 Generated with Claude Code