From d9a20c263bb3435897288d2820a3bc5776216b6e Mon Sep 17 00:00:00 2001 From: YairVaknin-starkware Date: Fri, 18 Oct 2024 18:06:53 +0300 Subject: [PATCH] Skip_pedersen_comparison_when_checking_pie_compatibility --- CHANGELOG.md | 2 ++ vm/src/vm/runners/cairo_pie.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e19803711..dd90242701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## Cairo-VM Changelog #### Upcoming Changes +* fix: [#1855](https://github.com/lambdaclass/cairo-vm/pull/1855): + * Adds logic to skip pedersen additional data comparison when checking pie compatibility. * feat(BREAKING): [#1824](https://github.com/lambdaclass/cairo-vm/pull/1824)[#1838](https://github.com/lambdaclass/cairo-vm/pull/1838): * Add support for dynamic layout diff --git a/vm/src/vm/runners/cairo_pie.rs b/vm/src/vm/runners/cairo_pie.rs index d86b1840c8..766d392899 100644 --- a/vm/src/vm/runners/cairo_pie.rs +++ b/vm/src/vm/runners/cairo_pie.rs @@ -289,6 +289,10 @@ impl CairoPie { return Err(CairoPieValidationError::DiffAdditionalData); } for (name, data) in self.additional_data.0.iter() { + // As documented above, we skip the pedersen field when comparing. + if *name == BuiltinName::pedersen { + continue; + } if !pie.additional_data.0.get(name).is_some_and(|d| d == data) { return Err(CairoPieValidationError::DiffAdditionalDataForBuiltin(*name)); }