Skip to content

ZK-058: Add browser-safe note randomness boundary#329

Closed
alceops wants to merge 1 commit intoANAVHEOBA:mainfrom
alceops:alceops/browser-safe-note-randomness
Closed

ZK-058: Add browser-safe note randomness boundary#329
alceops wants to merge 1 commit intoANAVHEOBA:mainfrom
alceops:alceops/browser-safe-note-randomness

Conversation

@alceops
Copy link
Copy Markdown

@alceops alceops commented Apr 25, 2026

Summary

  • adds a runtime-safe secure randomness boundary for SDK note generation
  • supports browser Web Crypto getRandomValues and Node crypto.randomBytes without a top-level Node crypto import
  • keeps deterministic/randomness injection isolated for tests and fails clearly when no secure source is available

Verification

  • npm test -- --runInBand random.test.ts
  • npm run build

Note: full npm test -- --runInBand currently fails on pre-existing/mainline unrelated witness/public-input expectations (for example golden_vectors.test.ts expects the old packWithdrawalPublicInputs arity and malformed witness tests expect WitnessValidationError while current code wraps ProvingError).

Closes #302

@alceops
Copy link
Copy Markdown
Author

alceops commented Apr 25, 2026

This PR is now superseded by changes already merged into main via #332, which closed #302 and implemented the browser-safe note randomness path. Closing this to avoid keeping a conflicting/obsolete PR open. No payout claim from this PR.

@alceops alceops closed this Apr 25, 2026
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.

ZK-058: Add browser-safe randomness and environment fallbacks for note generation

1 participant