@@ -101,7 +101,8 @@ void print_banner(const char* argv0, const core::CoinParams& p)
101101 << " [--version] [--help] [--selftest] [--run] [--stratum [H:]P]\n "
102102 << " [--coin-daemon H:P] [--coin-magic HEX] [--regtest]\n "
103103 << " [--regtest-force-won-share] [--no-p2p-relay]\n "
104- << " [--redistribute SPEC] [--sharechain-port P]\n\n "
104+ << " [--redistribute SPEC] [--sharechain-port P]\n "
105+ << " [--dev-relax-algo-softforks]\n\n "
105106 << " Status: pool/sharechain pillars live (Phase B); run-loop up\n "
106107 << " (--run: io_context + sharechain peer + Stratum standup).\n "
107108 << " --stratum [HOST:]PORT binds a miner-facing TCP listener\n "
@@ -112,6 +113,11 @@ void print_banner(const char* argv0, const core::CoinParams& p)
112113 << " --regtest AND --coin-daemon) drives ONE forced won\n "
113114 << " share through the live dual-path broadcaster;\n "
114115 << " --no-p2p-relay isolates the submitblock arm.\n "
116+ << " --dev-relax-algo-softforks (DEV-ONLY; OFF by default)\n "
117+ << " relaxes the algo-softfork readiness gate (odo/reservealgo/\n "
118+ << " nversionbips) so the node can boot against an isolated\n "
119+ << " tuned testnet. NEVER relaxes mainnet (gate stays absolute\n "
120+ << " when chain==main) and does NOT touch taproot.\n "
115121 << " Network: " << network_summary (p) << " \n " ;
116122}
117123
@@ -165,7 +171,8 @@ int run_node(const core::CoinParams& params, bool testnet,
165171 const std::string& rpc_conf_path,
166172 bool regtest = false , bool force_won_share = false ,
167173 bool no_p2p_relay = false ,
168- const std::string& redistribute_spec = " " )
174+ const std::string& redistribute_spec = " " ,
175+ bool dev_relax_algo_softforks = false )
169176{
170177 io::io_context ioc;
171178
@@ -186,6 +193,11 @@ int run_node(const core::CoinParams& params, bool testnet,
186193 dgb::Config config (net_subdir);
187194 config.pool ()->m_prefix = ParseHexBytes (dgb::PoolConfig::DEFAULT_PREFIX_HEX );
188195 config.m_testnet = testnet;
196+ // Wire the dev-only algo-softfork relax from argv into the coin config so
197+ // NodeRPC::check() can see it in --run (Config::init() is skipped above, so
198+ // the YAML path never sets it here). OFF by default; the only flip is the
199+ // explicit --dev-relax-algo-softforks marker. Mainnet stays fail-closed.
200+ config.coin ()->m_dev_relax_algo_softforks = dev_relax_algo_softforks;
189201 // DEFAULT_BOOTSTRAP_HOSTS is empty until DGB p2pool nodes come online, so
190202 // there are no outbound seeds to dial this slice — the node binds its
191203 // listener and waits for inbound sharechain peers.
@@ -1118,6 +1130,12 @@ int main(int argc, char** argv)
11181130 bool regtest = false ; // --regtest (dev/regtest marker; gates the forced seam)
11191131 bool force_won_share = false ; // --regtest-force-won-share (regtest-ONLY won-block live seam)
11201132 bool no_p2p_relay = false ; // --no-p2p-relay (suppress ARM A to isolate ARM B)
1133+ // --dev-relax-algo-softforks (DEV-ONLY, OFF by default): the ONLY argv path
1134+ // that flips CoinConfig::m_dev_relax_algo_softforks. Relaxes the algo-softfork
1135+ // readiness gate for an isolated tuned-testnet boot; NodeRPC::check() keeps it
1136+ // FAIL-CLOSED on mainnet (ignored when chain==main) and it does NOT extend to
1137+ // taproot (a real consensus floor; operator-gated, not relaxed here).
1138+ bool dev_relax_algo_softforks = false ; // --dev-relax-algo-softforks (dev boot aid)
11211139 for (int i = 1 ; i < argc; ++i) {
11221140 if (std::strcmp (argv[i], " --version" ) == 0 ) {
11231141 std::cout << " c2pool-dgb " << C2POOL_VERSION << " \n " ;
@@ -1156,6 +1174,7 @@ int main(int argc, char** argv)
11561174 if (std::strcmp (argv[i], " --regtest-force-won-share" ) == 0 )
11571175 force_won_share = true ; // gated below: regtest-ONLY
11581176 if (std::strcmp (argv[i], " --no-p2p-relay" ) == 0 ) no_p2p_relay = true ;
1177+ if (std::strcmp (argv[i], " --dev-relax-algo-softforks" ) == 0 ) dev_relax_algo_softforks = true ;
11591178 if (std::strcmp (argv[i], " --redistribute" ) == 0 && i + 1 < argc) {
11601179 redistribute_spec = argv[++i]; // pplns|fee|boost|donate or hybrid "boost:70,donate:20"
11611180 }
@@ -1182,7 +1201,7 @@ int main(int argc, char** argv)
11821201 coin_daemon, coin_magic, coin_genesis,
11831202 rpc_endpoint, rpc_conf_path,
11841203 regtest, force_won_share, no_p2p_relay,
1185- redistribute_spec);
1204+ redistribute_spec, dev_relax_algo_softforks );
11861205
11871206 // --selftest, or a bare invocation: drive the live score path so the
11881207 // binary exercises real consensus code, then exit cleanly.
0 commit comments