Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch09 section on Merkle trees has potentially contradictory information on the number of hashes required to prove a data element is in the tree #1083

Open
0xfauzi opened this issue Sep 13, 2023 · 0 comments

Comments

@0xfauzi
Copy link

0xfauzi commented Sep 13, 2023

When N data elements are hashed and summarized in a merkle tree, you can check to see if any one data element is included in the tree with at most 2*log~2~(N) calculations, making this a very efficient data structure.

and

To prove that a specific transaction is included in a block, a node only needs to produce log~2~(N) 32-byte hashes, constituting an authentication path or merkle path connecting the specific transaction to the root of the tree. This is especially important as the number of transactions increases, because the base-2 logarithm of the number of transactions increases much more slowly

seem to contradict each other.

To prove that a specific data element exists in the merkle tree, shouldn't that only need log2(N) hashes? Under what circumstances would you need twice that number of hashes?

@0xfauzi 0xfauzi changed the title ch09 section on Merkle trees has contradictory information on the number of hashes required to prove a data element is in the tree ch09 section on Merkle trees has potentially contradictory information on the number of hashes required to prove a data element is in the tree Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant