From 00f66dc9f0c8a6b4f0df675945b1620f3e951dfc Mon Sep 17 00:00:00 2001 From: Yi Sun Date: Wed, 8 Jan 2025 02:34:36 -0500 Subject: [PATCH] fix: store --- extensions/native/compiler/src/ir/poseidon.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/native/compiler/src/ir/poseidon.rs b/extensions/native/compiler/src/ir/poseidon.rs index 1feed43ebf..0947cb0819 100644 --- a/extensions/native/compiler/src/ir/poseidon.rs +++ b/extensions/native/compiler/src/ir/poseidon.rs @@ -1,6 +1,6 @@ use openvm_stark_backend::p3_field::FieldAlgebra; -use super::{Array, Builder, Config, DslIr, Ext, Felt, MemIndex, Ptr, Usize, Var}; +use super::{Array, Builder, Config, DslIr, Ext, Felt, MemIndex, MemVariable, Ptr, Usize, Var}; pub const DIGEST_SIZE: usize = 8; pub const HASH_RATE: usize = 8; @@ -151,6 +151,8 @@ impl Builder { .if_eq(idx, C::N::from_canonical_usize(HASH_RATE)) .then(|builder| { builder.poseidon2_permute_mut(&state); + let start = builder.get_ref(&state, 0).ptr.address; + builder.assign(&address, start); builder.assign(&idx, C::N::ZERO); }); });