Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into consensus_contracts_reader
Browse files Browse the repository at this point in the history
  • Loading branch information
moshababo committed Jul 27, 2024
2 parents cbc46a1 + 3729468 commit f1cda3e
Show file tree
Hide file tree
Showing 589 changed files with 6,904 additions and 4,064 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contracts/.git
!etc/multivm_bootloaders
!cargo
!bellman-cuda
!prover/vk_setup_data_generator_server_fri/data/
!prover/crates/bin/vk_setup_data_generator_server_fri/data/
!.github/release-please/manifest.json

!etc/env/file_based
Expand Down
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": "24.9.0",
"prover": "16.0.0"
"core": "24.12.0",
"prover": "16.1.0"
}
1 change: 1 addition & 0 deletions .github/workflows/build-contract-verifier-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
echo $(pwd)/bin >> $GITHUB_PATH
echo CI=1 >> .env
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download contracts
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
echo $(pwd)/bin >> $GITHUB_PATH
echo CI=1 >> .env
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download contracts
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

build-push-tee-prover-images:
name: Build and push images
needs: [setup, changed_files]
needs: [setup]
uses: ./.github/workflows/build-tee-prover-template.yml
if: contains(github.ref_name, 'core')
secrets:
Expand Down Expand Up @@ -95,7 +95,6 @@ jobs:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}


build-gar-prover-fri-gpu:
name: Build GAR prover FRI GPU
needs: [setup, build-push-prover-images]
Expand All @@ -105,3 +104,6 @@ jobs:
setup_keys_id: ${{ needs.setup.outputs.prover_fri_gpu_key_id }}
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
protocol_version: ${{ needs.build-push-prover-images.outputs.protocol_version }}
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/build-local-node-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
echo $(pwd)/bin >> $GITHUB_PATH
echo CI=1 >> .env
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
# TODO: Remove after when we can upgrade hardhat-plugins
- name: pre-download compiilers
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/build-prover-fri-gpu-gar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Build Prover FRI GPU with builtin setup data

on:
workflow_call:
secrets:
DOCKERHUB_USER:
description: "DOCKERHUB_USER"
required: true
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
inputs:
image_tag_suffix:
description: "Commit sha or git tag for Docker tag"
Expand Down Expand Up @@ -29,6 +36,10 @@ jobs:
run: |
gsutil -m rsync -r gs://matterlabs-setup-data-us/${{ inputs.setup_keys_id }} docker/prover-gpu-fri-gar
- name: Auth Docker hub registry
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to us-central1 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://us-docker.pkg.dev
Expand All @@ -44,10 +55,9 @@ jobs:
with:
context: docker/prover-gpu-fri-gar
build-args: |
PROVER_IMAGE=${{ inputs.image_tag_suffix }}
PROVER_IMAGE=${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }}
push: true
tags: |
us-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.protocol_version }}-${{ inputs.image_tag_suffix }}
- name: Login to Asia GAR
Expand All @@ -56,9 +66,6 @@ jobs:
- 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 }}
docker buildx imagetools create \
--tag asia-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }}
Expand All @@ -69,9 +76,6 @@ jobs:
- 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 }}
docker buildx imagetools create \
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/prover-fri-gpu-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }}
15 changes: 5 additions & 10 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
echo $(pwd)/bin >> $GITHUB_PATH
echo CI=1 >> .env
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: start-services
run: |
Expand Down Expand Up @@ -185,33 +186,27 @@ jobs:
component:
- witness-vector-generator
steps:

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Auth Docker hub registry
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to us-central1 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://us-docker.pkg.dev
- name: Login and push 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
docker buildx imagetools create \
--tag asia-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }}
docker buildx imagetools create \
--tag asia-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ needs.build-images.outputs.protocol_version }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ needs.build-images.outputs.protocol_version }}-${{ inputs.image_tag_suffix }}
- name: Login and push 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
docker buildx imagetools create \
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }}
docker buildx imagetools create \
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ needs.build-images.outputs.protocol_version }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ needs.build-images.outputs.protocol_version }}-${{ inputs.image_tag_suffix }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci-common-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Workflow template for CI jobs to be ran on both Prover and Core Components
on:
workflow_call:
secrets:
DOCKERHUB_USER:
description: "DOCKERHUB_USER"
required: true
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true

jobs:
build:
Expand All @@ -18,6 +25,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ci-core-lint-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: Workflow template for Core Linting CI jobs
on:
workflow_call:

secrets:
DOCKERHUB_USER:
description: "DOCKERHUB_USER"
required: true
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true

jobs:
code_lint:
Expand All @@ -17,6 +23,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Workflow template for CI jobs for Core Components
on:
workflow_call:
secrets:
DOCKERHUB_USER:
description: "DOCKERHUB_USER"
required: true
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
inputs:
compilers:
description: "JSON of required compilers and their versions"
Expand All @@ -12,6 +19,9 @@ jobs:
lint:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
unit-tests:
runs-on: [matterlabs-ci-runner]

Expand All @@ -26,6 +36,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
# TODO: Remove when we after upgrade of hardhat-plugins
- name: pre-download compilers
Expand Down Expand Up @@ -79,6 +90,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Loadtest configuration
run: |
Expand Down Expand Up @@ -151,6 +163,7 @@ jobs:
echo IN_DOCKER=1 >> .env
echo RUN_CONTRACT_VERIFICATION_TEST=true >> .env
echo ZKSYNC_DEBUG_LOGS=true >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download zksolc/solc and zkvyper/vyper
run: |
Expand Down Expand Up @@ -326,6 +339,7 @@ jobs:
echo IN_DOCKER=1 >> .env
echo RUN_CONTRACT_VERIFICATION_TEST=true >> .env
echo ZKSYNC_DEBUG_LOGS=true >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ci-docs-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: Workflow template for CI jobs against docs
on:
workflow_call:

secrets:
DOCKERHUB_USER:
description: "DOCKERHUB_USER"
required: true
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
jobs:
lint:
runs-on: [matterlabs-ci-runner]
Expand All @@ -16,6 +22,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/ci-prover-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: Workflow template for CI jobs for Prover Components
on:
workflow_call:

secrets:
DOCKERHUB_USER:
description: "DOCKERHUB_USER"
required: true
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
jobs:
lint:
runs-on: [matterlabs-ci-runner]
Expand All @@ -18,6 +24,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down Expand Up @@ -49,6 +56,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down
30 changes: 28 additions & 2 deletions .github/workflows/ci-zk-toolbox-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Workflow template for CI jobs for Core Components
on:
workflow_call:
secrets:
DOCKERHUB_USER:
description: "DOCKERHUB_USER"
required: true
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true

env:
CLICOLOR: 1
Expand All @@ -9,6 +16,9 @@ jobs:
lint:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

build:
runs-on: [matterlabs-ci-runner]
Expand All @@ -24,6 +34,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down Expand Up @@ -72,7 +83,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start services
run: |
Expand Down Expand Up @@ -102,11 +113,22 @@ jobs:
run: |
ci_run zk_supervisor test integration --ignore-prerequisites --verbose
- name: Run external node server
- name: Init external node server
run: |
ci_run zk_inception external-node configs --db-url=postgres://postgres:notsecurepassword@postgres:5432 \
--db-name=zksync_en_localhost_era --l1-rpc-url=http://reth:8545
ci_run zk_inception external-node init --ignore-prerequisites
- name: Run recovery tests (from snapshot)
run: |
ci_run zk_supervisor test recovery --snapshot --ignore-prerequisites --verbose
- name: Run recovery tests (from genesis)
run: |
ci_run zk_supervisor test recovery --ignore-prerequisites --verbose
- name: Run external node server
run: |
ci_run zk_inception external-node run --ignore-prerequisites &>external_node.log &
ci_run sleep 5
Expand All @@ -118,6 +140,10 @@ jobs:
run: |
ci_run zk_supervisor test revert --ignore-prerequisites --verbose
- name: Run revert tests (external node)
run: |
ci_run zk_supervisor test revert --external-node --ignore-prerequisites --verbose
- name: Show server.log logs
if: always()
run: ci_run cat server.log || true
Expand Down
Loading

0 comments on commit f1cda3e

Please sign in to comment.