-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestintegrationIntegration workIntegration worktwo-treeTwo-tree architecture migrationTwo-tree architecture migration
Description
Summary
The proof generation UI must handle both single-tree and two-tree proof paths, including progress indicators for mobile proving times that may reach 20-30 seconds on mid-range devices.
Severity: Required for two-tree deployment
Source: Two-Tree Architecture Spec, Performance Agent Review
Related voter-protocol tracking: Phase 5 remaining items
Requirements
Dual-System Proof Generation
- Detect credential type (
single-treevstwo-tree) - Route to
NoirProverorTwoTreeNoirProverAdapteraccordingly - Both paths produce a proof + public inputs for on-chain verification
- Submission API must accept both formats during the transition period
Progress UI
- Two-tree proofs generate ~25.5K constraints (2.3× single-tree)
- Estimated proving times:
- iPhone 14+: ~14s ✅
- Android flagship: ~14-17s ✅
- Mid-range (2yr old): ~20-28s
⚠️ - Low-end: ~30-40s
⚠️
- Progress bar or spinner with elapsed time for proofs exceeding 15s
- Timeout handling with user-friendly retry option (suggest closing other tabs)
Deployment Coordination
- Both verifier contracts (single-tree DistrictGate and two-tree DistrictGate) must be active
- API endpoints accept both proof formats
- Feature flag or credential-type-based routing
- Monitoring: track proof type distribution during rollover
Pitfalls
- WASM thread contention on mobile — proof generation should block UI minimally (use Web Worker)
- Two-tree proofs have 29 public inputs vs 5 — the submission payload is significantly larger
- Network timeout on slow connections with large payloads — consider chunked upload or compression
- The 6-month rollover means both systems run in parallel for the entire period — test resource usage
Acceptance Criteria
- Proof generation routes correctly based on credential type
- Progress UI for proofs > 15s
- Timeout + retry UX for proofs > 30s
- Web Worker for non-blocking proof generation
- Both proof types accepted by submission API
- Feature flag for two-tree activation
- Mobile device testing on target matrix (iPhone 12+, Pixel 6+, mid-range)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestintegrationIntegration workIntegration worktwo-treeTwo-tree architecture migrationTwo-tree architecture migration