dgb: DGB+DOGE phase-DC dual-target SELECTION scaffold (fenced KAT) - #490
Merged
Conversation
frstrtr
force-pushed
the
dgb/doge-dc-dual-target-select
branch
2 times, most recently
from
June 25, 2026 16:34
d8774f1 to
ef4e5ce
Compare
Pure, header-only DC decision contract the eventual DC run-loop wiring (AUX_DOGE node seam + submit) must satisfy, landed BEFORE the seam is touched (seam parked on #82 + ltc-doge written concurrence). coin/aux_dual_target_select.hpp: - aux_mint_decision(aux_enabled, has_doge_job): embed the fabe6d6d MM commitment IFF aux MM enabled AND a DOGE job is present; else no-op (mirrors #486 embed-at-mint nullopt byte-identity). - select_submit(pow, dgb_target, has_doge_job, doge_target): independent per-path thresholds against one scrypt pow_hash (mirrors dc_proof DualTargetIndependentThresholds); DOGE-aux only fires when minted. - selection_is_consistent(): load-bearing DC<->DB guard, fire_doge_aux ==> embed_commitment, coupling submit back to #475/#486. test/aux_dual_target_select_test.cpp: 5/5 KATs, non-circular goldens (fabe6d6d tag, embed truth table, independent threshold table, no-job suppression, the impossible DOGE-win-without-mint state). Registered in test/CMakeLists.txt + both build.yml --target allowlists (#143 trap). Fenced dgb/, not rewired, consumes nothing in src/impl/doge, no node seam touch, zero consensus surface.
frstrtr
force-pushed
the
dgb/doge-dc-dual-target-select
branch
from
June 25, 2026 18:02
ef4e5ce to
a54d168
Compare
frstrtr
pushed a commit
that referenced
this pull request
Jul 14, 2026
…n hardening) Clears the 8 real CodeQL security alerts on frstrtr/c2pool. Triaged + independently re-reviewed: 1 CRITICAL is a genuine fix, 2 HIGH get defense-in-depth, 5 HIGH are getenv-rooted false positives (dismissed separately with justification). - #490 CRITICAL cpp/potentially-dangerous-function (src/core/log.cpp:163): std::gmtime returns a pointer into a shared static tm and is not reentrant. Replace with gmtime_r (POSIX) / gmtime_s (MSVC) into a local tm. Only gmtime/localtime call in src/. - #502/#503 HIGH cpp/path-injection (coin_peer_manager.hpp db_path()): m_symbol is a hardcoded ticker literal at every production ctor site (traced through all callers; no network->filename path exists), but add an alphanumeric-only guard so a future caller cannot inject a path component. Legitimate tickers (LTC/DOGE/DGB/DASH/BTC/NMC/...) are all alnum -> no on-disk filename change. - Rider: core::filesystem::config_path() dereferenced getenv() without a null check -> std::filesystem::path(nullptr) is UB if HOME/APPDATA is unset. Fall back to '.'. The other 5 path-injection alerts (#507 node.cpp:2199, #506/#505/#504 payout_manager.cpp:224/261/284, #501 auto_ratchet.hpp:309) all build a path from config_path() (getenv HOME/APPDATA) + a hardcoded basename, never from network/peer/miner input -> dismissed as false positive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DGB+DOGE phase-DC — dual-target SELECTION scaffold (fenced KAT)
Pure, header-only DC decision contract the eventual DC run-loop wiring (AUX_DOGE node seam + submit) must satisfy. Landed BEFORE the seam is touched — the AUX_DOGE seam (node.hpp:57 bind + CMakeLists.txt:10 un-stub) stays parked on #82 broadcaster + ltc-doge written concurrence per integrator greenlight (2026-06-25). This PR has zero seam surface.
coin/aux_dual_target_select.hpp(not rewired)aux_mint_decision(aux_enabled, has_doge_job)— embed thefabe6d6dMM commitment IFF aux MM enabled AND a DOGE job present; else no-op (mirrors dgb: embed-at-mint MM commitment into coinbase scriptSig (phase DB) #486 embed-at-mint nullopt byte-identity).select_submit(pow, dgb_target, has_doge_job, doge_target)— independent per-path thresholds against one scryptpow_hash(mirrorsaux_doge_dc_proof_testDualTargetIndependentThresholds); DOGE-aux only fires when minted.selection_is_consistent()— load-bearing DC↔DB guard:fire_doge_aux ==> embed_commitment, coupling submit-time selection back to the dgb: fenced DGB-side AuxPoW merged-mining coinbase commitment builder (phase DB) #475/dgb: embed-at-mint MM commitment into coinbase scriptSig (phase DB) #486 mint.test/aux_dual_target_select_test.cpp— 5/5 greenNon-circular goldens:
fabe6d6dtag, mint embed truth table, independent threshold table, no-job suppression, and the impossible DOGE-win-without-mint state the guard rejects. Registered intest/CMakeLists.txt+ bothbuild.yml--targetallowlists (#143 NOT_BUILT trap).Fenced
dgb/, consumes nothing insrc/impl/doge, no node seam touch, zero consensus surface. GPG-signed. NO self-merge — integrator taps.