Skip to content

Commit 4953870

Browse files
committed
dgb: unify SEGWIT_ACTIVATION_VERSION to single SSOT (canonical oracle=35)
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.
1 parent bb7ef22 commit 4953870

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/impl/dgb/config_pool.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PoolConfig : protected core::Fileconfig
3535
static constexpr uint32_t TARGET_LOOKBEHIND = 100;
3636
static constexpr uint32_t MINIMUM_PROTOCOL_VERSION = 1700; // floor (p2pool-dgb-scrypt digibyte.py NEW_MIN)
3737
static constexpr uint32_t ADVERTISED_PROTOCOL_VERSION = 3301; // advertised capability (p2pool-dgb-scrypt p2p.py VERSION)
38-
static constexpr uint32_t SEGWIT_ACTIVATION_VERSION = 35;
38+
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)
3939
static constexpr uint32_t BLOCK_MAX_SIZE = 32000000;
4040
static constexpr uint32_t BLOCK_MAX_WEIGHT = 128000000;
4141

src/impl/dgb/params.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ inline core::CoinParams make_coin_params(bool testnet)
6363

6464
// Softforks — from PoolConfig SSOT (oracle: nversionbips,csv,segwit,reservealgo,odo,taproot)
6565
p.softforks_required = PoolConfig::SOFTFORKS_REQUIRED;
66-
p.segwit_activation_version = PoolConfig::SEGWIT_ACTIVATION_VERSION; // 35
66+
p.segwit_activation_version = PoolConfig::SEGWIT_ACTIVATION_VERSION; // 35 (canonical oracle p2pool-dgb-scrypt)
6767

6868
// ===== Pool-level (net) — from dgb::PoolConfig (config_pool.hpp) =====
6969
p.p2p_port = PoolConfig::P2P_PORT; // 5024 (DGB sharechain P2P)

src/impl/dgb/share_types.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
#include <core/uint256.hpp>
44
#include <core/pack_types.hpp>
55
#include <core/pack.hpp>
6+
#include "config_pool.hpp" // SSOT: PoolConfig::SEGWIT_ACTIVATION_VERSION
67

78
namespace dgb
89
{
910

10-
const uint64_t SEGWIT_ACTIVATION_VERSION = 17;
11+
// SSOT delegation (oracle = 17). Serialization/consensus gate sources from
12+
// PoolConfig; no local literal. Symbol kept for share_check.hpp consumers.
13+
inline constexpr uint32_t SEGWIT_ACTIVATION_VERSION = PoolConfig::SEGWIT_ACTIVATION_VERSION;
1114

1215
constexpr bool is_segwit_activated(uint64_t version)
1316
{

0 commit comments

Comments
 (0)