Skip to content

qt: minimize P2MR proof exports - #95

Merged
kiwidream merged 1 commit into
1.0.0from
qt-minimal-pqc-proofs
Jul 11, 2026
Merged

kiwidream merged 1 commit into
1.0.0from
qt-minimal-pqc-proofs

Conversation

@kiwidream

@kiwidream kiwidream commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Emit only the eight verifier-required fields in qbit-qt P2MR/PQC proof JSON.
  • Keep PQC usage state, remaining budget, and warnings in the local signer status instead of the displayed or copied proof.
  • Preserve Qt and RPC verification of older rich proofs, and leave the signdatapqchash include_pqc_usage contract unchanged.
  • Document the portable schema and the disclosure implications of RPC usage metadata.

Fixes #94

Testing

  • Built locally.
  • Ran focused unit or functional tests for the changed area.
  • Ran lint or formatting checks relevant to this change.
  • Not run. Reason:

Checks run:

  • cmake -S . -B build_qt_pqc_metadata -G Ninja -DBUILD_GUI=ON -DBUILD_GUI_TESTS=ON -DBUILD_TESTS=ON -DBUILD_DAEMON=ON -DBUILD_CLI=ON
  • cmake --build build_qt_pqc_metadata --target qbit-qt test_qbit-qt test_qbit qbitd qbit-cli -j 8
  • ulimit -n 1024; QTEST_FUNCTION_TIMEOUT=600000 QT_QPA_PLATFORM=cocoa build_qt_pqc_metadata/bin/test_qbit-qt
  • ulimit -n 1024; build_qt_pqc_metadata/bin/test_qbit --run_test=wallet_p2mr_descriptor_tests/P2MRDataHashSigningReportsCommittedFailedLeafReservation --catch_system_errors=no --log_level=test_suite
  • ulimit -n 1024; python3 test/functional/feature_p2mr.py --configfile=build_qt_pqc_metadata/test/config.ini
  • ulimit -n 1024; python3 test/functional/wallet_pqc_usage.py --configfile=build_qt_pqc_metadata/test/config.ini
  • Docker lint image from ci/lint_imagefile using its default entrypoint
  • test/lint/lint-qbit-public-docs.py
  • git diff --check origin/1.0.0...HEAD

Target Branch

  • This PR targets main or a maintainer-requested release branch such as 0.1.x.

Target: 1.0.0.

Risk / Review Notes

  • Consensus, script, crypto, wallet, P2P, release, CI, or security-sensitive behavior changed.
  • No consensus, script, crypto, wallet, P2P, release, CI, or security-sensitive behavior changed.

Notes:

  • Non-consensus Qt export and wallet-privacy change.
  • No signing hash, PQC counter, leaf selection, script validity, transaction validity, or RPC response behavior changes.
  • The selected proof key remains exported because verification requires it; retry-only keys and local usage metadata do not.
  • Failed-signing counter/error reporting remains unchanged and outside this issue.

Docs / Process Impact

Choose exactly one:

  • I updated public docs because this PR changes user-visible behavior, integration guidance, release/process guidance, or expected validation.
  • No public docs update needed. Reason:

Updated the P2MR data-hash design documentation, RPC help disclosure text, and release notes.

libbitcoinpqc Subtree Checklist (if src/libbitcoinpqc changed)

Not applicable; the subtree is unchanged.

  • Source commit is reachable from an immutable release tag in Qbit-Org/qbit-libbitcoinpqc.
  • qbit imports the tagged upstream tree directly without pruning or a curated subtree branch.
  • Subtree import/update was performed with contrib/devtools/update-libbitcoinpqc-subtree.sh.
  • test/lint/libbitcoinpqc-subtree-check.sh passes locally.
  • Any default tag change in contrib/devtools/update-libbitcoinpqc-subtree.sh is intentional and matches doc/subtrees/libbitcoinpqc.md.

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Note

Low Risk
Non-consensus Qt export and privacy change only; signing, verification, and signdatapqchash defaults are unchanged aside from clearer RPC disclosure text.

Overview
qbit-qt now displays and copies only the eight fields needed for stateless P2MR/PQC proof verification (address, message_hash, signature, pubkey, leaf_script, control_block, leaf_version, proof_mode). Wallet-local PQC usage counts, limits, warnings, retry-only pubkeys, and informational fields (datasig_hash, domain, algorithm, p2mr_merkle_root, hash metadata) are removed from proof JSON but still shown in the signer status after signing.

signdatapqchash behavior and include_pqc_usage default are unchanged; RPC help now warns that usage metadata can leak budget and failed-retry keys, and callers should set include_pqc_usage=false when sharing an RPC result as a portable proof. Qt and RPC verification still accept older “rich” proofs.

Docs add a portable proof schema in p2mr-datapqchash.md and release notes for the Qt change.

Reviewed by Cursor Bugbot for commit b24a332. Bugbot is set up for automated code reviews on this repo. Configure here.

@kiwidream
kiwidream force-pushed the qt-minimal-pqc-proofs branch from 9d15d69 to 5181f92 Compare July 10, 2026 23:32
@kiwidream kiwidream mentioned this pull request Jul 11, 2026
6 of 9 tasks
@kiwidream
kiwidream force-pushed the qt-minimal-pqc-proofs branch from 5181f92 to b24a332 Compare July 11, 2026 13:49
@kiwidream
kiwidream merged commit 9887564 into 1.0.0 Jul 11, 2026
34 checks passed
kiwidream added a commit that referenced this pull request Jul 15, 2026
kiwidream added a commit that referenced this pull request Jul 15, 2026
* 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
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