dgb(#82): arm external-daemon submitblock RPC leg from digibyte.conf creds - #269
Merged
Conversation
…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.
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.
#82 — external-daemon submitblock RPC arm (digibyte.conf creds)
Wires the RPC leg of the #82 dual-path broadcaster.
main_dgb.cpp --runnow resolves
rpcuser/rpcpassword/rpcportfromdigibyte.confand points areal
NodeRPCat the externaldigibyted, replacing therpc=nullptrseam onCoinNode(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 todigibyte.conf(default~/.digibyte/digibyte.conf).rpcpasswordis read from-file and never reaches the process table.submit_block_hexreturnsfalseloudly 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
--runstill works without adigibyted.Changes (fenced:
main_dgb.cpp+src/impl/dgb/only)src/impl/dgb/coin/rpc_conf.hpp—RpcConf+load_rpc_conf+apply_endpoint_override. Header-only, dependency-light; mirrorsmain_bch.cpp'sload_rpc_conflifted intosrc/impl/dgb/.main_dgb.cpp—--coin-rpc/--coin-rpc-authparse; construct + connectNodeRPC(outlives the tracker callback) and feedCoinNode.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_test14/14 PASS (9 existing + 5 new).c2pool-dgbbuilds + links;--runARMS against a livedigibyte.conf.#82 stays OPEN until the live won-block test (UpdateTip on a co-located
digibyted) passes on one arm. HOLD merge — operator tap.