Skip to content

Commit

Permalink
Use starknet-types-core Felt (#1408)
Browse files Browse the repository at this point in the history
* Initial swap

* Misc changes

* Misc changes

* Add felt_to_biguint util

* Misc changes

* Move to_signed_felt to math_utils

* Fix code

* Fix code

* Fix code

* Remove felt crate

* Remove felt crate

* Restore felt_str macro + other changes

* Fix parsing utils

* Add changes

* Add changes

* Add fixes

* Add fixes

* Add fixes

* Add fixes

* Fix maybe_add_padding

* Pad bytes in keccak hints

* Fix bigint to felt conversion

* Restore tests

* Fix test

* Fix recover_y

* Fix biguint to felt conversion

* Fix is_addr_bounded hint

* Fix test

* Make safe_div safe again

* Fix negative number parsing in felt_str

* Revert "Fix negative number parsing in felt_str"

This reverts commit 3feb9a2.

* Remove negative handling in deserialization util

* Fix byte conversions in keccak auto-deduction

* Update felt commit

* Remove felt crate

* Fix EC OP tests

* Fix sqrt

* Fix unsafe keccak hints

* fix keccak integration test

* Fix deserialize_scientific_notation

* Fix error when deserializing big numbers

* cargo clippy

* fix merge main changes

* Improve  Add<&Felt252> for Relocatable

* Indicate type-rs commit

* Fix merge conflicts

* Update type-rs commit

* Fix wasm and hint accountant imports (#1436)

* Add import for string

* Cargo fmt

* Update air_public_input.rs

---------

Co-authored-by: juan.mv <[email protected]>

* Bump commit

* Fix felt display

* Fix deps for fuzzing (#1432)

* Fix deps for fuzzing

* Revert stark-felt import change

* Cargo fmt

* Merge use-felt

---------

Co-authored-by: juan.mv <[email protected]>

* cargo clippy

* fix  bench/criterion_benchmark.rs

* cargo clippy in fuzzer

* Remove lambdaworks-felt workflows

* Missed a spot

* Remove dep in ensure-no_std

* don't create an extra implicit feature (slows down build checks)

* air public memory is hex

* Remove old import

* Remove panic handler

* improve find_element_hint

* Restore MaybeRelocatable formatting

* stark-felt no-default-features

* more feature work

* Update types-rs

* Update RELEASE docs

* Update stark-felt, expect slowdown here

* Remove double import

* Clippy

* changelog

* fix fuzzer

* cargo.lock

* Faster split

* faster bitwise

* clippy

* clippy

* Use vec of powers of 2

* address comments

* remove special features

* Apply suggestion

Co-authored-by: fmoletta <[email protected]>

* add todo

* fix build

* unwrap_or_default

* nostd

* clippy

* typo codecov cache

* codecov cache typo

* Update type-rs commit

* Update fuzzer/Cargo.lock

* Use starknet-types-core to 0.0.3 v

* Empty-Commit

* Empty-Commit

* Update starknet-types-core version

* n_elms_iter: u32

* fix warnings

* Include extensive-hints in coverage

* fix stuff

* Update Changelog

* Update Changelog

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: Juan-M-V <[email protected]>
Co-authored-by: juan.mv <[email protected]>
Co-authored-by: Mario Rugiero <[email protected]>
Co-authored-by: Mario Rugiero <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Edgar <[email protected]>
  • Loading branch information
8 people authored Dec 21, 2023
1 parent 070aeb9 commit fe72ee0
Show file tree
Hide file tree
Showing 99 changed files with 2,060 additions and 7,232 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ jobs:
uses: actions/checkout@v2
- name: Install stable toolchain
uses: dtolnay/[email protected]
- name: Publish crate cairo-felt
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --token ${CRATES_TOKEN} --all-features --manifest-path ./felt/Cargo.toml
# FIXME: there should be a better way to make sure the index in crates.io is updated before publishing
# cairo-vm but right now the step throws timeout and fails.
- name: wait for index in crates.io
run: sleep 300
- name: Publish crate cairo-vm
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down
40 changes: 17 additions & 23 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@ jobs:
fail-on-cache-miss: true

# NOTE: we do this separately because --workspace operates in weird ways
- name: Check all features (felt)
run: |
cd felt
cargo check-all-features
cargo check-all-features --workspace --all-targets
- name: Check all features (vm)
run: |
cd vm
Expand All @@ -218,7 +212,7 @@ jobs:
strategy:
fail-fast: false
matrix:
special_features: ["", "lambdaworks-felt", "extensive_hints"]
special_features: ["", "extensive_hints"]
target: [ test#1, test#2, test#3, test#4, test-no_std#1, test-no_std#2, test-no_std#3, test-no_std#4, test-wasm ]
name: Run tests
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -445,38 +439,38 @@ jobs:
path: lcov-test-no_std-.info
key: codecov-cache-test-no_std--${{ github.sha }}
fail-on-cache-miss: true

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


- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
with:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

#### Upcoming Changes

* feat/BREAKING: Add Cairo 1 proof mode compilation and execution [#1517] (https://github.com/lambdaclass/cairo-vm/pull/1517)
* feat(BREAKING): Replace `cairo-felt` crate with `starknet-types-core` [#1408](https://github.com/lambdaclass/cairo-vm/pull/1408)

* feat(BREAKING): Add Cairo 1 proof mode compilation and execution [#1517] (https://github.com/lambdaclass/cairo-vm/pull/1517)
* In the cairo1-run crate, now the Cairo 1 Programs are compiled and executed in proof-mode
* BREAKING: Remove `CairoRunner.proof_mode: bool` field and replace it with `CairoRunner.runner_mode: RunnerMode`

Expand Down
126 changes: 32 additions & 94 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fe72ee0

Please sign in to comment.