Skip to content

Commit 1554492

Browse files
ilitteriJereSalo
andauthored
refactor(replay): ethrex-replay improvements (#4641)
**Motivation** <!-- Why does this pull request exist? What are its goals? --> **Description** > [!NOTE] > Some of these changes were inspired by [`ere`](https://github.com/eth-act/ere) and [`zkevm-benchmark-workload`](https://github.com/eth-act/zkevm-benchmark-workload). > This PR settles the ground for adding `ere` as an alternative backend for `ethrex-replay`. - Adds new options `--zkvm`, `--resource` (cpu, gpu), and `--action` (prove, execute). - Adds help heading for options. - Makes block number, batch number, tx hash positional args to avoid needing to specify them with flags (could seem redundant in some commands e.g. `ethrex-replay block --block`, `ethrex-replay batch --batch`, etc). - Executes using CPU and no ZKVM by default. - Removes the module `bench` as it was already replaced by the report. - Refactors the reports (both how it is printed in the console and as slack message, se the images below). **Old Messages/Console print** <img width="397" height="323" alt="image" src="https://github.com/user-attachments/assets/16715acf-8feb-44e9-99c6-4166b51ce15b" /> <img width="1406" height="37" alt="image" src="https://github.com/user-attachments/assets/3ea6ef85-9e5d-4375-bd11-6ed16a9f4c01" /> **New** <img width="486" height="327" alt="image" src="https://github.com/user-attachments/assets/d85d97cd-2ff7-4027-9c6b-74cc8554fe7b" /> <img width="464" height="221" alt="image" src="https://github.com/user-attachments/assets/973ee4ba-b5d2-4c3f-8eb4-1c8390f4ac12" /> --------- Co-authored-by: Jeremías Salomón 🐃🐄🥚 <48994069+JereSalo@users.noreply.github.com>
1 parent 1c41473 commit 1554492

10 files changed

Lines changed: 962 additions & 816 deletions

File tree

cmd/ethrex_replay/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
.PHONY: prove-sp1-gpu-ci prove-risc0-gpu-ci
1+
.PHONY: execute prove-sp1-gpu-ci prove-risc0-gpu-ci execute-sp1-ci execute-risc0-ci
22

33
# Block parameters
44
ifdef BLOCK_NUMBER
5-
REPLAY_BLOCK_ARGS = --block ${BLOCK_NUMBER}
5+
REPLAY_BLOCK_ARGS = ${BLOCK_NUMBER}
66
endif
7-
REPLAY_BLOCK_ARGS += --rpc-url ${RPC_URL} --bench
7+
REPLAY_BLOCK_ARGS += --rpc-url ${RPC_URL}
88

99
## Execution block
1010
execute:
11-
cargo r -r --features ci --no-default-features -- block --execute ${REPLAY_BLOCK_ARGS}
11+
cargo r -r --features ci --no-default-features -- block ${REPLAY_BLOCK_ARGS}
1212

1313
prove-sp1-gpu-ci:
14-
SP1_PROVER=cuda cargo r -r --features "sp1,gpu,ci" -- block --prove ${REPLAY_BLOCK_ARGS}
14+
SP1_PROVER=cuda cargo r -r --features "sp1,gpu,ci" -- block --zkvm sp1 --action prove --resource gpu ${REPLAY_BLOCK_ARGS}
1515
prove-risc0-gpu-ci:
16-
cargo r -r --no-default-features --features "risc0,gpu,ci" -- block --prove ${REPLAY_BLOCK_ARGS}
16+
cargo r -r --no-default-features --features "risc0,gpu,ci" -- block --zkvm risc0 --action prove --resource gpu ${REPLAY_BLOCK_ARGS}
1717

1818
execute-sp1-ci:
19-
cargo r -r --features "sp1,ci" -- block --execute ${REPLAY_BLOCK_ARGS}
19+
cargo r -r --features "sp1,ci" -- block --zkvm sp1 ${REPLAY_BLOCK_ARGS}
2020
execute-risc0-ci:
21-
cargo r -r --no-default-features --features "risc0,ci" -- block --execute ${REPLAY_BLOCK_ARGS}
21+
cargo r -r --no-default-features --features "risc0,ci" -- block --zkvm risc0 ${REPLAY_BLOCK_ARGS}

cmd/ethrex_replay/src/bench.rs

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)