Skip to content

Commit

Permalink
feat: Remove CI and docker images for CPU prover & compressor (#2540)
Browse files Browse the repository at this point in the history
## What ❔

Remove CI workflows & docker images for the CPU prover and compressor.

## Why ❔

CPU implementations are no longer supported and will be removed from
code soon.
Less CI workflows is better.

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
  • Loading branch information
popzxc authored Jul 30, 2024
1 parent 99fd2bd commit 0dda805
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 76 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
runs-on: [ubuntu-latest]
outputs:
image_tag_suffix: ${{ steps.set.outputs.image_tag_suffix }}
prover_fri_cpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.cpu_short_commit_sha }}
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ jobs:
matrix:
component:
- witness-generator
- prover-fri
- prover-gpu-fri
- witness-vector-generator
- prover-fri-gateway
- proof-fri-compressor
- proof-fri-gpu-compressor
outputs:
protocol_version: ${{ steps.protocolversion.outputs.protocol_version }}
Expand Down Expand Up @@ -87,12 +85,6 @@ jobs:
ci_run git config --global --add safe.directory /usr/src/zksync/contracts
ci_run zk
# We need the CRS only for the fri compressor.
- name: download CRS for CPU compressor
if: matrix.component == 'proof-fri-compressor'
run: |
ci_run run_retried curl -LO https://storage.googleapis.com/matterlabs-setup-keys-us/setup-keys/setup_2\^26.key
- name: download CRS for GPU compressor
if: matrix.component == 'proof-fri-gpu-compressor'
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release-test-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
runs-on: [matterlabs-deployer-stage]
outputs:
image_tag_suffix: ${{ steps.generate-tag-suffix.outputs.image_tag_suffix }}
prover_fri_cpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.cpu_short_commit_sha }}
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand Down
24 changes: 0 additions & 24 deletions docker/proof-fri-compressor/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions docker/prover-fri/Dockerfile

This file was deleted.

13 changes: 1 addition & 12 deletions infrastructure/zk/src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ const IMAGES = [
'server-v2',
'external-node',
'contract-verifier',
'prover-v2',
'local-node',
'zk-environment',
'circuit-synthesizer',
'witness-generator',
'prover-fri',
'prover-gpu-fri',
'witness-vector-generator',
'prover-fri-gateway',
'proof-fri-compressor',
'proof-fri-gpu-compressor',
'snapshots-creator',
'verified-sources-fetcher'
Expand Down Expand Up @@ -84,9 +81,7 @@ function defaultTagList(image: string, imageTagSha: string, imageTagShaTS: strin
if (
protocolVersionTag &&
[
'proof-fri-compressor',
'proof-fri-gpu-compressor',
'prover-fri',
'prover-fri-gateway',
'prover-gpu-fri',
'witness-generator',
Expand Down Expand Up @@ -117,22 +112,16 @@ async function _build(image: string, tagList: string[], dockerOrg: string, platf
if (platform != '') {
buildArgs += `--platform=${platform} `;
}
if (image === 'prover-v2') {
const eraBellmanCudaRelease = process.env.ERA_BELLMAN_CUDA_RELEASE;
buildArgs += `--build-arg ERA_BELLMAN_CUDA_RELEASE=${eraBellmanCudaRelease} `;
}
if (image === 'prover-gpu-fri') {
const cudaArch = process.env.CUDA_ARCH;
buildArgs += `--build-arg CUDA_ARCH='${cudaArch}' `;
}
buildArgs += extraArgs;

const imagePath = image === 'prover-v2' ? 'prover' : image;

const buildCommand =
`DOCKER_BUILDKIT=1 docker buildx build ${tagsToBuild}` +
(buildArgs ? ` ${buildArgs}` : '') +
` -f ./docker/${imagePath}/Dockerfile .`;
` -f ./docker/${image}/Dockerfile .`;

await utils.spawn(buildCommand);
}
Expand Down
7 changes: 0 additions & 7 deletions prover/extract-setup-data-keys.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
#!/bin/bash

# Define file names
cpu_file="setup-data-cpu-keys.json"
gpu_file="setup-data-gpu-keys.json"

# Process CPU file
value=$(jq -r '.us' "./prover/$cpu_file")
short_sha=$(echo $value | sed 's|gs://matterlabs-setup-data-us/\(.*\)/|\1|')
echo "cpu_short_commit_sha=$short_sha"

# Process GPU file
value=$(jq -r '.us' "./prover/$gpu_file")
short_sha=$(echo $value | sed 's|gs://matterlabs-setup-data-us/\(.*\)/|\1|')
Expand Down
5 changes: 0 additions & 5 deletions prover/setup-data-cpu-keys.json

This file was deleted.

0 comments on commit 0dda805

Please sign in to comment.