Skip to content

Commit

Permalink
chore: remove params.yml (#306)
Browse files Browse the repository at this point in the history
* chore: remove args file

* fix: attach cdk test

* fix: legacy zkevm stack and pless zkevm-node cardona configs

* debug

* fix: attempt

* fix: path

* chore: move check of stopped services to ci job

* fix: typo

* fix: toolbox image

* fix: args parsing

* fix: sequencer type

* chore: remove `params.yml` from the matrix

* fix: check for stopped services while making sure batches are being verified to catch more errors

* chore: nit

* docs: update README

* chore: update monitor script

* chore: rename vars

* fix: temporary fix - target the sequencer instead of the rpc

* chore: lint

* fix: typos

* test: commit test combinations

* ci: check if test combinations are up to date

* fix: sequencer name issue

* ci: fix typo in validate test combinaton job

* fix: typo

* debug: comment step

* fix

* fix: typo

* ci: fix

* test

* chore: clean up
  • Loading branch information
leovct authored Oct 14, 2024
1 parent e354559 commit 39f708f
Show file tree
Hide file tree
Showing 29 changed files with 516 additions and 603 deletions.
62 changes: 0 additions & 62 deletions .github/scripts/compare-default-params.sh

This file was deleted.

29 changes: 23 additions & 6 deletions .github/scripts/monitor-verified-batches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@

# Function to display usage information.
usage() {
echo "Usage: $0 --rpc-url <URL> --target <TARGET> --timeout <TIMEOUT>"
echo "Usage: $0 --enclave <ENCLAVE> --rpc-url <URL> --target <TARGET> --timeout <TIMEOUT>"
echo " --enclave: The name of the Kurtosis enclave."
echo " --rpc-url: The RPC URL to query."
echo " --target: The target number of verified batches."
echo " --timeout: The script timeout in seconds."
exit 1
}

# Initialize variables.
enclave=""
rpc_url=""
target="10"
timeout="900" # 15 minutes.
Expand All @@ -21,6 +23,10 @@ timeout="900" # 15 minutes.
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--enclave)
enclave="$2"
shift 2
;;
--rpc-url)
rpc_url="$2"
shift 2
Expand All @@ -34,19 +40,26 @@ while [[ $# -gt 0 ]]; do
shift 2
;;
*)
echo "Error: unknown argument: $key"
usage
;;
esac
done

# Check if the required argument is provided.
if [ -z "$enclave" ]; then
echo "Error: enclave name is required."
usage
fi

if [ -z "$rpc_url" ]; then
echo "Error: RPC URL is required."
echo "Error: rpc url is required."
usage
fi

# Print script parameters for debug purposes.
echo "Running script with values:"
echo "- Enclave: $enclave"
echo "- RPC URL: $rpc_url"
echo "- Target: $target"
echo "- Timeout: $timeout"
Expand All @@ -60,10 +73,14 @@ gas_price_factor=1
# Main loop to monitor batch verification.
while true; do
# Check if there are any stopped services.
if kurtosis enclave inspect "$ENCLAVE_NAME" | grep STOPPED ; then
echo "It looks like there is a stopped service in the enclave. Something must have halted"
kurtosis enclave inspect "$ENCLAVE_NAME"
kurtosis enclave inspect "$ENCLAVE_NAME" --full-uuids | grep STOPPED | awk '{print $2 "--" $1}' | while read -r container; do echo "Printing logs for $container"; docker logs --tail 50 "$container"; done
stopped_services="$(kurtosis enclave inspect "$enclave" | grep STOPPED)"
if [[ -n "$stopped_services" ]]; then
echo "It looks like there is at least one stopped service in the enclave... Something must have halted..."
echo "$stopped_services"
echo

kurtosis enclave inspect "$enclave" --full-uuids | grep STOPPED | awk '{print $2 "--" $1}' \
| while read -r container; do echo "Printing logs for $container"; docker logs --tail 50 "$container"; done
exit 1
fi

Expand Down
1 change: 0 additions & 1 deletion .github/tests/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions .github/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Here is an example:
$ ./combine-ymls.sh
Creating combinations...
- combinations/fork11-new-cdk-stack-cdk-validium.yml
- combinations/fork11-legacy-zkevm-stack-rollup.yml
- combinations/fork11-new-cdk-stack-rollup.yml
- combinations/fork12-new-cdk-stack-cdk-validium.yml
- combinations/fork12-new-cdk-stack-rollup.yml
Expand Down
26 changes: 26 additions & 0 deletions .github/tests/attach-second-cdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
deployment_stages:
deploy_l1: false
deploy_agglayer: false

args:
deployment_suffix: "-002"
zkevm_rollup_chain_id: 20202
zkevm_rollup_id: 2

# The following accounts have been generated using the following command:
# polycli wallet inspect --mnemonic 'bless share truly shadow primary sun relief border van gallery stairs edit reflect gentle athlete main device smile response rescue mirror floor say people' --addresses 9 | tee keys.txt | jq -r '.Addresses[] | [.ETHAddress, .HexPrivateKey] | @tsv' | awk 'BEGIN{split("sequencer,aggregator,claimtxmanager,timelock,admin,loadtest,agglayer,dac,proofsigner",roles,",")} {print "zkevm_l2_" roles[NR] "_address: \"" $1 "\""; print "zkevm_l2_" roles[NR] "_private_key: \"0x" $2 "\"\n"}'
# Note that admin and agglayer accounts have been removed since we're using the default accounts.
zkevm_l2_sequencer_address: "0xA670342930242407b9984e467353044f8472055e"
zkevm_l2_sequencer_private_key: "0x902ed4ce26b536617a4f26da5e0cd0ef61b514a076b4bd766d6ab8b97efbb8c1"
zkevm_l2_aggregator_address: "0xfC419a9d9Fe0DfA4Cf9971AcD1Fbcd356DD768FD"
zkevm_l2_aggregator_private_key: "0xa70db9fb4b84a6ba18c03cd2266116dd110538d6c4c88e67ca35a29b910da25d"
zkevm_l2_claimtxmanager_address: "0x93F63c24735f45Cd0266E87353071B64dd86bc05"
zkevm_l2_claimtxmanager_private_key: "0x38718f22097afba13be48d818964326c9c5c48133f51e3c3bfd6faf05f813b34"
zkevm_l2_timelock_address: "0xDB22C6f61A82d6AA6d3607289fC93774AC09413a"
zkevm_l2_timelock_private_key: "0xae4a69010583a09709baa563fa66f9e6f2dacf9e9c84b89932406b9a0521b561"
zkevm_l2_loadtest_address: "0xD5278fC3Dc72A226d5C04c3d2C85fd397A46fA08"
zkevm_l2_loadtest_private_key: "0xef4db4f97684b8307adc332ed6c1bc82d66d160f08e7427d082d66a23889625e"
zkevm_l2_dac_address: "0xDa07AAD7226B136bc24157Dc4Ff5A813490E20D0"
zkevm_l2_dac_private_key: "0x992c9ab11d5eab6b6c2634b8bb0b85f3d8d1acf25024dc99c359cb2afd9b40a7"
zkevm_l2_proofsigner_address: "0xf1a661D7b601Ec46a040f57193cC99aB8c4132FA"
zkevm_l2_proofsigner_private_key: "0xc7fe3a006d75ba9326d9792523385abb49057c66aee0b8b4248821a89713f975"
11 changes: 11 additions & 0 deletions .github/tests/combinations/fork11-legacy-zkevm-stack-rollup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v7.0.0-rc.2-fork.11
zkevm_prover_image: hermeznetwork/zkevm-prover:v7.0.2-fork.11
cdk_erigon_node_image: hermeznetwork/cdk-erigon:acceptance-2.0.0-beta26-0f01107
zkevm_node_image: hermeznetwork/zkevm-node:v0.7.0-fork11-RC1
additional_services:
- tx_spammer
data_availability_mode: rollup
sequencer_type: zkevm
deployment_stages:
deploy_cdk_erigon_node: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v7.0.0-rc.2-fork.11
zkevm_prover_image: hermeznetwork/zkevm-prover:v7.0.2-fork.11
cdk_erigon_node_image: hermeznetwork/cdk-erigon:acceptance-2.0.0-beta26-0f01107
zkevm_node_image: hermeznetwork/zkevm-node:v0.7.0-fork11-RC1
additional_services:
- tx_spammer
data_availability_mode: cdk-validium
sequencer_type: erigon
9 changes: 9 additions & 0 deletions .github/tests/combinations/fork11-new-cdk-stack-rollup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v7.0.0-rc.2-fork.11
zkevm_prover_image: hermeznetwork/zkevm-prover:v7.0.2-fork.11
cdk_erigon_node_image: hermeznetwork/cdk-erigon:acceptance-2.0.0-beta26-0f01107
zkevm_node_image: hermeznetwork/zkevm-node:v0.7.0-fork11-RC1
additional_services:
- tx_spammer
data_availability_mode: rollup
sequencer_type: erigon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v8.0.0-rc.4-fork.12
zkevm_prover_image: hermeznetwork/zkevm-prover:v8.0.0-RC12-fork.12
cdk_erigon_node_image: hermeznetwork/cdk-erigon:0948e33
additional_services:
- tx_spammer
data_availability_mode: cdk-validium
sequencer_type: erigon
8 changes: 8 additions & 0 deletions .github/tests/combinations/fork12-new-cdk-stack-rollup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v8.0.0-rc.4-fork.12
zkevm_prover_image: hermeznetwork/zkevm-prover:v8.0.0-RC12-fork.12
cdk_erigon_node_image: hermeznetwork/cdk-erigon:0948e33
additional_services:
- tx_spammer
data_availability_mode: rollup
sequencer_type: erigon
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v6.0.0-rc.1-fork.9
zkevm_prover_image: hermeznetwork/zkevm-prover:v6.0.6
cdk_erigon_node_image: hermeznetwork/cdk-erigon:0948e33
zkevm_node_image: hermeznetwork/zkevm-node:v0.7.3-RC1
cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk
additional_services:
- pless_zkevm_node
- tx_spammer
data_availability_mode: cdk-validium
sequencer_type: zkevm
deployment_stages:
deploy_cdk_erigon_node: false
13 changes: 13 additions & 0 deletions .github/tests/combinations/fork9-legacy-zkevm-stack-rollup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v6.0.0-rc.1-fork.9
zkevm_prover_image: hermeznetwork/zkevm-prover:v6.0.6
cdk_erigon_node_image: hermeznetwork/cdk-erigon:0948e33
zkevm_node_image: hermeznetwork/zkevm-node:v0.7.3-RC1
cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk
additional_services:
- pless_zkevm_node
- tx_spammer
data_availability_mode: rollup
sequencer_type: zkevm
deployment_stages:
deploy_cdk_erigon_node: false
11 changes: 11 additions & 0 deletions .github/tests/combinations/fork9-new-cdk-stack-cdk-validium.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v6.0.0-rc.1-fork.9
zkevm_prover_image: hermeznetwork/zkevm-prover:v6.0.6
cdk_erigon_node_image: hermeznetwork/cdk-erigon:0948e33
zkevm_node_image: hermeznetwork/zkevm-node:v0.7.3-RC1
cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk
additional_services:
- pless_zkevm_node
- tx_spammer
data_availability_mode: cdk-validium
sequencer_type: erigon
11 changes: 11 additions & 0 deletions .github/tests/combinations/fork9-new-cdk-stack-rollup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v6.0.0-rc.1-fork.9
zkevm_prover_image: hermeznetwork/zkevm-prover:v6.0.6
cdk_erigon_node_image: hermeznetwork/cdk-erigon:0948e33
zkevm_node_image: hermeznetwork/zkevm-node:v0.7.3-RC1
cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk
additional_services:
- pless_zkevm_node
- tx_spammer
data_availability_mode: rollup
sequencer_type: erigon
4 changes: 3 additions & 1 deletion .github/tests/components/legacy-zkevm-stack.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# legacy zkevm stack:
# - zkevm-node sequencer
# - zkevm-node sequence-sender and aggregator
deploy_cdk_erigon_node: false
deployment_stages:
deploy_cdk_erigon_node: false

args:
sequencer_type: zkevm
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
deploy_l1: false
deploy_zkevm_contracts_on_l1: false
deploy_databases: false
deploy_cdk_central_environment: false
deploy_cdk_bridge_infra: false
deploy_agglayer: false
deploy_cdk_erigon_node: false
deployment_stages:
deploy_l1: false
deploy_zkevm_contracts_on_l1: false
deploy_databases: false
deploy_cdk_central_environment: false
deploy_cdk_bridge_infra: false
deploy_agglayer: false
deploy_cdk_erigon_node: false

args:
additional_services:
Expand Down
Loading

0 comments on commit 39f708f

Please sign in to comment.