Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Implement sparse merkle tree utils #289

Closed
hwwhww opened this issue Feb 18, 2019 · 2 comments · Fixed by #341
Closed

Implement sparse merkle tree utils #289

hwwhww opened this issue Feb 18, 2019 · 2 comments · Fixed by #341
Assignees
Labels

Comments

@hwwhww
Copy link
Contributor

hwwhww commented Feb 18, 2019

What is wrong?

current merkle tree utils in eth2/_utils/merkle requires all leaves to compute tree root. It will not be practical to use it to compute deposit tree in Deposit contract(which is a sparse merkle tree).

How can it be fixed

  1. Rename the old eth2/_utils/merkle.py to eth2/_utils/merkle_normal.py
  2. Add eth2/_utils/merkle_sparse.py
@hwwhww hwwhww added the eth2.0 label Feb 18, 2019
@hwwhww hwwhww self-assigned this Feb 18, 2019
@djrtwo
Copy link
Contributor

djrtwo commented Feb 19, 2019

The progressive merkle results in the same root as the normal merkle right?

@hwwhww
Copy link
Contributor Author

hwwhww commented Feb 20, 2019

Root is the same, but we no longer be able to get the Merkle proof from the contract. Opened the issue in the spec: ethereum/consensus-specs#660

@hwwhww hwwhww removed their assignment Feb 21, 2019
@NIC619 NIC619 changed the title Implement progressive_merkle_tree for deposits Implement sparse merkle tree utils Feb 27, 2019
@NIC619 NIC619 mentioned this issue Mar 1, 2019
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants