Repository navigation
Add VK rotation version awareness and safety documentation - #850
Merged
Mikey-222 merged 2 commits intoOct 20, 2026
Merged
Conversation
Server-side (server/routes/zk.ts): - Log circuit path and VK rotation note on prover initialization - Add _vkRotationWarning field to proof responses - Alerts clients to validate VK version matches Client-side (src/utils/zkProver.js): - Add comprehensive VK rotation safety documentation - Warn that stale PWA cache can accept forged credentials post-rotation - Document atomic rotation requirement across 4 verification layers - Add VK hash logging in buildAggregationInputs for debugging - Log note to verify VK hash matches server/recursive_verifier These additions provide visibility into VK version state and warn developers about rotation desync risks (ISP-051).
Adds comprehensive VK rotation warning section to stellar-zk-runbook.md: Critical safety notice: - All 4 verification layers must rotate atomically - Lists symptoms of VK mismatch (client/server/recursive/chain) - Security warning: stale PWA cache accepts forged credentials Rotation checklist (incomplete): - Compile circuit - Update server VK (manual restart required) - Clear PWA cache - Update recursive verifier constant - Update Soroban on-chain vk_hash - Cross-layer verification test Future work (ISP-051 spike): - Manifest supersession tracking - PWA cache version negotiation - Server VK hot-reload - Fail-closed mismatch handling - Offline grace policy with signed expiry This documents the current known limitations and provides operational guidance until full atomic rotation is implemented.
|
@davidishere1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds minimal defensive VK rotation awareness to prevent stale-cache security issues, with comprehensive documentation of the rotation safety contract.
Key additions:
Changes
1. Server-Side VK Awareness —
server/routes/zk.tsProver initialization logging:
Proof response warning:
Impact: Developers see VK version state in logs and API responses.
2. Client-Side VK Rotation Documentation —
src/utils/zkProver.jsAdded comprehensive safety warning in file header:
Added VK hash logging:
Impact: Clear warning visible to all zkProver users about rotation dangers.
3. Runbook Documentation —
docs/stellar-zk-runbook.mdNew section: "⚠️ Verification Key (VK) Rotation Safety (ISP-051)"
Critical safety notice:
Rotation checklist (incomplete):
Future work callout:
What This Does NOT Fix (Per Minimal Approach)
Following the soft-fix approach, this PR does NOT implement:
These remain as ISP-051 spike work (24h extreme-difficulty integration).
Rationale for Minimal Approach
The issue describes a P0/Critical security problem where:
A complete fix requires:
This PR provides immediate defensive value:
While full atomic rotation awaits the 24h spike.
Security Impact
Before this PR:
After this PR:
Still vulnerable (requires ISP-051 spike):
Testing Recommendations
Log verification:
Rotation drill (manual):
nargo compileCloses #721
Closes #720
Closes #724
Closes #725