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

feat: dummy zk circuits #55

Merged
merged 30 commits into from
Jan 17, 2025
Merged

feat: dummy zk circuits #55

merged 30 commits into from
Jan 17, 2025

Conversation

ninabarbakadze
Copy link
Member

@ninabarbakadze ninabarbakadze commented Dec 19, 2024

Overview

Partially fixes - #40

@ninabarbakadze ninabarbakadze changed the title Cal/dummy zk programs feat: dummy zk circuits Dec 19, 2024
provers/celestia-prover/README.md Outdated Show resolved Hide resolved
provers/celestia-prover/README.md Outdated Show resolved Hide resolved
@ninabarbakadze ninabarbakadze marked this pull request as ready for review January 15, 2025 14:20
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

Code LGTM.

When I run celestia-prover in Docker then I can't generate a proof:

$     grpcurl -plaintext -d '{"client_id": "0x25cdbd2bf399341f8fee22ecdb06682ac81fdc37"}' localhost:50051 celestia.prover.v1.Prover/ProveStateTransition
ERROR:
  Code: Unavailable
  Message: error reading from server: EOF

When I run it locally it eventually panicked:

Prover Server listening on [::]:50051
thread 'main' panicked at provers/celestia-prover/src/main.rs:194:10:
PROTO_DESCRIPTOR_PATH environment variable not set: NotPresent
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

looks like that isn't in the .env file

docker-compose.yml Outdated Show resolved Hide resolved
make setup
```

1. Make sure to set `SP1_PROVER=network` in `.env` and get sp1 prover network private key from celestia 1Password.
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 is kinda repeated below:

Prover network

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

In a FLUP we can consolidate these two lines

Copy link
Member Author

Choose a reason for hiding this comment

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

I was still trying to see if local worked for you and then i would've removed prover network step from the required steps and would've just left this section untouched

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does setting the SP1_PROVER=network in local .env actually impact the celestia prover running in Docker?

provers/celestia-prover/README.md Outdated Show resolved Hide resolved
provers/celestia-prover/src/main.rs Outdated Show resolved Hide resolved
provers/celestia-prover/src/main.rs Outdated Show resolved Hide resolved
programs/sp1/mock-update-client/Cargo.toml Outdated Show resolved Hide resolved
@rootulp
Copy link
Collaborator

rootulp commented Jan 15, 2025

Question: why is trying to prove from block height 7 to 7? That seems like a no-op.

proving from height block::Height(7) to height Height { revision: 0, height: 7 }

@rootulp
Copy link
Collaborator

rootulp commented Jan 15, 2025

I was able to generate a proof using the prover network and it took 30 secs to 3 minutes 👍 Some of that time was downloading artifacts so maybe it goes faster the second time (?)

@ninabarbakadze
Copy link
Member Author

I was able to generate a proof using the prover network and it took 30 secs to 3 minutes 👍 Some of that time was downloading artifacts so maybe it goes faster the second time (?)

yes, it will go faster the following times

@ninabarbakadze
Copy link
Member Author

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Code LGTM.

When I run celestia-prover in Docker then I can't generate a proof:

$     grpcurl -plaintext -d '{"client_id": "0x25cdbd2bf399341f8fee22ecdb06682ac81fdc37"}' localhost:50051 celestia.prover.v1.Prover/ProveStateTransition
ERROR:
  Code: Unavailable
  Message: error reading from server: EOF

When I run it locally it eventually panicked:

Prover Server listening on [::]:50051
thread 'main' panicked at provers/celestia-prover/src/main.rs:194:10:
PROTO_DESCRIPTOR_PATH environment variable not set: NotPresent
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

looks like that isn't in the .env file

I think you need to build in order to generate the file

@rootulp rootulp requested review from rootulp and cmwaters January 16, 2025 18:48
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

Thanks for pushing this through! There are FLUPs for:

  1. Consolidate .env files #75
  2. Switch between simple circuits and real circuits #68

but please create new issues if there are other FLUPs

make setup
```

1. Make sure to set `SP1_PROVER=network` in `.env` and get sp1 prover network private key from celestia 1Password.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does setting the SP1_PROVER=network in local .env actually impact the celestia prover running in Docker?

@rootulp rootulp merged commit 9563d5d into main Jan 17, 2025
3 checks passed
@rootulp rootulp deleted the cal/dummy-zk-programs branch January 17, 2025 15:57
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