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
121 stars 43 forks source link

Add Garaga test #769

Open pefontana opened 2 months ago

pefontana commented 2 months ago

Add a test for Garaba contracts https://github.com/keep-starknet-strange/garaga/tree/main/src/src/tests

Gerson2102 commented 2 months ago

Can this be considered too hard? I have contributed before to the project but just on good first issues.

pefontana commented 2 months ago

Hi @Gerson2102 ! I think it is an easy one! You also have the alexandria tests in the repo to take as a guide If you want I can assign you the issue

Gerson2102 commented 2 months ago

Yeah, lets see what I can do.

igaray commented 2 months ago

Hey @Gerson2102 ! Just wanted to make sure you are aware we are not (at the moment) participating in OnlyDust hackathons

edg-l commented 3 weeks ago

I tried this, looks like there is a compilation error, specially with the circuit related libfunc

Steps to reproduce:

# on cairo native
cd cairo_native
cargo b --release --all-features --bin scarb-native-test
cd ..
git clone git@github.com:keep-starknet-strange/garaga.git
cd garaga/src
/abs-path-to/cairo_native/target/release/scarb-native-test
❯ /data2/edgar/work/cairo_native/target/release/scarb-native-test
   Compiling test(garaga_unittest) garaga v0.1.0 (/data2/edgar/work/garaga/src/Scarb.toml)
    Finished `dev` profile target(s) in 22 seconds
testing garaga ...
loc("circuit_add_input(stmt_idx=27295)"("program.sierra":93874:0)): error: 'llvm.extractvalue' op folder produced a value of incorrect type: 'i96', expected: 'i8'
scarb-native-test: /home/edgar/data/llvm-project/mlir/lib/IR/Operation.cpp:624: void checkFoldResultTypes(Operation *, SmallVectorImpl<OpFoldResult> &): Assertion `false && "incorrect fold result type"' failed.
Aborted