Skip to content

Commit

Permalink
chore: change shared mutables to use poseidon
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanks12 committed Sep 25, 2024
1 parent 1acd93c commit 048c01c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use dep::protocol_types::{
hash::{pedersen_hash, poseidon2_hash}, header::Header, address::AztecAddress,
hash::{poseidon2_hash_with_separator}, header::Header, address::AztecAddress,
traits::{FromField, ToField}
};

Expand Down Expand Up @@ -71,15 +71,15 @@ impl<T, let INITIAL_DELAY: u32, Context> SharedMutable<T, INITIAL_DELAY, Context
// - a ScheduledDelaChange
// - the hash of both of these (via `hash_scheduled_data`)
fn get_value_change_storage_slot(self) -> Field {
pedersen_hash([self.storage_slot], VALUE_CHANGE_SEPARATOR)
poseidon2_hash_with_separator([self.storage_slot], VALUE_CHANGE_SEPARATOR)
}

fn get_delay_change_storage_slot(self) -> Field {
pedersen_hash([self.storage_slot], DELAY_CHANGE_SEPARATOR)
poseidon2_hash_with_separator([self.storage_slot], DELAY_CHANGE_SEPARATOR)
}

fn get_hash_storage_slot(self) -> Field {
pedersen_hash([self.storage_slot], HASH_SEPARATOR)
poseidon2_hash_with_separator([self.storage_slot], HASH_SEPARATOR)
}

// It may seem odd that we take a header and address instead of reading from e.g. a PrivateContext, but this lets us
Expand Down

0 comments on commit 048c01c

Please sign in to comment.