-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Merkle proof whose trie root node is inferior to 32 bytes being c…
…onsidered as invalid (#3046) Right now, we either hash each proof entry or take its inline value if it is too small. This isn't correct, for two reasons: - The root node is always hashed, meaning that right now if the root node of a proof is < 32 bytes, its hash won't be found in our array. - Nodes that are < 32 bytes should be inlined. There's no situation where a node whose length is < 32 bytes has its own proof entry. Consequently, we don't care about inline values and just hash the node entries. We also check whether hashed nodes shouldn't have been inlined, although this is very secondary. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
cde8632
commit af7b25c
Showing
2 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters