Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into daniyar/pla-865-vm-ru…
Browse files Browse the repository at this point in the history
…nner-storage-impl
  • Loading branch information
itegulov committed Apr 23, 2024
2 parents 3574949 + 8c3478a commit 05bad1c
Show file tree
Hide file tree
Showing 178 changed files with 12,466 additions and 4,399 deletions.
5 changes: 3 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
!docker/external-node/entrypoint.sh
!docker/contract-verifier/install-all-solc.sh
!etc/test_config
!etc/env/dev.env.example
!etc/env/docker.env
!etc/env/target/dev.env.example
!etc/env/target/docker.env
!etc/env/base
!etc/env/configs
!etc/tokens
!etc/ERC20
!artifacts
Expand Down
72 changes: 25 additions & 47 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
ci_run zk contract build
- name: Contracts unit tests
run: ci_run zk test l1-contracts
run: ci_run yarn l1-contracts test

- name: Rust unit tests
run: ci_run zk test rust
Expand Down Expand Up @@ -99,13 +99,16 @@ jobs:
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
ci_run zk init
ci_run zk init --local-legacy-bridge-testing
# `sleep 30` because we need to wait until server added all the tokens
# `sleep 60` because we need to wait until server added all the tokens
- name: Run server
run: |
ci_run zk server --uring --components api,tree,eth,state_keeper,housekeeper &>server.log &
ci_run sleep 30
ci_run zk server --uring --components api,tree,eth,state_keeper,housekeeper,commitment_generator &>server.log &
ci_run sleep 60
- name: Deploy legacy era contracts
run: ci_run zk contract setup-legacy-bridge-era

- name: Perform loadtest
run: ci_run zk run loadtest
Expand All @@ -119,15 +122,16 @@ jobs:
run: |
ci_run sccache --show-stats
ci_run cat /tmp/sccache_log.txt
integration:
name: Integration (consensus=${{ matrix.consensus }}, deployment_mode=${{ matrix.deployment_mode }})
name: Integration (consensus=${{ matrix.consensus }}, base_token=${{ matrix.base_token }})
strategy:
# In matrix jobs, fail-fast is true by default.
# To be consistent with the rest of the workflow we disable it explicitly.
fail-fast: false
matrix:
consensus: [false, true]
deployment_mode: ["Rollup", "Validium"]
base_token: ["Eth", "Custom"]
env:
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,basic_witness_input_producer,commitment_generator${{ matrix.consensus && ',consensus' || '' }}"

Expand Down Expand Up @@ -186,13 +190,8 @@ jobs:
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
if [[ "${{ matrix.deployment_mode }}" == "Rollup" ]]; then
ci_run zk init
elif [[ "${{ matrix.deployment_mode }}" == "Validium" ]]; then
ci_run zk env dev_validium_docker
ci_run zk config compile dev_validium_docker
ci_run zk init --validium-mode
fi
ci_run zk config compile
ci_run zk init ${{ matrix.base_token == 'Custom' && '--base-token-name BAT' || ''}}
# `sleep 5` because we need to wait until server started properly
- name: Run server
Expand All @@ -213,11 +212,7 @@ jobs:
# An empty topmost environment helps avoid a mess when redefining env vars shared between both envs
# (e.g., DATABASE_URL).
run: |
if [[ "${{ matrix.deployment_mode }}" == "Validium" ]]; then
ci_run zk config compile ext-node-validium
ci_run zk config compile ext-node-validium-docker
fi
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=${{ matrix.deployment_mode }} PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run yarn snapshot-recovery-test snapshot-recovery-test
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=Rollup PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run yarn snapshot-recovery-test snapshot-recovery-test
- name: Fee projection tests
run: ci_run zk test i fees
Expand All @@ -226,7 +221,8 @@ jobs:
run: |
ci_run pkill zksync_server || true
ci_run sleep 2
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=${{ matrix.deployment_mode }} PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run zk test i revert
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=Rollup PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run zk test i revert
# This test should be the last one as soon as it
# finished bootloader will be different
Expand Down Expand Up @@ -266,12 +262,12 @@ jobs:
ci_run cat /tmp/sccache_log.txt
external-node:
name: External node (consensus=${{ matrix.consensus }}, deployment_mode=${{ matrix.deployment_mode }})
name: External node (consensus=${{ matrix.consensus }}, base_token=${{ matrix.base_token }})
strategy:
fail-fast: false
matrix:
consensus: [false, true]
deployment_mode: ["Rollup", "Validium"]
base_token: ["Eth", "Custom"]
runs-on: [matterlabs-ci-runner]

env:
Expand Down Expand Up @@ -305,13 +301,8 @@ jobs:
ci_run git config --global --add safe.directory /usr/src/zksync/contracts/system-contracts
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
if [[ "${{ matrix.deployment_mode }}" == "Rollup" ]]; then
ci_run zk init
elif [[ "${{ matrix.deployment_mode }}" == "Validium" ]]; then
ci_run zk env dev_validium_docker
ci_run zk config compile dev_validium_docker
ci_run zk init --validium-mode
fi
ci_run zk config compile
ci_run zk init ${{ matrix.base_token == 'Custom' && '--base-token-name BAT' || ''}}
# `sleep 30` because we need to wait until server started properly
- name: Run server
Expand All @@ -321,11 +312,7 @@ jobs:
- name: Run external node
run: |
if [[ "${{ matrix.deployment_mode }}" == "Rollup" ]]; then
ci_run zk env ext-node-docker
elif [[ "${{ matrix.deployment_mode }}" == "Validium" ]]; then
ci_run zk env ext-node-validium-docker
fi
ci_run zk env ext-node-docker
ci_run zk db setup
ci_run zk external-node $EXT_NODE_FLAGS &>>ext-node.log &
ci_run sleep 30
Expand All @@ -335,24 +322,15 @@ jobs:

- name: Run revert test
run: |
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=${{ matrix.deployment_mode }} PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run zk test i revert-en
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=Rollup PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run zk test i revert-en
# test terminates the nodes, so we restart them.
if [[ "${{ matrix.deployment_mode }}" == "Rollup" ]]; then
ZKSYNC_ENV=docker ci_run zk server --components=$SERVER_COMPONENTS &>>server.log &
ZKSYNC_ENV=ext-node-docker ci_run zk external-node $EXT_NODE_FLAGS &>>ext-node.log &
elif [[ "${{ matrix.deployment_mode }}" == "Validium" ]]; then
ZKSYNC_ENV=dev_validium_docker ci_run zk server --components=$SERVER_COMPONENTS &>>server.log &
ZKSYNC_ENV=ext-node-validium-docker ci_run zk external-node $EXT_NODE_FLAGS &>>ext-node.log &
fi
ZKSYNC_ENV=docker ci_run zk server --components=$SERVER_COMPONENTS &>>server.log &
ZKSYNC_ENV=ext-node-docker ci_run zk external-node $EXT_NODE_FLAGS &>>ext-node.log &
ci_run sleep 30
- name: Run upgrade test
run: |
if [[ "${{ matrix.deployment_mode }}" == "Rollup" ]]; then
ci_run zk env docker
elif [[ "${{ matrix.deployment_mode }}" == "Validium" ]]; then
ci_run zk env dev_validium_docker
fi
ci_run zk env docker
CHECK_EN_URL="http://0.0.0.0:3060" ci_run zk test i upgrade
- name: Show server.log logs
Expand Down
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ Cargo.lock
!/infrastructure/zksync-crypto/Cargo.lock
!/prover/Cargo.lock

/etc/env/*
/etc/env/target/*
/etc/env/.current
/etc/env/configs
!/etc/env/configs/dev.toml
!/etc/env/configs/dev_validium.toml
!/etc/env/configs/dev_validium_docker.toml
!/etc/env/configs/ext-node.toml
!/etc/env/configs/ext-node-docker.toml
/etc/env/l1-inits
/etc/env/l2-inits
!/etc/env/base
!/etc/env/file_based
!/etc/env/dev.toml
Expand Down
11 changes: 6 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions checks-config/era.dic
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ L2s
L1
json
l1
l2
G1
G2
SystemConfig
Expand Down Expand Up @@ -679,6 +680,7 @@ StateKeeper
enum_index
virtual_block_start_batch
virtual_block_finish_l2_block
base_token_address
maxFeePerGas
maxPriorityFeePerGas
structs
Expand Down Expand Up @@ -802,6 +804,7 @@ threadpool
IntrinsicGas
InsufficientFundsForTransfer
ChainId
hyperchains
eth_getLogs
façade
virtual_blocks_per_miniblock
Expand Down Expand Up @@ -939,4 +942,5 @@ demuxer
superset
80M
780kb
hyperchain
storages
2 changes: 1 addition & 1 deletion contracts
Submodule contracts updated 450 files
6 changes: 3 additions & 3 deletions core/bin/external_node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ The easiest way to see everything that is used is to compile the `ext-node` conf
Note: not all the config values from the main node are actually used, so this is temporary, and in the future external
node would require a much smaller set of config variables.

To change the configuration, edit the `etc/env/ext-node.toml`, add the overrides from the `base` config if you need any.
Remove `etc/env/ext-node.env`, if it exists. On the next launch of the external node, new config would be compiled and
will be written to the `etc/env/ext-node.env` file.
To change the configuration, edit the `etc/env/chains/ext-node.toml`, add the overrides from the `base` config if you
need any. Remove `etc/env/chains/ext-node.env`, if it exists. On the next launch of the external node, new config would
be compiled and will be written to the `etc/env/chains/ext-node.env` file.

### Running

Expand Down
Loading

0 comments on commit 05bad1c

Please sign in to comment.