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 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

tuxcanfly
Copy link

@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
  • generate proof for range by invoking blevm


impl ProverService {
async fn new() -> Result<Self, Box<dyn std::error::Error>> {
let token = env::var("CELESTIA_NODE_AUTH_TOKEN").expect("Token not provided");
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this ENV variable isn't described in the README yet

.await
.expect("Failed creating Celestia RPC client");

let evm_rpc = env::var("EVM_RPC_URL").expect("EVM_RPC_URL not provided");
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this ENV variable isn't described in the README yet

cargo run
```

To use the SP1 Prover Network you should also populate the `SP1_PROVER` and `SP1_PRIVATE_KEY` environment variables. You can also use a `.env` file for all environment variables
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: should we provide an example.env that users can copy with pre-populated defaults for the environment variables?

Comment on lines +83 to +159
// Use the namespace from the request or a default
let namespace = Namespace::new_v0(&alloy::hex::decode("0f0f0f0f0f0f0f0f0f0f").unwrap())
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this doesn't use the namespace from the request yet, right?

Suggested change
// Use the namespace from the request or a default
let namespace = Namespace::new_v0(&alloy::hex::decode("0f0f0f0f0f0f0f0f0f0f").unwrap())
// Use a default namespace
// TODO: use the namespace from the request
let namespace = Namespace::new_v0(&alloy::hex::decode("0f0f0f0f0f0f0f0f0f0f").unwrap())

Comment on lines +12 to +14
- `TENDERMINT_RPC_URL` - the url of the tendermint chain you are proving.
- `RPC_URL` the json rpc url of the evm chain you are generating the proofs for.
- `CONTRACT_ADDRESS` - the evm address of the tendermint sp1 ics07 contract.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think these environment variables don't reflect the environment variables expected by the EVM prover

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.

2 participants