Skip to content

backport: v0.26 bitcoin#28385, bitcoin#28656 - #63

Merged
DCG-Claude merged 2 commits into
developfrom
backport-0.26-b049-misc
Sep 25, 2026
Merged

DCG-Claude merged 2 commits into
developfrom
backport-0.26-b049-misc

Conversation

@DCG-Claude

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

Copy link
Copy Markdown
Collaborator

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

upstream commit gates notes
bitcoin#28385 9871dcc790 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass Backports bitcoin#28385, which rewrites DisconnectedBlockTransactions as a std::list plus unordered_map in kernel/discon
bitcoin#28656 40f3424a08 ci_upstream:pass ci_fork:pass pick:pass build:pass tests:warn mech:warn tree:pass verify:pass Backports bitcoin#28656 so the fuzz test_runner accepts multiple --m_dir arguments and merges inputs from each directory
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.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts, please rebase.

@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28618, bitcoin#28385, partial bitcoin#25284, bitcoin#28473, bitcoin#24505, bitcoin#28597, bitcoin#28656 backport: v0.26 bitcoin#28385, bitcoin#25284, bitcoin#28473, bitcoin#24505, bitcoin#28597, bitcoin#28656 Sep 22, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b049-misc branch from 6e7dd1f to 7dc77e5 Compare September 22, 2026 15:04
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

Branch rewritten at 7dc77e53f2 (6 backport(s)).


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

I have a fix ready, but re-gating the branch fails in bitcoin#25284 (verify: Removal of the legacy CHashVerifier class (upstream commit fa626af 'Remove unused legacy CHashVerifier'). Dash can't drop it yet: src/node/blockstorage.cpp UndoReadFromDisk still uses CHashVerifier, and upstream moved that to HashVerifier/AutoFile in bitcoin#26649 (eeee610). The Dash-only src/evo/snapshot.h also still uses it and will need its own adaptation.), a commit the fix does not touch. That backport is being dropped from the branch and I will apply the fix on the rewritten branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

I have a fix ready, but re-gating the branch fails in bitcoin#25284 (verify: Removal of the CHashVerifier class. Upstream can drop it because bitcoin#26649 had already moved every caller to HashVerifier/AutoFile. Dash never landed bitcoin#26649: src/node/blockstorage.cpp:558 still uses CHashVerifier in UndoReadFromDisk, and Dash-only src/evo/snapshot.h:170/434 uses it too. So the class had to stay, and the HashVerifier class that this PR's addrdb.cpp/addrman.cpp), a commit the fix does not touch. That backport is being dropped from the branch and I will apply the fix on the rewritten branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

I have a fix ready, but re-gating the branch fails in bitcoin#25284 (verify: Upstream commit fa626af ('Remove unused legacy CHashVerifier') deletes the CHashVerifier class. It is dead upstream but still used in Dash: node/blockstorage.cpp:558 (UndoReadFromDisk) and Dash-only evo/snapshot.h:170/434 (SnapshotBoundedInput relies on its GetType()/GetVersion() forwarding). Keeping it is correct, and the rest of bitcoin#25284 doesn't depend on its removal.; bitcoin#25284 does not add t), a commit the fix does not touch. That backport is being dropped from the branch and I will apply the fix on the rewritten branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

I have a fix ready, but re-gating the branch fails in bitcoin#25284 (verify: Removal of the legacy CHashVerifier class. Upstream deletes it here because its remaining users had already moved to HashVerifier/AutoFile in an earlier PR. In Dash, CHashVerifier is still used by src/node/blockstorage.cpp (UndoReadFromDisk, which that earlier PR converts) and by the Dash-only src/evo/snapshot.h, so it cannot be removed yet.; No line of the upstream bitcoin#25284 diff adds HashVe), a commit the fix does not touch. That backport is being dropped from the branch and I will apply the fix on the rewritten branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

I have a fix ready, but re-gating the branch fails in bitcoin#25284 (verify: Upstream commit fa626af ('Remove unused legacy CHashVerifier') deletes the CHashVerifier class. Dash still uses it: node/blockstorage.cpp:558 (UndoReadFromDisk), and Dash-only evo/snapshot.h:170 (SnapshotBoundedInput) and evo/snapshot.h:434, which depend on the GetType()/GetVersion() forwarding that HashVerifier does not have. Keeping the class is correct.; bitcoin#25284 does not add this class; its diff), a commit the fix does not touch. That backport is being dropped from the branch and I will apply the fix on the rewritten branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

I have a fix ready, but re-gating the branch fails in bitcoin#25284 (verify: Removal of the legacy CHashVerifier class (upstream commit fa626af, 'Remove unused legacy CHashVerifier'). Dash keeps it because node/blockstorage.cpp:558 still uses CHashVerifier. That call site is what bitcoin#26649 converts to AutoFile/HashVerifier. Dash-only evo/snapshot.h (SnapshotBoundedInput) will also need its own conversion before the class can go.), a commit the fix does not touch. That backport is being dropped from the branch and I will apply the fix on the rewritten branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

I have a fix ready, but re-gating the branch fails in bitcoin#25284 (verify: Upstream commit fa626af removes the legacy CHashVerifier class. Dash keeps it and the commit message calls this 'not for Dash'. But the class is only still needed because the change that converted its users was never backported: node/blockstorage.cpp:558 (UndoReadFromDisk) still uses CHashVerifier. evo/snapshot.h:170 and :434 also use it, and those are Dash-only. So this is a deferral, ), a commit the fix does not touch. That backport is being dropped from the branch and I will apply the fix on the rewritten branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b049-misc branch from 7dc77e5 to 20b8d98 Compare September 23, 2026 02:41
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 7dc77e5 on thepastaclaw/dash: linux64_multiprocess-build / Build source

The bench file this backport added passed temporary objects to emplace_back, which Dash's clang-tidy modernize-use-emplace check treats as an error. Lines 39-40 now pass the constructor arguments directly (tx.vin.emplace_back(COutPoint{prevout_hash, 0}); tx.vout.emplace_back(CENT, spk);), matching later upstream master. Not built locally because the tree isn't configured yet. (folded into the bitcoin#28385 commit)


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28385, bitcoin#25284, bitcoin#28473, bitcoin#24505, bitcoin#28597, bitcoin#28656 backport: v0.26 bitcoin#28385, bitcoin#24505, bitcoin#28597, bitcoin#28656 Sep 23, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b049-misc branch from 20b8d98 to 65a889c Compare September 23, 2026 06:15
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

Branch rewritten at 65a889c073 (4 backport(s)).


🤖 backportsys, on behalf of the Dash backport pipeline.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts, please rebase.

@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b049-misc branch from 65a889c to e4b82ec Compare September 24, 2026 16:24
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28385, bitcoin#24505, bitcoin#28597, bitcoin#28656 backport: v0.26 bitcoin#28385, bitcoin#28656 Sep 24, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b049-misc branch from e4b82ec to 40f3424 Compare September 24, 2026 21:41
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28385, bitcoin#28656 backport: v0.26 bitcoin#28385, bitcoin#28656, bitcoin#24505, bitcoin#27869 Sep 25, 2026
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#28385, bitcoin#28656, bitcoin#24505, bitcoin#27869 backport: v0.26 bitcoin#28385, bitcoin#28656 Sep 25, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b049-misc branch from 3325156 to 40f3424 Compare September 25, 2026 01:18
… to not use boost

4313c77 make DisconnectedBlockTransactions responsible for its own memory management (glozow)
cf5f1fa MOVEONLY: DisconnectedBlockTransactions to its own file (glozow)
2765d6f rewrite DisconnectedBlockTransactions as a list + map (glozow)
79ce9f0 add std::list to memusage (glozow)
59a35a7 [bench] DisconnectedBlockTransactions (glozow)
925bb72 [refactor] batch-add transactions to DisconnectedBlockTransactions (glozow)

Pull request description:

  Motivation
  - I think it's preferable to use stdlib data structures instead of depending on boost if we can achieve the same thing.
  - Also see bitcoin#28335 for further context/motivation. This PR simplifies that one.

  Things done in this PR:
  - Add a bench for `DisconnectedBlockTransactions` where we reorg and the new chain has {100%, 90%, 10%} of the same transactions. AFAIU in practice, it's usually close to 100%.
  - Rewrite `DisconnectedBlockTransactions` as a `std::list` + `unordered_map` instead of a boost multi index container.
    - On my machine, the bench suggests the performance is very similar.
  - Move `DisconnectedBlockTransactions` from txmempool.h to its own kernel/disconnected_transactions.h. This struct isn't used by txmempool and doesn't have much to do with txmempool. My guess is that it's been living there for convenience since the boost includes are there.

ACKs for top commit:
  ismaelsadeeq:
    Tested ACK 4313c77
  stickies-v:
    ACK 4313c77
  TheCharlatan:
    ACK 4313c77

Tree-SHA512: 273c80866bf3acd39b2a039dc082b7719d2d82e0940e1eb6c402f1c0992e997256722b85c7e310c9811238a770cfbdeb122ea4babbc23835d17128f214a1ef9e

Dash adaptations:
- src/Makefile.am: added only `kernel/disconnected_transactions.h`; upstream's neighbouring `kernel/cs_main.h` context line does not exist in Dash's BITCOIN_CORE_H list.
- src/test/validation_chainstatemanager_tests.cpp: added `#include <kernel/disconnected_transactions.h>` in alphabetical position among Dash's evo/llmq/node includes; upstream's `node/kernel_notifications.h` context line is not present in Dash and was not introduced.
- src/test/validation_chainstatemanager_tests.cpp: also converted the Dash-only second call site in `chainstatemanager_evodb_snapshot_only_flush_restart` (`DisconnectedBlockTransactions unused_pool{MAX_DISCONNECTED_TX_POOL_SIZE * 1000}`), which upstream has no equivalent of.
- src/validation.cpp: added only `#include <kernel/disconnected_transactions.h>`; upstream's adjacent `kernel/chainparams.h` context line is not part of Dash's include block.
- src/validation.cpp: in MaybeUpdateMempoolForReorg kept Dash's `m_mempool->exists((*it)->GetHash())` instead of upstream's `exists(GenTxid::Txid(...))` — Dash's CTxMemPool::exists has no GenTxid overload at this commit.
- src/validation.cpp: updated the Dash-only ChainLocks call site `Chainstate::MarkConflictingBlock` to construct `DisconnectedBlockTransactions disconnectpool{MAX_DISCONNECTED_TX_POOL_SIZE * 1000}`, matching the new mandatory-argument constructor; upstream never touched this function.
- src/validation.h: dropped upstream's duplicate `struct PrecomputedTransactionData;` line — Dash already forward-declares it a few lines above; only the `struct`→`class DisconnectedBlockTransactions` change was taken.

Replayed onto a newer base.

Dash adaptations:
- src/Makefile.am: kept Dash develop's newer `kernel/cs_main.h` entry alongside the added `kernel/disconnected_transactions.h`; upstream's context had no cs_main.h line, which is what produced the conflict
- src/Makefile.bench.include: Dash's bench target is `bench_bench_dash_SOURCES` (not `bench_bench_bitcoin_SOURCES`) and the neighbouring entries differ (Dash has `bench/ecdsa.cpp`); the new `bench/disconnected_transactions.cpp` entry is placed in the same alphabetical slot
- src/validation.cpp: Dash-only `Chainstate::MarkConflictingBlock` also constructs a `DisconnectedBlockTransactions`; updated to the new `{MAX_DISCONNECTED_TX_POOL_SIZE * 1000}` constructor even though upstream never touched that call site
- src/validation.cpp: `m_mempool->exists((*it)->GetHash())` kept as-is rather than upstream's `exists(GenTxid::Txid(...))` — Dash's CTxMemPool::exists still takes a bare uint256
- src/test/validation_chainstatemanager_tests.cpp: Dash-only test `chainstatemanager_evodb_snapshot_only_flush_restart` has a second `unused_pool`; both occurrences updated to the new constructor
faa5e06 fuzz: Allow multiple --m_dir args (MarcoFalke)

Pull request description:

  This allows to merge the result from several servers (or just several folders) at the same time, instead of having to iterate over them.

  This should also allow the fuzz engine (libFuzzer) to optimize the final merge result more, because all fuzz inputs from all folders are available at the same time.

ACKs for top commit:
  dergoegge:
    tACK faa5e06

Tree-SHA512: bf0da418b1f7b8a8af16bb7cc1e148b1ccd0f17062ce70758d1ca5b35c3eee77c0c30377d376befdd55480adfd1f1a1073cfc47118e7a710e6760e020abe24bb

Dash adaptations:
- test/fuzz/test_runner.py: merge_inputs() keeps Dash's `fuzz_bin=fuzz_bin` parameter (signature + call site) instead of upstream's `build_dir=config["environment"]["BUILDDIR"]`; Dash has not backported the build_dir/fuzz_bin refactor (bitcoin#28314), and that line is unchanged context in the upstream diff, so only the merge_dir->merge_dirs part of those lines was taken
@DCG-Claude
DCG-Claude merged commit 15236ca into develop Sep 25, 2026
65 checks passed
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

merged as dashpay#7735

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