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

bug: inconsistent dict values in Native execution? #808

Closed
enitrat opened this issue Sep 25, 2024 · 1 comment
Closed

bug: inconsistent dict values in Native execution? #808

enitrat opened this issue Sep 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working difficulty-medium

Comments

@enitrat
Copy link

enitrat commented Sep 25, 2024

CASM execution:

stack_push top 0
stack_push top 0
stack_push top 0
stack_push top 0
stack_push top 0
stack_push top 4
stack_pop top 4

Native execution:

stack_push top 0
stack_push top 0
stack_push top 0
stack_push top 0
stack_push top 0
stack_push top 4
stack_pop top 0

Trying to debug why native would fail our EF-Tests.

Repro:
scarb 2.8.2
clone https://github.com/kkrt-labs/kakarot-ssj
git checkout temp/debug native
scarb build -p contracts - builds the required contract with some debug print logs
diff with main is only prints: kkrt-labs/kakarot-ssj#973

clone https://github.com/kkrt-labs/ef-tests
ensure correct branch git checkout feat/cairo-native
make
make setup-kakarot
copy the contracts built previously:cp ../kakarot-ssj/target/dev/contracts_* build/v1
cargo test mulmod_d0g0v0_Cancun --features v1,native -- --nocapture (with LLVM19)

Relevant Cairo code
https://github.com/kkrt-labs/kakarot-ssj/blob/29ace538518990a108ba30b3d0a690b2c8ca0724/crates/evm/src/stack.cairo

@enitrat enitrat changed the title bug: inconsistent kakarot-stack values in Native execution bug: inconsistent dict values in Native execution? Sep 25, 2024
edg-l added a commit that referenced this issue Sep 26, 2024
@edg-l edg-l added bug Something isn't working difficulty-medium labels Sep 26, 2024
@edg-l edg-l self-assigned this Sep 26, 2024
@edg-l edg-l modified the milestone: Production Ready Sep 26, 2024
edg-l added a commit that referenced this issue Sep 27, 2024
@edg-l
Copy link
Member

edg-l commented Sep 30, 2024

closing as fixed

@edg-l edg-l closed this as completed Sep 30, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 30, 2024
* Fix snapshot clones. Extract if statement from function for better readability.

* Fix broken MLIR bug.

* add test reproducing bug #808

---------

Co-authored-by: Esteve Soler Arderiu <[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
bug Something isn't working difficulty-medium
Projects
None yet
Development

No branches or pull requests

2 participants