From d59bb53c074de6489637c19e05a7aa0e7520b1a9 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 21 Aug 2024 00:57:26 -0400 Subject: [PATCH 1/2] cairo1 program hash fix --- src/air/public_input.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/air/public_input.cairo b/src/air/public_input.cairo index b89b475b9..036867916 100644 --- a/src/air/public_input.cairo +++ b/src/air/public_input.cairo @@ -175,7 +175,7 @@ fn verify_cairo1_public_input(public_input: @PublicInput) -> (felt252, felt252) // 1. Program segment assert(initial_pc == INITIAL_PC, 'Invalid initial_pc'); let program = memory - .extract_range_unchecked(initial_pc.try_into().unwrap(), memory.len() - output_len); + .extract_range_unchecked(0, memory.len() - output_len); let program_hash = poseidon_hash_span(program); // 2. Output segment From 3ce554845d89233bcde25c717da6dc30a049f1c6 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 21 Aug 2024 21:50:22 -0400 Subject: [PATCH 2/2] fmt --- src/air/public_input.cairo | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/air/public_input.cairo b/src/air/public_input.cairo index 036867916..0c9ef0fe4 100644 --- a/src/air/public_input.cairo +++ b/src/air/public_input.cairo @@ -174,8 +174,7 @@ fn verify_cairo1_public_input(public_input: @PublicInput) -> (felt252, felt252) // 1. Program segment assert(initial_pc == INITIAL_PC, 'Invalid initial_pc'); - let program = memory - .extract_range_unchecked(0, memory.len() - output_len); + let program = memory.extract_range_unchecked(0, memory.len() - output_len); let program_hash = poseidon_hash_span(program); // 2. Output segment