diff --git a/crates/prover/src/core/backend/simd/grind.rs b/crates/prover/src/core/backend/simd/grind.rs index 22d197f420..8e8837cbba 100644 --- a/crates/prover/src/core/backend/simd/grind.rs +++ b/crates/prover/src/core/backend/simd/grind.rs @@ -126,7 +126,7 @@ fn grind_poseidon31(digest: &[M31; 8], hi: u64, pow_bits: u32) -> Option { M31::from_u32_unchecked((((start + i as u64) >> 43) & ((1 << 21) - 1)) as u32) })); - let res = permute(attempt)[8]; + let res = permute(attempt)[0]; let success_mask = res.into_simd().trailing_zeros().simd_ge(pow_bits); if success_mask.any() { let i = success_mask.to_array().iter().position(|&x| x).unwrap(); diff --git a/crates/prover/src/core/channel/poseidon31.rs b/crates/prover/src/core/channel/poseidon31.rs index c9b718d446..be4b6cf3f6 100644 --- a/crates/prover/src/core/channel/poseidon31.rs +++ b/crates/prover/src/core/channel/poseidon31.rs @@ -112,7 +112,7 @@ impl Channel for Poseidon31Channel { poseidon2_permute(&mut state); } - let new_digest = state.last_chunk::<8>().unwrap(); + let new_digest = state.first_chunk::<8>().unwrap(); self.update_digest(*new_digest); } @@ -142,7 +142,7 @@ impl Channel for Poseidon31Channel { ]; poseidon2_permute(&mut state); - let new_digest = state.last_chunk::<8>().unwrap(); + let new_digest = state.first_chunk::<8>().unwrap(); self.update_digest(*new_digest); }