Skip to content

Commit

Permalink
Merge pull request #1 from matter-labs/sb-forge-for-contracts
Browse files Browse the repository at this point in the history
feat: Port the gateway release candidate + use forge
  • Loading branch information
StanislavBreadless authored Nov 17, 2024
2 parents 5d6cd32 + ed383c0 commit 82d69cf
Show file tree
Hide file tree
Showing 126 changed files with 3,472 additions and 599 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Login to google container registry
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-contract-verifier-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand Down Expand Up @@ -40,6 +43,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: setup-env
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand Down Expand Up @@ -49,6 +52,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: setup-env
Expand Down Expand Up @@ -181,6 +185,8 @@ jobs:
IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}${{ (inputs.en_alpha_release && matrix.component.name == 'external-node') && '-alpha' || '' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

- name: login to Docker registries
run: |
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build Image from tag
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
tag_name:
description: "Tag of an image to built"
Expand All @@ -12,6 +16,10 @@ on:
description: "Tag of an image to built"
type: string
required: true
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
push:
tags:
- core-v**
Expand All @@ -29,6 +37,8 @@ jobs:
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
- name: Generate output with git tag
id: set
run: |
Expand All @@ -54,6 +64,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
en_alpha_release: true
Expand All @@ -67,6 +78,7 @@ jobs:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}

Expand All @@ -78,6 +90,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}

Expand All @@ -93,6 +106,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-push-witness-generator-image-avx512:
name: Build and push image
Expand All @@ -107,6 +121,7 @@ jobs:
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

build-gar-prover-fri-gpu-and-circuit-prover-gpu-gar:
name: Build GAR prover FRI GPU
Expand All @@ -117,3 +132,5 @@ 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:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
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 @@ -20,6 +20,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: setup-env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build Prover FRI GPU & Circuit Prover GPU with builtin setup data

on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Commit sha or git tag for Docker tag"
Expand All @@ -23,6 +27,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Download Setup data
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
ERA_BELLMAN_CUDA_RELEASE:
description: "ERA_BELLMAN_CUDA_RELEASE"
Expand Down Expand Up @@ -62,6 +65,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: setup-env
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-runtime-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Login to google container registry
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build-tee-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
ATTIC_TOKEN:
description: "ATTIC_TOKEN"
required: false
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
image_tag_suffix:
description: "Optional suffix to override tag name generation"
Expand All @@ -32,9 +35,12 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
ref: ${{ github.event.inputs.target_branch }}
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
if: ${{ github.event_name != 'workflow_dispatch' }}
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}

- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-witness-generator-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
DOCKERHUB_TOKEN:
description: "DOCKERHUB_TOKEN"
required: true
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
ERA_BELLMAN_CUDA_RELEASE:
description: "ERA_BELLMAN_CUDA_RELEASE"
Expand Down Expand Up @@ -62,6 +65,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: setup-env
Expand Down Expand Up @@ -169,4 +173,4 @@ jobs:
if: always()
run: |
ci_run sccache --show-stats || true
ci_run cat /tmp/sccache_log.txt || true
ci_run cat /tmp/sccache_log.txt || true
5 changes: 5 additions & 0 deletions .github/workflows/ci-common-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow template for CI jobs to be ran on both Prover and Core Components
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
build:
Expand All @@ -11,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Setup environment
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-core-lint-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Workflow template for Core Linting CI jobs
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
code_lint:
runs-on: matterlabs-ci-runner-highmem-long
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Setup environment
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow template for CI jobs for Core Components
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true
inputs:
compilers:
description: "JSON of required compilers and their versions"
Expand All @@ -16,12 +20,15 @@ jobs:
lint:
name: lint
uses: ./.github/workflows/ci-core-lint-reusable.yml
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
unit-tests:
runs-on: [ matterlabs-ci-runner-highmem-long ]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"
fetch-depth: 0

Expand Down Expand Up @@ -94,6 +101,7 @@ jobs:
# steps:
# - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
# with:
# token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
# submodules: "recursive"
# fetch-depth: 0
#
Expand Down Expand Up @@ -177,6 +185,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"
fetch-depth: 0

Expand All @@ -196,6 +205,16 @@ jobs:
- name: Start services
run: |
ci_localnet_up
- name: Reinstall foundry
run: |
ci_run mkdir ./foundry-zksync
ci_run curl -LO https://github.com/matter-labs/foundry-zksync/releases/download/nightly-953a1800eaa2cffe5cb272f96ff641cc7a3c1ba1/foundry_nightly_linux_amd64.tar.gz
ci_run tar zxf foundry_nightly_linux_amd64.tar.gz -C ./foundry-zksync
ci_run chmod +x ./foundry-zksync/forge ./foundry-zksync/cast
ci_run mv ./foundry-zksync/forge /usr/local/cargo/bin/forge
ci_run mv ./foundry-zksync/cast /usr/local/cargo/bin/cast
- name: Install zkstack
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-docs-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow template for CI jobs against docs
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
lint:
Expand All @@ -10,6 +14,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Setup environment
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci-prover-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Workflow for testing prover component end-to-end
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
e2e-test:
Expand All @@ -11,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"
fetch-depth: 0

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci-prover-reusable.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Workflow template for CI jobs for Prover Components
on:
workflow_call:
secrets:
ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE:
description: "Token which will be provided to checkout action to be able to clone private submodules"
required: true

jobs:
lint:
runs-on: [ matterlabs-ci-runner-highmem-long ]
Expand All @@ -10,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Setup environment
Expand Down Expand Up @@ -51,6 +57,7 @@ jobs:
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
token: ${{ secrets.ZKSYNC_ADMIN_BOT_ORG_REPO_WRITE }}
submodules: "recursive"

- name: Setup environment
Expand Down
Loading

0 comments on commit 82d69cf

Please sign in to comment.