cairo_native
cairo_native copied to clipboard
bug: issue in self referencing struct
I am seeing an issue in the Kakarot RLP decoding step of the transaction. I can't really pinpoint the exact problem but basically what happens is:
- The value I pass to decode should decode to
RLPItem::List([RLPItem::String(a), RLPItem::String(b), RLPItem::String(c)]). https://github.com/kkrt-labs/kakarot-ssj/blob/ecbbb90e718b68dcbff780af14f1acdbd517776d/crates/utils/src/rlp.cairo#L21 - When I try to decode the transaction in the
decodefunction, all the inputs seem to be read correctly for each recursive call. https://github.com/kkrt-labs/kakarot-ssj/blob/ecbbb90e718b68dcbff780af14f1acdbd517776d/crates/utils/src/rlp.cairo#L167 - However, when printing the result, all I get are a bunch of
RLPItem::Stringand theRLPItem::Listseems to have disappeared. - Additionally, each
RLPItem::Stringshould normally contain some valueSpan. When printing them, all values have a length of 0.
I don't know if this is linked but I wrote a very basic recursive program with a self referencing struct which compile and runs on the cairo-vm but crashes on native (see https://github.com/lambdaclass/cairo_native/pull/550).
Let me know if you need more information, I can try to provide whatever more you need.
Hi, i will like to take up this issue.
This issue is fixed on main, the test is unignored there, closing!