Skip to content

Commit

Permalink
feat(zk_toolbox): add multi-chain CI integration test (#2594)
Browse files Browse the repository at this point in the history
## What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->
Using features introduced with the zk_toolbox, it should be possible now
to run multi-chain CI integration test.

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.

---------

Signed-off-by: Danil <[email protected]>
Co-authored-by: Danil <[email protected]>
Co-authored-by: Alexander Melnikov <[email protected]>
Co-authored-by: Rodion Sabodash <[email protected]>
  • Loading branch information
4 people authored Aug 30, 2024
1 parent d3cd553 commit 05c940e
Show file tree
Hide file tree
Showing 64 changed files with 1,302 additions and 441 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-core-lint-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
echo "prover_url=postgres://postgres:notsecurepassword@postgres:5432/zksync_local_prover" >> $GITHUB_ENV
echo "core_url=postgres://postgres:notsecurepassword@postgres:5432/zksync_local" >> $GITHUB_ENV
echo "prover_url=postgres://postgres:notsecurepassword@localhost:5432/zksync_local_prover" >> $GITHUB_ENV
echo "core_url=postgres://postgres:notsecurepassword@localhost:5432/zksync_local" >> $GITHUB_ENV
- name: Start services
run: |
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml
unit-tests:
runs-on: [matterlabs-ci-runner-highmem-long]
runs-on: [ matterlabs-ci-runner-highmem-long ]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand Down Expand Up @@ -70,11 +70,11 @@ jobs:
ci_run zk f cargo test --release -p vm-benchmark --bench oneshot --bench batch
loadtest:
runs-on: [matterlabs-ci-runner-high-performance]
runs-on: [ matterlabs-ci-runner-high-performance ]
strategy:
fail-fast: false
matrix:
vm_mode: ["old", "new"]
vm_mode: [ "old", "new" ]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand Down Expand Up @@ -142,13 +142,13 @@ jobs:
# To be consistent with the rest of the workflow we disable it explicitly.
fail-fast: false
matrix:
consensus: [false, true]
base_token: ["Eth", "Custom"]
deployment_mode: ["Rollup", "Validium"]
consensus: [ false, true ]
base_token: [ "Eth", "Custom" ]
deployment_mode: [ "Rollup", "Validium" ]
env:
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,vm_playground,da_dispatcher${{ matrix.consensus && ',consensus' || '' }}${{ matrix.base_token == 'Custom' && ',base_token_ratio_persister' || '' }}"

runs-on: [matterlabs-ci-runner-highmem-long]
runs-on: [ matterlabs-ci-runner-highmem-long ]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
Expand Down Expand Up @@ -243,15 +243,15 @@ jobs:
DEPLOYMENT_MODE=${{ matrix.deployment_mode }} \
SNAPSHOTS_CREATOR_VERSION=${{ matrix.deployment_mode == 'Validium' && '0' || '1' }} \
DISABLE_TREE_DURING_PRUNING=${{ matrix.base_token == 'Eth' }} \
ETH_CLIENT_WEB3_URL="http://reth:8545" \
ETH_CLIENT_WEB3_URL="http://localhost:8545" \
PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE,DISABLE_TREE_DURING_PRUNING,SNAPSHOTS_CREATOR_VERSION,ETH_CLIENT_WEB3_URL" \
ci_run yarn recovery-test snapshot-recovery-test
- name: Genesis recovery test
run: |
ENABLE_CONSENSUS=${{ matrix.consensus }} \
DEPLOYMENT_MODE=${{ matrix.deployment_mode }} \
ETH_CLIENT_WEB3_URL="http://reth:8545" \
ETH_CLIENT_WEB3_URL="http://localhost:8545" \
PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE,ETH_CLIENT_WEB3_URL" \
ci_run yarn recovery-test genesis-recovery-test
Expand Down Expand Up @@ -314,10 +314,10 @@ jobs:
strategy:
fail-fast: false
matrix:
consensus: [false, true]
base_token: ["Eth", "Custom"]
deployment_mode: ["Rollup", "Validium"]
runs-on: [matterlabs-ci-runner-highmem-long]
consensus: [ false, true ]
base_token: [ "Eth", "Custom" ]
deployment_mode: [ "Rollup", "Validium" ]
runs-on: [ matterlabs-ci-runner-highmem-long ]

env:
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,da_dispatcher${{ matrix.consensus && ',consensus' || '' }}${{ matrix.base_token == 'Custom' && ',base_token_ratio_persister' || '' }}"
Expand Down Expand Up @@ -431,3 +431,4 @@ jobs:
run: |
ci_run sccache --show-stats || true
ci_run cat /tmp/sccache_log.txt || true
Loading

0 comments on commit 05c940e

Please sign in to comment.