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

hash-functions: fix the definition of hash trees #389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

multun
Copy link
Contributor

@multun multun commented Oct 1, 2020

No description provided.

@lvh
Copy link
Member

lvh commented Oct 2, 2020

I think there are two competing definitions out there, both are in use, they just disagree about which direction the arrows point.

@multun
Copy link
Contributor Author

multun commented Oct 2, 2020

It's not just about the direction of the arrow, as I understand it, the current definition implies each node only references a single ancestor. I fact, I don't even think the patented merkle tree matches this definition, as each node hashes multiple ancestors (or children, depending on the direction of the arrows)

In practice, hash tree nodes often reference multiple nodes (git's directory nodes reference multiple files, git commits reference a tree object and the previous commit). I'd rather stick with the terminology of the hash tree wikipedia page, so people don't get confused if they look it up.

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

Successfully merging this pull request may close these issues.

2 participants