Skip to content

backport: v0.26 bitcoin#25284, bitcoin#28470, bitcoin#28473, bitcoin#27784 - #83

Open
DCG-Claude wants to merge 4 commits into
developfrom
backport-0.26-b063-misc
Open

DCG-Claude wants to merge 4 commits into
developfrom
backport-0.26-b063-misc

Conversation

@DCG-Claude

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

Copy link
Copy Markdown
Collaborator

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

upstream commit gates notes
bitcoin#25284 ff455205d2 pick:pass build:pass tests:warn mech:warn tree:pass verify:pass This backports bitcoin#25284 (serialization parameters, AsBase, Action* rename, CAddress/CNetAddr SerParams replacing AD
bitcoin#28470 7fe109fdf0 pick:pass build:pass tests:warn mech:pass tree:pass verify:pass clean cherry-pick
bitcoin#28473 58ddebd561 pick:pass build:pass tests:pass mech:pass tree:pass verify:pass This commit backports bitcoin#28473 in full: the serialize.h changes, the SER_PARAMS_OPFUNC shorthand and every WithPara
bitcoin#27784 980ae7aac8 pick:pass build:pass tests:pass mech:pass tree:pass verify:pass Backports bitcoin#27784, which adds a sync_blocks call so the pruned node catches up before more blocks are generated, f
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.

…erialization

fa626af Remove unused legacy CHashVerifier (MarcoFalke)
fafa3fc test: add tests that exercise WithParams() (MarcoFalke)
fac81af Use serialization parameters for CAddress serialization (MarcoFalke)
faec591 Support for serialization parameters (MarcoFalke)
fac42e9 Rename CSerAction* to Action* (MarcoFalke)
aaaa3fa Replace READWRITEAS macro with AsBase wrapping function (MarcoFalke)

Pull request description:

  It seems confusing that picking a wrong value for `ADDRV2_FORMAT` could have effects on consensus. (See the docstring of `ADDRV2_FORMAT`).

  Fix this by implementing bitcoin#19477 (comment) .

  This may also help with libbitcoinkernel, see bitcoin#28327

ACKs for top commit:
  TheCharlatan:
    ACK fa626af
  ajtowns:
    ACK fa626af

Tree-SHA512: 229d379da27308890de212b1fd2b85dac13f3f768413cb56a4b0c2da708f28344d04356ffd75bfcbaa4cabf0b6cc363c4f812a8f1648cff9e436811498278318

Dash adaptations:
- src/net_processing.cpp: PushNodeVersion keeps Dash's nProtocolVersion (-pushversion), mnauthChallenge and m_masternode_connection fields; only addr_you/CService{} are wrapped in WithParams(CNetAddr::V1, ...) as upstream does
- src/addrdb.cpp: DumpPeerAddresses/LoadAddrman keep Dash's gArgs.GetDataDirNet() (Dash's existing difference from upstream's args.) and drop the CLIENT_VERSION argument as upstream does
- src/serialize.h: Dash's HAVE_CONFIG_H/config include kept; upstream's new #include <attributes.h> added after it
- src/version.h: upstream edits a comment in Bitcoin's version list that Dash does not have; Dash's own line 'Make sure that none of the values above collide with `ADDRV2_FORMAT`' is removed because ADDRV2_FORMAT no longer exists; all Dash protocol-version constants kept
- src/test/netbase_tests.cpp: the caddress_(un)serialize_v1/v2 tests are at a different place in Dash's file; upstream's edits (DataStream + WithParams(CAddress::V1_NETWORK/V2_NETWORK, ...)) applied to Dash's existing copies; Dash's LookupSubNet(...).IsValid() checks kept
- src/test/serialize_tests.cpp: upstream's new params tests (Base/Derived/WithParams) appended after Dash's LIMITED_VECTOR tests; upstream's added #include <string> left out because Dash's include block already has it
- src/test/fuzz/deserialize.cpp: Dash's '*/' that ends the commented-out block_filter_deserialize target kept before upstream's new addr_info_deserialize FUZZ_TARGET; Dash's script/sign.h and util/system.h includes kept
- src/hash.h: upstream deletes CHashVerifier, but Dash-only src/evo/snapshot.h (SnapshotBoundedInput, the commitment BLS input check) still uses it and reads GetType/GetVersion through it, so the class is kept unchanged; the HashedSourceWriter -> HashWriter change is applied as upstream
- src/evo/netinfo.h (Dash-only): NetInfoEntry used OverrideStream with |ADDRV2_FORMAT, which upstream removed; it now uses WithParams(CNetAddr::V2, service). MnNetInfo (de)serialized CService on streams without ADDRV2_FORMAT and now uses WithParams(CNetAddr::V1, ...), including the CSizeComputer size override. Wire and disk bytes are unchanged
- src/evo/deterministicmns.h (Dash-only): GetUniquePropertyHash<CService> switched from ser_version |= ADDRV2_FORMAT to WithParams(IsAddrV1Compatible() ? CNetAddr::V1 : CNetAddr::V2, v), with non-CService types in an else branch of the if constexpr; the hash input bytes are identical, so the unique-property map stays compatible. CSerAction{Serialize,Unserialize} renamed to Action{Serialize,Unserialize} (upstream rename) in the immer-map SerReadWrite overloads and CDeterministicMNList
- src/llmq/snapshot.h (Dash-only): CSerAction{Serialize,Unserialize} -> Action{Serialize,Unserialize} (upstream rename) in CQuorumSnapshot and CQuorumRotationInfo
- src/netfulfilledman.h (Dash-only): the netfulfilled.dat store serializes std::map<CService,...> keys; it now uses READWRITE(WithParams(CNetAddr::V1, ...)), which matches the old no-ADDRV2_FORMAT stream, so the on-disk format is unchanged
fad52ba fuzz: Rework addr fuzzing (MarcoFalke)
fa5b6d2 fuzz: Drop unused params from serialize helpers (MarcoFalke)

Pull request description:

  Some minor fixups to addr fuzzing

ACKs for top commit:
  dergoegge:
    utACK fad52ba

Tree-SHA512: 6a2b07fb1a65cf855d5e7c0a52bfcb81d46dbc5d4b3e72cef359987cbd28dbfeb2fc54f210e9737cb131b40ac5f88a90e9af284e441e0b37196121590bbaf015
fb6a2ab scripted-diff: use SER_PARAMS_OPFUNC (Anthony Towns)
5e5c8f8 serialize: add SER_PARAMS_OPFUNC (Anthony Towns)
33203f5 serialize: specify type for ParamsWrapper not ref (Anthony Towns)
bf147bf serialize: move ser_action functions out of global namespace (Anthony Towns)

Pull request description:

  Cleanups after bitcoin#25284:

   * ser_action namespacing - bitcoin#25284 (comment)
   * make reference implicit - bitcoin#25284 (comment)
   * function notation - bitcoin#25284 (comment)

ACKs for top commit:
  MarcoFalke:
    lgtm ACK fb6a2ab 💨
  TheCharlatan:
    ACK fb6a2ab

Tree-SHA512: aacca2ee9cfec360ade6b394606e13d1dfe05bc29c5fbdd48a4e6992bd420312d4ed0d32218d95c560646af326e9977728dc2e759990636298e326947f6f9526

Dash adaptations:
- src/net_processing.cpp: PushNodeVersion keeps Dash's nProtocolVersion (-pushversion), the mnauthChallenge and m_masternode_connection fields and Dash's indentation; only the two WithParams(CNetAddr::V1, ...) calls became CNetAddr::V1(...), as upstream did
- src/test/netbase_tests.cpp: the caddress_serialize/unserialize v1/v2 tests and isbadport already exist in Dash earlier in the file (about line 413), so upstream's re-added copy of that block was dropped and its four WithParams -> CAddress::V1_NETWORK/V2_NETWORK(...) changes were made in Dash's existing tests; Dash's LookupSubNet(...).IsValid() checks are kept
9fe9074 test: add block sync to getblockfrompeer.py (Martin Zumsande)

Pull request description:

  This adds an additional `sync_blocks` call, fixing an intermittent error caused by blocks arriving out of order due to how compact block relay may revert to headers processing when the tip hasn't caught up, and resulting in slightly different pruning behavior.
  Making sure that all blocks from the previous tests are synced before generating more blocks makes this impossible.

  See bitcoin#27749 (comment) and bitcoin#27749 (comment) for a more detailed analysis.

  bitcoin#27770 is a more long-term approach to avoid having to deal with magic pruneheight numbers in the first place, but that PR introduces a new RPC and needs more discussion.

  Fixes bitcoin#27749.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 9fe9074
  theStack:
    ACK 9fe9074

Tree-SHA512: f3de1ea68725429aeef448c351ea812b805fa216912b112d7db9aceeddb1f2381b705c2577734b0d308e78ec5e0c4d26dc65fc2171f6e21f13061fc71d48216c

Dash adaptations:
- test/functional/rpc_getblockfrompeer.py: added upstream's sync_blocks([nodes[0], pruned_node]) after connect_nodes(0, 2) and moved the 'We need to generate more blocks to be able to prune' comment below it, as upstream does. Dash's generate(..., 900) and its comment about Dash's smaller blocks stay in place of upstream's generate(..., 400).
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#26649, bitcoin#25284, bitcoin#28470, bitcoin#28473, bitcoin#27784 backport: v0.26 bitcoin#25284, bitcoin#28470, bitcoin#28473, bitcoin#27784 Oct 4, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b063-misc branch from 16a7dd5 to 980ae7a Compare October 4, 2026 01:20
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

Branch rewritten at 980ae7aac8 (4 backport(s)).


🤖 backportsys, on behalf of the Dash backport pipeline.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Potential PR merge conflicts

This is advisory only. It does not block CI, but it marks PRs that will likely need a rebase depending on merge order.

If these PRs merge first

This PR will likely need a rebase:

  • #90: backport: v0.26 bitcoin#25284 Changed files: src/addrdb.cpp, src/addrdb.h, src/addrman.cpp, src/addrman_impl.h, src/evo/deterministicmns.h, src/evo/netinfo.h, src/hash.h, src/index/disktxpos.h, src/llmq/snapshot.h, src/net.cpp, src/net_processing.cpp, src/netaddress.h, and 19 more.

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