Skip to content

Commit

Permalink
Merge branch 'main' into afo/faster-compressor
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemka374 authored Jan 23, 2025
2 parents 07b9310 + c916797 commit e3e4805
Show file tree
Hide file tree
Showing 150 changed files with 2,060 additions and 2,432 deletions.
21 changes: 11 additions & 10 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,27 @@
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"include-component-in-tag": true,
"release-type": "simple",
"packages": {
"core": {
"release-type": "simple",
"component": "core",
"component": "core"
},
"prover": {
"component": "prover",
"extra-files": [
{
"type": "generic",
"path": "bin/external_node/Cargo.toml"
"path": "Cargo.toml"
}
]
},
"prover": {
"release-type": "simple",
"component": "prover"
},
"zkstack_cli": {
"release-type": "simple",
"component": "zkstack_cli",
"plugins": [
"cargo-workspace"
"extra-files": [
{
"type": "generic",
"path": "Cargo.toml"
}
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "25.4.0",
"core": "26.1.0",
"prover": "17.1.1",
"zkstack_cli": "0.1.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Download Setup data
run: |
gsutil -m rsync -r gs://matterlabs-setup-data-us/${{ inputs.setup_keys_id }} docker/prover-gpu-fri-gar
gsutil -m rsync -r gs://matterlabs-setup-data-us/${{ inputs.setup_keys_id }} docker/circuit-prover-gpu-gar
- name: Login to us-central1 GAR
run: |
Expand All @@ -47,32 +47,6 @@ jobs:
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 prover-gpu-fri-gar
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: docker/prover-gpu-fri-gar
build-args: |
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.protocol_version }}-${{ inputs.image_tag_suffix }}
- name: Build and push prover-gpu-fri-gar to Asia GAR
run: |
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 }}
- name: Build and push prover-gpu-fri-gar to Europe GAR
run: |
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 }}
- name: Move Setup data from prover-gpu-fri-gar to circuit-prover-gpu-gar
run: |
mv -v docker/prover-gpu-fri-gar/*.bin docker/circuit-prover-gpu-gar/
- name: Build and push circuit-prover-gpu-gar
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ jobs:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

build-gar-prover-fri-gpu-and-circuit-prover-gpu-gar:
build-circuit-prover-gpu-gar:
name: Build GAR prover FRI GPU
needs: [setup, build-push-prover-images]
uses: ./.github/workflows/build-prover-fri-gpu-gar-and-circuit-prover-gpu-gar.yml
uses: ./.github/workflows/build-circuit-prover-gpu-gar.yml
if: contains(github.ref_name, 'prover')
with:
setup_keys_id: ${{ needs.setup.outputs.prover_fri_gpu_key_id }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-proof-fri-gpu-compressor-gar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ jobs:
tags: |
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }}
- name: Build and push prover-gpu-fri-gar to Asia GAR
- name: Build and push proof-fri-gpu-compressor-gar to Asia GAR
run: |
docker buildx imagetools create \
--tag asia-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }}
- name: Build and push prover-gpu-fri-gar to Europe GAR
- name: Build and push proof-fri-gpu-compressor-gar to Europe GAR
run: |
docker buildx imagetools create \
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/proof-fri-gpu-compressor-gar:2.0-${{ inputs.protocol_version }}-${{ inputs.image_tag_suffix }} \
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ jobs:
matrix:
components:
- witness-generator
- prover-gpu-fri
- witness-vector-generator
- prover-fri-gateway
- prover-job-monitor
- proof-fri-gpu-compressor
Expand Down Expand Up @@ -201,42 +199,3 @@ jobs:
docker push us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.components }}:latest
docker push ghcr.io/${{ github.repository_owner }}/${{ matrix.components }}:latest
docker push matterlabs/${{ matrix.components }}:latest
copy-images:
name: Copy images between docker registries
needs: [build-images, get-protocol-version]
env:
PROTOCOL_VERSION: ${{ needs.get-protocol-version.outputs.protocol_version }}
runs-on: matterlabs-ci-runner
if: ${{ inputs.action == 'push' }}
strategy:
matrix:
component:
- witness-vector-generator
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1

- 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-${{ env.PROTOCOL_VERSION }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ env.PROTOCOL_VERSION }}-${{ inputs.image_tag_suffix }}
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 }}
- 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-${{ env.PROTOCOL_VERSION }}-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ env.PROTOCOL_VERSION }}-${{ inputs.image_tag_suffix }}
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 }}
8 changes: 6 additions & 2 deletions .github/workflows/protobuf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:

jobs:
compatibility:
runs-on: [ubuntu-22.04-github-hosted-16core]
runs-on: [ubuntu-24.04-github-hosted-16core]
steps:
- uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af # v0.0.5

Expand All @@ -46,24 +46,28 @@ jobs:
run:
git checkout $(git merge-base $BASE $HEAD) --recurse-submodules
working-directory: ./before

- name: compile before
run: cargo check --manifest-path ./core/Cargo.toml --all-targets
working-directory: ./before

- name: build before.binpb
run: >
perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
`find ./before/core/target/debug/build/*/output`
| xargs cat > ./before/.binpb
| xargs cat > ./before.binpb
# after
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
ref: ${{ env.HEAD }}
path: after
submodules: recursive

- name: compile after
run: cargo check --manifest-path ./core/Cargo.toml --all-targets
working-directory: ./after

- name: build after.binpb
run: >
perl -ne 'print "$1\n" if /PROTOBUF_DESCRIPTOR="(.*)"/'
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish crates

on:
workflow_dispatch:
inputs:
compontent:
description: 'Component to release. Possible values are: core, prover or zkstack_cli.'
required: true
default: 'zkstack_cli'
run-build:
type: boolean
description: 'Build the workspace before release.'
required: false
default: true
run-tests:
type: boolean
description: 'Run tests before release.'
required: false
default: false
org-owner:
type: string
description: 'Organization to add as owner of the crates.'
required: false
default: 'github:matter-labs:crates-io'


jobs:

publish-crates:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- name: Publish crates
uses: matter-labs/zksync-ci-common/.github/actions/publish-crates@v1
with:
slack_webhook: ${{ secrets.SLACK_WEBHOOK_RELEASES }} # Slack webhook for notifications
cargo_registry_token: ${{ secrets.CRATES_IO_TOKEN }} # Crates.io token for publishing
workspace_path: ${{ inputs.component }}
org_owner: ${{ inputs.org-owner }}
run_build: ${{ inputs.run-build }}
run_tests: ${{ inputs.run-tests }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
55 changes: 0 additions & 55 deletions .github/workflows/release-please-cargo-lock.yml

This file was deleted.

45 changes: 24 additions & 21 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
name: Release-please

# Give permissions to the release-please to open, update PRs
# and commit to PRs the repository to update Cargo.lock
permissions:
contents: write
pull-requests: write
id-token: write
attestations: write

# Run the workflow on push to the main branch or manually
on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write
pull-requests: write

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
with:
token: ${{ secrets.RELEASE_TOKEN }}
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json

- name: Send Release Info
if: ${{ steps.release.outputs.releases_created == 'true' }}
uses: matter-labs/format-release-please-for-slack-action@69e6fe9e4ec531b7b5fb0d826f73c190db83cf42 # v2.1.0
with:
release-please-output: ${{ toJSON(steps.release.outputs) }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_RELEASES }}
# Prepare the release PR with changelog updates and create github releases
release-please:
uses: matter-labs/zksync-ci-common/.github/workflows/release-please.yaml@v1
secrets:
slack_webhook: ${{ secrets.SLACK_WEBHOOK_RELEASES }} # Slack webhook for notifications
gh_token: ${{ secrets.GITHUB_TOKEN }} # GitHub token for release-please
with:
config: '.github/release-please/config.json' # Path to the configuration file
manifest: '.github/release-please/manifest.json' # Path to the manifest file
update-cargo-lock: true # Update Cargo.lock file in the release PR
publish-to-crates-io: true # Enable publishing to crates.io
upgrade-dependencies: true # Upgrade cross-workspace dependencies
version-suffix: 'non-semver-compat' # Version suffix for the crates.io release
4 changes: 2 additions & 2 deletions .github/workflows/release-test-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ jobs:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

build-gar-prover-fri-gpu-and-circuit-prover-gpu-gar:
build-circuit-prover-gpu-gar:
name: Build GAR prover FRI GPU
needs: [setup, build-push-prover-images]
uses: ./.github/workflows/build-prover-fri-gpu-gar-and-circuit-prover-gpu-gar.yml
uses: ./.github/workflows/build-circuit-prover-gpu-gar.yml
if: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true'
with:
setup_keys_id: ${{ needs.setup.outputs.prover_fri_gpu_key_id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vm-perf-comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
run: |
ci_run zkstackup -g --local
ci_run zkstack dev contracts
ci_run cargo bench --package vm-benchmark --bench instructions -- --verbose
ci_run cargo bench --manifest-path ./core/Cargo.toml --package vm-benchmark --bench instructions -- --verbose
ci_run cargo bench --manifest-path ./core/Cargo.toml \
--package vm-benchmark --bench instructions -- --print > instructions.log 2>/dev/null
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/vm-perf-to-prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
- name: run benchmarks
run: |
ci_run cargo bench --package vm-benchmark --bench oneshot
ci_run cargo bench --manifest-path ./core/Cargo.toml --package vm-benchmark --bench oneshot
# Run only benches with 1,000 transactions per batch to not spend too much time
ci_run cargo bench --package vm-benchmark --bench batch '/1000$'
ci_run cargo bench --package vm-benchmark --bench instructions -- --verbose
ci_run cargo bench --package vm-benchmark --bench instructions -- --print
ci_run cargo bench --manifest-path ./core/Cargo.toml --package vm-benchmark --bench batch '/1000$'
ci_run cargo bench --manifest-path ./core/Cargo.toml --package vm-benchmark --bench instructions -- --verbose
ci_run cargo bench --manifest-path ./core/Cargo.toml --package vm-benchmark --bench instructions -- --print
Loading

0 comments on commit e3e4805

Please sign in to comment.