Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| thiserror = "2" | ||
| tokio = { version = "1", features = ["sync"] } | ||
| rusqlite = { version = "0.32", features = ["bundled-sqlcipher"], optional = true } | ||
| uuid = { version = "1.10", features = ["v4"], optional = true } |
There was a problem hiding this comment.
This doesn't compile to wasm, maybe we use something friendlier already
| } | ||
| let (proof, nullifier) = self | ||
| .0 | ||
| .generate_proof(proof_request, credential, credential_sub_blinding_factor) |
There was a problem hiding this comment.
Let's split the nullifier and proof generation, we don't want to waste the computation of the proof if replay won't pass. This is especially important for devices with limited resources
There was a problem hiding this comment.
protocol implementation: worldcoin/world-id-protocol#278
implementation on this PR: https://github.com/worldcoin/walletkit/pull/168/changes
| } | ||
|
|
||
| fn serialize_inclusion_proof( | ||
| payload: &CachedInclusionProof, |
There was a problem hiding this comment.
Nit. Why not make this serialization method part of the struct?
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac956f59ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let payload_bytes = serialize_inclusion_proof(&payload)?; | ||
| let proof_root = field_element_to_bytes(proof.root); | ||
| storage.merkle_cache_put( | ||
| registry_kind, | ||
| proof_root, |
There was a problem hiding this comment.
Validate proof root against requested root
If the caller passes a specific root (e.g., from on-chain state) and the indexer returns a proof for a different root, this method still returns that proof and caches it under proof.root. That means callers expecting a proof for the requested root can get a mismatched proof (verification will fail against the expected root), and subsequent calls for the requested root will keep missing the cache. Consider checking proof.root against the root parameter and returning an error (or refetching) when they differ, or storing under the requested root only when it matches.
Useful? React with 👍 / 👎.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
thomas-waite
left a comment
There was a problem hiding this comment.
Approving to unblock

No description provided.