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

create evm prover #56

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

tuxcanfly
Copy link
Contributor

@tuxcanfly tuxcanfly commented Dec 20, 2024

Overview

[WIP] create evm proving service

  • query the Groth16 client on SimApp for the client and consensus state.
  • decode trusted height and header
  • query evm chain for target height
  • serialize evm block into blob use rsp::executor::execute_variant
  • lookup proofs for blob from celestia
  • generate proof for range by invoking blevm [blocked by Generate aggregate proof #42]

provers/evm-prover/src/main.rs Outdated Show resolved Hide resolved
provers/evm-prover/src/main.rs Show resolved Hide resolved
provers/evm-prover/README.md Outdated Show resolved Hide resolved
provers/evm-prover/src/main.rs Outdated Show resolved Hide resolved
provers/evm-prover/README.md Outdated Show resolved Hide resolved
@tuxcanfly
Copy link
Contributor Author

Blocked on #42 ideally we should be able to pass [trusted_height, target_height] range to generate aggregate proof using a helper importing blevm as a library.

Until that is implemented we can use the mock program: S1nus/blevm#2 once that's merged.

@@ -0,0 +1,5 @@
export CELESTIA_NODE_AUTH_TOKEN=
Copy link
Member

Choose a reason for hiding this comment

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

any reason why you added a separate .env.example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should use the common .env


To run the server you will need to clone the repo and install rust and cargo. To run the node you also need to set the following environment variables:

- `CELESTIA_NODE_AUTH_TOKEN` - the auth token for the celestia node you are connecting to.
Copy link
Member

Choose a reason for hiding this comment

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

we have a node auth token file in test files so it should probably consume the key form there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep

@tuxcanfly
Copy link
Contributor Author

Rebased on sp1 sdk v4.

@tuxcanfly
Copy link
Contributor Author

Next steps: need to create a aggregator which has BlevmAggOutput as it's public values and which verifies the blevm-aggregator proofs inside it, so that we can we verify consecutive ranges by comparing output1.newest_header_hash and output2.oldest_header_hash. The range proof will be a binary tree where the intermediate nodes are aggregate proofs and the leafs are single block proofs. The root node will give us the recursive proofs required to prove the entire range in O(log n).

@tuxcanfly
Copy link
Contributor Author

Next steps: need to create a aggregator which has BlevmAggOutput as it's public values and which verifies the blevm-aggregator proofs inside it, so that we can we verify consecutive ranges by comparing output1.newest_header_hash and output2.oldest_header_hash. The range proof will be a binary tree where the intermediate nodes are aggregate proofs and the leafs are single block proofs. The root node will give us the recursive proofs required to prove the entire range in O(log n).

This is being done in #154

Rebased this PR on latest main, need to into the aggregator once the above is merged.

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.

3 participants