Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cairo 1 considerations for Gitignore and Makefile #1144

Merged
merged 3 commits into from
May 8, 2023

Conversation

rcatalan98
Copy link
Contributor

Add Cairo 1 consideration for Gitignore and Makefile

Description

This PR adds Casm and Sierra files to the Gitignore and also adds the --allowed-libfuncs-list-name flag to compile Cairo 1 programs.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@github-actions
Copy link

github-actions bot commented May 8, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 17.329 ± 0.170 17.102 17.685 1.00
head blake2s_integration_benchmark 17.488 ± 0.303 17.204 18.132 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 5.347 ± 0.061 5.232 5.461 1.01 ± 0.02
head compare_arrays_200000 5.305 ± 0.053 5.190 5.368 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 3.399 ± 0.055 3.315 3.495 1.00 ± 0.02
head dict_integration_benchmark 3.397 ± 0.055 3.336 3.527 1.00
Command Mean [s] Min [s] Max [s] Relative
base factorial_multirun 5.701 ± 0.078 5.547 5.806 1.00
head factorial_multirun 5.789 ± 0.078 5.698 5.955 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base fibonacci_1000_multirun 4.913 ± 0.075 4.806 5.009 1.00 ± 0.02
head fibonacci_1000_multirun 4.907 ± 0.091 4.758 5.077 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base field_arithmetic_get_square_benchmark 215.1 ± 8.8 201.9 232.7 1.00
head field_arithmetic_get_square_benchmark 218.2 ± 6.9 207.8 231.9 1.01 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 15.780 ± 0.246 15.416 16.290 1.00 ± 0.02
head integration_builtins 15.722 ± 0.187 15.458 15.997 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 17.599 ± 0.323 17.118 18.137 1.00
head keccak_integration_benchmark 17.776 ± 0.914 17.140 20.322 1.01 ± 0.06
Command Mean [s] Min [s] Max [s] Relative
base linear_search 5.331 ± 0.148 5.133 5.686 1.00
head linear_search 5.362 ± 0.116 5.227 5.628 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 3.640 ± 0.065 3.556 3.784 1.00
head math_cmp_and_pow_integration_benchmark 3.650 ± 0.089 3.552 3.809 1.00 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 3.468 ± 0.100 3.329 3.707 1.00 ± 0.03
head math_integration_benchmark 3.453 ± 0.045 3.379 3.517 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.987 ± 0.056 2.900 3.107 1.01 ± 0.03
head memory_integration_benchmark 2.965 ± 0.065 2.884 3.076 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 3.402 ± 0.053 3.322 3.484 1.02 ± 0.02
head operations_with_data_structures_benchmarks 3.352 ± 0.043 3.309 3.420 1.00
Command Mean [s] Min [s] Max [s] Relative
base pedersen 1.161 ± 0.020 1.133 1.194 1.04 ± 0.02
head pedersen 1.119 ± 0.015 1.095 1.139 1.00
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.932 ± 0.031 1.885 1.972 1.00
head poseidon_integration_benchmark 1.952 ± 0.072 1.853 2.105 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 4.373 ± 0.112 4.179 4.503 1.01 ± 0.03
head secp_integration_benchmark 4.335 ± 0.063 4.245 4.439 1.00
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 2.649 ± 0.035 2.596 2.708 1.00
head set_integration_benchmark 2.655 ± 0.029 2.590 2.688 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 10.144 ± 0.172 9.965 10.522 1.01 ± 0.02
head uint256_integration_benchmark 10.081 ± 0.078 9.932 10.225 1.00

@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Merging #1144 (a6baa4d) into run-casm-contract-class (f0dcbb6) will not change coverage.
The diff coverage is n/a.

❗ Current head a6baa4d differs from pull request most recent head 2a6a5b4. Consider uploading reports for the commit 2a6a5b4 to get more accurate results

@@                   Coverage Diff                    @@
##           run-casm-contract-class    #1144   +/-   ##
========================================================
  Coverage                    98.15%   98.15%           
========================================================
  Files                           85       85           
  Lines                        34561    34561           
========================================================
  Hits                         33924    33924           
  Misses                         637      637           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rcatalan98 rcatalan98 marked this pull request as ready for review May 8, 2023 14:51
Copy link
Contributor

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rcatalan98 rcatalan98 merged commit d1c9dda into run-casm-contract-class May 8, 2023
@rcatalan98 rcatalan98 deleted the add-cairo1-makefile-gitignore branch May 8, 2023 16:01
pefontana pushed a commit that referenced this pull request May 8, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Fix rust.yml

---------

Co-authored-by: Roberto Catalan <[email protected]>
pefontana added a commit that referenced this pull request May 8, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* add test

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* update CHANGELOG.md

* cargo fmt

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Roberto Catalan <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
pefontana pushed a commit that referenced this pull request May 9, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Move Felt252DictEntryInit hint impl

* Add hint Felt252DictEntryUpdate

* Add hint GetCurrentAccessDelta

* Add hint InitSquashData

* Add hint AllocConstantSize

* Add hint GetCurrentAccessIndex

* Add hint Uint256SquareRoot

* Fix cfg directive

* Misc fixes

* Add changelog entry

* Add hint ShouldContinueSquashLoop

* Add hint FieldSqrt

* Fixes

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Update CHANGELOG.md

---------

Co-authored-by: Roberto Catalan <[email protected]>
pefontana pushed a commit that referenced this pull request May 10, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Implement a test for linear split hint

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Add linear split test

* Import hint processor dependencies without default features

* delete sierra and casm files

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Fix tests to cover more cases

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Modify changelog

* Delete merge conflict message

* Delete wrong file

* Add feature cairo-1-hint to test

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Fix clippy

* Remove cairo-hint file

* fix gitignore

* fix changelog

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Roberto Catalan <[email protected]>
pefontana added a commit that referenced this pull request May 12, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Add test for RandomEcPoint hint

* Add rust test for Cairo 1 program

* Fix Cairo 1 program

* Change contract & Add activate feature for Cairo 1

* Add new entry to Changelog

* Restore CHANGELOG.md

* Restore Cargo.toml

* Add eof new line

* Add more coverage to the test

* Refactor contract test

* Fix LinearSplit hint

* Add fix entry to the CHANGELOG

* Remove outdated comment

* Remove CHANGELOG entry

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
pefontana added a commit that referenced this pull request May 12, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Add test for RandomEcPoint hint

* Add rust test for Cairo 1 program

* Fix Cairo 1 program

* Change contract & Add activate feature for Cairo 1

* Add new entry to Changelog

* Restore CHANGELOG.md

* Restore Cargo.toml

* Add eof new line

* Add more coverage to the test

* Refactor contract test

* Fix LinearSplit hint

* Add fix entry to the CHANGELOG

* Remove outdated comment

* Add test for FieldSqrt

* Remove CHANGELOG entry

* Fix Cairo 1 contract & test

* Add new line EOF Cairo 1 contract

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
pefontana added a commit that referenced this pull request May 12, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add alloc dict hint test

* Modify .gitignore

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add new lines at the end of the files and modify Changelog

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Add feature cairo-1-hint to test

* Fix changelog

* Change contract name and move test to other file

* Delete submodule cairo

* restore hint_processor.rs

* cargo clippy

* cargo clippy

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Roberto Catalan <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (lambdaclass#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Fix rust.yml

---------

Co-authored-by: Roberto Catalan <[email protected]>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* add test

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (lambdaclass#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* update CHANGELOG.md

* cargo fmt

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Roberto Catalan <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
…ass#1143)

* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Move Felt252DictEntryInit hint impl

* Add hint Felt252DictEntryUpdate

* Add hint GetCurrentAccessDelta

* Add hint InitSquashData

* Add hint AllocConstantSize

* Add hint GetCurrentAccessIndex

* Add hint Uint256SquareRoot

* Fix cfg directive

* Misc fixes

* Add changelog entry

* Add hint ShouldContinueSquashLoop

* Add hint FieldSqrt

* Fixes

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (lambdaclass#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Update CHANGELOG.md

---------

Co-authored-by: Roberto Catalan <[email protected]>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Implement a test for linear split hint

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Add linear split test

* Import hint processor dependencies without default features

* delete sierra and casm files

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Fix tests to cover more cases

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Modify changelog

* Delete merge conflict message

* Delete wrong file

* Add feature cairo-1-hint to test

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (lambdaclass#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Fix clippy

* Remove cairo-hint file

* fix gitignore

* fix changelog

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Roberto Catalan <[email protected]>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (lambdaclass#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Add test for RandomEcPoint hint

* Add rust test for Cairo 1 program

* Fix Cairo 1 program

* Change contract & Add activate feature for Cairo 1

* Add new entry to Changelog

* Restore CHANGELOG.md

* Restore Cargo.toml

* Add eof new line

* Add more coverage to the test

* Refactor contract test

* Fix LinearSplit hint

* Add fix entry to the CHANGELOG

* Remove outdated comment

* Remove CHANGELOG entry

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (lambdaclass#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Add test for RandomEcPoint hint

* Add rust test for Cairo 1 program

* Fix Cairo 1 program

* Change contract & Add activate feature for Cairo 1

* Add new entry to Changelog

* Restore CHANGELOG.md

* Restore Cargo.toml

* Add eof new line

* Add more coverage to the test

* Refactor contract test

* Fix LinearSplit hint

* Add fix entry to the CHANGELOG

* Remove outdated comment

* Add test for FieldSqrt

* Remove CHANGELOG entry

* Fix Cairo 1 contract & test

* Add new line EOF Cairo 1 contract

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Implement TryFrom<CasmContractClass> for Program

* Add cairo1hintprocessor dependency

* Map hints to pc

* Add Cairo1HintProcessor

* Move cairo-1-hint-processor to cairo-rs crate

* fixes

* Fix test helper

* Remove allow

* fix test func

* Add builtins to test

* Extract builtins from contract_class

* Add _builtin to builtin names in etrypoint data

* Copy logic from cairo1 contract execution in starknet

* Remove unused code

* Use lower initial_gas value

* Add program segment size argument

* Check return values in run_cairo_1_entrypoint fn

* Remove debug prints

* Add basic fibonacci test

* Add another fibonacci case

* Always verify secure

* Clippy

* Compile casm contracts when running test target

* Remove unwrap from cell_ref_to_relocatable

* Remove paniking macro from extract_buffer

* Misc improvements

* Misc improvements

* Misc improvements

* Misc improvements

* Remove unwraps & asserts from DictSquashExecScope::pop_current_key

* Remove unwraps & asserts from DictManagerExecScope::new_default_dict

* Remove expect from get_dict_tracker

* Add constants for cairo 1 compiler binaries in makefile

* Add cairo 1 compiler to deps target in makefile

* Add cairo folder to clean target

* Remove todo from execute method

* Separate helper functions from Cairo1HintProcessor implementation

* Add untracked file

* Fix

* Add changelog entry

* Add a job to compile cairo 1 contracts in ci

* Add job dependency

* Fix yml syntax

* Fix yml syntax

* Temporarily extempt cairo-1-hint-processor from codecov

* Fix yml syntax

* Fix workflow

* Remove cache code from new job

* Fix yml syntax

* Fix wrong path

* Fix makefile

* Build only compiler binaries

* Add cairo-1-contracts-cache

* Fetch contracts cache in jobs that need them

* Use no-std version of HashMap

* Import stdlib::prelude::*

* Wrap print in not-wasm block

* Remove std path

* use slices instead of vec

* Make DictSquashExecScope fields private

* Import hint processor dependencies without default features

* -Clippy

* Add type

* Compile cairo 1 contracts in build-programs job

* Rename cache

* Use target dependency instead of explicit $(MAKE)

* Fix yml syntax

* Check for cairo folder before cloning cairo repo

* Ommit folder name

* Swap paths

* Add cairo-1-hints feature flag

* Add alloc dict hint test

* Modify .gitignore

* Add compile-hint feature to tests run in workflow

* Add cairo-1-hints to test_utils

* Add cairo-1-hints to test_utils

* Use both paths when fetching compiled test data

* Remove cairo-1-hints feature from test_utils feature

* Move dependencies to cairo-1-hints feature

* Update CHANGELOG.md

* Fix cfg directive

* Add new lines at the end of the files and modify Changelog

* Add cairo-1-hints to test workflow

* Add Cairo 1 considerations for Gitignore and Makefile (lambdaclass#1144)

* Add ignore for casm and sierra files

* Add libfunc experimental for cairo 1 compilation

* Add new enty to CHANGELOG

* Add feature cairo-1-hint to test

* Fix changelog

* Change contract name and move test to other file

* Delete submodule cairo

* restore hint_processor.rs

* cargo clippy

* cargo clippy

---------

Co-authored-by: Federica <[email protected]>
Co-authored-by: fmoletta <[email protected]>
Co-authored-by: Roberto Catalan <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
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.

3 participants