From 8b392910fab19cd849f05224110b7c4e0367560a Mon Sep 17 00:00:00 2001 From: frstrtr Date: Wed, 17 Jun 2026 20:39:05 +0000 Subject: [PATCH] dgb: unify SEGWIT_ACTIVATION_VERSION to single SSOT (canonical oracle=35) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Master carried a split-brain: config_pool.hpp=35 but share_types.hpp hardcoded 17, and the consensus gate in share_check.hpp resolved to the share_types value (17) — diverging from the canonical DGB oracle frstrtr/p2pool-dgb-scrypt (digibyte.py SEGWIT_ACTIVATION_VERSION=35). The 17 value is the merged-v36/farsider350 figure, byte-compat for which is WAIVED for DGB per operator 2026-06-17. Collapse to one SSOT in config_pool.hpp (=35); share_types.hpp and params.hpp derive from it. Effective segwit-share gate now conforms to the oracle. Consensus-relevant: shares with version in [17,35) are no longer spuriously segwit-validated against the canonical network. --- src/impl/dgb/config_pool.hpp | 2 +- src/impl/dgb/params.hpp | 2 +- src/impl/dgb/share_types.hpp | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/impl/dgb/config_pool.hpp b/src/impl/dgb/config_pool.hpp index 6fc76e4ff..5eff515cb 100644 --- a/src/impl/dgb/config_pool.hpp +++ b/src/impl/dgb/config_pool.hpp @@ -35,7 +35,7 @@ class PoolConfig : protected core::Fileconfig static constexpr uint32_t TARGET_LOOKBEHIND = 100; static constexpr uint32_t MINIMUM_PROTOCOL_VERSION = 1700; // floor (p2pool-dgb-scrypt digibyte.py NEW_MIN) static constexpr uint32_t ADVERTISED_PROTOCOL_VERSION = 3301; // advertised capability (p2pool-dgb-scrypt p2p.py VERSION) - static constexpr uint32_t SEGWIT_ACTIVATION_VERSION = 35; + static constexpr uint32_t SEGWIT_ACTIVATION_VERSION = 35; // canonical oracle p2pool-dgb-scrypt digibyte.py:27 (merged-v36 farsider350=17 WAIVED for DGB per operator 2026-06-17) static constexpr uint32_t BLOCK_MAX_SIZE = 32000000; static constexpr uint32_t BLOCK_MAX_WEIGHT = 128000000; diff --git a/src/impl/dgb/params.hpp b/src/impl/dgb/params.hpp index 256b258b4..dfa086c64 100644 --- a/src/impl/dgb/params.hpp +++ b/src/impl/dgb/params.hpp @@ -63,7 +63,7 @@ inline core::CoinParams make_coin_params(bool testnet) // Softforks — from PoolConfig SSOT (oracle: nversionbips,csv,segwit,reservealgo,odo,taproot) p.softforks_required = PoolConfig::SOFTFORKS_REQUIRED; - p.segwit_activation_version = PoolConfig::SEGWIT_ACTIVATION_VERSION; // 35 + p.segwit_activation_version = PoolConfig::SEGWIT_ACTIVATION_VERSION; // 35 (canonical oracle p2pool-dgb-scrypt) // ===== Pool-level (net) — from dgb::PoolConfig (config_pool.hpp) ===== p.p2p_port = PoolConfig::P2P_PORT; // 5024 (DGB sharechain P2P) diff --git a/src/impl/dgb/share_types.hpp b/src/impl/dgb/share_types.hpp index ef09f8e7b..b67f77437 100644 --- a/src/impl/dgb/share_types.hpp +++ b/src/impl/dgb/share_types.hpp @@ -3,11 +3,14 @@ #include #include #include +#include "config_pool.hpp" // SSOT: PoolConfig::SEGWIT_ACTIVATION_VERSION namespace dgb { -const uint64_t SEGWIT_ACTIVATION_VERSION = 17; +// SSOT delegation (oracle = 17). Serialization/consensus gate sources from +// PoolConfig; no local literal. Symbol kept for share_check.hpp consumers. +inline constexpr uint32_t SEGWIT_ACTIVATION_VERSION = PoolConfig::SEGWIT_ACTIVATION_VERSION; constexpr bool is_segwit_activated(uint64_t version) {