Skip to content

Implements Notary Proofs - #346

Merged
Step7750 merged 16 commits into
masterfrom
feature/notary-client
Oct 21, 2025
Merged

Step7750 merged 16 commits into
masterfrom
feature/notary-client

Conversation

@Step7750

@Step7750 Step7750 commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

Mega-PR that provides E2E functionality for computing tlsn proofs. There will be a few follow ups for submitting proofs and auto-computing them in certain circumstances.

Overview:

  • New NOTARY_PROVE method for external communication
  • New bridge layer for service worker <-> offscreen communication
  • Decent chunk of auxiliary bootstrapping in order to load WASM (ie. mutated CSP, headers)
  • Permits only one ongoing proof at a time -- likely a good idea regardless since CPU can briefly spike during proof gen

Firefox is not supported: It appears to not be possible to set Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy headers on the FF background page itself (dynamic MV3 header rewrite rules were a no-go as well). Given the small % that FF makes up on the site, we can likely shift them to the app to complete associated tasks.


Note

Introduce TLSNotary-based proof generation via a new NOTARY_PROVE API using an offscreen document with web worker threads, plus required CSP, build, and dependency updates.

  • Notary/TLSN proofs:
    • Add NOTARY_PROVE request (src/lib/bridge/handlers/notary_prove.ts) with concurrency limiting (MaxConcurrency) and new RequestType.NOTARY_PROVE.
    • Define proof request types and Steam URL builder (src/lib/notary/types.ts, src/lib/notary/utils.ts).
    • Offscreen infrastructure:
      • Message client (src/offscreen/client.ts), handlers map and TLSN prove handler (src/offscreen/handlers/{handlers.ts,notary_prove.ts,types.ts}).
      • Offscreen bootstrap and lifecycle (src/offscreen/{offscreen.html,offscreen.ts,utils.ts}), worker exposing tlsn-js via comlink (src/offscreen/worker.ts).
      • Initialize threads and compute presentations; estimate HTTP sizes for TLSN.
    • Environment config adds notary endpoints and logging levels (src/environment*.ts).
  • Build/config:
    • manifest.json: set minimum_chrome_version 109, add offscreen permission, and content_security_policy.extension_pages for WASM.
    • webpack.config.js: include offscreen entry, copy TLSN WASM/assets, Provide Buffer, add COEP/COOP dev headers, dev host permissions; filter offscreen permission for Firefox.
    • tsconfig.json: change module to es2022.
    • Dependencies: add tlsn-js, comlink, buffer.
  • Misc:
    • Add wait(ms) utility (src/lib/utils/snips.ts).

Written by Cursor Bugbot for commit 8771aff. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

@GODrums GODrums left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few optional minor improvements. Overall, super impressive technology though.

Comment thread webpack.config.js Outdated
Comment thread src/offscreen/utils.ts Outdated
Comment thread manifest.json
Comment thread src/offscreen/handlers/notary_prove.ts Outdated
Comment thread package.json Outdated
Comment thread src/offscreen/handlers/notary_prove.ts Outdated
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Comment thread src/offscreen/handlers/notary_prove.ts
@Step7750
Step7750 merged commit 35fcd32 into master Oct 21, 2025
3 checks passed
@Step7750
Step7750 deleted the feature/notary-client branch October 21, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants