-
Notifications
You must be signed in to change notification settings - Fork 39
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
regression and benchmark testing between jerigon and zkevm #751
base: develop
Are you sure you want to change the base?
Conversation
45eb44d
to
581be7e
Compare
581be7e
to
3e0ff27
Compare
9967181
to
18f7058
Compare
0dceebc
to
4dc1e8f
Compare
4dc1e8f
to
e254c8a
Compare
- name: Run Erigon Network | ||
run: | | ||
cd .. | ||
tar xf "$(pwd)/zk_evm/test_data/erigon-data.tar.gz" || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nashtare @praetoriansentry what would be best way to store the file? currently added with repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not big, I think it can stay with repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are using a shorter data (672) blocks, if we use that, its probably fine but if we choose to go with a larger set of data, we may need to think
run: | | ||
export ETH_RPC_URL="http://localhost:8545" | ||
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out | ||
random_numbers=($(shuf -i 1-500 -n 5)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nashtare @praetoriansentry currently using random 5 blocks for integration testing, any pref for block count
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is a good idea to take random 5 blocks. Should be all 500 probably, if we run it once a week. Maybe 10 or 100, if 500 is too much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya its just for testing, we will choose whatever we think is fine. i was thinking somewhere around 100
echo "$(date +"%Y-%m-%d %H:%M:%S")" &>> "$OUTPUT_LOG" | ||
|
||
# Define the blocks to process | ||
blocks=(100 200 300 400 500) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@praetoriansentry @Nashtare currently using random blocks, any idea which blocks to use for benchmark testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could read the list from the config file (CSV to make it simple?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this is just a placeholder. we will choose block numbers first and if thats too much, we will put that in config file
@praetoriansentry @Nashtare currently using |
name: Jerigon Zero Testing | ||
|
||
on: | ||
# Uncomment when ready to run on a schedule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
Sample output in log file
@praetoriansentry @Nashtare let me know what more data we want to add to this. |
jobs: | ||
jerigon_zero_testing: | ||
name: Jerigon Zero Testing - Integration and Benchmarking | ||
runs-on: zero-ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zero-ci
is shared among other tasks. Ben created zero-reg
- stronger, and for use only with benchmarks. We should just make sure that we schedule checks at different time.
push: | ||
branches: [develop] | ||
pull_request: | ||
branches: | ||
- "**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be removed when PR is debugged, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is just for testing
run: | | ||
export ETH_RPC_URL="http://localhost:8545" | ||
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out | ||
random_numbers=($(shuf -i 1-500 -n 5)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is a good idea to take random 5 blocks. Should be all 500 probably, if we run it once a week. Maybe 10 or 100, if 500 is too much.
- name: Run Erigon Network | ||
run: | | ||
cd .. | ||
tar xf "$(pwd)/zk_evm/test_data/erigon-data.tar.gz" || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not big, I think it can stay with repo.
# Run performance stats | ||
if ! perf stat -e cycles ./target/release/leader --runtime in-memory --load-strategy monolithic --block-batch-size "$BLOCK_BATCH_SIZE" --proof-output-dir "$PROOF_OUTPUT_DIR" stdio < "output_${block}.json" &> "$BLOCK_OUTPUT_LOG"; then | ||
echo "Performance command failed for block: $block" &>> "$OUTPUT_LOG" | ||
cat "$BLOCK_OUTPUT_LOG" &>> "$OUTPUT_LOG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use one output file to append performance measurements, and the other for error log details. This way, any error that happens will dump big log to the previous performance results and would make them hard to read.
set +o pipefail | ||
if ! cat "$BLOCK_OUTPUT_LOG" | grep "Successfully wrote to disk proof file " | awk '{print $NF}' | tee "$PROOFS_FILE_LIST"; then | ||
echo "Proof list not generated for block: $block. Check the log for details." &>> "$OUTPUT_LOG" | ||
cat "$BLOCK_OUTPUT_LOG" &>> "$OUTPUT_LOG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is $BLOCK_OUTPUT_LOG
the whole leader output terminal log? We should just keep minimal details and time measurements, as we want to track changes over weeks - not to append whole debug/info leader log to the results file. One liner with the block that error-ed in results file, and separate file with whole error log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is printed only in case of failure, if a block proving fails. otherwise we wont know why a block failed
if it succeeds, then we are printing only details about time measurements.
maybe, we can move failure blocks to a new file or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can print 'Proof list not generated for block: $block. Check the log for details."' so that we know the block failed. Then you check the error logs in the other file.
echo "Processing block: $block" &>> "$OUTPUT_LOG" | ||
|
||
# Fetch block data | ||
if ! ./target/release/rpc --rpc-url "$ETH_RPC_URL" fetch --start-block "$block" --end-block "$block" > "output_${block}.json"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output_${block}.json
is a bit misleading. Maybe witness_${block}.json
?
process_block() { | ||
local block=$1 | ||
|
||
echo "Processing block: $block" &>> "$OUTPUT_LOG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the results file minimal - maybe one line with date/time of measurement, and the timings for the blocks. Would be easy that way to open file and see how the performances are changed over weeks and months.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the expected output
let me know if we need to reduce more. i think this also gives clear info along with being concise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line Processing block: 1
is redundant, does not bring any new information.
#726 #704