Skip to content

Commit

Permalink
Fix comments and readme and remove old script
Browse files Browse the repository at this point in the history
  • Loading branch information
sergerad committed Nov 19, 2024
1 parent 9f5e31a commit 6b20299
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 195 deletions.
3 changes: 2 additions & 1 deletion scripts/prove_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub struct ProveRpcArgs {
output_dir: PathBuf,
}

/// Run leader binary to prove a block range via RPC.
pub fn prove_via_rpc(args: ProveRpcArgs) -> Result<()> {
// Set rustc environment variables.
set_var("RUST_MIN_STACK", "33554432");
Expand Down Expand Up @@ -102,7 +103,7 @@ pub fn prove_via_rpc(args: ProveRpcArgs) -> Result<()> {
if !proof_output_dirpath.exists() {
create_dir_all(proof_output_dirpath)?;
}
/// Set file handle limit.
// Set file handle limit.
const RECOMMENDED_FILE_LIMIT: isize = 8192;
if !sysinfo::set_open_files_limit(RECOMMENDED_FILE_LIMIT) {
eprintln!("WARNING: Unable to set file descriptor limit to recommended value: {RECOMMENDED_FILE_LIMIT}.");
Expand Down
192 changes: 0 additions & 192 deletions scripts/prove_rpc.sh

This file was deleted.

4 changes: 2 additions & 2 deletions zero/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ For testing proof generation for blocks, the `testing` branch should be used.
If you want to generate a full block proof, you can use `cargo xtask prove-rpc`:

```sh
cargo xtask prove-rpc -s <BLOCK_START> -e <BLOCK_END> -u <FULL_NODE_ENDPOINT> -t <RPC_TYPE> -c <CHECKPOINT_BLOCK> -m <MODE>
cargo xtask prove-rpc <RPC_URL> <RPC_TYPE> <MODE> <BLOCK_START> -e <BLOCK_END> -c <CHECKPOINT_BLOCK>
```

Which may look like this:
Expand All @@ -447,7 +447,7 @@ A few other notes:
If you want to test a block without the high CPU & memory requirements that come with creating a full proof, you can instead generate only the witness using `cargo xtask prove-rpc` in the `test` mode:

```sh
cargo xtask prove-rpc -u "$ETH_RPC_URL" -s 17 -e 18 -t jerigon -c 16 -b 3000 -r 100 -m test
cargo xtask prove-rpc "$ETH_RPC_URL" jerigon test 17 -e 18 -c 16 -b 3000 -r 100
```

Finally, note that both of these testing scripts force proof generation to be sequential by allowing only one worker. Because of this, this is not a realistic representation of performance but makes the debugging logs much easier to follow.
Expand Down

0 comments on commit 6b20299

Please sign in to comment.