From c1bd096ac8cc831f96cf06ddcf64bb6a3354dba3 Mon Sep 17 00:00:00 2001 From: frstrtr Date: Sat, 20 Jun 2026 21:58:49 +0000 Subject: [PATCH] dgb(#82): make daemon softfork readiness gate regtest-aware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The startup readiness gate (NodeRPC::check) requires the full SSOT SOFTFORKS_REQUIRED set {nversionbips,csv,segwit,reservealgo,odo,taproot}. A regtest digibyted legitimately deploys only csv/segwit/taproot — the DGB-specific algo softforks (reservealgo, odo) and nversionbips are mainnet/testnet deployments not carried on regtest. Gating startup on deployments the connected chain cannot carry made the regtest won-block path (and CI against regtest) impossible to start, with no consensus benefit. Relax ONLY when chain==regtest; mainnet/testnet keep the full SSOT requirement set unchanged. Non-consensus startup readiness gate only; the SOFTFORKS_REQUIRED SSOT and its KAT are untouched. Verified live: armed run-loop against regtest digibyted now clears the gate (CoindRPC connected; no Refusing-to-start retry loop), work source + Stratum stand up, embedded P2P handshake OK. dgb_share_test 16/16. --- src/impl/dgb/coin/rpc.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/impl/dgb/coin/rpc.cpp b/src/impl/dgb/coin/rpc.cpp index e1cbdbdfb..10a59be32 100644 --- a/src/impl/dgb/coin/rpc.cpp +++ b/src/impl/dgb/coin/rpc.cpp @@ -264,8 +264,22 @@ bool NodeRPC::check() } } + // Regtest does not deploy the DGB-specific algo softforks (reservealgo, odo) + // nor nversionbips — those are mainnet/testnet deployments, so a regtest + // digibyted legitimately signals only csv/segwit/taproot. Gating startup on + // deployments the connected chain cannot carry would make the regtest + // won-block path (and CI against regtest) impossible to start, with no + // consensus benefit. Relax ONLY on regtest; mainnet/testnet keep the full + // SSOT requirement set. Non-consensus startup readiness gate only. + std::set required = dgb::PoolConfig::SOFTFORKS_REQUIRED; + if (blockchaininfo.value("chain", std::string{}) == "regtest") + { + for (const char* algo_fork : {"reservealgo", "odo", "nversionbips"}) + required.erase(algo_fork); + } + std::vector missing; - for (const auto& req : dgb::PoolConfig::SOFTFORKS_REQUIRED) + for (const auto& req : required) { if (!softforks_supported.contains(req)) missing.push_back(req);