diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr b/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr index 585c3ead13fb..13a82bc58b58 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr @@ -1,7 +1,7 @@ -use crate::{hash::poseidon2_hash_with_separator, traits::ToField}; +use crate::{hash::pedersen_hash, traits::ToField}; pub fn derive_storage_slot_in_map(storage_slot: Field, key: K) -> Field where K: ToField { - poseidon2_hash_with_separator([storage_slot, key.to_field()], 0) + pedersen_hash([storage_slot, key.to_field()], 0) } mod test { diff --git a/yarn-project/circuits.js/src/hash/map_slot.ts b/yarn-project/circuits.js/src/hash/map_slot.ts index 8ffed794039d..d14b85b0ea9f 100644 --- a/yarn-project/circuits.js/src/hash/map_slot.ts +++ b/yarn-project/circuits.js/src/hash/map_slot.ts @@ -1,4 +1,4 @@ -import { poseidon2Hash } from '@aztec/foundation/crypto'; +import { pedersenHash } from '@aztec/foundation/crypto'; import { type Fr } from '@aztec/foundation/fields'; /** @@ -14,5 +14,5 @@ export function deriveStorageSlotInMap( toField: () => Fr; }, ): Fr { - return poseidon2Hash([mapSlot, key.toField()]); + return pedersenHash([mapSlot, key.toField()]); }