Repository navigation
backport: v0.26 bitcoin#26296, bitcoin#28245, bitcoin#28258, bitcoin#27907 - #76
DCG-Claude wants to merge 4 commits into
Conversation
bba2d64 to
36c7453
Compare
Real Dash-specific breakage caused by enabling the bitcoin-tidy plugin in CI: the Dash-only two-part log in CFlatDB::Read intentionally emits a prefix without a trailing newline, which bitcoin-unterminated-logprintf rejects. I suppressed it with the same 🤖 backportsys, on behalf of the Dash backport pipeline. |
The Validate PR title job only lints the pull request's title text and the excerpt shows nothing but post-job checkout cleanup — no check output or error from the branch's contents. Nothing on this batch touches PR-title validation, so this is infrastructure/title metadata, not a backport defect. 🤖 backportsys, on behalf of the Dash backport pipeline. |
|
This pull request has conflicts, please rebase. |
1c976c6 tidy: Integrate bicoin-tidy clang-tidy plugin (fanquake) 7de23cc refactor: fix unterminated LogPrintf()s (fanquake) 0a1029a lint: remove /* Continued */ markers from codebase (fanquake) 9100079 lint: remove lint-logs.py (fanquake) d86a83d lint: drop DIR_IWYU global (fanquake) Pull request description: Demo of integrating the [bitcoin-tidy](https://github.com/theuni/bitcoin-tidy-plugin), [clang-tidy plugin](https://clang.llvm.org/extra/clang-tidy/) written by theuni into our tidy CI job. The plugin currently has a single check, `bitcoin-unterminated-logprintf`. This would replace our current Python driven, `git-grep`-based, `.cpp` file only, lint-logs linter. ACKs for top commit: TheCharlatan: ACK 1c976c6 theuni: ACK 1c976c6 MarcoFalke: re-ACK 1c976c6 👠 Tree-SHA512: 725b45c70e431d48e6f276671e05c694e10b6047cae1a31906ac3ee9093bc8105fb226b36a5bac6709557526ca6007222112d66aecec05a574434edc4897e4b8 Dash adaptations: - {'file': 'ci/dash/lint-tidy.sh', 'what': 'Upstream added the bitcoin-tidy plugin build and the run-clang-tidy `-load=` flag to ci/test/06_script_b.sh. Dash has no ci/test/06_script_b.sh; its clang-tidy job lives in ci/dash/lint-tidy.sh (driven from ci/dash/build_src.sh). Added the same three cmake invocations (configure /tidy-build from contrib/devtools/bitcoin-tidy, build, build target bitcoin-tidy-tests) right after the ctcache `--zero-stats` line, and added `-load="/tidy-build/libbitcoin-tidy.so"` to the run-clang-tidy invocation.'} - {'file': 'ci/dash/lint-tidy.sh', 'what': 'Upstream passes `-DLLVM_DIR=/usr/lib/llvm-${LLVM_VERSION}/lib/cmake/llvm`. In Dash, LLVM_VERSION is a Dockerfile ARG (build-time only) and is not in the CI runtime environment, so the same directory is obtained with `-DLLVM_DIR="$(llvm-config --cmakedir)"`.'} - {'file': 'src/init.cpp', 'what': 'Upstream\'s hunk removing the `/* Continued */` marker from the relative-datadir warning rewrites the following line; kept Dash\'s branding ("Dash Core" instead of "Bitcoin Core") in that continuation string.'} - {'file': 'src/test/logging_tests.cpp', 'what': "Upstream converts four `LogPrintf_` calls in logging_tests to the terminated form. Dash's test has six calls (extra BCLog::Level::Info / BCLog::LogFlags::ALL variants where upstream has Level::None / LogFlags::NONE); all six were converted the same way."} - {'file': 'test/lint/lint-format-strings.py', 'what': "Added `contrib/devtools/bitcoin-tidy/example_logprintf.cpp` to the exclusion regex, preserving Dash's existing exclusion list (dashbls, leveldb, secp256k1, minisketch, tinyformat, test/fuzz/strprintf.cpp, clientversion.cpp)."} - {'file': 'test/lint/lint-include-guards.py', 'what': "Added `contrib/devtools/bitcoin-tidy` to EXCLUDE_FILES_WITH_PREFIX, which in Dash is a local list concatenated with SHARED_EXCLUDED_SUBTREES from test/lint/lint_ignore_dirs.py rather than upstream's flat literal list."} - {'file': 'test/lint/lint-includes.py', 'what': 'Upstream adds `contrib/devtools/bitcoin-tidy/` to this file\'s local EXCLUDED_DIRS. Dash had replaced EXCLUDED_DIRS with the shared SHARED_EXCLUDED_SUBTREES list (also used by lint-spelling.py and lint-include-guards.py). Reintroduced a file-local `EXCLUDED_DIRS = ["contrib/devtools/bitcoin-tidy/"] + SHARED_EXCLUDED_SUBTREES` and pointed both use sites (list_files_by_suffix, find_quote_syntax_inclusions) at it, so the new exclusion applies only to lint-includes.py, as upstream intended.'} - {'file': 'src/coinjoin/client.cpp', 'what': "Dash-only call sites. Upstream's sweep removes every `/* Continued */` marker (the marker existed only for the now-deleted test/lint/lint-logs.py) and adds `// NOLINT(bitcoin-unterminated-logprintf)` where the format string genuinely does not end in \\n. Applied to the Dash-only markers in this file; one site (`WalletCJLogPrint(/* Continued */` on its own line followed by `m_wallet,`) collapses to `WalletCJLogPrint(m_wallet,` now that the marker is gone."} - {'file': 'src/coinjoin/server.cpp', 'what': 'Dash-only `/* Continued */` markers removed; `// NOLINT(bitcoin-unterminated-logprintf)` added at the six sites whose format string is genuinely unterminated (lines 81, 213, 410, 425, 531, 562).'} - {'file': 'src/coinjoin/coinjoin.cpp', 'what': 'Dash-only `/* Continued */` markers removed; NOLINT added at the three unterminated LogPrint sites.'} - {'file': 'src/masternode/payments.cpp', 'what': 'Dash-only `/* Continued */` markers removed; NOLINT added at the six unterminated LogPrintf/LogPrint sites.'} - {'file': 'src/governance/object.cpp', 'what': 'Dash-only `/* Continued */` marker removed; NOLINT added (RemoveInvalidVotes log line ends with %s).'} Not applicable to Dash (intentionally omitted): - ci/test/01_base_install.sh: - ci/test/06_script_b.sh: - ci/test/00_setup_env.sh:
d82bb90 doc: use llvm-config for bitcoin-tidy example (fanquake) Pull request description: An LLVM installation will have `llvm-config` available to query for info. Ask it for the `--cmakedir`, and use that in our bitcoin-tidy example, rather than listing multiple different (potential) paths per distro/OS etc. ACKs for top commit: theuni: ACK d82bb90. jonatack: ACK d82bb90 TheCharlatan: Nice, Re-ACK d82bb90 Tree-SHA512: e07e979231f8f000deafce0751bed4b73ff0eff995bec49e90f579c9051cf5859dac5e49554b8219d33b00c81192db979eed98fee1c643a9205ea8babfce2c5d
bb3263d bitcoin-tidy: fix macOS build (Cory Fields) Pull request description: [LLVM uses these options](https://github.com/llvm/llvm-project/blob/main/llvm/cmake/modules/HandleLLVMOptions.cmake#L178) for building as well, so there's precedent. Also fix the shared library extension which was incorrectly being set to dylib. Thanks to jonatack for reporting and debugging. ACKs for top commit: jonatack: ACK bb3263d tested with arm64 macos 13.5, llvm 16.0.6 and cmake 3.27.2 Tree-SHA512: de7bfd497f38f1565a14d217d0b057cbfa788bdda702b5942b7f0b55947ae5e1c05af13e7d6a073ed036bc4db57035868f180034508b6e084ab9b901a5baaf2f
… wallet_create_tx.cpp a72af2e bench: disable birth time block skip for wallet_create_tx.cpp (furszy) Pull request description: As the benchmarks inside `wallet_create_tx.cpp` assert the wallet balance at the end, they require all blocks to be scanned by the wallet. So, we need to ensure that no blocks are skipped by the recently added wallet birth time functionality. This just means setting the wallet birth time to the genesis block time. So the wallet is always older than any new block. ACKs for top commit: achow101: ACK a72af2e hernanmarino: ACK a72af2e TheCharlatan: ACK a72af2e Tree-SHA512: d3148659bd633d20978736e1292e3456a2c6dd2b6c8f60625a4160e16818d923487c889237eb3f34693f7dd78b7d124b89afdc56e4c9fad370026d0733ef1e08 Dash adaptations: - src/bench/wallet_create_tx.cpp: kept Dash's CWallet constructor call (extra coinjoin_loader + gArgs params, and CreateMockWalletDatabase() since Dash predates the CreateMockableWalletDatabase rename) as the anchor context for both hunks; only the 2x comment+SetMockTime lines were added
36c7453 to
deacf04
Compare
|
Branch rewritten at
🤖 backportsys, on behalf of the Dash backport pipeline. |
|
batch closed by PastaPastaPasta on dashpay#7729 |
Automated Bitcoin Core v0.26 backports, batch
backport-0.26-b056-misc.62be40dd7d77cd44efd4487b0c1f1bdeacf04e0eProvenance
Each commit passed: cherry-pick (adapted by an Opus lane only where conflicts existed), build, touched tests, a mechanical diff-of-diffs check (every upstream hunk landed; no added line without an upstream counterpart), and an independent Opus verification lane where anything was adapted. Gate rows and lane artifacts are in the backportsys DB.