spaceandtimelabs / sxt-proof-of-sql

Space and Time | Proof of SQL
Other
1.45k stars 31 forks source link

Enable using transcripts other than `merlin::Transcript`. #161

Open JayWhite2357 opened 1 week ago

JayWhite2357 commented 1 week ago

Background and Motivation

Currently, the Proof of SQL prover uses the merlin crate to provide it's public-coin transcript, created here: https://github.com/spaceandtimelabs/sxt-proof-of-sql/blob/29d334d5cd6e31cf66a0353f21613932df63c059/crates/proof-of-sql/src/sql/proof/query_proof.rs#L62. However, merlin does not support no_std (see #117 and https://github.com/zkcrypto/merlin/pull/8) and is not conducive to use within the EVM/Solidity.

https://github.com/spaceandtimelabs/sxt-proof-of-sql/pull/123 and https://github.com/spaceandtimelabs/sxt-proof-of-sql/pull/159 add a new Transcript trait that allows for using different transcripts. (Such as the simple Keccak256Transcript.)

If we replace all uses of merlin::Transcript with impl Transcript, we enable the ability to use any transcript implementation that is desired.

Requested Changes

We need to replace all usage of merlin::Transcript with impl Transcript. Tests can still leverage merlin::Transcript because they need a concrete implementation, but all other code should be written generically.

JayWhite2357 commented 1 week ago

@jvff Here is the issue that we discussed. This should complete the work to support wasm32-unknown-unknown without JS.