Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
fix: verifiedBatch polling
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelArtists committed Apr 10, 2024
1 parent deeec65 commit 997a0d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/regression-test-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ jobs:
kurtosis run --enclave cdk-v1 --args-file params.yml .
- name: Monitor and report any potential regressions to CI logs
run: |
bake_time=5
bake_time=20
current_minute=$(date +'%M')
end_minute=$(( (current_minute + bake_time) % 60 ))
export ETH_RPC_URL="$(kurtosis port print cdk-v1 zkevm-node-rpc-001 http-rpc)"
INITIAL_STATUS=$(cast rpc zkevm_verifiedBatchNumber 2>/dev/null)
echo "Initial Verified Block Number: $INITIAL_STATUS"
echo "Initial verifiedBatchNumber: $INITIAL_STATUS"
incremented=false
while [ $(date +'%M') -lt $end_minute ]; do
# Attempt to connect to the service
if STATUS=$(cast rpc zkevm_verifiedBatchNumber 2>/dev/null); then
echo "ZKEVM_VERIFIED_BATCH_NUMBER: $STATUS"
echo "Current ZKEVM_VERIFIED_BATCH_NUMBER: $STATUS, continue polling.."
# Check if STATUS has incremented
if [ "$STATUS" != "$INITIAL_STATUS" ]; then
Expand All @@ -74,7 +74,7 @@ jobs:
echo "ZKEVM_VERIFIED_BATCH_NUMBER did not increment. This may indicate chain experienced a regression. Please investigate."
exit 1
fi
# - name: Finally, remove all devnet resources locally
# run: |
# cd kurtosis-cdk
# kurtosis clean -a
- name: Lastly, remove all local devnet resources
run: |
cd kurtosis-cdk
kurtosis clean -a
3 changes: 2 additions & 1 deletion .github/workflows/regression-test-manual-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ jobs:
export ETH_RPC_URL="$(kurtosis port print cdk-v1 zkevm-node-rpc-001 http-rpc)"
INITIAL_STATUS=$(cast rpc zkevm_verifiedBatchNumber 2>/dev/null)
echo "Initial verifiedBatchNumber: $INITIAL_STATUS"
incremented=false
while [ $(date +'%M') -lt $end_minute ]; do
# Attempt to connect to the service
if STATUS=$(cast rpc zkevm_verifiedBatchNumber 2>/dev/null); then
echo "ZKEVM_VERIFIED_BATCH_NUMBER: $STATUS"
echo "Current ZKEVM_VERIFIED_BATCH_NUMBER: $STATUS, continue polling.."
# Check if STATUS has incremented
if [ "$STATUS" != "$INITIAL_STATUS" ]; then
Expand Down

0 comments on commit 997a0d3

Please sign in to comment.