Repository navigation
build: prohibit PQC runtime test controls in qbit - #107
Conversation
PR ReviewFindings
Consensus Impact
Review ScopeReviewed #104 as the backing contract, the related upstream issue, the PR body and sole commit, all six changed files, surrounding qbit/subtree CMake integration, SHA backend selection, WOTS+C cap behavior, Guix configuration, documentation, CI checks and relevant logs. There are no prior reviews, comments, or review threads. The PR is currently behind the Deep Checks PerformedTraced cache-option handling through the effective target definitions and SHA dispatcher; checked direct Issue FitThe direct CMake option and stale-cache cases correctly fail closed, and normal builds receive the intended production definition. The compiler-flag bypass means the main release-hardening guarantee is not yet satisfied. Effective accelerator evidence is also still outstanding. The WOTS+C documentation correctly distinguishes the statistics-active signer cap from the verifier’s full 16-bit range. qbit-Specific ChecksReviewed the consensus-reachable PQC backend-selection path and confirmed the patch does not alter P2MR layouts, signature hashing, serialization, wallet behavior, or provider APIs. The strongest risk is build-policy enforcement, not a direct consensus-rule change. Validation ReviewedCI’s build smoke passed the four new policy tests and showed production definitions on the ordinary Linux target. The focused job passed all 35 Residual RiskThe actual Guix release artifact’s effective compile command was not inspected by PR CI; its test only checks configuration text. The bypass reproduction was performed with AppleClang/CMake/Ninja, not MSVC. The PR should be updated onto the current base and have the full required matrix rerun after fixes. |
7e6e406 to
6c474c6
Compare
* build: prohibit PQC runtime test controls * build: prevent PQC production mode cancellation * ci: make PQC build policy check executable * ci: reset cached IWYU sources before tidy setup
* ci: enable validation on 1.0.0 (#73) * Fix scanner high findings (#72) * Resolve scanner medium findings (#74) * Reject malformed P2MR leaf versions in Qt (#82) * Bind builder attestations to signed-tag source (#84) * Bind builder attestations to release source * Fix builder workflow source environment * Restore verified release tag after checkout * qt: avoid wallet shutdown deadlock during model adoption (#87) * Use aggregate work rate for assumevalid burial (#88) * p2p: use recent chainwork for anti-DoS thresholds (#89) * qt: bind P2MR proofs to expected signer (#85) * Complete restricted-output fundrawtransaction edge coverage (#86) * test: extend restricted-output raw funding coverage * test: use documented raw funding fee option * Prevent closing wallet progress dialogs (#97) * qt: minimize P2MR proof exports (#95) * Fix Qt wallet shutdown lifetime (#90) * Fix Qt wallet shutdown lifetime * Fix Qt shutdown CI coverage * Test active wallet shutdown during transaction preparation * Use portable thread in Qt shutdown test * validation: reject height-invalid AuxPoW substitutions (#106) * Bound qbit-qt P2MR proof parsing (#96) * Bound Qt P2MR proof parsing * Fix GCC range-loop warning * qt: bind proof limit to minimal export * rpc: default to portable P2MR proofs * test: update PQC usage RPC expectations * doc: qualify legacy P2MR proof compatibility * Cache Cadence lane predecessors (#108) * build: prohibit PQC runtime test controls in qbit (#107) * build: prohibit PQC runtime test controls * build: prevent PQC production mode cancellation * ci: make PQC build policy check executable * ci: reset cached IWYU sources before tidy setup * docs: show qbit version and full logo in RPC sidebar (#119) * doc: update RPC docs branding * test: handle missing MkDocs in RPC docs suite * Activate P2MR validation weight v2 on testnet4 at height 60,000 (#109) * Activate P2MR validation weight v2 at height 60,000 * test: cover P2MR weight in getblockchaininfo * validation: pre-enforce forthcoming P2MR weight rule * doc: bound block-wide P2MR verification work * test: cover P2MR validation-weight boundaries * test: avoid mixed enum flag expressions * Make resumed release draft notes deterministic (#116) * release: make draft notes deterministic * release: harden draft validation edge cases * P2MR v1 conformance and release framework (#118) * doc: define the qbit P2MR v1 consensus profile * test: add the qbit P2MR v1 conformance corpus * ci: gate qbit P2MR v1 conformance with an independent oracle * release: gate qbit P2MR v1 conformance and integration signoff * ci: execute P2MR CHECKSIGADD and release validator tests * build: preserve P2MR corpus line endings * test: hard-fail invalid P2MR oracle signatures * ci: initialize P2MR target directory at runtime * ci: test p2mr release gate in release-only profile * test: make p2mr v1 corpus fully reproducible * test: execute p2mr data signature opcodes * test: type p2mr generator mutation fixtures * release: sync p2mr support matrix digest * test: require CHECKSIGADD boundary fixtures * test: fix rebased P2MR conformance checks * test: close P2MR conformance review gaps * test: align P2MR conformance with weight v2 * Harden P2MR corpus and oracle conformance evidence (#127) * test: prove P2MR corpus mutation resistance * test: cover P2MR signature opcode underflow * release: sync hardened P2MR evidence digest * qt: preserve PQC usage after signing failures (#128) * qt: preserve PQC usage after signing failures * docs: align release note with PR 128 * Enforce immutable local release publication (#117) * release: enforce immutable local publication * release: preserve resumed draft metadata * release: fail closed on remote verification * release: discover resumable drafts safely * release: re-pin immutable publication tags (#130) * Establish mainnet 3-of-5 release-key policy (#134) * release: establish mainnet 3-of-5 signer policy * ci: always verify operator policy approvals * ci: use merge queue base for policy history * Stage v1.0.0 mainnet launch; placeholder genesis and AuxPoW chain ID (#131) * Stage v1.0.0 mainnet launch configuration * test: derive subversion expectation from release version * ci: enforce staged mainnet publication posture * release: lock staged mainnet launch difficulty * ci: test chain ID finalization contract * release: separate staged and final genesis targets * ci: require live chain ID assertion * Activate future block time v2 at testnet4 height 60,000 (#133) * Activate future block time v2 on testnet4 * Fix future-time v2 CI regressions * test: isolate mempool limit synthetic chain * test: preserve legacy timestamp scenarios * test: derive nulldummy block time from tip * test: keep sequence-lock blocks within time limit * ci: retrigger validation after release rebase * test: isolate pruning timestamps from future-time v2 * docs: publish v1.0.0 mainnet guidance * consensus: pin mainnet genesis and ASERT anchor
Summary
SPX_ENABLE_TEST_BENCH_ENV_KNOBS=ONin integrated qbit buildsbitcoinpqctarget and Guix artifacts toSPX_PRODUCTION_BUILD=1Closes #104.
Related upstream test-evidence work: Qbit-Org/qbit-libbitcoinpqc#3.
Testing
Commands and checks:
python3 ci/checks/test_libbitcoinpqc_build_policy.pypython3 contrib/guix/test_build_config.pybitcoinpqcandtest_bitcoinwith CMake/Ninjapqc_tests, including the bounded30 known-answer vectorSPX_PRODUCTION_BUILD=1and omits the runtime-control macrogit diff --checkTarget Branch
mainor a maintainer-requested release branch such as0.1.x.Target:
1.0.0.Risk / Review Notes
Notes:
This is release-build hardening for consensus-reachable PQC code. Normal qbit builds retain the existing scalar production backend and object behavior. Only configurations that request test/benchmark runtime controls now fail. Compiler-flag injection is covered by forcing the production macro and relying on the existing upstream mutual-exclusion compile error.
Docs / Process Impact
Choose exactly one:
The subtree runbook now documents qbit's downstream production policy, standalone backend experimentation, and the WOTS+C signing-cap/verifier-bound distinction.
libbitcoinpqc Subtree Checklist (if
src/libbitcoinpqcchanged)Not applicable: this PR deliberately leaves
src/libbitcoinpqcunchanged and implements the downstream policy in qbit-owned integration, CI, release, and documentation files.Qbit-Org/qbit-libbitcoinpqc.contrib/devtools/update-libbitcoinpqc-subtree.sh.contrib/devtools/update-libbitcoinpqc-subtree.shis intentional and matchesdoc/subtrees/libbitcoinpqc.md.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
High Risk
Touches consensus-reachable PQC compile policy and release build configuration; misconfiguration could change verifier behavior, though the change hardens toward production-only builds.
Overview
Integrated qbit builds now fail closed on PQC test/benchmark runtime knobs and always compile the
bitcoinpqctarget in production mode.cmake/libbitcoinpqc.cmakerejectsSPX_ENABLE_TEST_BENCH_ENV_KNOBS=ON, forces that cache option off for integrated builds, and pinsSPX_PRODUCTION_BUILD=1on thebitcoinpqctarget (including compile options so flag injection cannot bypass it). Guix releaseCONFIGFLAGSexplicitly pass-DSPX_ENABLE_TEST_BENCH_ENV_KNOBS=OFF.New regression coverage includes
ci/checks/test_libbitcoinpqc_build_policy.py(normal production build, explicit ON, stale cache, compiler-flag injection) plus Core Checks steps that run that script and grep the verbosebitcoinpqcbuild for the expected macros.contrib/guix/test_build_config.pyasserts the Guix flag.doc/subtrees/libbitcoinpqc.mddocuments the downstream production policy, standalone experimentation, and WOTS+C signing-cap vs verifier bounds.A small CI base-install fix removes existing IWYU paths before re-cloning when
RUN_TIDYis enabled.Reviewed by Cursor Bugbot for commit 564697f. Bugbot is set up for automated code reviews on this repo. Configure here.