Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evl hotfixing circuit provers #3403

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency: docker-build
jobs:
setup:
name: Setup
runs-on: [ ubuntu-latest ]
runs-on: [ubuntu-latest]
outputs:
image_tag_suffix: ${{ steps.set.outputs.image_tag_suffix }}
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
Expand All @@ -46,71 +46,71 @@ jobs:
run: |
./prover/extract-setup-data-keys.sh >> $GITHUB_OUTPUT

build-push-core-images:
name: Build and push image
needs: [ setup ]
uses: ./.github/workflows/build-core-template.yml
if: contains(github.ref_name, 'core')
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
en_alpha_release: true

build-push-tee-prover-images:
name: Build and push images
needs: [ setup ]
uses: ./.github/workflows/build-tee-prover-template.yml
if: contains(github.ref_name, 'core')
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}

build-push-contract-verifier:
name: Build and push image
needs: [ setup ]
uses: ./.github/workflows/build-contract-verifier-template.yml
if: contains(github.ref_name, 'contract_verifier')
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}

# build-push-core-images:
# name: Build and push image
# needs: [ setup ]
# uses: ./.github/workflows/build-core-template.yml
# if: contains(github.ref_name, 'core')
# secrets:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# with:
# image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
# en_alpha_release: true
#
# build-push-tee-prover-images:
# name: Build and push images
# needs: [ setup ]
# uses: ./.github/workflows/build-tee-prover-template.yml
# if: contains(github.ref_name, 'core')
# secrets:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
# with:
# image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
#
# build-push-contract-verifier:
# name: Build and push image
# needs: [ setup ]
# uses: ./.github/workflows/build-contract-verifier-template.yml
# if: contains(github.ref_name, 'contract_verifier')
# secrets:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# with:
# image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
#
build-push-prover-images:
name: Build and push image
needs: [ setup ]
uses: ./.github/workflows/build-prover-template.yml
needs: [setup]
uses: ./.github/workflows/new-build-prover-template.yml
if: contains(github.ref_name, 'prover')
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
ERA_BELLMAN_CUDA_RELEASE: ${{ vars.ERA_BELLMAN_CUDA_RELEASE }}
CUDA_ARCH: "60;70;75;80;89"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

build-push-witness-generator-image-avx512:
name: Build and push image
needs: [ setup ]
uses: ./.github/workflows/build-witness-generator-template.yml
if: contains(github.ref_name, 'prover')
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}-avx512
ERA_BELLMAN_CUDA_RELEASE: ${{ vars.ERA_BELLMAN_CUDA_RELEASE }}
CUDA_ARCH: "60;70;75;80;89"
WITNESS_GENERATOR_RUST_FLAGS: "-Ctarget_feature=+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl"
action: "push"
secrets:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

# build-push-witness-generator-image-avx512:
# name: Build and push image
# needs: [ setup ]
# uses: ./.github/workflows/build-witness-generator-template.yml
# if: contains(github.ref_name, 'prover')
# with:
# image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}-avx512
# ERA_BELLMAN_CUDA_RELEASE: ${{ vars.ERA_BELLMAN_CUDA_RELEASE }}
# CUDA_ARCH: "60;70;75;80;89"
# WITNESS_GENERATOR_RUST_FLAGS: "-Ctarget_feature=+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl"
# secrets:
# DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
#
build-gar-prover-fri-gpu-and-circuit-prover-gpu-gar:
name: Build GAR prover FRI GPU
needs: [ setup, build-push-prover-images ]
needs: [setup, build-push-prover-images]
uses: ./.github/workflows/build-prover-fri-gpu-gar-and-circuit-prover-gpu-gar.yml
if: contains(github.ref_name, 'prover')
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,31 @@ 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 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
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ jobs:
strategy:
matrix:
component:
- witness-generator
- prover-gpu-fri
- witness-vector-generator
# - witness-generator
# - prover-gpu-fri
# - witness-vector-generator
- circuit-prover-gpu
- prover-fri-gateway
- prover-job-monitor
- proof-fri-gpu-compressor
- prover-autoscaler
# - prover-fri-gateway
# - prover-job-monitor
# - proof-fri-gpu-compressor
# - prover-autoscaler
outputs:
protocol_version: ${{ steps.protocolversion.outputs.protocol_version }}
steps:
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/new-build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ on:
CUDA_ARCH:
description: "CUDA Arch to build"
type: string
default: "89"
default: "75;80;89"
required: false
# Details: https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
# L4: 89
# T4: 75
# A100: 80
outputs:
protocol_version:
description: "Protocol version of the binary"
Expand Down Expand Up @@ -90,13 +94,13 @@ jobs:
strategy:
matrix:
components:
- witness-generator
- prover-gpu-fri
- witness-vector-generator
- prover-fri-gateway
- prover-job-monitor
- proof-fri-gpu-compressor
- prover-autoscaler
# - witness-generator
# - prover-gpu-fri
# - witness-vector-generator
# - prover-fri-gateway
# - prover-job-monitor
# - proof-fri-gpu-compressor
# - prover-autoscaler
- circuit-prover-gpu
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down Expand Up @@ -210,7 +214,6 @@ jobs:
--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
Expand Down
18 changes: 14 additions & 4 deletions core/lib/object_store/src/gcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl From<HttpError> for ObjectStoreError {
impl ObjectStore for GoogleCloudStore {
async fn get_raw(&self, bucket: Bucket, key: &str) -> Result<Vec<u8>, ObjectStoreError> {
let filename = Self::filename(bucket.as_str(), key);
tracing::trace!(
tracing::info!(
"Fetching data from GCS for key {filename} from bucket {}",
self.bucket_prefix
);
Expand All @@ -170,10 +170,20 @@ impl ObjectStore for GoogleCloudStore {
object: filename,
..GetObjectRequest::default()
};
self.client
let response = self
.client
.download_object(&request, &Range::default())
.await
.map_err(Into::into)
.await;
match response {
Err(err) => {
tracing::info!("Errored with: {err:?}");
Err(err.into())
}
Ok(data) => {
tracing::info!("received {} bytes of data", data.len());
Ok(data)
}
}
}

async fn put_raw(
Expand Down
4 changes: 2 additions & 2 deletions prover/crates/lib/prover_fri_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pub mod keys;
pub mod queue;

// THESE VALUES SHOULD BE UPDATED ON ANY PROTOCOL UPGRADE OF PROVERS
pub const PROVER_PROTOCOL_VERSION: ProtocolVersionId = ProtocolVersionId::Version25;
pub const PROVER_PROTOCOL_PATCH: VersionPatch = VersionPatch(0);
pub const PROVER_PROTOCOL_VERSION: ProtocolVersionId = ProtocolVersionId::Version24;
pub const PROVER_PROTOCOL_PATCH: VersionPatch = VersionPatch(2);
pub const PROVER_PROTOCOL_SEMANTIC_VERSION: ProtocolSemanticVersion = ProtocolSemanticVersion {
minor: PROVER_PROTOCOL_VERSION,
patch: PROVER_PROTOCOL_PATCH,
Expand Down