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

StateDiff mismatch in Nonce #847

Open pefontana opened 4 days ago

pefontana commented 4 days ago

Running Starknet Replay with state_dump, native vs VM, there is a mismatch in State's nonce track Txs:

commits

Cairo Native: 82c25b377f50904e1253b614c8719388277530e6 Starknet replay: e125989afa77022995b3989c1d64292755312a87 blockifier = { git = "https://github.com/lambdaclass/sequencer", branch = "native2.8.x"}, 1eaaa4b9902cd9f4a867b111ca87c3a3bfce5d29

JulianGCalderon commented 18 hours ago

I think 0x469cd089b00448e2816aa799299bafc50d160850fd25f1d34c1926929833b05 diff is caused by the previous tx (0x1575f53142109a24350541cf9a6019390f298478b0b2757157c818a3b74cf51). The previous tx reverts in Native, but not in CairoVM.

This is missed by the state dump feature as the unexpected error causes the state dump of 0x1575f53142109a24350541cf9a6019390f298478b0b2757157c818a3b74cf51 to not even be generated.