Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prover service for EVM #41

Open
cmwaters opened this issue Dec 17, 2024 · 3 comments
Open

Prover service for EVM #41

cmwaters opened this issue Dec 17, 2024 · 3 comments
Assignees

Comments

@cmwaters
Copy link
Collaborator

Similar to #33, we need a proving service the relayer can use to update the groth16 client on simapp/celestia.

This will wrap the program https://github.com/S1nus/blevm/tree/main and should comply with the current proposed interface (of course subject to change) here. We can worry about the membership proofs later, in the short term we should just worry about proving the state transition function

@rootulp
Copy link
Collaborator

rootulp commented Dec 17, 2024

@cmwaters has an in-flight PR that sets up some directories we can re-use in this issue: #33

  • This issue is to create an evm-prover that wraps around blevm.
  • Generates one proof per block.
  • celestia-prover has an input for Tendermint RPC, queries latest height from chain (chainHeight), queries latest height of the client (clientHeight), generates a proof from clientHeight to chainHeight.
  • Currently blevm prooves one EVM block is valid and included in Celestia data root. Aggregation hasn't been built yet.
  • This service should generate one STARK proof per block. Then generate one recursive proof that includes all the blocks from clientHeight to chainHeight.
  • To get the best performance, aggregate in a tree structure. Group two leaves, another two leaves, then group one level up two child nodes. We can make the outermost SNARK proof aggregate any number of heights.
  • We can punt the design of aggregation of block heights (performance improvement).

When do we generate the proof?

  • Option A: generate one STARK proof per block height, generate aggregated proof every block range of 16. Generate a Groth16 proof around the aggregate proof.
  • Option B: generate one proof per block height, generate aggregated proof when user requests it. Generate a Groth16 proof around aggregate proof.

Partially blocked on #42

@rootulp
Copy link
Collaborator

rootulp commented Dec 19, 2024

Stand-up notes

  • Javed was looking at Celestia prover and will open a PR soon to copy over main.rs from blevm
  • SimApp needs a GRPC server for querying client state + consensus state. SimApp's IBC client 02 has a query service that you can query client state.
  • IBC team has Rust code to query client state + consensus state (likely ibc-rs or a lib that Hermes uses).
  • IBC team is building their own relayer.

@rootulp
Copy link
Collaborator

rootulp commented Dec 20, 2024

  • This service needs to query the Groth16 client on SimApp for the client and consensus state.
  • @rootulp extract fix for client and consensus state initialization

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

No branches or pull requests

3 participants