nmc(PF): lock external-daemon fallback-path conformance - #493
Merged
Conversation
Phase PF fallback-path half. The V36 external_fallback invariant requires the external-daemon (.140 namecoind submitauxblock) RPC fallback to PERSIST as the retained path alongside the embedded P2P relay. Existing dispatcher and host-wiring KATs bind the fallback leg to an always-ack fake, so neither distinguishes WHICH backend serves it. This adds nmc_fallback_path_conformance_test (3 KATs) locking the one fact PF owns: the fallback MUST be the external namecoind RPC (a daemon that can ack), NOT the embedded backend daemon-less submit_aux_block (structurally false, aux_chain_embedded.hpp:153). Mis-wiring set_fallback_backend to the embedded self-leg leaves the wiring looking present but turns the retained fallback into a dead path -- a won aux block is silently lost when P2P is down. Test 2 makes that regression RED; test 1 proves the external path carries when P2P is down; test 3 locks that the external fallback always-fires alongside a working embedded relay (not optimized away). Test-only, NMC-fenced (src/impl/nmc/ only), zero consensus surface. Registered in test/CMakeLists.txt + gtest_add_tests and the build.yml --target allowlist (both legs) to avoid a #137-style NOT_BUILT sentinel.
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.
Phase PF — fallback-path conformance (external-daemon half)
The V36
external_fallbackinvariant requires the external-daemon RPC fallback (NMC = .140 namecoindsubmitauxblock) to PERSIST as the retained path alongside the embedded P2P relay — "embedded is default, external is the retained fallback path; do NOT remove external-daemon code paths."Gap this closes
The existing dispatcher KAT (
nmc_block_broadcast_test) and host-wiring DELIVERY KAT (nmc_host_dualpath_test) both bind the fallback leg to a fake that always acks, so neither distinguishes which backend serves the fallback. PF owns that fact.What it locks (
nmc_fallback_path_conformance_test, 3 KATs)submitauxblocksaves the won aux block (rpc_ok,any(),landed_first="rpc").submit_aux_blockis daemon-less and returnsfalseunconditionally (aux_chain_embedded.hpp:153). Mis-wiringset_fallback_backendto it leaves the wiring looking present but turns the retained fallback into a dead path: with P2P also down the won block is silently lost (any()==false). This makes that regression RED.Scope / safety
src/impl/nmc/only), zero consensus surface (no PoW hash, share format, aux commitment, template, or PPLNS math).test/CMakeLists.txt+gtest_add_testsand thebuild.yml --targetallowlist (both build legs) — no dgb: conform subsidy to p2pool-dgb-scrypt oracle (COIN=1e6, weeks+1) [COMPAT] #137-style NOT_BUILT sentinel.