starknet-io / starknet-docs

The repo for Starknet's developer documentation. Includes contribution guidelines and the Starknet documentation supplementary style guide
https://docs.starknet.io/
112 stars 158 forks source link

Precise the pedersen hash construction for contract trie. #1214

Closed feltroidprime closed 2 months ago

feltroidprime commented 3 months ago

The leaf hash in the contract trie is not computed using the standard pedersen array hashing defined here https://docs.starknet.io/documentation/architecture_and_concepts/Cryptography/hash-functions/#pedersen_array_hash (impl here : https://github.com/starkware-libs/cairo-lang/blob/efa9648f57568aad8f8a13fbf027d2de7c63c2c0/src/starkware/cairo/common/hash_state.py#L6 )

See : https://github.com/eqlabs/pathfinder/blob/d93f50052b6b7b22072de53f0d94e1e74fbe8247/crates/merkle-tree/src/contract_state.rs#L129-L135

This is confusing and should be precised. Thank you


This change is Reviewable

stoobie commented 2 months ago

@feltroidprime Thank you for your contribution!