Skip to content

doc: define the qbit P2MR v1 consensus profile - #112

Merged
kiwidream merged 1 commit into
p2mr-v1-conformance-suitefrom
p2mr-v1-profile-spec
Jul 13, 2026
Merged

kiwidream merged 1 commit into
p2mr-v1-conformance-suitefrom
p2mr-v1-profile-spec

Conversation

@kiwidream

@kiwidream kiwidream commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Publish a normative, versioned qbit P2MR v1 consensus profile for the behavior frozen at the Issue 105 reference commit.
  • State explicitly that qbit P2MR v1 is not BIP-360 compatible and pin BIP-360 v0.12.0 only as non-normative ancestry.
  • Replace misleading BIP-360 terminology in source comments, tests, public docs, release notes, and integration guidance.
  • Define activation, witness and annex parsing, control blocks, commitment domains, depth-zero execution, sighash construction, PQC encodings, opcode behavior, resource limits, and consensus/policy boundaries.

This is PR 1 of 4. It intentionally preserves current transaction acceptance. Later stack layers add the machine-readable corpus, independent oracle, and release gate.

Stack: PR 1/4 → next #113.

Refs #105

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:

Validation included the cumulative stack's clean test_bitcoin build, 98 script_p2mr_tests, independent hash reproduction, documentation checks, git diff --check, and Docker lint.

Target Branch

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

Targets the maintained 1.0.0 release branch.

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: the new document is consensus-sensitive normative text, but executable production changes are comment-only. Any discovered semantic discrepancy must be handled in a separate issue rather than folded into this stack.

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:

libbitcoinpqc Subtree Checklist (if src/libbitcoinpqc changed)

  • 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.

Not applicable; the subtree is unchanged.


Note

Low Risk
Changes are normative documentation and comments only; transaction acceptance is unchanged, though reviewers should treat the new spec as the authoritative contract for future divergence from implementation.

Overview
Adds a frozen, versioned qbit P2MR v1 consensus profile (qbit-p2mr-v1) with a pinned reference commit, a new doc/consensus/ index, and links from the root README, doc index, integration guides, release notes, and Bitcoin-differences page.

The spec documents byte-level rules—activation, witness/annex parsing, P2MRLeaf/P2MRBranch commitments, depth-zero script execution (unlike pinned BIP-360 ancestry), P2MRSighash, fixed SLH-DSA-SHA2-128s-bounded30 PQC (no witness algorithm byte; optional sighash suffix only), opcodes, limits, and consensus vs policy—and states explicitly that qbit P2MR v1 is not BIP-360 compatible.

Integrator-facing docs now require that profile for exchanges, pools, and RPC clients (e.g. trailing sig byte is sighash, not an algorithm selector). User docs drop the old 0x01 algorithm-byte story in favor of the fixed profile naming.

Source, policy, and tests: comment and help text in interpreter, policy, descriptor, params.h, and functional/unit tests are retitled from BIP-360 to qbit P2MR v1; no executable consensus or policy logic changes in this PR.

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

@kiwidream
kiwidream force-pushed the p2mr-v1-profile-spec branch from 6d2f2c6 to 38f59bf Compare July 13, 2026 13:57
@kiwidream
kiwidream changed the base branch from 1.0.0 to p2mr-v1-conformance-suite July 13, 2026 14:47
@kiwidream
kiwidream merged commit 38f59bf into p2mr-v1-conformance-suite Jul 13, 2026
33 checks passed
@kiwidream kiwidream mentioned this pull request Jul 13, 2026
6 of 14 tasks
@kiwidream

Copy link
Copy Markdown
Member Author

Merged into p2mr-v1-conformance-suite; final landing into 1.0.0 is tracked by #118.

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