lambdaclass / cairo_native

A compiler to convert Cairo's intermediate representation "Sierra" code to MLIR.
https://lambdaclass.github.io/cairo_native/cairo_native
Apache License 2.0
115 stars 42 forks source link

Error in tx 0x6c51758aa1ae9506602fffb9194da427fe948314b74eb93cdc9570558d4a88d, Killed process #722

Closed pefontana closed 1 week ago

pefontana commented 3 months ago

When you execute the 0x6c51758aa1ae9506602fffb9194da427fe948314b74eb93cdc9570558d4a88d in starknet-replay, the process gets Killed In starknet-replay, in a x86 computer

cargo run --release tx 0x6c51758aa1ae9506602fffb9194da427fe948314b74eb93cdc9570558d4a88d mainnet 648461
INFO replay: starting execution
    in replay::transaction with hash: "0x6c51758aa1ae9506602fffb9194da427fe948314b74eb93cdc9570558d4a88d", chain: "mainnet"

Killed
azteca1998 commented 3 months ago

The problem lies in MLIR's canonicalization pass. If you run mlir-opt --canonicalize contract.mlir it'll crash with an out of memory.

Disclaimer: Test the bug at your own risk, OOM errors can crash not only themselves but other apps too. contract.mlir.txt

igaray commented 2 months ago

Adding:

JulianGCalderon commented 1 month ago

llvm-19.1.0-rc2 seems to fix this bug. I tested it by running mlir-opt with both contracts mentioned in this issue, and both of them finished successfully

pefontana commented 1 week ago

Fixed with https://github.com/lambdaclass/cairo_native/pull/763