diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index edcb401ef..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: CI -on: - push: - merge_group: - pull_request: -jobs: - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: software-mansion/setup-scarb@v1 - - run: scarb fmt --check - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: software-mansion/setup-scarb@v1 - - run: scarb test - - verify-layout: - strategy: - matrix: - layout: ["dex", "recursive", "recursive_with_poseidon", "small", "starknet"] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - uses: software-mansion/setup-scarb@v1 - - run: python configure.py -l ${{ matrix.layout }} -s keccak - - run: scarb build - - run: cargo run --release --bin runner -- target/dev/cairo_verifier.sierra.json < examples/proofs/${{ matrix.layout }}/example_proof.json \ No newline at end of file diff --git a/.github/workflows/full.yml b/.github/workflows/full.yml new file mode 100644 index 000000000..3bbe70f95 --- /dev/null +++ b/.github/workflows/full.yml @@ -0,0 +1,60 @@ +name: Continuous Integration - full testing + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + formatting-and-testing: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Scarb + uses: software-mansion/setup-scarb@v1 + + - name: Format code + run: scarb fmt --check + + - name: Run tests + run: scarb test + + verify-layout: + needs: formatting-and-testing + runs-on: ubuntu-latest + strategy: + matrix: + layout: ["dex", "recursive", "recursive_with_poseidon", "small", "starknet"] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Scarb + uses: software-mansion/setup-scarb@v1 + + - name: Setup Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Configure layout + run: python configure.py -l ${{ matrix.layout }} -s keccak + + - name: Build project + run: scarb build + + - name: Run verification + run: cargo run --release --bin runner -- target/dev/cairo_verifier.sierra.json < examples/proofs/${{ matrix.layout }}/example_proof.json diff --git a/.github/workflows/partial.yml b/.github/workflows/partial.yml new file mode 100644 index 000000000..95f3e04be --- /dev/null +++ b/.github/workflows/partial.yml @@ -0,0 +1,21 @@ +name: Continuous Integration - partial testing + +on: + push: + pull_request: + +jobs: + formatting-and-testing: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Scarb + uses: software-mansion/setup-scarb@v1 + + - name: Format code + run: scarb fmt --check + + - name: Run tests + run: scarb test \ No newline at end of file diff --git a/.tool-versions b/.tool-versions index f2e92b793..31ea1ea1b 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1,2 @@ -scarb 2.6.0 +scarb nightly-2024-03-16 +starknet-foundry 0.20.0 \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index d33a7eb10..f50202ad2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,10 +9,10 @@ version = "0.1.0" [workspace.dependencies] anyhow = "1" cairo-felt = "0.9" -cairo-lang-casm = "=2.6.0" -cairo-lang-runner = "=2.6.0" -cairo-lang-sierra = "=2.6.0" -cairo-lang-utils = "=2.6.0" +cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo/" } +cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo/" } +cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo/" } +cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo/" } cairo-proof-parser = { git = "https://github.com/Okm165/cairo-proof-parser" } cairo-vm = "=0.9.2" clap = { version = "4.5.2", features = ["derive"] } diff --git a/runner/src/main.rs b/runner/src/main.rs index 5c81a6139..b062e25aa 100644 --- a/runner/src/main.rs +++ b/runner/src/main.rs @@ -58,7 +58,7 @@ fn main() -> anyhow::Result<()> { let result = runner .run_function_with_starknet_context( func, - &[Arg::Array(proof.to_vec())], + &[Arg::Array(proof.into_iter().map(Arg::Value).collect_vec())], Some(u32::MAX as usize), Default::default(), )