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

Update TMSimpleMerkleTree.sol #111

Open
colin-axner opened this issue Mar 3, 2019 · 0 comments
Open

Update TMSimpleMerkleTree.sol #111

colin-axner opened this issue Mar 3, 2019 · 0 comments
Labels
V2 next iteration of the contract
Milestone

Comments

@colin-axner
Copy link
Member

Tendermint updated their simple merkle tree to the following:

leaf nodes and inner nodes have different hashes. 
This is for "second pre-image resistance", to prevent the proof to an inner node being valid as the proof of a leaf. 
The leaf nodes are SHA256(0x00 || leaf_data), and inner nodes are SHA256(0x01 || left_hash || right_hash)

This can be seen here

@colin-axner colin-axner added the V2 next iteration of the contract label Mar 3, 2019
@colin-axner colin-axner added this to the Version 2 milestone Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 next iteration of the contract
Development

No branches or pull requests

1 participant