Skip to content

Commit

Permalink
Merge branch 'boojum-integration' into bh-evm-294-synchronise-linting…
Browse files Browse the repository at this point in the history
…-rules-of-repositories
  • Loading branch information
benceharomi committed Nov 2, 2023
2 parents 2639834 + 7dee1e3 commit 27f76f0
Show file tree
Hide file tree
Showing 289 changed files with 11,529 additions and 25,518 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ contracts/.git
!infrastructure/local-setup-preparation
!infrastructure/zk
!sdk/zksync-rs
!sdk/zksync-web3.js
!etc/system-contracts/bootloader/build/artifacts
!etc/system-contracts/contracts/artifacts
!etc/system-contracts/contracts/precompiles/artifacts
Expand Down
4 changes: 0 additions & 4 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
"release-type": "simple",
"component": "core"
},
"sdk/zksync-web3.js": {
"release-type": "node",
"component": "web3js"
},
"sdk/zksync-rs": {
"release-type": "rust",
"component": "zksync-rs"
Expand Down
3 changes: 1 addition & 2 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"sdk/zksync-web3.js": "0.15.4",
"sdk/zksync-rs": "0.4.0",
"core": "16.1.0",
"core": "16.2.0",
"prover": "7.2.0"
}
4 changes: 3 additions & 1 deletion .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ jobs:
DOCKER_ACTION: ${{ inputs.action }}
COMPONENT: ${{ matrix.component }}
run: |
ci_run docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
ci_run gcloud auth configure-docker us-docker.pkg.dev,asia-docker.pkg.dev -q
ci_run rustup default nightly-2023-07-21
ci_run zk docker $DOCKER_ACTION $COMPONENT -- --public
- name: Show sccache stats
if: always()
run: |
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/build-prover-fri-gpu-gar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Download Setup data
run: |
gsutil -m rsync -r gs://matterlabs-zksync-v2-infra-blob-store/prover_setup_data/${{ inputs.setup_keys_id }} docker/prover-gpu-fri-gar
gsutil -m rsync -r gs://matterlabs-setup-data-us/${{ inputs.setup_keys_id }} docker/prover-gpu-fri-gar
- name: Login to us-central1 GAR
run: |
Expand All @@ -44,3 +44,23 @@ jobs:
push: true
tags: |
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.image_tag_suffix }}
- name: Login to Asia GAR
run: |
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://asia-docker.pkg.dev
- name: Build and push to Asia GAR
run: |
docker buildx imagetools create \
--tag asia-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.image_tag_suffix }}
- name: Login to Europe GAR
run: |
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://europe-docker.pkg.dev
- name: Build and push to Europe GAR
run: |
docker buildx imagetools create \
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.image_tag_suffix }}
52 changes: 29 additions & 23 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
echo RUN_CONTRACT_VERIFICATION_TEST=true >> .env
# TODO (EVM-374): Change the following to `true` after https://github.com/NomicFoundation/hardhat/pull/4552 is merged and released.
echo RUN_CONTRACT_VERIFICATION_TEST=false >> .env
echo ZKSYNC_DEBUG_LOGS=true >> .env
- name: Download zksolc/solc and zkvyper/vyper
Expand All @@ -118,10 +119,10 @@ jobs:
mv solc-linux-amd64-v0.8.21+commit.d9974bed $(pwd)/etc/solc-bin/0.8.21/solc
chmod +x $(pwd)/etc/solc-bin/0.8.21/solc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.15
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.15
mv zksolc-linux-amd64-musl-v1.3.15 $(pwd)/etc/zksolc-bin/v1.3.15/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.15/zksolc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.16
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.16
mv zksolc-linux-amd64-musl-v1.3.16 $(pwd)/etc/zksolc-bin/v1.3.16/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.16/zksolc
mkdir -p $(pwd)/etc/vyper-bin/0.3.3
wget -O vyper0.3.3 https://github.com/vyperlang/vyper/releases/download/v0.3.3/vyper.0.3.3%2Bcommit.48e326f0.linux
Expand Down Expand Up @@ -204,7 +205,8 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
echo RUN_CONTRACT_VERIFICATION_TEST=true >> .env
# TODO (EVM-374): Change the following to `true` after https://github.com/NomicFoundation/hardhat/pull/4552 is merged and released.
echo RUN_CONTRACT_VERIFICATION_TEST=false >> .env
echo ZKSYNC_DEBUG_LOGS=true >> .env
- name: Download zksolc/solc and zkvyper/vyper
Expand All @@ -216,10 +218,10 @@ jobs:
mv solc-linux-amd64-v0.8.21+commit.d9974bed $(pwd)/etc/solc-bin/0.8.21/solc
chmod +x $(pwd)/etc/solc-bin/0.8.21/solc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.15
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.15
mv zksolc-linux-amd64-musl-v1.3.15 $(pwd)/etc/zksolc-bin/v1.3.15/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.15/zksolc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.16
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.16
mv zksolc-linux-amd64-musl-v1.3.16 $(pwd)/etc/zksolc-bin/v1.3.16/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.16/zksolc
mkdir -p $(pwd)/etc/vyper-bin/0.3.3
wget -O vyper0.3.3 https://github.com/vyperlang/vyper/releases/download/v0.3.3/vyper.0.3.3%2Bcommit.48e326f0.linux
Expand Down Expand Up @@ -265,18 +267,22 @@ jobs:
- name: Run Cross EN Checker
run: ci_run zk run cross-en-checker

# - name: Run revert test
# run: |
# ci_run pkill zksync_server || true
# ci_run sleep 2
# ci_run zk test i revert
# # Check that the rollback was performed on the EN
# ci_run grep -q 'Rollback successfully completed' ext-node.log
# # Restart the EN
# ci_run zk server &>>server.log &
# ci_run sleep 30
# ZKSYNC_ENV=ext-node-docker ci_run zk external-node &>>ext-node.log &
# ci_run sleep 30
- name: Run revert test
run: |
ci_run zk env
ci_run zk env docker
ci_run pkill zksync_server || true
ci_run sleep 2
ci_run zk env
ci_run zk test i revert
# Check that the rollback was performed on the EN
ci_run sleep 20
ci_run grep -q 'Rollback successfully completed' ext-node.log
# Restart the EN
ci_run zk server &>>server.log &
ci_run sleep 30
ZKSYNC_ENV=ext-node-docker ci_run zk external-node &>>ext-node.log &
ci_run sleep 30
- name: Run upgrade test
run: |
Expand All @@ -288,7 +294,7 @@ jobs:
run: |
ci_run cat server.log
ci_run cat ext-node.log
# ci_run cat core/tests/revert-test/revert.log
ci_run cat core/tests/revert-test/revert.log
ci_run cat core/tests/upgrade-test/upgrade.log
ci_run sccache --show-stats
ci_run cat /tmp/sccache_log.txt
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
prover:
- 'prover/**'
- '!prover/CHANGELOG.md'
- '!prover/setup-data-cpu-keys.json'
- '!prover/setup-data-gpu-keys.json'
- 'docker/prover*/**'
- '.github/workflows/build-prover-template.yml'
- '.github/workflows/ci-prover-reusable.yml'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-test-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- '!prover/**'
setup:
name: Setup
runs-on: [self-hosted, k8s, stage]
runs-on: [matterlabs-deployer-stage]
outputs:
image_tag_suffix: ${{ steps.generate-tag-suffix.outputs.image_tag_suffix }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,15 @@ on:
push:
branches:
- main
paths:
- "docker/zk-environment/*"
- ".github/workflows/zk-environment.publish.yml"
pull_request:
branches:
- main
paths:
- "docker/zk-environment/Dockerfile"
- "docker/zk-environment-cuda-12-0/Dockerfile"
- "docker/zk-environment/*"
- ".github/workflows/zk-environment.publish.yml"
workflow_dispatch:
inputs:
build_zk_environment:
description: 'Build zk-environment'
required: false
type: boolean
default: true
build_zk_environment_cuda_12:
description: 'Build zk-environment-cuda-12'
required: false
type: boolean
default: true

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
Expand All @@ -32,6 +22,7 @@ jobs:
changed_files:
outputs:
zk_environment: ${{ steps.changed-files-yaml.outputs.zk_env_any_changed }}
zk_environment_cuda_11_8: ${{ steps.changed-files-yaml.outputs.zk_env_cuda_11_8_any_changed }}
zk_environment_cuda_12: ${{ steps.changed-files-yaml.outputs.zk_env_cuda_12_any_changed }}
runs-on: ubuntu-latest
steps:
Expand All @@ -47,12 +38,15 @@ jobs:
zk_env:
- docker/zk-environment/Dockerfile
- .github/workflows/zk-environment.publish.yml
zk_env_cuda_11_8:
- docker/zk-environment/20.04_amd64_cuda_11_8.Dockerfile
- .github/workflows/zk-environment.publish.yml
zk_env_cuda_12:
- docker/zk-environment-cuda-12-0/Dockerfile
- docker/zk-environment/20.04_amd64_cuda_12_0.Dockerfile
- .github/workflows/zk-environment.publish.yml
get_short_sha:
if: (needs.changed_files.outputs.zk_environment == 'true' && github.event_name != 'workflow_dispatch') || (github.event_name == 'workflow_dispatch' && github.event.inputs.build_zk_environment == 'true')
if: needs.changed_files.outputs.zk_environment == 'true'
needs: [changed_files]
runs-on: ubuntu-latest
outputs:
Expand All @@ -66,7 +60,7 @@ jobs:
run: echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT

zk_environment:
if: (needs.changed_files.outputs.zk_environment == 'true' && github.event_name != 'workflow_dispatch') || (github.event_name == 'workflow_dispatch' && github.event.inputs.build_zk_environment == 'true')
if: needs.changed_files.outputs.zk_environment == 'true'
needs: [changed_files, get_short_sha]
name: Build and optionally push zk-environment Docker images to Docker Hub
strategy:
Expand Down Expand Up @@ -94,26 +88,18 @@ jobs:
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
file: docker/zk-environment/Dockerfile
target: base
target: rust-lightweight
tags: "matterlabs/zk-environment:${{ needs.get_short_sha.outputs.short_sha }}-lightweight-${{ matrix.arch }}"
build-args: ARCH=${{ matrix.arch }}
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Build and optionally push zk-environment Rust nightly
- name: Build and optionally push zk-environment lightweight Rust nightly
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
file: docker/zk-environment/Dockerfile
target: rust-nightly
tags: "matterlabs/zksync_rust:${{ needs.get_short_sha.outputs.short_sha }}-nightly-${{ matrix.arch }}"
target: rust-lightweight-nightly
tags: "matterlabs/zk-environment:${{ needs.get_short_sha.outputs.short_sha }}-lightweight-nightly-${{ matrix.arch }}"
build-args: ARCH=${{ matrix.arch }}
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Build and optionally push zk-environment CUDA 11.8
if: matrix.arch == 'amd64'
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
file: docker/zk-environment/Dockerfile
target: nvidia-tools
tags: "matterlabs/zk-environment:latest2.0"
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

zk_environment_multiarch_manifest:
if: needs.changed_files.outputs.zk_environment == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -144,34 +130,52 @@ jobs:
docker buildx imagetools create --tag "${multiarch_tag}" "${individual_images[@]}"
done
zk_environment_cuda_12:
if: needs.changed_files.outputs.zk_environment_cuda_12 == 'true'
zk_environment_cuda:
needs: changed_files
name: Build and optionally push zk-environment CUDA 12 Docker image
runs-on: [matterlabs-ci-runner]
strategy:
matrix:
cuda_version: ['11_8', '12_0']
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Evaluate condition
id: condition
run: |
key="zk_environment_cuda_${{ matrix.cuda_version }}"
changed_files_output=$(echo '${{ toJson(needs.changed_files.outputs) }}' | jq -r ".$key")
echo "should_run=$changed_files_output" >> "$GITHUB_OUTPUT"
- name: Checkout code
if: steps.condition.outputs.should_run == 'true'
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
submodules: "recursive"
- name: Log in to us-central1 GAR
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

- name: Log in to US GAR
if: steps.condition.outputs.should_run == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev
- name: Log in to Docker Hub
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
if: steps.condition.outputs.should_run == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
if: steps.condition.outputs.should_run == 'true'
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2
if: steps.condition.outputs.should_run == 'true'
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7

- name: Build and optionally push
if: steps.condition.outputs.should_run == 'true'
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
file: docker/zk-environment-cuda-12-0/Dockerfile
file: docker/zk-environment/20.04_amd64_cuda_${{ matrix.cuda_version }}.Dockerfile
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: |
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/zk-environment-cuda-12-0:latest
matterlabs/zk-environment:cuda-12-0-latest
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/zk-environment-cuda-${{ matrix.cuda_version }}:latest
matterlabs/zk-environment:cuda-${{ matrix.cuda_version }}-latest
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Ignore submodule
bellman-cuda
sdk/zksync-web3.js/CHANGELOG.md
sdk/zksync-rs/CHANGELOG.md
CHANGELOG.md

# Ignore contract submodules
contracts
etc/system-contracts
etc/system-contracts
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are many ways to contribute to the ZK Stack:
issues.
3. Resolve issues: either by showing an issue isn't a problem and the current state is ok as is or by fixing the problem
and opening a PR.
4. Report security issues, see [our security policy](./github/SECURITY.md).
4. Report security issues, see [our security policy](./SECURITY.md).
5. [Join the team!](https://matterlabs.notion.site/Shape-the-future-of-Ethereum-at-Matter-Labs-dfb3b5a037044bb3a8006af2eb0575e0)

## Fixing issues
Expand Down
Loading

0 comments on commit 27f76f0

Please sign in to comment.