Skip to content

feat: ZK-065 – full ZK validation CI pipeline with artifact drift detection - #460

Open
rushikeshgarad2024-dev wants to merge 1 commit into
ANAVHEOBA:mainfrom
rushikeshgarad2024-dev:feat/zk-065-full-validation-ci
Open

rushikeshgarad2024-dev wants to merge 1 commit into
ANAVHEOBA:mainfrom
rushikeshgarad2024-dev:feat/zk-065-full-validation-ci

Conversation

@rushikeshgarad2024-dev

Copy link
Copy Markdown

Summary

Closes the ZK-065 acceptance criteria by introducing a CI workflow that runs the full ZK validation stack from a clean checkout, with no frontend or contract-deployment dependencies.

Wave Issue Key: ZK-065


What was implemented

.github/workflows/zk-full-validation.yml

A four-job workflow that triggers on push to main and on any PR touching circuits/, sdk/, artifacts/zk/, scripts/, or the workflow file itself.

Job What it does
zk-nargo-tests Installs Nargo via noirup, validates manifest.json exists, runs nargo test for commitment, merkle, and withdraw circuits
zk-sdk-tests Sets up Node 20, npm ci in sdk/, runs full Jest suite (npm test), runs scripts/zk/zk-proof-smoke.mjs
zk-artifact-drift Recompiles all circuits with nargo compile, copies outputs back to artifacts/zk/, runs git diff; a non-empty diff fails the build
zk-manifest-validation Validates manifest.json schema (version, backend, circuit entries with sha256 + path), asserts commitment_vectors.json is present

A final zk-validation-summary gate job aggregates results and prints a human-readable status table.

scripts/zk-full-validation-local.sh

Shell script for local reproduction with flags mirroring each CI job:

# Run all checks (mirrors full CI pipeline)
bash scripts/zk-full-validation-local.sh

# Rebuild artifacts then validate
bash scripts/zk-full-validation-local.sh --rebuild

# Individual checks
bash scripts/zk-full-validation-local.sh --nargo
bash scripts/zk-full-validation-local.sh --sdk
bash scripts/zk-full-validation-local.sh --drift
bash scripts/zk-full-validation-local.sh --manifest

Acceptance criteria checklist

  • CI runs the full ZK validation stack from a clean checkout
  • Runs Nargo tests, SDK ZK tests, artifact rebuild checks, and manifest validation
  • Artifact drift is detected automatically (dirty artifact diff fails the build)
  • A contributor can reproduce the same checks locally with scripted commands (scripts/zk-full-validation-local.sh)
  • Keeps ZK tasks scoped without depending on frontend or contract deployment

…ection

- Add .github/workflows/zk-full-validation.yml with four dedicated jobs:
  1. zk-nargo-tests: installs noirup + runs nargo test for each circuit
  2. zk-sdk-tests: installs Node 20, runs npm test in sdk/, smoke tests
  3. zk-artifact-drift: recompiles circuits, diffs artifacts/zk/ (dirty = fail)
  4. zk-manifest-validation: validates manifest.json schema + required fields
- Add scripts/zk-full-validation-local.sh for local reproduction
  (mirrors all four CI checks with --nargo/--sdk/--drift/--manifest flags)
- Workflow scoped to ZK paths only (circuits/, sdk/, artifacts/zk/, scripts/)
- No frontend or contract-deployment dependencies

Wave Issue Key: ZK-065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant