Skip to content

backport: v0.26 bitcoin#27800, bitcoin#28125, bitcoin#28232, bitcoin#27695 - #100

Merged
DCG-Claude merged 4 commits into
developfrom
backport-0.26-b186-misc
Oct 18, 2026
Merged

DCG-Claude merged 4 commits into
developfrom
backport-0.26-b186-misc

Conversation

@DCG-Claude

@DCG-Claude DCG-Claude commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

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

upstream commit gates notes
bitcoin#27800 2d7b155784 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass Backports bitcoin#27800: removes DataStream::Serialize and updates the upstream call sites in wallet/dump.cpp and wallet
bitcoin#28125 a579befd06 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass Backports bitcoin#28125 in full: legacy-wallet migration now skips invalid or non-watched watch-only scripts (such as sh
bitcoin#28232 3e2077c380 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass Backports bitcoin#28232: the locked_wallet test now sets a fixed tx fee so it no longer depends on fee estimation, and i
bitcoin#27695 8cfc3c4522 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass Backports bitcoin#27695 in full: p2p_leak_tx.py is split into test_tx_in_block and test_notfound_on_unannounced_tx, and
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.

…thod and << operator

5cd0717 streams: Drop confusing DataStream::Serialize method and << operator (Ryan Ofsky)

Pull request description:

  DataStream Serialize method has surprising behavior because it just serializes raw bytes without a length prefix. When you serialize a string or vector, a length prefix is serialized before the raw object contents so the object can be unambiguously deserialized later. But DataStreams don't support deserializing at all and just dump the raw bytes.

  Having this inconsistency is not necessary and could be confusing (see bitcoin#27790 (comment)) so this PR just drops the DataStream::Serialize method.

ACKs for top commit:
  furszy:
    lgtm ACK 5cd0717
  MarcoFalke:
    lgtm ACK 5cd0717 🌙

Tree-SHA512: 49dd117de266f091a5336b13a91c5d8658abe1b3a0a9c51c8b5f6a2e0e814781b73afc39256353e79dade603a8a2761e8536716d1a48499720c266f4500477e2

Dash adaptations:
- src/net_processing.cpp: final-alert hunk not applied; Dash's ProcessMessage has no legacy final-alert block, so there is nothing to convert
- src/flat-database.h: Dash-only `fileout << ssObj` becomes `fileout << Span{ssObj}` since DataStream::Serialize is removed
- src/llmq/net_quorum.cpp: QDATA error reply streams `Span{body}` and passes `Span{ssResponse}` to Make(), as upstream did for the alert message
- src/governance/net_governance.cpp: MNGOVERNANCEOBJECT/MNGOVERNANCEOBJECTVOTE replies pass `Span{ss}` to Make() instead of the CDataStream itself
…ripts

8e7e3e6 test: wallet, verify migration doesn't crash for an invalid script (furszy)
1de8a23 wallet: disallow migration of invalid or not-watched scripts (furszy)

Pull request description:

  Fixing bitcoin#28057.

  The legacy wallet allows to import any raw script (bitcoin#28126), without
  checking if it was valid or not. Appending it to the watch-only set.

  This causes a crash in the migration process because we are only
  expecting to find valid scripts inside the legacy spkm.

  These stored scripts internally map to `ISMINE_NO` (same as if they
  weren't stored at all..).

  So we need to check for these special case, and take into account that
  the legacy spkm could be storing invalid not watched scripts.

  Which, in code words, means `IsMineInner()` returning
  `IsMineResult::INVALID` for them.

  Note:
  To verify this, can run the test commit on top of master.
  `wallet_migration.py` will crash without the bugfix commit.

ACKs for top commit:
  achow101:
    ACK 8e7e3e6

Tree-SHA512: c2070e8ba78037a8f573b05bf6caa672803188f05429adf5b93f9fc1493faedadecdf018dee9ead27c656710558c849c5da8ca5f6f3bc9c23b3c4275d2fb50c7

Dash adaptations:
- test/functional/wallet_migration.py: new sh(sh(pkh())) import and asserts go into Dash's existing test_migrate_raw_p2sh, which has no wsh step and expects balance 2, not 5
- test/functional/wallet_migration.py: script_to_p2sh import added next to Dash's existing key_to_p2pkh import on the same line
5364dd8 test: locked_wallet, skip default fee estimation (furszy)

Pull request description:

  Coming from bitcoin#28139 (comment).

  No test case in this file is meant to exercise fee estimation. All default wallets have a
  custom tx fee set [here](https://github.com/bitcoin/bitcoin/blob/b7138252ace6d21476964774e094ed1143cd7a1c/test/functional/wallet_fundrawtransaction.py#L100). The only one missing is the one created for `locked_wallet`.

ACKs for top commit:
  theStack:
    ACK 5364dd8

Tree-SHA512: 514c02708081d18330d759d10e306cee16c6350de243c68f0973777d2582f5d81968a237393c1f59aba245297e03f3f98d3ae5249a042469d0d016255f568719

Dash adaptations:
- test/functional/wallet_fundrawtransaction.py: keeps the Dash-only `satoshi_round` import next to the new `get_fee` import (still used at line 208).
- test/functional/wallet_fundrawtransaction.py: the exact-fee size is 191 bytes for Dash's p2pkh->p2pkh tx (147-byte input + 44 bytes), not upstream's 110 vbytes for p2wpkh; Dash has no segwit.
- test/functional/wallet_fundrawtransaction.py: replaces Dash's earlier fixed 500-duff fee deduction (and its comment) with upstream's exact get_fee() calculation.
… be downloaded

fa4c16b test: Add test to check tx in the last block can be downloaded (MarcoFalke)
fadc849 test: Split up test_notfound_on_unannounced_tx test case (MarcoFalke)

Pull request description:

  If a peer received an `inv` about a transaction, which was included in a block before receiving the corresponding `getdata`, it can be beneficial to send this transaction to the peer to aid compact block relay.

  Add a test for this to avoid breaking it in the future.

ACKs for top commit:
  sdaftuar:
    ACK fa4c16b
  instagibbs:
    ACK fa4c16b

Tree-SHA512: 1ec16dcc216dd29c849928e753158d45c409612e9ac528db16e5af465bb5b69cd42241ac6f67e5a4583b8e558eeba49fa0a0889a4247b3fb0053b2758eec9490

Dash adaptations:
- test/functional/p2p_leak_tx.py: uses send_self_transfer()["txid"] instead of ["wtxid"]; Dash has no segwit so MiniWallet returns no wtxid
- test/functional/p2p_leak_tx.py: test_tx_in_block checks tx.rehash() == txid instead of tx.getwtxid() == wtxid, since Dash's CTransaction has no getwtxid()
- test/functional/p2p_leak_tx.py: test_tx_in_block calls self.bump_mocktime(60) before waiting for the inv; Dash's framework freezes mocktime, so the inbound inv timer would never fire
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#27800, bitcoin#28125, bitcoin#27869, bitcoin#28232, bitcoin#27695 backport: v0.26 bitcoin#27800, bitcoin#28125, bitcoin#28232, bitcoin#27695 Oct 18, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b186-misc branch from 1af9327 to 8cfc3c4 Compare October 18, 2026 03:43
@DCG-Claude
DCG-Claude merged commit fe232f9 into develop Oct 18, 2026
74 checks passed
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

merged as dashpay#7916

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.

1 participant