Skip to content

Commit

Permalink
Merge branch 'main' into wasm-cairo1
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoGiachetta authored Oct 1, 2024
2 parents 50bd9ee + 7d19956 commit bd66521
Show file tree
Hide file tree
Showing 53 changed files with 1,281 additions and 363 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
with:
components: rustfmt, clippy
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cairo_1_programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fresh_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0

- name: Install Pyenv
uses: "gabrielfalcao/pyenv-action@v13"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hint_accountant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hyper_threading_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo apt-get install -y hyperfine
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
with:
components: rustfmt, clippy

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hyperfine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

- name: Install Rust
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0

- name: Checkout
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iai_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Python3 Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iai_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Install Rust
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
- name: Set up cargo cache
if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }}
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Python3 Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
- name: Publish crate cairo-vm
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down
81 changes: 75 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
with:
components: rustfmt, clippy
- name: Set up cargo cache
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
with:
targets: wasm32-unknown-unknown

Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
with:
targets: wasm32-unknown-unknown

Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
with:
targets: wasm32-unknown-unknown

Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
with:
components: llvm-tools-preview
- name: Set up cargo cache
Expand Down Expand Up @@ -395,7 +395,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.76.0
uses: dtolnay/rust-toolchain@1.80.0
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
Expand Down Expand Up @@ -600,6 +600,36 @@ jobs:
key: codecov-cache-test-no_std-extensive_hints-${{ github.sha }}
fail-on-cache-miss: true

- name: Fetch results for tests with stdlib (w/mod_builtin; part. 1)
uses: actions/cache/restore@v3
with:
path: lcov-test#1-mod_builtin.info
key: codecov-cache-test#1-mod_builtin-${{ github.sha }}
fail-on-cache-miss: true
- name: Fetch results for tests with stdlib (w/mod_builtin; part. 2)
uses: actions/cache/restore@v3
with:
path: lcov-test#2-mod_builtin.info
key: codecov-cache-test#2-mod_builtin-${{ github.sha }}
fail-on-cache-miss: true
- name: Fetch results for tests with stdlib (w/mod_builtin; part. 3)
uses: actions/cache/restore@v3
with:
path: lcov-test#3-mod_builtin.info
key: codecov-cache-test#3-mod_builtin-${{ github.sha }}
fail-on-cache-miss: true
- name: Fetch results for tests with stdlib (w/mod_builtin; part. 4)
uses: actions/cache/restore@v3
with:
path: lcov-test#4-mod_builtin.info
key: codecov-cache-test#4-mod_builtin-${{ github.sha }}
fail-on-cache-miss: true
- name: Fetch results for tests without stdlib (w/mod_builtin)
uses: actions/cache/restore@v3
with:
path: lcov-no_std-mod_builtin.info
key: codecov-cache-test-no_std-mod_builtin-${{ github.sha }}
fail-on-cache-miss: true

- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
Expand Down Expand Up @@ -742,6 +772,45 @@ jobs:
- name: Run script
run: ./vm/src/tests/compare_factorial_outputs_all_layouts.sh

compare-outputs-dynamic-layouts:
name: Compare outputs with dynamic layouts
needs: [ build-programs, build-release ]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Python3 Build
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'

- name: Install cairo-lang and deps
run: pip install -r requirements.txt

- name: Fetch release binary
uses: actions/cache/restore@v3
with:
key: cli-bin-rel-${{ github.sha }}
path: target/release/cairo-vm-cli
fail-on-cache-miss: true

- uses: actions/download-artifact@master
with:
name: proof_programs
path: cairo_programs/proof_programs/

- name: Fetch programs
uses: actions/cache/restore@v3
with:
path: ${{ env.CAIRO_PROGRAMS_PATH }}
key: cairo_proof_programs-cache-${{ hashFiles('cairo_programs/**/*.cairo', 'examples/wasm-demo/src/array_sum.cairo') }}
fail-on-cache-miss: true

- name: Run script
run: ./vm/src/tests/compare_outputs_dynamic_layouts.sh

compare-run-from-cairo-pie-all-outputs:
name: Compare all outputs from running Cairo PIEs
needs: [ build-programs, build-release, run-cairo-release ]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ cairo-vm-cli/air_input.pub
ensure-no_std/Cargo.lock
cairo_programs/proof_programs/*.cairo

!cairo_layout_params_file.json
!vm/src/tests/cairo_pie_test_output.json
20 changes: 17 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

#### Upcoming Changes

* fix: [#1841](https://github.com/lambdaclass/cairo-vm/pull/1841):
* Fix modulo builtin to comply with prover constraints

* feat(BREAKING): [#1824](https://github.com/lambdaclass/cairo-vm/pull/1824):
* Add support for dynamic layout
* CLI change(BREAKING): The flag `cairo_layout_params_file` must be specified when using dynamic layout.
* Signature change(BREAKING): Both `CairoRunner::new` and `CairoRunner::new_v2` now receive an `Option<CairoLayoutParams>`, used only with dynamic layout.

* chore: bump pip `cairo-lang` 0.13.2 [#1827](https://github.com/lambdaclass/cairo-vm/pull/1827)

* chore: bump `cairo-lang-` dependencies to 2.8.0 [#1833](https://github.com/lambdaclass/cairo-vm/pull/1833/files)
* chore: update Rust required version to 1.80.0

* chore: make cairo 1.0 compatible with wasm [#1830](https://github.com/lambdaclass/cairo-vm/pull/1830)

* fix: Added the following VM fixes: [#1820](https://github.com/lambdaclass/cairo-vm/pull/1820)
Expand All @@ -10,13 +23,14 @@
* Fix prover input.
* Fix version reading when no version is supplied.


* chore: bump `cairo-lang-` dependencies to 2.7.1 [#1823](https://github.com/lambdaclass/cairo-vm/pull/1823)

#### [1.0.1] - 2024-08-12

* fix(BREAKING): [#1818](https://github.com/lambdaclass/cairo-vm/pull/1818):
* Fix `MemorySegmentManager::add_zero_segment` function when resizing a segment
* Signature change(BREAKING): `MemorySegmentManager::get_memory_holes` now receives `builtin_segment_indexes: HashSet<usize>`
* fix(BREAKING): [#1818](https://github.com/lambdaclass/cairo-vm/pull/1818):
* Fix `MemorySegmentManager::add_zero_segment` function when resizing a segment
* Signature change(BREAKING): `MemorySegmentManager::get_memory_holes` now receives `builtin_segment_indexes: HashSet<usize>`

* fix(BREAKING): Replace `CairoRunner` method `initialize_all_builtins` with `initialize_program_builtins`. Now it only initializes program builtins instead of all of them

Expand Down
Loading

0 comments on commit bd66521

Please sign in to comment.