Skip to content

backport: v0.26 bitcoin#28085, bitcoin#27037, bitcoin#27735 - #79

Merged
DCG-Claude merged 7 commits into
developfrom
backport-0.26-b059-misc
Oct 6, 2026
Merged

DCG-Claude merged 7 commits into
developfrom
backport-0.26-b059-misc

Conversation

@DCG-Claude

@DCG-Claude DCG-Claude commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Automated Bitcoin Core v0.26 backports, batch backport-0.26-b059-misc.

upstream commit gates notes
bitcoin#28085 839b280141 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass Backports bitcoin#28085 in full: CSipHasher::Write now takes a Span, and every upstream caller is c
bitcoin#27037 2a3720b78a pick:pass build:pass tests:warn mech:warn tree:pass verify:pass Backports the ScriptToUniv optional SigningProvider parameter from bitcoin#27037, so descriptor inference can use a call
bitcoin#27735 93c3fcdaff pick:pass build:pass tests:pass mech:pass tree:pass verify:pass ci_fork:pass ci_upstream:pass The Dash commit reproduces upstream 7794d9d exactly: the listunspent ancestor{count,siz

Skipped in this batch:

Provenance

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.

@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28085, bitcoin#27037, partial bitcoin#13669, bitcoin#27735 backport: v0.26 bitcoin#28085, bitcoin#27037, bitcoin#27735 Oct 4, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b059-misc branch from b75b213 to 93c3fcd Compare October 4, 2026 01:46
knst and others added 7 commits October 6, 2026 04:06
…llocation tests

GetMnRewardEraAfter() accepts a null pindexPrev, so clang-tidy's static analyzer treats the tip as possibly null on the path into it and flags the tip->nBits dereference a few lines later in linux64_multiprocess CI.

Wrap every tip lookup that feeds the era helper in Assert(): the chain is never empty here, and a fatal check in a unit test documents that.
…test

~Qt::ItemIsEnabled is evaluated as a plain int of -33, and QFlags::operator& converts it to unsigned, which UBSan reports as an implicit sign change in the asan CI job.

Use setFlag(Qt::ItemIsEnabled, false) so the mask never leaves the QFlags type.
clang-tidy's performance-inefficient-vector-operation flags the push_back
loop in AddCoins(), and src/.clang-tidy turns every warning into an error,
so the linux64_multiprocess tidy step fails on this file.

Reserve the final size before the loop.
…sign change, clang-analyzer null dereference)

92365cc fix(qt): reserve the coin vector in the coin control test helper (Konstantin Akimov)
9c6ccd0 fix(qt): clear ItemIsEnabled through QFlags::setFlag in coin control test (Konstantin Akimov)
7daa67d fix(test): assert the chain tip before dereferencing it in reward reallocation tests (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented

  `develop` CI is red since the merge of dashpay#7260 (aec4994). Both `linux64_asan-build` and `linux64_multiprocess-build` pass on the merge of dashpay#7790 (2ca083a) and on the head of dashpay#7584 (fed2f49), and both are red on the head of dashpay#7260 (3034e98) and on its merge commit. dashpay#7260 was merged with those two jobs failing.

  1. `linux64_asan` fails in `test_dash-qt`: `CoinControlTreeWidgetTests::disabledCoinsSkipped()` triggers an UBSan implicit-integer-sign-change inside `QFlags::operator&`. The test, added by dashpay#7260 in 3034e98, clears a flag with `flags() & ~Qt::ItemIsEnabled`. `~Qt::ItemIsEnabled` is evaluated as a plain `int` (-33) and QFlags converts it to its unsigned storage type.

  2. `linux64_multiprocess` reports a clang static analyzer diagnostic in `test/block_reward_reallocation_tests.cpp:209`: `tip->nBits` dereferences a pointer the analyzer considers possibly null, because `GetMnRewardEraAfter()` (via `DeploymentActiveAfter()`) accepts a null `pindexPrev`. The pattern dates back to dashpay#7339 (7f2058e) and the file was last touched by dashpay#7536 in August, so this diagnostic is not caused by dashpay#7260's diff. The analyzer runs in that job because the tidy step operates on the `make distdir` copy of the tree, which does not include `src/.clang-tidy`, so clang-tidy falls back to its default `clang-analyzer-*` checks. I could not read the job log (needs credentials) to confirm that this diagnostic alone fails the step, so this part is fixed on the evidence of the pasted output.

  ## What was done?

  - `src/qt/test/coincontroltreewidgettests.cpp`: clear the flag with `flags().setFlag(Qt::ItemIsEnabled, false)`, which stays inside the `QFlags` type.
  - `src/test/block_reward_reallocation_tests.cpp`: wrap every chain-tip lookup that feeds `GetMnRewardEraAfter()` in `Assert()` and include `util/check.h`. The chain is never empty at those points; the assertion documents it for the analyzer and the reader. This is test code, so a fatal check is acceptable.

  ## How Has This Been Tested?

  see CI

  ## Breaking Changes

  None.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: cd7d524e35ec6039f5b72ae05cfd498c83c00d842a617bf412de87a5759eb7fbd74f5b96698e9a3aab27174d8ac8942f5624bbe49a1028c4d9d0fbc3cfb3dd33
7d92b14 refactor: use Span for SipHash::Write (Sebastian Falbesoner)

Pull request description:

  This simple refactoring PR changes the interface for the `SipHash` arbitrary-data `Write` method to take a `Span<unsigned char>` instead of having to pass data and length. (`Span<std::byte>` seems to be more modern, but vectors of `unsigned char` are still used prety much everywhere where SipHash is called, and I didn't find it very appealing having to clutter the code with `Make(Writable)ByteSpan` helpers).

ACKs for top commit:
  sipa:
    utACK 7d92b14
  MarcoFalke:
    lgtm ACK 7d92b14
  achow101:
    ACK 7d92b14

Tree-SHA512: f17a27013c942aead4b09f5a64e0c3ff8dbc7e83fe63eb9a2e3ace8be9921c9cbba3ec67e3e83fbe3332ca941c42370efd059e702c060f9b508307e9657c66f2

Dash adaptations:
- src/txrequest.cpp: Dash's PriorityComputer keys on a CInv (hash + type) rather than a bare txhash, so upstream's `.Write(txhash)` became `.Write(inv.hash).Write(inv.type)` — only the byte-span write was converted, the existing `.Write(inv.type)` uint64 overload call is preserved
- src/llmq/quorums.h: Dash-only SaltedHasherImpl<llmq::CQuorumDataRequestKey> used the removed two-argument CSipHasher::Write; wrapped each raw pointer/size pair in `Span{ptr, size}` (same style as upstream's `hasher2.Write(Span{&x, 1})` in hash_tests.cpp), byte-for-byte identical hashing. Upstream never touched this file because it does not exist in Bitcoin Core, but it would not compile after the signature change
…in decodescript

6699d85 doc: release notes for bitcoin#27037 (Antoine Poinsot)
dfc9acb rpc: decode Miniscript descriptor when possible in decodescript (Antoine Poinsot)

Pull request description:

  The descriptor inference logic would previously always use a dummy signing provider and would never analyze the witness script of a P2WSH scriptPubKey.

  It's often not possible to infer a Miniscript only from the onchain Script, but it was such a low hanging fruit that it's probably worth having it?

  Fixes bitcoin#27007. I think it also closes bitcoin#25606.

ACKs for top commit:
  instagibbs:
    ACK bitcoin@6699d85
  achow101:
    ACK 6699d85
  sipa:
    utACK 6699d85

Tree-SHA512: e592bf1ad45497e7bd58c26b33cd9d05bb3007f1e987bee773d26013c3824e1b394fe4903809d80997d5ba66616cc79d77850cd7e7f847a0efb2211c59466982

Dash adaptations:
- src/core_io.h: took upstream's `class SigningProvider;` forward declaration and the new `const SigningProvider* provider = nullptr` parameter on ScriptToUniv, while keeping Dash's own forward-decl list (CSpentIndexTxInfo, MnType), Dash's extra TxToUniv `ptxSpentInfo` parameter, and the Dash-only evo/core_write.cpp template declarations that upstream has no equivalent of
- src/rpc/rawtransaction.cpp: resolved to Dash's HEAD — the entire upstream `can_wrap_P2WSH` / `segwit` sub-object block that the patch modifies does not exist in Dash's decodescript, so there is no call site for the new provider argument
- test/functional/rpc_decodescript.py: restored to HEAD; the added decodescript_miniscript() test and its run_test() invocation were dropped because both assertions read res["segwit"]["desc"], a key Dash's decodescript never emits

Not applicable to Dash (intentionally omitted):
- src/rpc/rawtransaction.cpp: The hunk adds a FillableSigningProvider to decodescript's P2WSH wrapping branch. Dash removed segwit, so decodescript has no `segwit` result object and no WitnessV0ScriptHash path; there is nowhere in Dash's decodescript for the shape of this change to go — the top-level ScriptToUniv call infers a descriptor for the bare script, where upstream also passes no provider
- test/functional/rpc_decodescript.json: Upstream changes the `desc` field inside the `segwit` sub-object of the `02eeee` fixture. Dash's fixture file contains only two entries (P2SH and OP_RETURN) and no segwit sub-object at all, so the edited line has no counterpart
- test/functional/rpc_decodescript.py: decodescript_miniscript() asserts on res["segwit"]["desc"] for wsh(...) descriptors; Dash's decodescript returns no segwit key and Dash's descriptor.cpp has no P2WSH parse context, so the test could only ever fail
- doc/release-notes-27037.md: The note states decodescript may now infer a Miniscript descriptor under P2WSH context — a user-visible behaviour change that does not occur in Dash, so shipping the note would document a feature the binary does not have
…rom mempool_packages to wallet_basic

ffffe62 test: Move test_chain_listunspent wallet check from mempool_packages to wallet_basic (MarcoFalke)

Pull request description:

  This fixes a bug.

  On master:

  ```
  $ ./test/functional/mempool_packages.py  --legacy-wallet
    File "./test/functional/mempool_packages.py", line 52, in run_test
      self.nodes[0].importaddress(self.wallet.get_address())
  test_framework.authproxy.JSONRPCException: Bech32m addresses cannot be imported into legacy wallets (-5)
  ```

  On this pull, all tests pass.

ACKs for top commit:
  glozow:
    ACK ffffe62, thanks for changing! Nice to remove wallet from another non-wallet test.

Tree-SHA512: 842c3b7c2e90285a155b8ed9924ef0c99f7773892be4f1847e5d7ece79c914ea5acee0d71de2ce46c354ee95fb74a03c20c0afb5e49c0b8e1c0ce406df963650

Dash adaptations:
- test/functional/wallet_basic.py: the upstream hunk's leading context (the '-spendzeroconfchange'/sendall zeroconf sub-test) does not exist in Dash's wallet_basic.py, so only the actual additions were taken; self.test_chain_listunspent() is appended at the end of run_test, after the existing 'listunspent parent_descs' descriptor block, instead of after the zeroconf block

Replayed onto a newer base.

Dash adaptations:
- test/functional/wallet_basic.py: dropped prior.diff's `self.restart_node(0)` + '-limitancestorcount' comment (a review fix for the old base); develop now has the -spendzeroconfchange block whose `restart_node(0, ["-spendzeroconfchange=1"])` already clears the reduced -limitancestorcount, so the hunk lands in its literal upstream form at the upstream anchor point
@PastaPastaPasta
PastaPastaPasta force-pushed the backport-0.26-b059-misc branch from 93c3fcd to 1078cbb Compare October 5, 2026 23:21
@DCG-Claude
DCG-Claude merged commit bb68323 into develop Oct 6, 2026
79 checks passed
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

merged as dashpay#7759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants