backport: Merge bitcoin#30257, 30264, 29607 , 30047, 3006, 27905 - #7296
backport: Merge bitcoin#30257, 30264, 29607 , 30047, 3006, 27905#7296vijaydasmp wants to merge 0 commit into
Conversation
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (1)
WalkthroughThis PR consolidates three independent changes: (1) removes gprof profiling support from the build system and changes hardening default to enabled, (2) refactors the Bech32 checksum implementation with a new optional Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Infer (1.2.0)src/bech32.cppsrc/bech32.cpp:5:10: error: 'bech32.h' file not found with include; use "quotes" instead ... [truncated 1293 characters] ... lugins/clang/install/lib/clang/18/include" src/validation.cppsrc/validation.cpp:7:10: error: 'validation.h' file not found with include; use "quotes" instead ... [truncated 2200 characters] ... ans.CTrans_funct.exec_with_node_creation in file "src/clang/cTrans.ml" (inlined), line 104, characters 20-38 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Final review complete — no blockers (commit 13d8299) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Six clean Bitcoin Core backports. The final tree at HEAD compiles and is semantically equivalent to upstream for the touched regions; the only in-scope concern is that bitcoin#29607 and bitcoin#30047 were cherry-picked in reverse upstream order, leaving one intermediate merge commit that references CHECKSUM_SIZE before it is defined and breaks bisect.
🟡 1 suggestion(s)
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `src/bech32.cpp`:
- [SUGGESTION] src/bech32.cpp:189: Cherry-pick order of bitcoin#29607 and bitcoin#30047 is reversed — breaks git bisect
Upstream merged #30047 (charlimit enum / CHECKSUM_SIZE constexpr) before #29607 (encode-path memcopy reduction), and #29607 explicitly builds on #30047. This PR applies them in the opposite order: 804d22a487 (Merge #29607) lands before 621289fa9a (Merge #30047). At 804d22a487, src/bech32.cpp:189 reads `ret.reserve(hrp.size() + 1 + values.size() + CHECKSUM_SIZE);` but `constexpr size_t CHECKSUM_SIZE = 6;` is not introduced until the next merge. Verified: `git show 804d22a487:src/bech32.cpp` references CHECKSUM_SIZE, while neither 804d22a487~1 nor 804d22a487 itself defines it. That intermediate commit will not compile, which breaks `git bisect` across this range. The final HEAD (13d8299381) is correct because #30047 is applied immediately after, so this is non-blocking — but the merges should be reordered to match upstream and preserve bisectability.
| std::string Encode(Encoding encoding, const std::string& hrp, const data& values) { | ||
| // First ensure that the HRP is all lowercase. BIP-173 and BIP350 require an encoder | ||
| // to return a lowercase Bech32/Bech32m string, but if given an uppercase HRP, the | ||
| // result will always be invalid. |
There was a problem hiding this comment.
🟡 Suggestion: Cherry-pick order of bitcoin#29607 and bitcoin#30047 is reversed — breaks git bisect
Upstream merged bitcoin#30047 (charlimit enum / CHECKSUM_SIZE constexpr) before bitcoin#29607 (encode-path memcopy reduction), and bitcoin#29607 explicitly builds on bitcoin#30047. This PR applies them in the opposite order: 804d22a (Merge bitcoin#29607) lands before 621289f (Merge bitcoin#30047). At 804d22a, src/bech32.cpp:189 reads ret.reserve(hrp.size() + 1 + values.size() + CHECKSUM_SIZE); but constexpr size_t CHECKSUM_SIZE = 6; is not introduced until the next merge. Verified: git show 804d22a487:src/bech32.cpp references CHECKSUM_SIZE, while neither 804d22a~1 nor 804d22a itself defines it. That intermediate commit will not compile, which breaks git bisect across this range. The final HEAD (13d8299) is correct because bitcoin#30047 is applied immediately after, so this is non-blocking — but the merges should be reordered to match upstream and preserve bisectability.
source: ['claude', 'codex']
…partial) 23577, 24402, 26252, 30047, 29607, 27905 5ce9c6f Merge bitcoin#27905: validation: add missing insert to m_dirty_blockindex (fanquake) bd6b815 Merge bitcoin#29607: refactor: Reduce memory copying operations in bech32 encoding (Ava Chow) 67d6eed Merge bitcoin#30047: refactor: Model the bech32 charlimit as an Enum (Ava Chow) 0f033fd Merge bitcoin#26252: refactor: Make 64-bit shift explicit (MacroFake) a27cdd3 Merge bitcoin#24402: refactor: Avoid implicit-integer-sign-change in bech32.cpp (fanquake) bd1186e (partial) Merge bitcoin#23577: Follow-ups to Bech32 error detection (W. J. van der Laan) ce6d7cb (partial) Merge bitcoin#16807: Let validateaddress locate error in Bech32 address (W. J. van der Laan) a8a3fa8 Merge bitcoin#30264: test: add coverage for errors for `combinerawtransaction` (merge-script) 8a74523 Merge bitcoin#30257: build: Remove --enable-gprof (merge-script) Pull request description: ## Issue being fixed or feature implemented - Replaces #7296 with a clean, GPG-signed backport stack. - Backports Bitcoin Core build cleanup, RPC test coverage, Bech32 library improvements, and the missing dirty block-index update. - Excludes bitcoin#30006 because its `feature_reindex_readonly.py` change depends on an upstream test-history chain not currently present in Dash; it should be handled separately. ## What was done? - Backported bitcoin#30257 and bitcoin#30264. - Partially backported bitcoin#16807 and bitcoin#23577, limited to: - `src/bech32.cpp` - `src/bech32.h` - `src/test/bech32_tests.cpp` - Intentionally excluded their Bitcoin L1 `key_io` / `validateaddress` integration, related functional tests, and release note. Dash L1 addresses remain Base58; Dash's Platform Bech32m path is separate. - Backported bitcoin#24402 completely, including the Bech32 sign-conversion cleanup and removal of the four now-unnecessary sanitizer suppressions. - Backported the complete applicable bitcoin#26252 change. Its `src/bech32.cpp` change is applied exactly. The `build_msvc/common.init.vcxproj.in` hunk is intentionally inapplicable because Dash removed that obsolete build system in `04fb085f6bddc90e806deefd90c72104763f055a`. - Backported bitcoin#30047 completely, including all `CharLimit`, `CHECKSUM_SIZE`, and `LocateErrors` changes. - Backported bitcoin#29607 completely, including both `hrp.reserve(pos)` additions in `Decode` and `LocateErrors`. - Backported bitcoin#27905 while preserving Dash's ChainLocks-specific `fConflictingChain` path. - Preserved upstream authorship and signed all nine commits with PastaClaw key `218BBA5FAC3745AB`. The remaining older, non-blocking upstream starting-state differences are a copyright-header update and bitcoin#24513's cosmetic `CChainState` rename. Neither causes an omitted hunk, semantic workaround, or behavior difference in this stack. ## How Has This Been Tested? - `git verify-commit` passed for all nine commits. - Compared bitcoin#24402 and bitcoin#26252 against their upstream first-parent merge diffs, file by file. - Confirmed bitcoin#24402 removes only the four intended sanitizer suppressions. - Confirmed bitcoin#26252 applies the exact Bech32 change and does not recreate `build_msvc`. - Confirmed stable patch IDs for bitcoin#30047 and bitcoin#29607 are unchanged. - `git range-diff` confirmed the existing seven patches remain unchanged apart from rewritten IDs and the expected bitcoin#30047 context around bitcoin#24402's formatting change. - `git diff --check` passed. - `make -C src test/test_dash -j15` passed on macOS arm64. - `./src/test/test_dash --run_test=bech32_tests`: 4 test cases passed. - A build configured with `--with-sanitizers=undefined,integer` passed. - The Bech32 test suite passed under the sanitizer build with the project's CI `UBSAN_OPTIONS`. - Separate local Codex backport review passed at `5ce9c6f8da5659c540f8b68cdf8dc317bf7c8934` with no findings. ## Breaking Changes None. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ Top commit has no ACKs. Tree-SHA512: e24f389a19c812766d6c28ead35347808a9b4d4fe3b86527a24ac69ded41310724e5e5ac0e90d1a3a958371060eef8dac1af21bfcbd6c3d517bda23d9f9f07d3
|
This pull request has conflicts, please rebase. |
13d8299 to
981a25d
Compare
No description provided.