Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert breaking change on public input serialization #1790

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#### Upcoming Changes

* fix: revert breaking change on public input serialization [#1790](https://github.com/lambdaclass/cairo-vm/pull/1790)

* fix: Handle `GasBuiltin` in cairo1-run crate [#1789](https://github.com/lambdaclass/cairo-vm/pull/1789)
* Load `initial_gas` into vm instead of creating it via instructions.
* Fix bug affecting programs with input arguments and gas builtin.
Expand Down
3 changes: 2 additions & 1 deletion vm/src/air_public_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod mem_value_serde {
serializer: S,
) -> Result<S::Ok, S::Error> {
if let Some(value) = value {
serializer.serialize_str(&format!("{:x}", value))
serializer.serialize_str(&format!("0x{:x}", value))
} else {
serializer.serialize_none()
}
Expand Down Expand Up @@ -66,6 +66,7 @@ mod mem_value_serde {
where
E: de::Error,
{
let value = value.strip_prefix("0x").unwrap_or(value);
Felt252::from_hex(value)
.map_err(de::Error::custom)
.map(Some)
Expand Down
Loading