From 39ad790554b50811eec0a236abf4db356fd69956 Mon Sep 17 00:00:00 2001 From: YairVaknin-starkware <141148375+YairVaknin-starkware@users.noreply.github.com> Date: Wed, 6 Nov 2024 00:30:34 +0200 Subject: [PATCH] Skip_pedersen_comparison_when_checking_pie_compatibility (#1855) Co-authored-by: Pedro Fontana --- 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 1595eb1efc..806d9da4d6 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. #### [2.0.0-rc0] - 2024-10-22 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)); }