Skip to content

Commit

Permalink
Merge branch 'main' into gprusak-smooth
Browse files Browse the repository at this point in the history
  • Loading branch information
pompon0 authored Oct 11, 2024
2 parents 1f97a74 + a5d57f4 commit 676fd32
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 28 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/release-test-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- '!prover/**'
setup:
name: Setup
runs-on: [ matterlabs-deployer-stage ]
runs-on: [matterlabs-deployer-stage]
outputs:
image_tag_suffix: ${{ steps.generate-tag-suffix.outputs.image_tag_suffix }}
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
Expand All @@ -58,11 +58,10 @@ jobs:
run: |
./prover/extract-setup-data-keys.sh >> $GITHUB_OUTPUT
build-push-core-images:
name: Build and push images
needs: [ setup, changed_files ]
uses: ./.github/workflows/build-core-template.yml
needs: [setup, changed_files]
uses: ./.github/workflows/new-build-core-template.yml
if: needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true'
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
Expand All @@ -72,7 +71,7 @@ jobs:

build-push-tee-prover-images:
name: Build and push images
needs: [ setup, changed_files ]
needs: [setup, changed_files]
uses: ./.github/workflows/build-tee-prover-template.yml
if: needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true'
with:
Expand All @@ -84,8 +83,8 @@ jobs:

build-push-contract-verifier:
name: Build and push images
needs: [ setup, changed_files ]
uses: ./.github/workflows/build-contract-verifier-template.yml
needs: [setup, changed_files]
uses: ./.github/workflows/new-build-contract-verifier-template.yml
if: needs.changed_files.outputs.core == 'true' || needs.changed_files.outputs.all == 'true'
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
Expand All @@ -95,8 +94,8 @@ jobs:

build-push-prover-images:
name: Build and push images
needs: [ setup, changed_files ]
uses: ./.github/workflows/build-prover-template.yml
needs: [setup, changed_files]
uses: ./.github/workflows/new-build-prover-template.yml
if: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true'
with:
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
Expand All @@ -108,12 +107,11 @@ jobs:

build-push-witness-generator-image-avx512:
name: Build and push prover images with avx512 instructions
needs: [ setup, changed_files ]
uses: ./.github/workflows/build-witness-generator-template.yml
needs: [setup, changed_files]
uses: ./.github/workflows/new-build-witness-generator-template.yml
if: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true'
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:
Expand All @@ -122,7 +120,7 @@ jobs:

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: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true'
with:
Expand Down
17 changes: 12 additions & 5 deletions etc/nix/tee_prover.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{ cargoArtifacts
, craneLib
{ craneLib
, commonArgs
}:
craneLib.buildPackage (commonArgs // {
let
pname = "zksync_tee_prover";
cargoExtraArgs = "--locked -p zksync_tee_prover";
in
craneLib.buildPackage (commonArgs // {
inherit pname;
version = (builtins.fromTOML (builtins.readFile ../../core/bin/zksync_tee_prover/Cargo.toml)).package.version;
cargoExtraArgs = "-p zksync_tee_prover --bin zksync_tee_prover";
inherit cargoArtifacts;
inherit cargoExtraArgs;

cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
inherit pname;
inherit cargoExtraArgs;
});

postInstall = ''
strip $out/bin/zksync_tee_prover
Expand Down
8 changes: 5 additions & 3 deletions etc/nix/zksync.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{ cargoArtifacts
, craneLib
{ craneLib
, commonArgs
}:
craneLib.buildPackage (commonArgs // {
pname = "zksync";
version = (builtins.fromTOML (builtins.readFile ../../core/bin/zksync_tee_prover/Cargo.toml)).package.version;
cargoExtraArgs = "--all";
inherit cargoArtifacts;

cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
pname = "zksync-era-workspace";
});

outputs = [
"out"
Expand Down
9 changes: 2 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
packages = {
# to ease potential cross-compilation, the overlay is used
inherit (appliedOverlay.zksync-era) zksync tee_prover container-tee-prover-azure container-tee-prover-dcap;
default = appliedOverlay.zksync-era.zksync;
default = appliedOverlay.zksync-era.tee_prover;
};

devShells.default = appliedOverlay.zksync-era.devShell;
Expand Down Expand Up @@ -107,10 +107,6 @@
strictDeps = true;
inherit hardeningEnable;
};

cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
pname = "zksync-era-workspace";
});
in
{
zksync-era = rec {
Expand All @@ -120,12 +116,11 @@
};

zksync = pkgs.callPackage ./etc/nix/zksync.nix {
inherit cargoArtifacts;
inherit craneLib;
inherit commonArgs;
};

tee_prover = pkgs.callPackage ./etc/nix/tee_prover.nix {
inherit cargoArtifacts;
inherit craneLib;
inherit commonArgs;
};
Expand Down

0 comments on commit 676fd32

Please sign in to comment.