lambdaclass / cairo-vm

cairo-vm is a Rust implementation of the Cairo VM. Cairo (CPU Algebraic Intermediate Representation) is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly without the need for this party to re-execute the same program.
https://lambdaclass.github.io/cairo-vm
Apache License 2.0
485 stars 132 forks source link

fix: revert breaking change on public input serialization #1790

Open odesenfans opened 2 weeks ago

odesenfans commented 2 weeks ago

Context: integration of the OS + bootloader with the Stone prover.

Problem: The 0x prefix was removed from public memory hex values in fe72ee0e95cf9f1761cfdc0759af12a68294c081. This is incompatible with the Stone prover and causes the following exception:

terminate called after throwing an instance of 'starkware::StarkwareException'
what():  /app/src/starkware/utils/to_from_string.cc:60: String ("40780017fff7fff") does not start with '0x'.

Solution: revert the change + fix the serialization/deserialization test.

Checklist

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.79%. Comparing base (5d11811) to head (fdf3fee).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1790 +/- ## ======================================= Coverage 94.79% 94.79% ======================================= Files 102 102 Lines 40141 40142 +1 ======================================= + Hits 38050 38051 +1 Misses 2091 2091 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pefontana commented 2 days ago

Hi @odesenfans ! Can yoy solve some merge conflicts here so we can merge it! The Serialization part we already added here https://github.com/lambdaclass/cairo-vm/pull/1799