Skip to content

[nmc 2c] generic aux payout chain_id loop across parent trackers (v37 bucket-2) - #247

Merged
frstrtr merged 1 commit into
masterfrom
nmc/p1-pe-2c-generic-aux-chainid-loop
Jun 20, 2026
Merged

[nmc 2c] generic aux payout chain_id loop across parent trackers (v37 bucket-2)#247
frstrtr merged 1 commit into
masterfrom
nmc/p1-pe-2c-generic-aux-chainid-loop

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 19, 2026

Copy link
Copy Markdown
Owner

NMC P1 PE 2c — generic aux payout chain_id loop (v37 bucket-2 standardization, note #2)

What

Replaces the three hardcoded chain_id = 98 literals in the shared aux-payout diagnostic path of src/impl/{btc,dgb,ltc}/share_tracker.hpp with a single generic kAuxPayoutChains[] enumeration loop, and folds embedded NMC in at cid=1.

Cross-coin justification (EXCEPTIONAL shared-edit rationale — required by per-coin isolation invariant)

This touches three src/impl/<coin>/share_tracker.hpp trees, which is EXCEPTIONAL, not SAFE-ADDITIVE under the per-coin isolation invariant. The written rationale:

  • The aux-payout chain enumeration is a v36-native SHARED STRUCTURE (bucket-2), not an isolation primitive. Standardizing it toward the v37 unified vector<ParentChainInstance> shape is the explicit goal; leaving three divergent hardcoded 98s would force a reconciliation at v37 migration instead of a clean lift.
  • No isolation primitive is touched. Per-coin PREFIX / IDENTIFIER namespaces are unchanged. This is the shared aux STRUCTURE, not a namespace.
  • chain_id is sourced from each backend's own params, never relocated to a shared literal:
    • DOGE: doge::coin::DOGEChainParams::AUXPOW_CHAIN_ID (0x0062) — canonical source unchanged at chain_params.hpp:43
    • NMC : nmc::coin::NMC_AUXPOW_CHAIN_ID (0x0001) — new dependency-free src/impl/nmc/coin/aux_id.hpp SSOT (Namecoin nAuxpowChainId, mainnet+testnet), so parent trackers need not pull the full embedded header_chain.hpp (leveldb/block/transaction) just to read a chain id.
    • The win is deleting the three 98s, not relocating them — no coin-specific literal is reintroduced in any shared path.

Consensus / parity

  • DOGE PPLNS payout-weight path (where this hardcode lived) preserved — same chain_id value (0x0062), now sourced symbolically.
  • Non-aux coins unchanged.

Merge gate

  • Operator-tap class (multi-coin-tree edit) — do NOT auto-merge / self-merge.
  • Requires full gh CI rollup CLEAN (not UNSTABLE) on head SHA + all four coin smokes (ltc/doge/dgb/dash) green.

Tagged: v37 bucket-2 standardization (note #2).

… bucket-2)

Replace the three hardcoded chain_id=98 literals in the shared aux-payout
diagnostic path of btc/dgb/ltc share_tracker.hpp with a single generic
kAuxPayoutChains[] loop. Each chain_id is sourced from its own backend
params, never a relocated shared literal:
  - DOGE: doge::coin::DOGEChainParams::AUXPOW_CHAIN_ID (0x0062)
  - NMC : nmc::coin::NMC_AUXPOW_CHAIN_ID (0x0001), new dependency-free
          aux_id.hpp SSOT so trackers need not pull embedded header_chain.

Standardizes the v36-native aux enumeration toward the v37 unified
vector<ParentChainInstance> shape (bucket-2). Per-coin isolation primitives
(prefix/identifier) untouched; this is the shared aux-payout STRUCTURE, not
a namespace. PPLNS payout-weight path for DOGE preserved; non-aux coins
unchanged. EXCEPTIONAL multi-coin-tree edit -> operator-tap, not auto-merge.
frstrtr added a commit that referenced this pull request Jun 20, 2026
Replace the hand-typed NMC_AUXPOW_CHAIN_ID=1 literal with a runtime
derivation from src/impl/nmc/coin/aux_id.hpp (the #247 SSOT), normalizing
the 0x0001 hex form to decimal for the createauxblock chainid compare.
A scripts-only slice can no longer drift from consensus, and a missing
header now fails the harness loud as a #247-not-in-tree pre-flight.
frstrtr added a commit that referenced this pull request Jun 20, 2026
…nt success) (#253)

The embedded submitauxblock RPC leg has no daemon to RPC and is not a
same-process fallback like BTC submitblock-to-bitcoind, so it cannot
itself broadcast and must not claim success. Return false, mirroring
submit_block() never-silent-drop (#162); the P2P relay via submit_block()
is the one authoritative embedded route. Updates the fallback-leg KAT to
assert false (supersedes integrator note #3 per UID1610) while keeping the
distinct no-cache invariant.

Punch-list item (2) of the 2d broadcaster gate; item (1) host m_block_relay
wiring + #251 won-block un-gate stay queued behind the #247/#251 tap.

Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
@frstrtr
frstrtr merged commit e37e46d into master Jun 20, 2026
18 checks passed
frstrtr added a commit that referenced this pull request Jun 20, 2026
…te P2P won-block from 2d

Per integrator design call (2026-06-20): embedded mode relies SOLELY on P2P
relay for won-block propagation. submit_aux_block() is intentionally inert
in-process (mirrors doge embedded path), so LEG 1 (submitauxblock) is
external-RPC-deployment-only / N/A in the embedded soak -- never driven here.
The dual-path submitblock fallback stays a DEPLOYMENT-level gate, kept explicit.

LEG 2 (P2P primary) is the live embedded won-block route and is UN-GATED from
2d (#247/#253/#254 landed on master 294fb30). The end-to-end assert fires once
the in-loop c2pool embedded regtest process drives node A -- next slice.

Recut off origin/master (294fb30); scripts-only, fenced to scripts/.
frstrtr added a commit that referenced this pull request Jun 20, 2026
…te P2P won-block from 2d

Per integrator design call (2026-06-20): embedded mode relies SOLELY on P2P
relay for won-block propagation. submit_aux_block() is intentionally inert
in-process (mirrors doge embedded path), so LEG 1 (submitauxblock) is
external-RPC-deployment-only / N/A in the embedded soak -- never driven here.
The dual-path submitblock fallback stays a DEPLOYMENT-level gate, kept explicit.

LEG 2 (P2P primary) is the live embedded won-block route and is UN-GATED from
2d (#247/#253/#254 landed on master 294fb30). The end-to-end assert fires once
the in-loop c2pool embedded regtest process drives node A -- next slice.

Recut off origin/master (294fb30); scripts-only, fenced to scripts/.
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