Skip to content

Substrate v5: RFC 8785 canonical adoption (binding v5)#30

Merged
sftimeless merged 1 commit into
mainfrom
substrate-v5-canonical-2026-06-04
Jun 5, 2026
Merged

Substrate v5: RFC 8785 canonical adoption (binding v5)#30
sftimeless merged 1 commit into
mainfrom
substrate-v5-canonical-2026-06-04

Conversation

@sftimeless

Copy link
Copy Markdown
Member

Summary

Adds binding version v5 to the keel-verifier package using RFC 8785 JCS canonical bytes via the rfc8785 Python package. Substrate-wide cutover per SPEC_SUBSTRATE_V5_CANONICAL_RFC8785_v1_1_2026-06-04.md (in keel-api repo).

Highlights

  • v5 builder + dispatch API (canonical_binding_bytes)
  • v1-v4 byte-stable (legacy _legacy_canonical_json_v1_to_v4 preserved)
  • Adjudicates v5 permits via existing permit.decision.v1 claim with structured reject codes (permit.binding.v5.spend_scope_hash_mismatch, permit.binding.v5.delegation_policy_hash_mismatch, permit.binding.v5.wire_body_hash_mismatch)
  • Pre-customer cutover; no historical migration
  • Version bump 3.1.0 → 3.2.0 (additive minor)
  • New v5-focused test bundle: 38 tests collected

Test plan

  • CI green (target: 313+ passing; existing 300 baseline + new v5 coverage)
  • After merge: tag v3.2.0; release.yml publishes to PyPI
  • Install-test: pip install keel-verifier==3.2.0 from fresh venv adjudicates a v5 fixture permit emitted by keel-api with byte-identical canonical
  • Cross-repo byte-identity script confirmed PASS (1740 bytes) per Codex completion report

Companion PR

keel-api substrate-v5 (separate PR, opens after this lands on PyPI per release sequence runbook stage 4).

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

🤖 Generated with Claude Code

Mirror RFC 8785 v5 canonical dispatch, v5 payload building, PERMIT_V2 envelope dispatch, closure_v3 chain bytes, and v5 permit-decision recompute paths including wire-body mismatch detection.

PERMIT_V2 reuses the parent permit binding_version as the envelope canonical version. closure_v3 is the verifier-recognized v5-era closure format to match the existing closure_v1/closure_v2 family.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sftimeless sftimeless merged commit 28b7776 into main Jun 5, 2026
4 checks passed
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