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

Update layouts to cairo-lang 0.11 release #874

Merged
merged 43 commits into from
Mar 10, 2023
Merged

Conversation

Jrigada
Copy link
Contributor

@Jrigada Jrigada commented Mar 3, 2023

Update layouts to cairo-lang 0.11 release

Description

Solves #872

Depends on Poseidon builtin

Checklist

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

Copy link
Member

@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.

Makefile and benches should be updated too

@Jrigada Jrigada requested a review from fmoletta March 3, 2023 20:03
Copy link
Member

@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.

There are also mentions to the all layout in the README

@Jrigada Jrigada changed the base branch from main to 0.11 March 8, 2023 15:26
.github/workflows/rust.yml Outdated Show resolved Hide resolved
.github/workflows/rust.yml Outdated Show resolved Hide resolved
Jrigada and others added 6 commits March 10, 2023 10:51
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>
@Jrigada Jrigada force-pushed the changes-layout-cairo-lang-0.11 branch from 489476d to 4c4131f Compare March 10, 2023 14:23
@Jrigada Jrigada requested a review from fmoletta March 10, 2023 14:41
@Jrigada Jrigada changed the title [WIP] Update layouts to cairo-lang 0.11 release Update layouts to cairo-lang 0.11 release Mar 10, 2023
Copy link
Member

@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.

LGTM

@Jrigada Jrigada merged commit 110395c into 0.11 Mar 10, 2023
@Jrigada Jrigada deleted the changes-layout-cairo-lang-0.11 branch March 10, 2023 18:54
@fmoletta fmoletta mentioned this pull request Mar 10, 2023
Oppen added a commit that referenced this pull request Apr 3, 2023
* Add poseidon builtin (#875)

* Add instance def

* Add file

* Add poseidon instance def to builtin instance def

* Add Poseidon to BuiltinRunners

* Add simple tests program

* Prevent poseidon from being rejected by deserialize

* Use modified version of starknet-crypto poseidon hash (need permute fn to be public in order to access full state

* Add poseidon builtin impl + remove unreleased AddAssign usage

* Fix EOF

* Save a step

* Add comment before unwrap

* Clippy

* Reorder files

* Add comment

* Use constants for cells

* Add more test program

* Add integration tests

* test constant creation doesnt panic

* Add tests

* Fix failling tests

* Use final values for POSEIDON_COMP_CONSTANTS and move calculation to test module

* typo

* Solve post-merge conflicts

* Implement poseidon hints

* Add file

* Add tests for new hint

* Clippy

* Fix hint names

* Solve post-merge conflicts

* Add missing import

* Use `starknet-crypto` for poseidon (#890)

* ec_op changes 0.11 release (#876)

* ec_op changes 0.11 release cairo_lang

* Update src/vm/runners/builtin_runner/ec_op.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* remove rc and change bigint to felt

* debug cache

* debug cache

* change add_int implementation

* cargo fmt

---------

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* [WIP] Update keccak-builtin  (#873)

* Add cache to keccak builtin

* Temporaryly unhide recursive layout for debugging

* Use same keccak method as the one used in keccak_utils

* Make keccak builtin work

* Fix visisbility

* Small refactor

* Refactor

* Refactor

* Add tests

* Fix address management

* Add test program

* Clippy + Update tests

* Remove unused import

* Remove uneeded Rc

* Make error less specific

* Add integration test

* Add proposed changes

* Re-hide recursive layout

* Update layouts to cairo-lang 0.11 release (#874)

* update layouts to cairo-lang 0.11 release

* update layout all

* update benches and makefile

* Add instance def

* Add file

* Add poseidon instance def to builtin instance def

* Add Poseidon to BuiltinRunners

* Add simple tests program

* Prevent poseidon from being rejected by deserialize

* Use modified version of starknet-crypto poseidon hash (need permute fn to be public in order to access full state

* Add poseidon builtin impl + remove unreleased AddAssign usage

* Fix EOF

* Save a step

* Add comment before unwrap

* Clippy

* Reorder files

* reset run_benchmark script

* Add comment

* Use constants for cells

* Add more test program

* Add integration tests

* test constant creation doesnt panic

* Add tests

* Fix failling tests

* Use final values for POSEIDON_COMP_CONSTANTS and move calculation to test module

* typo

* Solve post-merge conflicts

* Implement poseidon hints

* Add file

* Add tests for new hint

* Clippy

* allow dead code in default poseidon

* remove wrong text

* Update .github/workflows/rust.yml

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/poseidon_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/poseidon_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

---------

Co-authored-by: Federica <fedemoletta@hotmail.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Add new keccak hints + update import paths  (#883)

* Add cache to keccak builtin

* Temporaryly unhide recursive layout for debugging

* Use same keccak method as the one used in keccak_utils

* Make keccak builtin work

* Fix visisbility

* Small refactor

* Refactor

* Refactor

* Add tests

* Fix address management

* Add test program

* Clippy + Update tests

* Remove unused import

* Remove uneeded Rc

* Make error less specific

* Add integration test

* Add proposed changes

* Add new hints

* Add test program

* Move constants

* Add keccak hints;

* Fix overflowing operation

* Add more hints

* Add unit tests

* Add integration test

* Update import paths in cairo programs used for testing

* Update hints with new import paths

* Add newline at end of file

* Clippy

* Clean imports

* Re-hide recursive layout

* Update src/hint_processor/builtin_hint_processor/keccak_utils.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Add suggested change + fix conflicts

* Update src/hint_processor/builtin_hint_processor/keccak_utils.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Fix

* Use u64 in split_n_bytes hints

* Use starknet_with_keccak layout when running cairo-lang

* Fix relative path in compare_vm_state script

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Remove typeguard pin

* Run cairo-format

* Fix program ruined by formatter

* Fix wasm compatibility for newer files

* Fix wasm compatibility for newer files

* Fix wrong version

* Fix syntax

* Fix wasm compatibility

* Tempfix for iai workflow

* Fix workflow

* Use the same layout for memory trace proof mode comparison

* Add dynamic layout (#879)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* Fix workflows

* Update Cargo.lock

* Remove comment

* [0.11] Add `SegmentArenaBuiltinRunner` (#913)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* Initial progress

* Add builtin specific methods

* Add SegmentArenaBuiltinRunner to BuiltinRunner enum

* implement final_stack for segmen arena nuiltin runner

* Add other methods

* Integrate into runner

* Remove error from initialize_segments

* Fix comment

* Add test

* Add tests for segment arena builtin

* Fix

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* expose program base for starknet reasons

* Update src/vm/runners/builtin_runner/mod.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Fix build

* Add nostd Vec import

* Fix wasm import

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>

* Add suggested changes

* Fix overriden run_benchmarks script

* Add `program_segment_size` argument to `verify_secure_runner` & `run_from_entrypoint` (#928)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* Initial progress

* Add builtin specific methods

* Add SegmentArenaBuiltinRunner to BuiltinRunner enum

* implement final_stack for segmen arena nuiltin runner

* Add other methods

* Integrate into runner

* Remove error from initialize_segments

* Fix comment

* Add test

* Add tests for segment arena builtin

* Fix

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* expose program base for starknet reasons

* Update src/vm/runners/builtin_runner/mod.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Add optional program_size argument to verify_secure_runner & run_from_entrypoint

* Fix build

* Add nostd Vec import

* Fix wasm import

* Expose get_segment_size (#934)

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>

* Fix typo

* Add misc tests

* Add misc tests

* Add misc test

* Add misc test

* Add misc test

* Expand misc test

* Add wasm attr + misc test

---------

Co-authored-by: Jonathan LEI <me@xjonathan.dev>
Co-authored-by: Juan Rigada <62958725+Jrigada@users.noreply.github.com>
Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>
Oppen added a commit that referenced this pull request Apr 10, 2023
* Add poseidon builtin (#875)

* Add instance def

* Add file

* Add poseidon instance def to builtin instance def

* Add Poseidon to BuiltinRunners

* Add simple tests program

* Prevent poseidon from being rejected by deserialize

* Use modified version of starknet-crypto poseidon hash (need permute fn to be public in order to access full state

* Add poseidon builtin impl + remove unreleased AddAssign usage

* Fix EOF

* Save a step

* Add comment before unwrap

* Clippy

* Reorder files

* Add comment

* Use constants for cells

* Add more test program

* Add integration tests

* test constant creation doesnt panic

* Add tests

* Fix failling tests

* Use final values for POSEIDON_COMP_CONSTANTS and move calculation to test module

* typo

* Solve post-merge conflicts

* Implement poseidon hints

* Add file

* Add tests for new hint

* Clippy

* Fix hint names

* Solve post-merge conflicts

* Add missing import

* Use `starknet-crypto` for poseidon (#890)

* ec_op changes 0.11 release (#876)

* ec_op changes 0.11 release cairo_lang

* Update src/vm/runners/builtin_runner/ec_op.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* remove rc and change bigint to felt

* debug cache

* debug cache

* change add_int implementation

* cargo fmt

---------

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* [WIP] Update keccak-builtin  (#873)

* Add cache to keccak builtin

* Temporaryly unhide recursive layout for debugging

* Use same keccak method as the one used in keccak_utils

* Make keccak builtin work

* Fix visisbility

* Small refactor

* Refactor

* Refactor

* Add tests

* Fix address management

* Add test program

* Clippy + Update tests

* Remove unused import

* Remove uneeded Rc

* Make error less specific

* Add integration test

* Add proposed changes

* Re-hide recursive layout

* Update layouts to cairo-lang 0.11 release (#874)

* update layouts to cairo-lang 0.11 release

* update layout all

* update benches and makefile

* Add instance def

* Add file

* Add poseidon instance def to builtin instance def

* Add Poseidon to BuiltinRunners

* Add simple tests program

* Prevent poseidon from being rejected by deserialize

* Use modified version of starknet-crypto poseidon hash (need permute fn to be public in order to access full state

* Add poseidon builtin impl + remove unreleased AddAssign usage

* Fix EOF

* Save a step

* Add comment before unwrap

* Clippy

* Reorder files

* reset run_benchmark script

* Add comment

* Use constants for cells

* Add more test program

* Add integration tests

* test constant creation doesnt panic

* Add tests

* Fix failling tests

* Use final values for POSEIDON_COMP_CONSTANTS and move calculation to test module

* typo

* Solve post-merge conflicts

* Implement poseidon hints

* Add file

* Add tests for new hint

* Clippy

* allow dead code in default poseidon

* remove wrong text

* Update .github/workflows/rust.yml

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/poseidon_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/poseidon_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

---------

Co-authored-by: Federica <fedemoletta@hotmail.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Add new keccak hints + update import paths  (#883)

* Add cache to keccak builtin

* Temporaryly unhide recursive layout for debugging

* Use same keccak method as the one used in keccak_utils

* Make keccak builtin work

* Fix visisbility

* Small refactor

* Refactor

* Refactor

* Add tests

* Fix address management

* Add test program

* Clippy + Update tests

* Remove unused import

* Remove uneeded Rc

* Make error less specific

* Add integration test

* Add proposed changes

* Add new hints

* Add test program

* Move constants

* Add keccak hints;

* Fix overflowing operation

* Add more hints

* Add unit tests

* Add integration test

* Update import paths in cairo programs used for testing

* Update hints with new import paths

* Add newline at end of file

* Clippy

* Clean imports

* Re-hide recursive layout

* Update src/hint_processor/builtin_hint_processor/keccak_utils.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Add suggested change + fix conflicts

* Update src/hint_processor/builtin_hint_processor/keccak_utils.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Fix

* Use u64 in split_n_bytes hints

* Use starknet_with_keccak layout when running cairo-lang

* Fix relative path in compare_vm_state script

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Remove typeguard pin

* Run cairo-format

* Fix program ruined by formatter

* Fix wasm compatibility for newer files

* Fix wasm compatibility for newer files

* Fix wrong version

* Fix syntax

* Fix wasm compatibility

* Tempfix for iai workflow

* Fix workflow

* Use the same layout for memory trace proof mode comparison

* Add dynamic layout (#879)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* Fix workflows

* Update Cargo.lock

* Remove comment

* [0.11] Add `SegmentArenaBuiltinRunner` (#913)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* Initial progress

* Add builtin specific methods

* Add SegmentArenaBuiltinRunner to BuiltinRunner enum

* implement final_stack for segmen arena nuiltin runner

* Add other methods

* Integrate into runner

* Remove error from initialize_segments

* Fix comment

* Add test

* Add tests for segment arena builtin

* Fix

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* expose program base for starknet reasons

* Update src/vm/runners/builtin_runner/mod.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Fix build

* Add nostd Vec import

* Fix wasm import

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>

* Add suggested changes

* Fix overriden run_benchmarks script

* Add `program_segment_size` argument to `verify_secure_runner` & `run_from_entrypoint` (#928)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* Initial progress

* Add builtin specific methods

* Add SegmentArenaBuiltinRunner to BuiltinRunner enum

* implement final_stack for segmen arena nuiltin runner

* Add other methods

* Integrate into runner

* Remove error from initialize_segments

* Fix comment

* Add test

* Add tests for segment arena builtin

* Fix

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* expose program base for starknet reasons

* Update src/vm/runners/builtin_runner/mod.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Add optional program_size argument to verify_secure_runner & run_from_entrypoint

* Fix build

* Add nostd Vec import

* Fix wasm import

* Expose get_segment_size (#934)

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>

* Fix typo

* Add misc tests

* Add misc tests

* Add misc test

* Add misc test

* Add misc test

* Expand misc test

* Add wasm attr + misc test

* Add poseidon benchmarks

* Run cairo-format

* Remove unused import

* Add unmerged

* Add bench to iai benchmarks

* fmt

---------

Co-authored-by: Jonathan LEI <me@xjonathan.dev>
Co-authored-by: Juan Rigada <62958725+Jrigada@users.noreply.github.com>
Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>
kariy pushed a commit to dojoengine/cairo-rs that referenced this pull request Jun 23, 2023
* Add poseidon builtin (lambdaclass#875)

* Add instance def

* Add file

* Add poseidon instance def to builtin instance def

* Add Poseidon to BuiltinRunners

* Add simple tests program

* Prevent poseidon from being rejected by deserialize

* Use modified version of starknet-crypto poseidon hash (need permute fn to be public in order to access full state

* Add poseidon builtin impl + remove unreleased AddAssign usage

* Fix EOF

* Save a step

* Add comment before unwrap

* Clippy

* Reorder files

* Add comment

* Use constants for cells

* Add more test program

* Add integration tests

* test constant creation doesnt panic

* Add tests

* Fix failling tests

* Use final values for POSEIDON_COMP_CONSTANTS and move calculation to test module

* typo

* Solve post-merge conflicts

* Implement poseidon hints

* Add file

* Add tests for new hint

* Clippy

* Fix hint names

* Solve post-merge conflicts

* Add missing import

* Use `starknet-crypto` for poseidon (lambdaclass#890)

* ec_op changes 0.11 release (lambdaclass#876)

* ec_op changes 0.11 release cairo_lang

* Update src/vm/runners/builtin_runner/ec_op.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* remove rc and change bigint to felt

* debug cache

* debug cache

* change add_int implementation

* cargo fmt

---------

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* [WIP] Update keccak-builtin  (lambdaclass#873)

* Add cache to keccak builtin

* Temporaryly unhide recursive layout for debugging

* Use same keccak method as the one used in keccak_utils

* Make keccak builtin work

* Fix visisbility

* Small refactor

* Refactor

* Refactor

* Add tests

* Fix address management

* Add test program

* Clippy + Update tests

* Remove unused import

* Remove uneeded Rc

* Make error less specific

* Add integration test

* Add proposed changes

* Re-hide recursive layout

* Update layouts to cairo-lang 0.11 release (lambdaclass#874)

* update layouts to cairo-lang 0.11 release

* update layout all

* update benches and makefile

* Add instance def

* Add file

* Add poseidon instance def to builtin instance def

* Add Poseidon to BuiltinRunners

* Add simple tests program

* Prevent poseidon from being rejected by deserialize

* Use modified version of starknet-crypto poseidon hash (need permute fn to be public in order to access full state

* Add poseidon builtin impl + remove unreleased AddAssign usage

* Fix EOF

* Save a step

* Add comment before unwrap

* Clippy

* Reorder files

* reset run_benchmark script

* Add comment

* Use constants for cells

* Add more test program

* Add integration tests

* test constant creation doesnt panic

* Add tests

* Fix failling tests

* Use final values for POSEIDON_COMP_CONSTANTS and move calculation to test module

* typo

* Solve post-merge conflicts

* Implement poseidon hints

* Add file

* Add tests for new hint

* Clippy

* allow dead code in default poseidon

* remove wrong text

* Update .github/workflows/rust.yml

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/poseidon_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/poseidon_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Update src/types/instance_definitions/builtins_instance_def.rs

Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

---------

Co-authored-by: Federica <fedemoletta@hotmail.com>
Co-authored-by: fmoletta <99273364+fmoletta@users.noreply.github.com>

* Add new keccak hints + update import paths  (lambdaclass#883)

* Add cache to keccak builtin

* Temporaryly unhide recursive layout for debugging

* Use same keccak method as the one used in keccak_utils

* Make keccak builtin work

* Fix visisbility

* Small refactor

* Refactor

* Refactor

* Add tests

* Fix address management

* Add test program

* Clippy + Update tests

* Remove unused import

* Remove uneeded Rc

* Make error less specific

* Add integration test

* Add proposed changes

* Add new hints

* Add test program

* Move constants

* Add keccak hints;

* Fix overflowing operation

* Add more hints

* Add unit tests

* Add integration test

* Update import paths in cairo programs used for testing

* Update hints with new import paths

* Add newline at end of file

* Clippy

* Clean imports

* Re-hide recursive layout

* Update src/hint_processor/builtin_hint_processor/keccak_utils.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Add suggested change + fix conflicts

* Update src/hint_processor/builtin_hint_processor/keccak_utils.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Fix

* Use u64 in split_n_bytes hints

* Use starknet_with_keccak layout when running cairo-lang

* Fix relative path in compare_vm_state script

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Remove typeguard pin

* Run cairo-format

* Fix program ruined by formatter

* Fix wasm compatibility for newer files

* Fix wasm compatibility for newer files

* Fix wrong version

* Fix syntax

* Fix wasm compatibility

* Tempfix for iai workflow

* Fix workflow

* Use the same layout for memory trace proof mode comparison

* Add dynamic layout (lambdaclass#879)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* Fix workflows

* Update Cargo.lock

* Remove comment

* [0.11] Add `SegmentArenaBuiltinRunner` (lambdaclass#913)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* Initial progress

* Add builtin specific methods

* Add SegmentArenaBuiltinRunner to BuiltinRunner enum

* implement final_stack for segmen arena nuiltin runner

* Add other methods

* Integrate into runner

* Remove error from initialize_segments

* Fix comment

* Add test

* Add tests for segment arena builtin

* Fix

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* expose program base for starknet reasons

* Update src/vm/runners/builtin_runner/mod.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Fix build

* Add nostd Vec import

* Fix wasm import

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>

* Add suggested changes

* Fix overriden run_benchmarks script

* Add `program_segment_size` argument to `verify_secure_runner` & `run_from_entrypoint` (lambdaclass#928)

* Change instance def ratios to Option

* Move builtin runner ratios to option

* Modify methods to accomodate dynamic ratios

* Misc fixes

* Misc fixes

* Fix wrong impl

* Fix tests

* Fix tests

* Add dynamic layout

* Fix wrong impl

* Fix tests

* Expose instances_per_component

* Move get_used_cells_and_allocated_sizes to mod

* Move get_allocated_memory_units to mod

* Finnish prev tasks

* Fix test

* Initial progress

* Add builtin specific methods

* Add SegmentArenaBuiltinRunner to BuiltinRunner enum

* implement final_stack for segmen arena nuiltin runner

* Add other methods

* Integrate into runner

* Remove error from initialize_segments

* Fix comment

* Add test

* Add tests for segment arena builtin

* Fix

* fix get_perm_range_check_limit

* Fix get_range_check_usage

* Fix test values

* expose program base for starknet reasons

* Update src/vm/runners/builtin_runner/mod.rs

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>

* Add optional program_size argument to verify_secure_runner & run_from_entrypoint

* Fix build

* Add nostd Vec import

* Fix wasm import

* Expose get_segment_size (lambdaclass#934)

---------

Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>

* Fix typo

* Add misc tests

* Add misc tests

* Add misc test

* Add misc test

* Add misc test

* Expand misc test

* Add wasm attr + misc test

* Add poseidon benchmarks

* Run cairo-format

* Remove unused import

* Add unmerged

* Add bench to iai benchmarks

* fmt

---------

Co-authored-by: Jonathan LEI <me@xjonathan.dev>
Co-authored-by: Juan Rigada <62958725+Jrigada@users.noreply.github.com>
Co-authored-by: Mario Rugiero <mario.rugiero@lambdaclass.com>
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants