Skip to content

dgb(#82): arm external-daemon submitblock RPC leg from digibyte.conf creds - #269

Merged
frstrtr merged 1 commit into
masterfrom
dgb/82-noderpc-arm-conf-creds
Jun 20, 2026
Merged

dgb(#82): arm external-daemon submitblock RPC leg from digibyte.conf creds#269
frstrtr merged 1 commit into
masterfrom
dgb/82-noderpc-arm-conf-creds

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 20, 2026

Copy link
Copy Markdown
Owner

#82 — external-daemon submitblock RPC arm (digibyte.conf creds)

Wires the RPC leg of the #82 dual-path broadcaster. main_dgb.cpp --run
now resolves rpcuser/rpcpassword/rpcport from digibyte.conf and points a
real NodeRPC at the external digibyted, replacing the rpc=nullptr seam on
CoinNode (main_dgb.cpp:242).

Credential posture (operator self-provision)

  • --coin-rpc HOST:PORT — endpoint override only (no secret; safe on argv).
  • --coin-rpc-auth PATH — path to digibyte.conf (default ~/.digibyte/digibyte.conf).
  • rpcpassword is read from-file and never reaches the process table.
  • No creds resolve ⇒ arm stays UNARMED (submit_block_hex returns false
    loudly via the dgb(test): lock CoinNode submit/seam contract (#82 RPC-fallback half) #163 seam guard) — byte-identical to today's daemon-less
    default build, so --run still works without a digibyted.

Changes (fenced: main_dgb.cpp + src/impl/dgb/ only)

  • New src/impl/dgb/coin/rpc_conf.hppRpcConf + load_rpc_conf +
    apply_endpoint_override. Header-only, dependency-light; mirrors
    main_bch.cpp's load_rpc_conf lifted into src/impl/dgb/.
  • main_dgb.cpp--coin-rpc / --coin-rpc-auth parse; construct + connect
    NodeRPC (outlives the tracker callback) and feed CoinNode.
  • 5 KATs added to the already-allowlisted dgb_share_test (no new gtest binary
    — avoids ci: build test_dgb_subsidy in both Linux test jobs (fix master-red NOT_BUILT) #143): parse, c2pool aliases + comment-strip, missing-password
    fail-closed, missing-file false, endpoint-override-carries-no-secret.

Verification

  • dgb_share_test 14/14 PASS (9 existing + 5 new).
  • c2pool-dgb builds + links; --run ARMS against a live digibyte.conf.
  • Zero shared/core/p2pool-merged-v36 surface.

#82 stays OPEN until the live won-block test (UpdateTip on a co-located
digibyted) passes on one arm. HOLD merge — operator tap.

…creds

Wire the RPC leg of the #82 dual-path broadcaster. main_dgb.cpp --run now
resolves rpcuser/rpcpassword/rpcport from digibyte.conf (default
~/.digibyte/digibyte.conf, --coin-rpc-auth PATH override) and points a real
NodeRPC at the external digibyted, replacing the rpc=nullptr seam on CoinNode.
The rpcpassword NEVER reaches argv: --coin-rpc carries only HOST:PORT, the
secret stays in-file. No creds resolve => arm stays UNARMED (submit_block_hex
returns false LOUDLY via the #163 seam guard), byte-identical to today's
daemon-less default build so --run still works without a digibyted.

New fenced header src/impl/dgb/coin/rpc_conf.hpp (RpcConf + load_rpc_conf +
apply_endpoint_override), mirroring main_bch.cpp's load_rpc_conf lifted into
src/impl/dgb/. Header-only, dependency-light. 5 KATs added to the already-
allowlisted dgb_share_test (no new gtest binary): user/pass/port/connect parse,
c2pool aliases + comment stripping, missing-password fail-closed, missing-file
false, endpoint-override-carries-no-secret. 14/14 dgb_share_test PASS,
c2pool-dgb links + arms against a live digibyte.conf.

Fence: main_dgb.cpp + src/impl/dgb/ only; zero shared/core/p2pool-v36 surface.
#82 stays OPEN until the live won-block test (UpdateTip on a co-located
digibyted) passes on one arm.
@frstrtr
frstrtr merged commit d1e2e6e into master Jun 20, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant