Skip to content

dgb: dev-only flag to relax algo softfork readiness gate on isolated testnet (G3b slice-ii (b)) - #514

Merged
frstrtr merged 2 commits into
masterfrom
dgb/dev-relax-algo-softforks-flag
Jun 26, 2026
Merged

dgb: dev-only flag to relax algo softfork readiness gate on isolated testnet (G3b slice-ii (b))#514
frstrtr merged 2 commits into
masterfrom
dgb/dev-relax-algo-softforks-flag

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 26, 2026

Copy link
Copy Markdown
Owner

G3b slice (ii) follow-on (b) — dev-only softfork-gate relaxation

Greenlit by integrator (re: [s=blocked][decision-needed] G3b slice (ii); [s=shipped] #512): the second of the two next-in-sequence items, landed as its own fenced PR, exactly as scoped — an explicit, off-by-default dev flag, not a blanket chain=="test" relaxation, and un-inheritable by any real crossing-soak.

Problem

On the tuned isolated testnet4, NodeRPC::check() refuses to start because the DGB-unique algo deployments (reservealgo, odo) and nversionbips are not yet active/signalled on a young tuned net. #512 fixed the Core-26 getdeploymentinfo parse; this adds a development boot path so the c2pool-dgb sharechain leg can come up to answer slice (ii)'s actual ask (does check() consume the work-weighted vote tally vs a peer-download value).

Design — safety properties

  • dev_relax_algo_softforks: optional config key, off by default and absent from the default config emitted by get_default() — must be added by hand to opt in, so a real crossing-soak cannot silently inherit it.
  • New pure SSOT dgb::coin::compute_required_softforks(base, chain, dev_flag) (softfork_check.hpp):
    • regtest → always drops {reservealgo, odo, nversionbips} (pre-existing behaviour, unchanged).
    • any other non-main chain → drops them only when the flag is set.
    • mainnever relaxed under any flag value (hard floor; un-inheritable).
    • non-relaxable forks (csv/segwit/taproot) always survive.
  • NodeRPC::check() emits a loud, un-suppressable LOG_WARNING whenever the flag actually relaxes the gate on a non-regtest chain: such a node is NOT a valid V36 crossing-soak.

Scope / compat

  • Non-consensus startup-readiness gate only; no consensus-value change. Does not touch share format, sharechain rules, PPLNS, or block submission → p2pool-merged-v36 compatible.
  • Fenced to src/impl/dgb/ (7 files). No shared-base / doge / other-coin edits.

Tests

  • softfork_check_test: +7 KAT cases (15/15 green), pinning the full policy — incl. the real-soak guard (test, flag off ⇒ full set) and the mainnet hard floor (main, flag on ⇒ full set). Target already in the CMake foreach + build.yml allowlist (no build wiring change).
  • Verified dgb object lib + dgb_coin_node_seam_test compile/link clean under -DAUX_DOGE=ON (seam test 3/3).

Holding the G3b PASS claim per integrator — a boot on the relaxed/isolated net is not a crossing-soak PASS; that proof bar is the operator's open ruling. This PR only unblocks the boot-to-verify read.

GPG-signed. No self-merge — integrator merges on operator tap.

frstrtr added a commit that referenced this pull request Jun 26, 2026
…ss gate

#514 added the dev-only m_dev_relax_algo_softforks SSOT + config flag, but
--run skips Config::init() (no YAML load) so nothing ever flipped it: the
flag was unreachable on the run path and dead weight. Add the only argv path
that sets it.

main_dgb.cpp:
- new --dev-relax-algo-softforks marker (OFF by default), parsed beside
  --no-p2p-relay; threaded through run_node as a trailing defaulted bool
- run_node sets config.coin()->m_dev_relax_algo_softforks from the flag right
  after building the Config (mirrors the existing coin-config wiring), so
  NodeRPC::check() sees it in --run
- banner/help documents it as DEV-ONLY

Scope: relaxes ONLY the three algo-softforks (odo/reservealgo/nversibips)
via the existing SSOT; the gate stays FAIL-CLOSED on mainnet (ignored when
chain==main) and does NOT touch taproot (real consensus floor; operator-gated).
No consensus surface — pure plumbing from argv to the existing dev flag.
frstrtr and others added 2 commits June 26, 2026 04:09
…testnet

G3b slice (ii) follow-on (b): add an EXPLICIT, off-by-default
dev_relax_algo_softforks knob so c2pool-dgb can boot against an isolated
tuned testnet4 without the DGB-unique algo deployments (reservealgo/odo)
or nversionbips being active, which a young/tuned net does not yet signal.

This is a development boot-aid, NOT a chain=="test" blanket relaxation:

  * Off by default and ABSENT from the auto-written default config, so a real
    testnet crossing-soak cannot silently inherit it; it must be added by
    hand to opt in.
  * compute_required_softforks() (softfork_check.hpp) is the pure policy
    SSOT: regtest always drops the relaxable algo forks (pre-existing
    behaviour); any other non-main chain drops them ONLY when the flag is
    set; mainnet is NEVER relaxed under any flag value.
  * NodeRPC::check() emits a loud, un-suppressable warning whenever the flag
    actually relaxes the gate on a non-regtest chain: such a node is not a
    valid V36 crossing-soak.

Non-consensus startup readiness gate only; no consensus-value change.
Fenced to src/impl/dgb/. softfork_check_test gains 7 KAT cases
(15/15 green) pinning the relaxation policy, including the real-soak guard
(flag off keeps the full set) and the mainnet hard floor.
…ss gate

#514 added the dev-only m_dev_relax_algo_softforks SSOT + config flag, but
--run skips Config::init() (no YAML load) so nothing ever flipped it: the
flag was unreachable on the run path and dead weight. Add the only argv path
that sets it.

main_dgb.cpp:
- new --dev-relax-algo-softforks marker (OFF by default), parsed beside
  --no-p2p-relay; threaded through run_node as a trailing defaulted bool
- run_node sets config.coin()->m_dev_relax_algo_softforks from the flag right
  after building the Config (mirrors the existing coin-config wiring), so
  NodeRPC::check() sees it in --run
- banner/help documents it as DEV-ONLY

Scope: relaxes ONLY the three algo-softforks (odo/reservealgo/nversibips)
via the existing SSOT; the gate stays FAIL-CLOSED on mainnet (ignored when
chain==main) and does NOT touch taproot (real consensus floor; operator-gated).
No consensus surface — pure plumbing from argv to the existing dev flag.
@frstrtr
frstrtr force-pushed the dgb/dev-relax-algo-softforks-flag branch from 79ea8d8 to 3e1a4d8 Compare June 26, 2026 04:10
@frstrtr
frstrtr merged commit b886efb into master Jun 26, 2026
33 checks passed
frstrtr added a commit that referenced this pull request Jun 26, 2026
… runs the readiness gate

#514 wired the --dev-relax-algo-softforks CLI flag into config.coin()->m_dev_relax_algo_softforks and into dgb::Node's internal m_rpc, but the standalone submit-arm NodeRPC built in run_node (main_dgb.cpp, the one whose check() actually gates --run startup) was constructed without the flag, so it defaulted to false. The flag was reachable but inert: the node still refused to start ("missing required softfork features: nversionbips, odo, reservealgo") on an isolated tuned testnet even with the flag on.

Pass dev_relax_algo_softforks as the 4th arg to that make_unique<NodeRPC>. OFF by default; mainnet stays fail-closed (compute_required_softforks hard-floors chain=="main" regardless of the flag, and the daemon chain field drives the relax decision, not c2pool's testnet bool).

Empirical proof on .42 tuned testnet4 (chain=test, daemon @h123): node boots past the readiness gate, emits the loud DEV-ONLY relax warning, 0 "Refusing to start", run-loop up, StratumServer bound. Pre-existing embedded coin-P2P "prefix doesn't match" (RPC-fallback submit arm) is unrelated and unchanged.
frstrtr added a commit that referenced this pull request Jun 26, 2026
…rm-rpc

dgb: feed --dev-relax-algo-softforks into the submit-arm NodeRPC readiness gate (G3b slice-iii, follow-on to #514)
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