Skip to content

backport: v0.26 bitcoin#27499 - #84

Closed
DCG-Claude wants to merge 1 commit into
developfrom
backport-0.26-b064-src-node
Closed

DCG-Claude wants to merge 1 commit into
developfrom
backport-0.26-b064-src-node

Conversation

@DCG-Claude

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

Copy link
Copy Markdown
Collaborator

Automated Bitcoin Core v0.26 backports, batch backport-0.26-b064-src-node.

upstream commit gates notes
bitcoin#27499 ba1e068e68 pick:pass build:pass tests:pass mech:warn tree:pass verify:pass This backports bitcoin#27499: a PeerManager::Options struct filled by node::ApplyArgsManOptions replaces PeerManager's g

Failed gates (not included):

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

Copy link
Copy Markdown
Collaborator Author

CI failed at 807c261 on thepastaclaw/dash: Lint / Run linters

The lint failure was a new circular dependency, dbwrapper -> node/database_args -> dbwrapper. It came from the Dash-only adaptation in bitcoin#25862 that made util::MakeDbWrapper call node::ReadDatabaseArgs from dbwrapper.h. I removed the <node/database_args.h> include and now set DBOptions{.force_compact = gArgs.GetBoolArg("-forcecompactdb", false)} directly, so -forcecompactdb still applies to Dash's databases as it did before the backport. lint-circular-dependencies.py now passes locally and a syntax-only compile of dbwrapper.h with MakeDbWrapper succeeds; I did not run a full build. (folded into the bitcoin#25862 commit)


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at 9bc7bd5 on thepastaclaw/dash: linux64_asan-test / Test source

I tried a fix but it failed local gates in bitcoin#28148 (verify: Upstream bitcoin#28148 does not touch the -maxorphantxsize handling. This replaces the std::max(int64_t{0}, *value) line kept from the parent commit with a new overflow clamp, which changes behaviour and is not in upstream or in the commit's declared Dash adaptations.; Added only to support the invented std::clamp change. Upstream adds no includes.; Added only to support the invented std::numeric_). bitcoin#28148 has had its repair lane and is being dropped from this branch.


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#25862, bitcoin#27499, bitcoin#28148 backport: v0.26 bitcoin#25862, bitcoin#27499 Sep 28, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b064-src-node branch from 9bc7bd5 to e796595 Compare September 28, 2026 05:14
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

Branch rewritten at e796595008 (2 backport(s)).


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b064-src-node branch from e796595 to 8b9cea6 Compare October 1, 2026 11:05
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

CI failed at e796595 on thepastaclaw/dash: linux64_asan-test / Test source

The backport's Dash adaptation in node/peerman_args.cpp multiplied -maxorphantxsize by 1000000 in uint32_t, which overflows at startup for -maxorphantxsize=100000 (mempool_package_onemore.py); Dash's old inline code had the same overflow but only ran when an orphan was handled. It now clamps the MB value to [0, UINT32_MAX/1000000] before multiplying, using the std::clamp style upstream uses for -blockreconstructionextratxn, so the value saturates at about 4.29 GB instead of wrapping. (folded into the bitcoin#27499 commit)


🤖 backportsys, on behalf of the Dash backport pipeline.

@github-actions

github-actions Bot commented Oct 6, 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:

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

tracker#3516 closed by a human

…rom gArgs

23c7b51 [net processing] Move -capturemessages to PeerManager::Options (dergoegge)
bd59bda [net processing] Move -blockreconstructionextratxn to PeerManager::Options (dergoegge)
567c4e0 [net processing] Move -maxorphantx to PeerManager::Options (dergoegge)
fa9e6d8 [net processing] Move -txreconciliation to PeerManager::Options (dergoegge)
4cfb7b9 [net processing] Use ignore_incoming_txs from m_opts (dergoegge)
8b87725 [net processing] Introduce PeerManager options (dergoegge)

Pull request description:

  This PR decouples `PeerManager` from our global args manager by introducing `PeerManager::Options`.

ACKs for top commit:
  stickies-v:
    re-ACK 23c7b51
  TheCharlatan:
    ACK 23c7b51

Tree-SHA512: cd807b36ec018010e11935d3539fa7ed5015fdfb531d13a042a65b54ee8533a35a919a6a6c5fa293b5cba76000e9403c64dfd790fb9c649b7838544929b1fee8

Dash adaptations:
- src/net_processing.h: PeerManager::Options has `uint32_t max_orphan_txs_size{DEFAULT_MAX_ORPHAN_TRANSACTIONS_SIZE * 1000000}` instead of upstream's `max_orphan_txs{DEFAULT_MAX_ORPHAN_TRANSACTIONS}`, because Dash limits orphans by total size (-maxorphantxsize, MB), not by count (-maxorphantx). The DEFAULT_MAX_ORPHAN_TRANSACTIONS constant is not added (Dash doesn't have it), and DEFAULT_MAX_ORPHAN_TRANSACTIONS_SIZE is kept
- src/net_processing.h: DEFAULT_TXRECONCILIATION_ENABLE moved here from node/txreconciliation.h as upstream does, placed above Dash's DEFAULT_MAX_ORPHAN_TRANSACTIONS_SIZE
- src/net_processing.h/.cpp: PeerManager::make and the PeerManagerImpl constructor keep all of Dash's extra parameters (dstxman, mn_metaman, mn_sync, sporkman, chainlocks, clhandler, nodeman, dmnman, cj_walletman, isman, llmq_ctx); only the trailing `bool ignore_incoming_txs` becomes `Options opts`, and the m_opts{opts} initializer goes after m_clhandler
- src/net_processing.cpp: the orphan-limit line becomes `m_orphanage.LimitOrphans(m_opts.max_orphan_txs_size)` in place of Dash's inline gArgs -maxorphantxsize*1000000 computation. Dash's ForgetTx() call and comments are kept (upstream's m_txrequest.ForgetTxHash/GetWitnessHash lines are not brought in)
- src/net_processing.cpp: AddToCompactExtraTransactions keeps Dash's GetInstanceHash() (upstream uses GetWitnessHash()); only the gArgs read becomes m_opts.max_extra_txs
- src/net_processing.cpp: upstream's `-#include <common/args.h>` hunk doesn't apply because Dash's net_processing.cpp never included it. util/system.h stays because Dash still uses gArgs there for -pushversion and the devnet name
- src/node/peerman_args.cpp: includes <util/system.h> instead of <common/args.h> (Dash hasn't done the common/args split, bitcoin#27419, and ArgsManager lives in util/system.h); reads -maxorphantxsize and stores clamp(>=0)*1000000 into max_orphan_txs_size, the same value Dash computed inline before; the other three options match upstream
- src/init.cpp: peerman_opts is built and ApplyArgsManOptions is called just before Dash's PeerManager::make, whose Dash arguments are unchanged, with peerman_opts as the last argument. The node/txreconciliation.h include becomes node/peerman_args.h, and Dash's node/sync_manager.h include stays
- src/test/util/setup_common.{h,cpp}: Dash builds peers through its own MakePeerManager(connman, node, banman, ...) helper, so the helper's last parameter changes from `bool ignore_incoming_txs` to `PeerManager::Options opts`. TestingSetup builds peerman_opts with ApplyArgsManOptions(*m_node.args, ...) as upstream does. setup_common.h now includes <net_processing.h> because Options must be a complete type there (node/context.h only forward-declares PeerManager). Upstream's connman line in this hunk is not taken, because Dash creates connman earlier in ChainTestingSetup
- src/test/denialofservice_tests.cpp: the four call sites keep Dash's MakePeerManager helper and pass `{}` instead of `/*ignore_incoming_txs=*/false`, which matches upstream's use of `{}`
- src/test/net_peer_connection_tests.cpp (Dash-only caller, not touched upstream): its MakePeerManager call now passes `{}` for the new Options parameter
@DCG-Claude DCG-Claude changed the title backport: v0.26 bitcoin#25862, bitcoin#27499 backport: v0.26 bitcoin#27499 Oct 15, 2026
@DCG-Claude
DCG-Claude force-pushed the backport-0.26-b064-src-node branch from 8b9cea6 to ba1e068 Compare October 15, 2026 17:58
@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

Branch rewritten at ba1e068e68 (1 backport(s)).


🤖 backportsys, on behalf of the Dash backport pipeline.

@DCG-Claude

Copy link
Copy Markdown
Collaborator Author

folded into backport-0.26-b175-misc: its commits ship there

@DCG-Claude DCG-Claude closed this Oct 15, 2026
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.

2 participants