Skip to content

Commit

Permalink
Merge branch 'main' into update-logo
Browse files Browse the repository at this point in the history
  • Loading branch information
pefontana authored Mar 1, 2024
2 parents b90b5fa + 061ba87 commit 29c0727
Show file tree
Hide file tree
Showing 223 changed files with 2,369 additions and 1,563 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.70.0
uses: dtolnay/rust-toolchain@1.74.1
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.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: pipelines,coverage
skipLabels: pipelines,tests,documentation
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.70.0
uses: dtolnay/rust-toolchain@1.74.1

- 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.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up Cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
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.70.0
uses: dtolnay/rust-toolchain@1.74.1

- 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.70.0
uses: dtolnay/rust-toolchain@1.74.1
- 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.70.0
uses: dtolnay/rust-toolchain@1.74.1
- 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.70.0
uses: dtolnay/rust-toolchain@1.74.1
- 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.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Publish crate cairo-vm
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down
65 changes: 61 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@ env:
PROPTEST_CASES: 100

jobs:

# We need to use the same files across all jobs or else hashing will fail
upload_proof_programs_symlinks:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create proof_programs symlinks
run: make create-proof-programs-symlinks
- uses: actions/upload-artifact@master
with:
name: proof_programs
path: cairo_programs/proof_programs/*.cairo

build-programs:
needs: upload_proof_programs_symlinks
strategy:
matrix:
# NOTE: we build cairo_bench_programs so clippy can check the benchmarks too
Expand All @@ -41,6 +57,11 @@ jobs:
with:
fetch-depth: 0

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

- name: Fetch from cache
uses: actions/cache@v3
id: cache-programs
Expand Down Expand Up @@ -91,6 +112,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Fetch test programs
uses: actions/cache/restore@v3
Expand Down Expand Up @@ -135,17 +161,23 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
with:
components: rustfmt, clippy
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
uses: actions/checkout@v3

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

- name: Format
run: make check-fmt


- name: Fetch programs
uses: actions/cache/restore@v3
with:
Expand All @@ -165,7 +197,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
with:
targets: wasm32-unknown-unknown

Expand All @@ -181,6 +213,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

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

- name: Fetch programs
uses: actions/cache/restore@v3
with:
Expand Down Expand Up @@ -220,14 +257,19 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
with:
components: llvm-tools-preview
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
uses: actions/checkout@v3

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

- name: Fetch programs
uses: actions/cache/restore@v3
with:
Expand Down Expand Up @@ -281,7 +323,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@1.70.0
uses: dtolnay/rust-toolchain@1.74.1
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Checkout
Expand Down Expand Up @@ -314,6 +356,11 @@ jobs:
with:
fetch-depth: 0

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

- name: Check cache
uses: actions/cache@v3
id: trace-cache
Expand Down Expand Up @@ -381,6 +428,11 @@ jobs:
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:
Expand Down Expand Up @@ -496,6 +548,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

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

- name: Fetch traces for cairo-lang
uses: actions/cache/restore@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ cairo-vm-pypy-env/*
cairo1-run/corelib/
cairo-vm-cli/air_input.pub
ensure-no_std/Cargo.lock
cairo_programs/proof_programs/*.cairo

!vm/src/tests/cairo_pie_test_output.json
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,47 @@

#### Upcoming Changes

* feat: Add cairo1-run output pretty-printing for felts, arrays/spans and dicts [#1630](https://github.com/lambdaclass/cairo-vm/pull/1630)

#### [1.0.0-rc1] - 2024-02-23

* Bump `starknet-types-core` dependency version to 0.0.9 [#1628](https://github.com/lambdaclass/cairo-vm/pull/1628)

* feat: Implement `Display` for `MemorySegmentManager`[#1606](https://github.com/lambdaclass/cairo-vm/pull/1606)

* fix: make Felt252DictEntryUpdate work with MaybeRelocatable instead of only Felt [#1624](https://github.com/lambdaclass/cairo-vm/pull/1624).

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

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

* refactor: Refactor `cairo1-run` crate [#1601](https://github.com/lambdaclass/cairo-vm/pull/1601)
* Add function `cairo_run_program` & struct `Cairo1RunConfig` in `cairo1-run::cairo_run` module.
* Function `serialize_output` & structs `FuncArg` and `Error` in crate `cairo1-run` are now public.

* feat(BREAKING): Add `allow_missing_builtins` flag [#1600](https://github.com/lambdaclass/cairo-vm/pull/1600)

This new flag will skip the check that all builtins used by the program need to be present in the selected layout if enabled. It will also be enabled by default when running in proof_mode.

* Add `allow_missing_builtins` flag to `cairo-vm-cli` crate
* Add `allow_missing_builtins` field to `CairoRunConfig` struct
* Add `allow_missing_builtins` boolean argument to `CairoRunner` methods `initialize` & `initialize_builtins`

* feat: Append return values to the output segment when running cairo1-run in proof_mode [#1597](https://github.com/lambdaclass/cairo-vm/pull/1597)
* Add instructions to the proof_mode header to copy return values to the output segment before initiating the infinite loop
* Output builtin is now always included when running cairo 1 programs in proof_mode

* feat: deserialize AIR private input [#1589](https://github.com/lambdaclass/cairo-vm/pull/1589)

* feat(BREAKING): Remove unecessary conversion functions between `Felt` & `BigUint`/`BigInt` [#1562](https://github.com/lambdaclass/cairo-vm/pull/1562)
* Remove the following functions:
* felt_from_biguint
* felt_from_bigint
* felt_to_biguint
* felt_to_bigint

* perf: optimize instruction cache allocations by using `VirtualMachine::load_data` [#1441](https://github.com/lambdaclass/cairo-vm/pull/1441)

* feat: Add `print_output` flag to `cairo-1` crate [#1575] (https://github.com/lambdaclass/cairo-vm/pull/1575)

* bugfixes(BREAKING): Fix memory hole count inconsistencies #[1585] (https://github.com/lambdaclass/cairo-vm/pull/1585)
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/lambda
- `merge`
- `wip`

### Labels

We recommend using the corresponding labels for each PR's purpose, the most commonly used labels include:

- `documentation`: Improvements or additions to documentation
- `tests`: Implementation of tests
- `pipelines`: Improving CI/CD workflows
- `enhancement`: Implementation of new features
- `performance`: Performance-related improvements

## Attribution
This guide is based on the **contributing.md**. [Make your own](https://contributing.md/)!
Loading

0 comments on commit 29c0727

Please sign in to comment.