diff --git a/std/machines/hash/poseidon_gl_memory.asm b/std/machines/hash/poseidon_gl_memory.asm index 18a351d1d..bf048346b 100644 --- a/std/machines/hash/poseidon_gl_memory.asm +++ b/std/machines/hash/poseidon_gl_memory.asm @@ -193,7 +193,8 @@ machine PoseidonGLMemory(mem: Memory, split_gl: SplitGL) with array::zip(state, c, |state, c| (state' - c) * (1-LAST) = 0); // In the last row, the first OUTPUT_SIZE elements of the state should equal output - array::zip(output, state, |output, state| LASTBLOCK * (output - state) = 0); + let output_state = array::sub_array(state, 0, OUTPUT_SIZE); + array::zip(output, output_state, |output, state| LASTBLOCK * (output - state) = 0); // The output should stay constant in the block array::map(output, |c| unchanged_until(c, LAST));