Skip to content

Commit

Permalink
Add nonce check in resequence test
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Jan 7, 2025
1 parent 070b606 commit 485c423
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/scripts/test_resequence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ kurtosis service exec cdk-v1 cdk-erigon-sequencer-001 "nohup cdk-erigon --pprof=
# Wait for cdk-erigon to start
sleep 30

num_requests=2000

echo "Running loadtest using polycli"
/usr/local/bin/polycli loadtest --rpc-url "$(kurtosis port print cdk-v1 cdk-erigon-rpc-001 rpc)" --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625" --verbosity 600 --requests 2000 --rate-limit 500 --mode uniswapv3 --legacy
/usr/local/bin/polycli loadtest --rpc-url "$(kurtosis port print cdk-v1 cdk-erigon-rpc-001 rpc)" --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625" --verbosity 600 --requests $num_requests --rate-limit 500 --mode uniswapv3 --legacy

echo "Waiting for batch virtualization"
if ! wait_for_l1_batch 600 "virtual"; then
Expand Down Expand Up @@ -193,6 +195,14 @@ else
exit 1
fi

echo "Check the nonce of the account is > 2000"
nonce=$(cast nonce "0xE34aaF64b29273B7D567FCFc40544c014EEe9970" --rpc-url "$(kurtosis port print cdk-v1 cdk-erigon-rpc-001 rpc)")
echo "Nonce: $nonce"
if [ "$nonce" -lt $num_requests ]; then
echo "Nonce $nonce is less than $num_requests, which means some txns were not resequenced successfully"
exit 1
fi

echo "Waiting for batch verification"
if ! wait_for_l1_batch 1200 "verified"; then
echo "Failed to wait for batch verification"
Expand Down

0 comments on commit 485c423

Please sign in to comment.