alloy-rs / trie

Fast Merkle-Patricia Trie (MPT) state root calculator and proof generator for prefix-sorted nibbles
Apache License 2.0
74 stars 26 forks source link

fix: proofs for divergent leaf nodes #16

Closed rkrasiuk closed 3 months ago

rkrasiuk commented 3 months ago

Description

Closes https://github.com/alloy-rs/trie/issues/15. Proof for a given leaf node should be stored at the path to it rather than the full key. This fixes the case where the divergent leaf node was not retained for the proof where target key is not present in the trie.