entropyxyz / entropy-core

Protocol and cryptography development.
https://docs.entropy.xyz/
GNU Affero General Public License v3.0
11 stars 2 forks source link

how is program pointer hash #1081

Closed mixmix closed 1 month ago

mixmix commented 1 month ago

Hi all, we have program_pointers and I'm just wanting to check that that hash is derived using all of:

I did have a search of the repo but wasn't sure where to check that.

mixmix commented 1 month ago

Ahh looks like we're good - https://github.com/entropyxyz/entropy-core/blob/master/pallets/programs/src/lib.rs#L237-L243

let mut hash_input = vec![];
hash_input.extend(&new_program);
hash_input.extend(&configuration_schema);
hash_input.extend(&auxiliary_data_schema);
hash_input.extend(&oracle_data_pointer);
hash_input.extend(&vec![version_number]);
let program_hash = T::Hashing::hash(&hash_input);