Skip to content

Commit

Permalink
Merge branch 'kl-factory' into base-token-addr-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
fkrause98 committed Apr 5, 2024
2 parents 9cd48b7 + fb39e9e commit 0ffd1fe
Show file tree
Hide file tree
Showing 999 changed files with 45,192 additions and 16,127 deletions.
4 changes: 2 additions & 2 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"core": "21.1.0",
"prover": "12.1.0"
"core": "22.1.0",
"prover": "12.2.0"
}
35 changes: 3 additions & 32 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,38 +137,9 @@ jobs:
env:
DOCKER_ACTION: ${{ inputs.action }}
COMPONENT: ${{ matrix.component }}
RUST_NIGHTLY_COMPONENTS: |
(
"witness-generator"
"prover-v2"
"circuit-synthesizer"
"prover-fri"
"prover-gpu-fri"
"witness-vector-generator"
"prover-fri-gateway"
"proof-fri-compressor"
)
run: |
nightly_components=${{ env.RUST_NIGHTLY_COMPONENTS }}
if [[ " ${nightly_components[*]} " =~ " ${COMPONENT} " ]]; then
underscored_name=$(echo "$COMPONENT" | tr '-' '_')
# Hack: prover-v2 codebase located in prover directory instead of prover_v2
if [ "$underscored_name" == "prover_v2" ]; then
underscored_name="prover"
fi
# prover-gpu-fri codebase located in prover_fri directory instead of prover_gpu_fri
if [ "$underscored_name" == "prover_gpu_fri" ]; then
underscored_name="prover_fri"
fi
ci_run echo [workspace] > Cargo.toml
ci_run echo members = [\"prover/${underscored_name}\"] >> Cargo.toml
ci_run cp prover/Cargo.lock Cargo.lock
PASSED_ENV_VARS="ERA_BELLMAN_CUDA_RELEASE,CUDA_ARCH" \
ci_run zk docker $DOCKER_ACTION $COMPONENT
else
ci_run zk docker $DOCKER_ACTION $COMPONENT
fi
run: |
PASSED_ENV_VARS="ERA_BELLMAN_CUDA_RELEASE,CUDA_ARCH" \
ci_run zk docker $DOCKER_ACTION $COMPONENT
- name: Show sccache stats
if: always()
Expand Down
66 changes: 50 additions & 16 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_call:
inputs:
compilers:
description: 'JSON of required compilers and their versions'
description: "JSON of required compilers and their versions"
type: string
required: false
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19", "1.3.21"] } , { "zkvyper": ["1.3.13"] }]'
Expand All @@ -19,6 +19,7 @@ jobs:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: "recursive"
fetch-depth: 0

- name: Setup environment
run: |
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: "recursive"
fetch-depth: 0

- name: Setup environment
run: |
Expand Down Expand Up @@ -118,13 +120,14 @@ jobs:
ci_run sccache --show-stats
ci_run cat /tmp/sccache_log.txt
integration:
name: Integration (consensus=${{ matrix.consensus }})
name: Integration (consensus=${{ matrix.consensus }}, deployment_mode=${{ matrix.deployment_mode }})
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"]
env:
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,basic_witness_input_producer,commitment_generator${{ matrix.consensus && ',consensus' || '' }}"

Expand All @@ -133,6 +136,7 @@ jobs:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: "recursive"
fetch-depth: 0

- name: Setup environment
run: |
Expand All @@ -150,7 +154,7 @@ jobs:
wget https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.23%2Bcommit.f704f362
mv solc-linux-amd64-v0.8.23+commit.f704f362 $(pwd)/etc/solc-bin/0.8.23/solc
chmod +x $(pwd)/etc/solc-bin/0.8.23/solc
mkdir -p $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0
wget https://github.com/matter-labs/era-solidity/releases/download/0.8.23-1.0.0/solc-linux-amd64-0.8.23-1.0.0 -O $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0/solc
chmod +x $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0/solc
Expand Down Expand Up @@ -182,8 +186,13 @@ 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
ci_run zk init
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
# `sleep 5` because we need to wait until server started properly
- name: Run server
Expand All @@ -200,11 +209,15 @@ jobs:
run: ci_run zk test i server

- name: Snapshot recovery test
if: ${{ ! matrix.consensus }}
# We use `yarn` directly because the test launches `zk` commands in both server and EN envs.
# An empty topmost environment helps avoid a mess when redefining env vars shared between both envs
# (e.g., DATABASE_URL).
run: ci_run yarn snapshot-recovery-test snapshot-recovery-test
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
- name: Fee projection tests
run: ci_run zk test i fees
Expand All @@ -213,7 +226,7 @@ jobs:
run: |
ci_run pkill zksync_server || true
ci_run sleep 2
ENABLE_CONSENSUS=${{ matrix.consensus }} PASSED_ENV_VARS=ENABLE_CONSENSUS ci_run zk test i revert
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=${{ matrix.deployment_mode }} 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 @@ -253,11 +266,12 @@ jobs:
ci_run cat /tmp/sccache_log.txt
external-node:
name: External node (consensus=${{ matrix.consensus }})
name: External node (consensus=${{ matrix.consensus }}, deployment_mode=${{ matrix.deployment_mode }})
strategy:
fail-fast: false
matrix:
consensus: [false, true]
deployment_mode: ["Rollup", "Validium"]
runs-on: [matterlabs-ci-runner]

env:
Expand All @@ -269,6 +283,7 @@ jobs:
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: "recursive"
fetch-depth: 0

- name: Setup environment
run: |
Expand All @@ -290,17 +305,27 @@ 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
ci_run zk init
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
# `sleep 30` because we need to wait until server started properly
- name: Run server
run: |
ci_run zk server --components=$SERVER_COMPONENTS &>>server.log &
ci_run sleep 30
- name: Run external node
run: |
ci_run zk env ext-node-docker
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 db setup
ci_run zk external-node $EXT_NODE_FLAGS &>>ext-node.log &
ci_run sleep 30
Expand All @@ -310,15 +335,24 @@ jobs:

- name: Run revert test
run: |
ENABLE_CONSENSUS=${{ matrix.consensus }} PASSED_ENV_VARS=ENABLE_CONSENSUS ci_run zk test i revert-en
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=${{ matrix.deployment_mode }} PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run zk test i revert-en
# test terminates the nodes, so we restart them.
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 &
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
ci_run sleep 30
- name: Run upgrade test
run: |
ci_run zk env docker
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
CHECK_EN_URL="http://0.0.0.0:3060" ci_run zk test i upgrade
- name: Show server.log logs
Expand Down
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@ Cargo.lock
!/etc/env/l1-inits/.init.env
/etc/env/l2-inits
!/etc/env/base
!/etc/env/configs/docker.toml
!/etc/env/configs/dev.toml
!/etc/env/configs/ext-node.toml
!/etc/env/configs/ext-node-docker.toml
!/etc/env/file_based
!/etc/env/dev.toml
!/etc/env/dev_validium.toml
!/etc/env/dev_validium_docker.toml
!/etc/env/docker.toml
!/etc/env/ext-node.toml
!/etc/env/ext-node-docker.toml
!/etc/env/ext-node-validium.toml
!/etc/env/*.yaml
!/etc/env/ext-node-validium-docker.toml
/etc/tokens/localhost.json
/etc/zksolc-bin/*
/etc/zkvyper-bin/*
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Contribution Guidelines

Hello! Thanks for your interest in joining the mission to accelerate the mass adoption of crypto for personal
sovereignty! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!
sovereignty! We welcome contributions from anyone on the internet.

Note, however, that all the contributions are subject to review, and not every contribution is guaranteed to be merged.
It is highly advised to reach out to developers (for example, by creating an issue) before preparing a significant
change in the codebase, and explicitly confirm that this contribution will be considered for merge. Otherwise, it is
possible to discover that a feature you have spent some time on does not align with the core team vision or capacity to
maintain a high quality of given submission long term.

## Ways to contribute

Expand Down
Loading

0 comments on commit 0ffd1fe

Please sign in to comment.