Repository navigation
fix(deployer): version each inserted verifier key - #200
Conversation
The insert path wrapped every key as `v3`, so a zkir-v3 build's `[v7]` keys failed the ledger's header check on any fragmented deploy. The ledger now picks the version per key, from the set its types declare.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (4)
Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. WalkthroughThe deployer now detects whether each verifier key matches ledger version v3 or v4 before building fragmented-deployment inserts. Tests cover standard ChangesVerifier Key Version Detection
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is established for the verifier-key version fix; it is ready for normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks keys by the lantern’s glow Comment |
Types of changes
What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
Put an
xin the boxes that applyFixes OpenZeppelin/compact-contracts#997
A zkir-v3 build emits
[v7]verifier keys, which ledger-v9 accepts only asv4. The insert path fixed every key atv3, so any fragmented deploy of such a contract failed its follow-up insert. The deploy tx itself was unaffected.Not visible in the diff:
'v3' | 'v4'), with no runtime list and no constructor that detects the version from the raw key. The candidate list is aRecordover that type, so a ledger bump that adds or drops a version fails the build here.compact-js's own insert path also hard-codesv3.PR Checklist
Further comments
The new fixture is the existing Counter
incrementkey rebuilt withcompact compile --feature-zkir-v3. Not yet run against a live node; the end-to-end check is theNativeShieldedTokenIssuerlive spec in compact-contracts once this is released.Summary by CodeRabbit
--feature-zkir-v3so verifier keys are accepted by the ledger, avoiding version-related deployment failures.