Skip to content

Feat/circuit version in memo#111

Merged
nol4lej merged 5 commits into
mainfrom
feat/circuit-version-in-memo
Jul 11, 2026
Merged

Feat/circuit version in memo#111
nol4lej merged 5 commits into
mainfrom
feat/circuit-version-in-memo

Conversation

@nol4lej

@nol4lej nol4lej commented Jul 11, 2026

Copy link
Copy Markdown
Member

Move a shielded note's ZK circuit version into the encrypted memo plaintext, so a note is self-contained: a wallet that recovers a note by scanning the chain keeps its true circuit version without any indexer lookup. This keeps old notes spendable across a VK rotation, the prover/pallet verify a spent note against the exact circuit version that created it, not the active one.
Before, the version had no on-chain home in the note itself; it was inferred from the indexer feed. Now it rides in the memo alongside value/assetId/blinding.

Changes

orbinum-encrypted-memo 0.6.0 → 0.7.0

  • MemoData gains circuit_version: u32 as the last plaintext field.
  • Plaintext 116 → 120 bytes; encrypted wire format 176 → 180 bytes (nonce(12) | ciphertext(120) | MAC(16) | ephPk(32)).
  • MemoData::new / new_without_counterparty gain a trailing circuit_version arg.

pallet-shielded-pool 0.9.0 → 0.10.0

  • MAX_ENCRYPTED_MEMO_SIZE 176 → 180; EncryptedMemo slice offsets updated (ciphertext [12..132], tag [132..148], ephPk [148..180]). The pallet still treats the memo as opaque bytes.
  • Weights regenerated on the reference host (ubuntu-32gb-fsn1-1, AMD EPYC-Genoa): CommitmentMemos MaxEncodedLen 226 → 230 raises proof_size for shield, shield_batch, private_transfer, unshield, claim_shielded_fees.

Runtime

  • spec_version 5 → 6.
  • transaction_version unchanged (3): the extrinsic SCALE codec is identical, the memo arg is still BoundedVec, only its max bound rose, so offline-signed extrinsics decode the same.

@nol4lej nol4lej merged commit 28decfe into main Jul 11, 2026
6 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