Skip to content

dash: opt-out for the v24 provider special txs (types 10-12) and v3 ProTx payloads in embedded templates - #2352

Merged
frstrtr merged 5 commits into
masterfrom
dash/v24-provider-optout
Nov 28, 2026
Merged

frstrtr merged 5 commits into
masterfrom
dash/v24-provider-optout

Conversation

@frstrtr

@frstrtr frstrtr commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

dash: opt-out for the v24 provider special txs (types 10-12) and v3 (ExtAddr) ProTx payloads in embedded templates

What it does

New flag --embedded-include-v24-provider-txs[=false], default ON.

Several kinds of provider tx are valid only once Dash Core v24 (DEPLOYMENT_V24) is ACTIVE. Today they ride the same lever as provider types 1-4 (--embedded-include-mn-special-txs) and enter embedded templates automatically at activation:

  • the shared-masternode types ProDisTx (10), ProUpShareTx (11) and ProUpSharedRegTx (12);
  • every ProTx payload of types 1-4 in version 3 (ExtAddr). That covers ProRegTx (shared registrations included, since they are version 3), ProUpServTx, ProUpRegTx and ProUpRevTx.

ProTx version 3 is itself gated on v24 in Dash Core v24.0.3:

  • src/evo/specialtxman.cpp:1180: if (opt_ptx->nVersion > ProTxVersion::GetMax(is_v19_active, is_v24_active)) gives bad-protx-version.
  • src/evo/types.h:23-34: GetMax returns ExtAddr (3) only when is_extended_addr, that is, with v24 active.
  • Our port of GetMax is max_version in src/impl/dash/coin/protx_check.hpp:369-373.

This change gives an operator a separate switch for all of them:

  • ON (default): unchanged. With the superset armed and v24 active, these txs are selected and folded exactly as on master; the template is byte-identical for the same inputs.
  • OFF (--embedded-include-v24-provider-txs=false): with the superset armed and v24 active, types 10-12 are never selected. A type 1-4 tx is selected only if its payload parses with ProTx version 1 or 2; anything else is held. That covers version 3, and it fails closed: a payload that does not parse is held too. Version 1/2 ProTx always parse, so no valid tx is lost. MNHF signals (type 7) still ride. Before v24 activation the flag changes nothing: none of these are valid before v24.

Format marker (src/impl/dash/coin/mempool.hpp):

  • protx_payload_version(tx) (line 99) gives the parsed ProTx version of a type 1-4 tx, using parse_protx_payload for CProRegTx, CProUpServTx, CProUpRegTx or CProUpRevTx. It gives nullopt when the payload does not parse.
  • is_legacy_format_protx(tx) (line 118, test at line 121) is true when that version exists and is at most ProTxVersion::BASIC_BLS (2).
  • is_v24_opt_out_protx(tx) (line 132) is true for a type 1-4 tx that is not legacy. That is version 3, shared registrations included, and any payload that does not parse.

Where it is used:

  • selection: mempool.hpp:3124;
  • the shared-collateral template guard: mempool.hpp:3170;
  • the builder sets the hold at src/impl/dash/coin/embedded_gbt.hpp:934;
  • the emit gate: src/impl/dash/coin/node_coin_state.hpp:1963.

Can an unparseable ProTx reach selection today? Yes. Mempool admission does not parse provider payloads: provider_admission_conflict_locked returns no conflict for a payload that does not parse (mempool.hpp:1455, "the Core checks refuse it later"). Admission's contextual check only reads the version and type. The builder's MN-list fold then refuses it (bad-protx-payload, ON or OFF), so it never reached a served template. The selection-level hold is therefore a safeguard on top of the fold, kept because it fails closed.

How our Dash Core check treats these payloads today (protx_check.hpp):

  • Types 1-3: a version-3 payload is routed to its own v3 path before codec_version_refusal: proreg_v3_refusal, or provider_payload_refusal for ProUpServTx and ProUpRegTx.
  • Type 4: ProUpRevTx is checked inline, version 3 included.
  • Under v24: all are checked in full, and a valid one reaches selection and rides. The real testnet v3 ProUpServTx and ProUpRevTx fold KATs already show this.
  • Before v24: every version-3 payload is refused with bad-protx-version (max_version = BASIC_BLS).

So under v24 the hold is a real change in what OFF serves, not only a second safeguard.

The OFF form is one exact, greppable token: --embedded-include-v24-provider-txs=false.

  • Any other spelling (=0, =off, =no, =true, =FALSE, an empty value, a typo of the flag name) is an unknown argument: the node prints unknown argument: ... and exits 1. It never falls back to ON silently.
  • A settings-file entry embedded.include_v24_provider_txs is applied too, and the command line wins. There, only an explicit true keeps them on; any other value turns them off.

How

  • embedded_gbt.hpp:
    • build_embedded_workdata takes include_v24_provider_txs as a new trailing parameter, default true, so every existing caller is unchanged.
    • In the per-type selection mask, allow_v24_provider is allow_mn_types && v24_active && include_v24_provider_txs, and hold_non_legacy_protx is v24_active && !include_v24_provider_txs.
  • mempool.hpp:
    • When hold_non_legacy_protx is set, a tx matching is_v24_opt_out_protx is refused as a package member. Its whole package goes with it, so an in-pool child spending one of its outputs never rides either.
    • The shared-collateral template guard honours the same hold.
    • Only a mask the builder builds under v24 with the opt-out set carries the hold, so every other mask selects as before.
  • A pooled ProDisTx with the flag OFF:
    • It is left out at selection: the mask refuses type 10, and the shared-collateral input guard refuses its input. Its package goes with it.
    • It never reaches the MN-collateral filter, so the v24_dissolve exemption is never taken and nothing lands in the excluded-collateral list (the GBT-xcheck label aid).
    • The shared masternode stays in the committed list; the committed merkleRootMNList is the fold of the body actually served.
  • work_source.hpp, node_coin_state.hpp:
    • EmbeddedWorkInputs::include_v24_provider_txs and NodeCoinState::set_include_v24_provider_txs carry the flag to the builder.
    • While it is OFF, the emit gate refuses any body that carries a type 10-12 tx or a type 1-4 tx that is not a parsed version 1/2 ProTx (emit-v24-provider-tx-opted-out). The value is type=10|11|12, type=N-v3-protx for a parsed version 3, or type=N-unparsed-protx for a payload that does not parse. In that mode it also no longer exempts a ProDisTx from the collateral-spend check.
  • main_dash.cpp: option parsing, --help line, run_node wiring, settings-file overlay, and the startup line. The superset line now ends with v24-provider-txs=on|off:
    • ... ; v24-provider-txs=on (types 10-12 ProDisTx/ProUpShareTx/ProUpSharedRegTx and v3 (ExtAddr) ProTx payloads, including shared registrations, ride from Dash Core v24 activation; opt out: --embedded-include-v24-provider-txs=false)
    • ... ; v24-provider-txs=off (--embedded-include-v24-provider-txs=false: types 10-12 and v3 (ExtAddr) ProTx payloads, including shared registrations, never selected; v1/v2 ProTx still ride)
    • ... ; v24-provider-txs=off (the superset is off)
  • param_catalog.inc: embedded.include_v24_provider_txs (TRISTATE_BOOL, RESTART, alias --embedded-include-v24-provider-txs, FLAG_OPT_EQFALSE), help text "types 10-12 and v3 (ExtAddr) ProTx payloads, including shared registrations". ci/check_param_catalog.py passes.
  • README: flag table row.

Mempool admission is unchanged: these txs are still admitted and kept in the pool under v24 rules; only template selection is affected.

KATs

In test/test_dash_v24_alltx.cpp (target test_dash_govvote_bls, the BLS-backend target):

KAT What it proves
DashV24AllTx.V24ProviderOptOutLeavesOutTypes10To12AndKeepsTypes1To4 OFF, v24 active, superset on: the template excludes exactly the type 10, 11 and 12 txs and still carries the v2 type 2+3 txs (one pool) or the v2 type 4 tx (second pool). The fees of the three leave the coinbase value, nothing is recorded as an excluded collateral spend, and the committed root equals the block-connect root of the served body (S stays listed).
DashV24AllTx.V24ProviderOptInDefaultIsTheTemplateBeforeTheFlag ON: the default call and the explicit true call give the same template field by field. The assertions of BuilderCarriesSharedTypesAtV24AndCommitsTheBlockConnectRoot hold: all three shared types ride, CbTx v4, block-connect root, S removed by the dissolution. The work source forwards the flag unchanged.
DashV24AllTx.V24ProviderOptOutChangesNothingBeforeActivation Before v24, OFF, ON and default give the same template; types 10-12 do not ride, types 2-4 do; CbTx v3.
DashV24AllTx.V24ProviderOptOutHoldsEveryV3ProTxInSelection Each tx alone in its own pool, selected with the builder's v24 mask. Version 3 is selected ON and held OFF: real testnet type 1 (unshared and a shared registration), type 2 (a Regular and an EvoNode) and type 4; synthetic type 2, 3 and 4. Version 1/2 is selected either way: real mainnet type 1, synthetic types 2, 3 and 4. The format marker matches exactly the version-3 cases.
DashV24AllTx.V24ProviderOptOutHoldsV3ProTxTypes2To4InTheTemplate Synthetic version-3 types 2, 3 and 4 through the full builder. Each rides ON and the default equals ON. Each is held OFF, and the OFF template equals that of a pool that never held it. Before v24 none rides and OFF equals ON.
DashV24AllTx.V24ProviderOptOutHoldsAnUnparsedProTxPayload Fail closed. Types 1, 2, 3 and 4 each get four payloads that do not parse: a valid v2 payload truncated to half, the same with one trailing byte, the same relabelled version 4, and four garbage bytes. Each is fed straight to selection and to the builder; admission takes it. Selection picks it ON, as before, and holds it OFF. In the builder it never rides: ON equals the default and the template of a pool without it, because the fold refuses it. OFF also equals the template of a pool without it, and before v24 OFF equals ON.
DashV24AllTx.V24ProviderOptOutHoldsASharedRegistrationAndKeepsALegacyProRegTx OFF, v24 active: the real testnet shared registration is held together with a child spending its change output, and the template equals that of a pool that never held them. A real mainnet legacy (version 2) ProRegTx still rides with the template unchanged. The marker matches only the first. Before v24, OFF equals ON.
DashV24AllTx.V24ProviderOptInKeepsASharedRegistrationAsBefore ON: the default call and the explicit true call give the same template. The assertions of BuilderCarriesARealSharedRegistrationOnlyAtV24 hold. The legacy ProRegTx gives the same template either way, before and after v24.
DashV24AllTx.V24ProviderOptOutEmitGateRefusesTypes10To12 NodeCoinState hands the flag to the builder inputs. With it OFF, the emit gate refuses a body carrying a type 10, 11 or 12 tx, any of the version-3 ProTx above (type=N-v3-protx), or any of the unparsed payloads (type=N-unparsed-protx). It does not apply the opt-out to the version 1/2 ones. Back ON, the same ProDisTx body passes.
DashV24AllTx.V24ProviderOptOutCatalogRowAndOffToken The catalog row and alias exist with the right type; the settings scanner reads =false as false and the bare flag as true; main_dash parses exactly these spellings into the default-ON local and the unknown-argument exit stays in place.

Synthetic fixtures (well-formed payloads, signed with test keys, checked in full by our Dash Core port): v3 ProUpServTx, ProUpRegTx and ProUpRevTx of the test world's regular masternode, plus the v2 ProUpServTx, ProUpRegTx and ProUpRevTx. Real fixtures: testnet v3 ProRegTx (unshared and shared), testnet v3 ProUpServTx (Regular a356adb8, EvoNode 763ca29f), testnet v3 ProUpRevTx (EvoNode 044d20aa), mainnet v2 ProRegTx. No real version-3 ProUpRegTx is in the fixtures, so type 3 v3 is synthetic only.

All ten pass (3 repeats). Each mutant below turns the named KATs RED, and the clean tree is green again after the mutants. KAT names are shortened: the DashV24AllTx.V24Provider prefix is dropped.

Mutant RED
selection mask ignores the flag OptOutLeavesOutTypes10To12AndKeepsTypes1To4, OptInDefaultIsTheTemplateBeforeTheFlag
only the ProDisTx exemption honours the flag (11/12 still selected) OptOutLeavesOutTypes10To12AndKeepsTypes1To4, OptInDefaultIsTheTemplateBeforeTheFlag
builder default flipped to OFF OptInDefaultIsTheTemplateBeforeTheFlag, OptInKeepsASharedRegistrationAsBefore, OptOutHoldsV3ProTxTypes2To4InTheTemplate, OptOutEmitGateRefusesTypes10To12; also the existing BuilderCarriesARealSharedRegistrationOnlyAtV24, BuilderCarriesSharedTypesAtV24AndCommitsTheBlockConnectRoot, BuilderLeavesOutAnInvalidOrDuplicateDissolution, EmitGateFoldsAProDisTxInsteadOfRefusingItsCollateralSpend, P2FoldMemoServesTheFoldedRootForAListChangingProviderTx
work source does not forward the flag OptInDefaultIsTheTemplateBeforeTheFlag
NodeCoinState does not forward the flag OptOutEmitGateRefusesTypes10To12
emit-gate opt-out check removed OptOutEmitGateRefusesTypes10To12
the flag also masks types 1-4 OptOutLeavesOutTypes10To12AndKeepsTypes1To4, OptOutChangesNothingBeforeActivation, OptOutHoldsASharedRegistrationAndKeepsALegacyProRegTx
main_dash parses =false as ON OptOutCatalogRowAndOffToken
catalog row typed BOOL instead of TRISTATE_BOOL OptOutCatalogRowAndOffToken
the builder never sets the hold OptOutHoldsV3ProTxTypes2To4InTheTemplate, OptOutHoldsASharedRegistrationAndKeepsALegacyProRegTx
the hold set with the flag ON too OptInKeepsASharedRegistrationAsBefore, OptOutHoldsV3ProTxTypes2To4InTheTemplate, OptOutHoldsASharedRegistrationAndKeepsALegacyProRegTx; also the existing BuilderCarriesARealSharedRegistrationOnlyAtV24
the emit gate's v3 check removed OptOutEmitGateRefusesTypes10To12
the selection check removed (the shared-collateral guard alone left) OptOutHoldsEveryV3ProTxInSelection, OptOutHoldsV3ProTxTypes2To4InTheTemplate, OptOutHoldsAnUnparsedProTxPayload
the selection check and the guard's hold both removed the three above, plus OptOutHoldsASharedRegistrationAndKeepsALegacyProRegTx
the legacy test ignores the version (a parsed version 3 counts as legacy) OptOutHoldsEveryV3ProTxInSelection, OptOutHoldsV3ProTxTypes2To4InTheTemplate, OptOutHoldsASharedRegistrationAndKeepsALegacyProRegTx, OptOutEmitGateRefusesTypes10To12
the hold keyed on IsShared() only OptOutHoldsEveryV3ProTxInSelection, OptOutHoldsV3ProTxTypes2To4InTheTemplate, OptOutHoldsAnUnparsedProTxPayload, OptOutEmitGateRefusesTypes10To12
the hold misses types 2, 3 and 4 (type 1 only) OptOutHoldsEveryV3ProTxInSelection, OptOutHoldsV3ProTxTypes2To4InTheTemplate, OptOutHoldsAnUnparsedProTxPayload, OptOutEmitGateRefusesTypes10To12
a payload that does not parse rides (the earlier fail-open rule) OptOutHoldsAnUnparsedProTxPayload, OptOutEmitGateRefusesTypes10To12

Removing only the selection check leaves the shared-registration KAT green: the shared-collateral guard also holds a valid shared registration. Every other version-3 payload and every unparsed payload, though, depends on the selection check.

Suites (Release, BLS backend on):

Suite Result
test_dash_govvote_bls 90/90
test_dash_embedded_gbt 375/375
test_dash_mempool 236/236
test_dash_node 197 passed (1 environment skip, as on master)
test_dash_work_source 98/98
test_dash_bestcl_gate 11/11
core_test 867 passed (2 environment skips, as on master)

ci/check_param_catalog.py passes. No new compiler warnings.

The built binary:

  • --embedded-include-v24-provider-txs=false --dump-resolved-config prints embedded.include_v24_provider_txs=false source=cli.
  • The bare flag prints =true source=cli.
  • =0, =off, =no, =FALSE, =False, =true, =1, =garbage, = and a misspelt flag name each exit 1 with unknown argument: ....
  • --help lists the flag with "types 10-12 and v3 (ExtAddr) ProTx payloads, including shared registrations".

Flip criterion (proposal)

Proposed condition for turning these txs back ON on a node that runs with --embedded-include-v24-provider-txs=false. It is measured on a node that keeps them ON and checks its templates against dashd. The counted txs are types 10-12 and version-3 (ExtAddr) ProTx payloads of types 1-4, shared registrations included.

  • N = 20 accepted dashd proposal checks (getblocktemplate with mode=proposal) of our templates that contain at least one counted tx;
  • at least 5 distinct counted txids across those accepted proposals;
  • spanning at least 24 h after ACTIVE;
  • at least 2 of those txids later mined in a network block;
  • 0 rejected proposals that contain a counted tx.

The flip card lists explicitly any kind not yet seen in an accepted proposal, so the flip is made knowing which kinds are still unobserved. The kinds are type 10, 11 and 12, a shared registration, and v3 types 1 (unshared), 2, 3 and 4.

…ded templates

New flag --embedded-include-v24-provider-txs[=false], default ON (the
template is unchanged). With the special-tx superset armed
(--embedded-include-mn-special-txs) and Dash Core v24 active, =false keeps
ProDisTx, ProUpShareTx and ProUpSharedRegTx (types 10-12) out of template
selection, while provider types 1-4 and MNHF signals still ride.

- embedded_gbt.hpp: build_embedded_workdata takes include_v24_provider_txs
  (trailing, default true); allow_v24_provider in the selection mask is
  false when it is off, so selection refuses types 10-12 and the
  shared-collateral input of a ProDisTx, and the ProDisTx collateral-spend
  exemption is never taken. A pooled ProDisTx is left out with its in-pool
  descendants; the committed merkleRootMNList is the fold of the body served.
- work_source.hpp / node_coin_state.hpp: EmbeddedWorkInputs and
  NodeCoinState carry the flag (set_include_v24_provider_txs) to the builder.
  The emit gate refuses a body carrying a type 10-12 tx while it is off
  (emit-v24-provider-tx-opted-out), and no longer exempts a ProDisTx from
  the collateral-spend check.
- main_dash.cpp: parses --embedded-include-v24-provider-txs and
  --embedded-include-v24-provider-txs=false (any other spelling is an
  unknown argument and the node exits 1), applies a settings-file value
  (only an explicit true keeps 10-12 on), and the startup line states
  v24-provider-txs=on|off.
- param_catalog.inc: embedded.include_v24_provider_txs (TRISTATE_BOOL,
  RESTART, FLAG_OPT_EQFALSE). README flag table row.

KATs in test_dash_v24_alltx.cpp (test_dash_govvote_bls):
V24ProviderOptOutLeavesOutTypes10To12AndKeepsTypes1To4,
V24ProviderOptInDefaultIsTheTemplateBeforeTheFlag,
V24ProviderOptOutChangesNothingBeforeActivation,
V24ProviderOptOutKeepsAType1SharedRegistration,
V24ProviderOptOutEmitGateRefusesTypes10To12,
V24ProviderOptOutCatalogRowAndOffToken.
With --embedded-include-v24-provider-txs=false and Dash Core v24 active,
a type-1 ProRegTx in the v24 shared-registration format is now held from
the template together with types 10-12. Every other type 1-4 tx, including
legacy-format ProRegTx, rides as before. With the flag ON (the default),
and before v24 activation, the template is unchanged.

- mempool.hpp: is_v24_shared_registration(tx), the format marker: a type-1
  payload that decodes as CProRegTx with ProTx version >= EXT_ADDR and a
  non-empty share table (CProRegTx::IsShared, vendor/providertx.hpp). The
  selection mask gains hold_v24_shared_registration (default false); when
  set, such a tx is refused as a package member, so its package and any
  in-pool child are left out. The shared-collateral template guard honours
  the same hold.
- embedded_gbt.hpp: hold_v24_shared_registration = v24_active &&
  !include_v24_provider_txs.
- node_coin_state.hpp: the emit gate refuses a body carrying a v24 shared
  registration while the opt-out is set (emit-v24-provider-tx-opted-out,
  value type=1-shared-registration).
- main_dash.cpp --help line and startup line, param_catalog.inc help text
  and the README flag row now say "types 10-12 and v24 shared
  registrations".

KATs in test_dash_v24_alltx.cpp:
V24ProviderOptOutHoldsASharedRegistrationAndKeepsALegacyProRegTx (replaces
V24ProviderOptOutKeepsAType1SharedRegistration) and
V24ProviderOptInKeepsASharedRegistrationAsBefore; the emit-gate KAT also
covers the shared registration.
@frstrtr frstrtr changed the title dash: opt-out for the v24 provider special txs (types 10-12) in embedded templates dash: opt-out for the v24 provider special txs (types 10-12) and v24 shared registrations in embedded templates Nov 27, 2026
ProTx version 3 (ExtAddr) is itself valid only once Dash Core v24 is
active: Core refuses nVersion above ProTxVersion::GetMax as
bad-protx-version, and GetMax is ExtAddr only with v24 active (our port:
protx_check.hpp max_version). With --embedded-include-v24-provider-txs=false
and v24 active, every type 1-4 tx whose payload parses with version >= 3
(ProRegTx, ProUpServTx, ProUpRegTx, ProUpRevTx; shared registrations are
version 3) is now held from the template together with types 10-12.
Version 1/2 ProTx ride as before. With the flag ON, and before v24
activation, the template is unchanged.

- mempool.hpp: is_v24_format_protx(tx) replaces is_v24_shared_registration:
  types 1-4 whose payload parses (parse_protx_payload) with nVersion >=
  ProTxVersion::EXT_ADDR; a payload that does not parse is not a match. The
  mask field becomes hold_v24_format_protx; the selection check and the
  shared-collateral guard use it.
- embedded_gbt.hpp: hold_v24_format_protx = v24_active &&
  !include_v24_provider_txs.
- node_coin_state.hpp: the emit gate refuses such a body with
  emit-v24-provider-tx-opted-out, value type=N-v3-protx.
- main_dash.cpp --help line and startup line, param_catalog.inc help text
  and the README flag row now say "types 10-12 and v3 (ExtAddr) ProTx
  payloads, including shared registrations".

KATs in test_dash_v24_alltx.cpp: V24ProviderOptOutHoldsEveryV3ProTxInSelection
(real testnet v3 types 1, 2 and 4, synthetic v3 types 2, 3 and 4, v1/v2 types
1-4 selected either way), V24ProviderOptOutHoldsV3ProTxTypes2To4InTheTemplate
(synthetic v3 types 2-4 through the builder, ON byte-identical, pre-v24 OFF =
ON); the emit-gate KAT covers every v3 type and the v2 ones.
@frstrtr frstrtr changed the title dash: opt-out for the v24 provider special txs (types 10-12) and v24 shared registrations in embedded templates dash: opt-out for the v24 provider special txs (types 10-12) and v3 ProTx payloads in embedded templates Nov 27, 2026
…oes not parse

With --embedded-include-v24-provider-txs=false and Dash Core v24 active, a
type 1-4 tx is now held from the template unless its payload parses with
ProTx version 1 or 2. Until now a payload that did not parse counted as
"not version 3" and was selected (the builder's fold then refused it with
bad-protx-payload). Version 1/2 payloads always parse, so no valid tx is
lost. With the flag ON, and before v24 activation, the template is
unchanged.

- mempool.hpp: protx_payload_version(tx) (the parsed ProTx version of a
  type 1-4 tx, or nullopt), is_legacy_format_protx(tx) (parses, version <=
  BASIC_BLS) and is_v24_opt_out_protx(tx) (type 1-4 and not legacy) replace
  is_v24_format_protx. The mask field becomes hold_non_legacy_protx; the
  selection check and the shared-collateral guard use it.
- embedded_gbt.hpp: hold_non_legacy_protx = v24_active &&
  !include_v24_provider_txs.
- node_coin_state.hpp: the emit gate refuses such a body with
  emit-v24-provider-tx-opted-out, value type=N-v3-protx for a parsed
  version-3 payload and type=N-unparsed-protx for one that does not parse.

Mempool admission does not parse provider payloads (an unparsed one is left
to the Dash Core checks), so such a tx can reach selection.

KAT in test_dash_v24_alltx.cpp: V24ProviderOptOutHoldsAnUnparsedProTxPayload
(truncated, trailing-byte, version-4 and garbage payloads of types 1-4, fed
to selection and the builder: held OFF, unchanged ON, pre-v24 OFF = ON); the
emit-gate KAT covers the unparsed values.
frstrtr added a commit that referenced this pull request Nov 28, 2026
… read budget (#2357)

Test only: src/impl/ltc/test/merged_aux_hardening_test.cpp.

- After mining.subscribe or mining.authorize, the session tests read the socket for a fixed budget (2 x 50 ms receive timeouts after a 0.5 s build poll). Under ASan on a loaded runner the job notify can arrive later, and `MergedAuxStratumSession.AJobBuiltBeforeTheLoginKeepsItsSplitThroughTheAuthorize` saw an empty job id after subscribe (two consecutive linux-asan runs of #2352, 1 of 6932).
- `LineClient::wait_new_job(prev)` reads until a mining.notify sets a job id other than `prev`, up to 10 s. It is used at the four subscribe sites that assert a job and at that test's authorize site.

vm905, ASan+UBSan share_test: `MergedAuxStratumSession.*` x20 serial and 8 parallel copies x10 under load, all PASSED.
@frstrtr
frstrtr merged commit 4022e9b into master Nov 28, 2026
40 checks passed
frstrtr added a commit that referenced this pull request Nov 28, 2026
master brings #2353 (one scrypt per DGB submit: the vardiff gate's digest
reused by mining_submit for byte-equal headers), #2361, #2357, #2352 and
#2363. work_source.cpp keeps both sides; its include block takes both
<atomic> and <cctype>.
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