From bd4a150cf34ea32db484b94251ea0622bbe54bab Mon Sep 17 00:00:00 2001 From: frstrtr Date: Sat, 20 Jun 2026 14:11:27 +0000 Subject: [PATCH] dgb: pin oracle SOFTFORKS_REQUIRED set (DGB-distinctive reservealgo+odo) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test-only Phase-B pool/share conformance guard. Locks PoolConfig:: SOFTFORKS_REQUIRED to the oracle set in frstrtr/p2pool-dgb-scrypt networks/digibyte.py:25 — {nversionbips,csv,segwit,reservealgo,odo, taproot}. reservealgo and odo are DigiByte-unique; a silent add or drop would mis-signal softfork requirements vs the oracle network. Fenced to src/impl/dgb/test/share_test.cpp only; no shared-base, CMake, or build.yml touch; dgb_share_test already allowlisted. No consensus value changes (guards what already ships). 10/10 green. --- src/impl/dgb/test/share_test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/impl/dgb/test/share_test.cpp b/src/impl/dgb/test/share_test.cpp index e5c7e7b00..35e736516 100644 --- a/src/impl/dgb/test/share_test.cpp +++ b/src/impl/dgb/test/share_test.cpp @@ -19,6 +19,8 @@ #include // #82 external-daemon RPC creds (digibyte.conf) #include +#include +#include #include // Sharechain-identity: the isolation primitives (PREFIX / IDENTIFIER) are the @@ -63,6 +65,23 @@ TEST(DGB_share_test, OraclePoolShareLayer) "00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); } +// SOFTFORKS_REQUIRED — DGB-distinctive softfork-signalling set. reservealgo +// and odo are DigiByte-unique (absent from BTC/LTC); a silent drop here makes +// the embedded daemon mis-signal softfork requirements vs the oracle network. +// Oracle SSOT: frstrtr/p2pool-dgb-scrypt networks/digibyte.py:25 +// set([nversionbips,csv,segwit,reservealgo,odo,taproot]) +TEST(DGB_share_test, OracleSoftforksRequired) +{ + const std::set kExpected = { + "nversionbips", "csv", "segwit", "reservealgo", "odo", "taproot" + }; + EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED, kExpected); + // Loud guard on the DGB-unique members + cardinality (catches add OR drop). + EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.count("reservealgo"), 1u); + EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.count("odo"), 1u); + EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.size(), 6u); +} + // v35 donation = forrestv P2PK (4104ffd0…ac, 65-byte pubkey push + CHECKSIG). // v36 donation = combined P2SH (23-byte). get_donation_script() switches on // share_version at the SEGWIT/merged boundary.