nmc(PB): name-operation relay path + fee flow into template - #402
Merged
Conversation
P1 PB for embedded merge-mined Namecoin. Adds the one NMC tx-class with no BTC/DOGE analog: the name operations (name_new / name_firstupdate / name_update). c2pool is a merge-miner, not a name registry, so name txs are RELAYED into the block template WITHOUT name-db consensus validation (SPV-trust in the configured namecoind backend; namecoind owns name-db consensus). - coin/mempool.hpp: classify_name_op() (version-marker + leading name opcode, with a false-positive guard against bare OP_1..OP_3 segwit/multisig outputs in plain Bitcoin-version txs); MempoolEntry carries NameOp + TxSource provenance (daemon-trusted vs peer-relay, the SPV-trust boundary); name_op_count() / trusted_name_op_count() queries. Name-tx fees flow through the existing get_sorted_txs_with_fees -> coinbasevalue path unchanged (name ops are NOT special-cased in payout; Bitcoin subsidy schedule). - test/nmc_mempool_name_test.cpp: 9 KATs (classify incl. false-positive guard, admission + provenance tagging, fee reaching template coinbasevalue). - Registered in test/CMakeLists.txt + build.yml allowlist (both lines) to avoid a #137 NOT_BUILT sentinel. Per-coin isolation: src/impl/nmc/ only; btc tree consumed read-only. The three §4 PF caveats (bind trust to daemon source; v36 short-circuit; aux-slot distinctness) are folded into the PF KAT slice, not gated on PB.
frstrtr
force-pushed
the
nmc/pb-name-relay
branch
from
June 24, 2026 05:31
6c6bcd5 to
9246e71
Compare
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.
NMC P1 PB — name-operation relay path + fee flow
§4 review CLEARED (integrator, all 3 open items accepted). Cuts NMC PB.
Adds the one NMC tx-class with no BTC/DOGE analog: the Namecoin name operations (
name_new/name_firstupdate/name_update). c2pool is a merge-miner, not a name registry, so name txs are relayed into the block template WITHOUT name-db consensus validation — SPV-trust in the configurednamecoindbackend; namecoind owns name-db consensus.Changes (src/impl/nmc/ only — per-coin isolation, btc tree read-only)
coin/mempool.hppclassify_name_op()— version-marker (getNamecoinVersion() == 0x7100) and a leading name opcode (OP_1/OP_2/OP_3) on an output script. The version gate is the false-positive guard: a bareOP_1..OP_3output in a plain Bitcoin-version tx (taproot / segwit-v1 / bare multisig) is not classified as a name op.MempoolEntrycarriesNameOp+TxSourceprovenance (Daemon-trusted vsPeerRelay) — the SPV-trust boundary.name_op_count()/trusted_name_op_count()queries.get_sorted_txs_with_fees → coinbasevaluepath unchanged — name ops are NOT special-cased in payout (Bitcoin subsidy schedule).test/nmc_mempool_name_test.cpp— 9 KATs: classify (incl. false-positive guard + wrong-version + name-version-without-name-script), admission + provenance tagging, and a name-tx fee reaching the templatecoinbasevalue(subsidy(2) + 7000).test/CMakeLists.txt+build.yml—nmc_mempool_name_testregistered in CMake and both allowlist lines (avoids a dgb: conform subsidy to p2pool-dgb-scrypt oracle (COIN=1e6, weeks+1) [COMPAT] #137NOT_BUILTsentinel).Local verification
nmc_mempool_name_test— 9/9 PASSnmc_template_builder_test(existing mempool consumer, after the mempool.hpp edits) — 17/17 PASS, no regressionDeferred to PF (per §4 — caveats, not PB blockers)
if constexpr ShareT::version < 36 return {}) so NMC merged work can't mint on a pre-v36 BTC share.vector<AuxChain>at actual tree size.