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

feat: verify a old root and all incremental items after it #35

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

yangby-cryptape
Copy link
Collaborator

@yangby-cryptape yangby-cryptape commented Jun 28, 2023

Add a method to verify a old root and all incremental leaves.

If this method returns true, it means the following assertion are true:

  • The old root could be generated in the history of the current MMR.
  • All incremental leaves are on the current MMR.
  • The MMR, which could generate the old root, appends all incremental leaves, becomes the current MMR.

Closes #33.

src/mmr.rs Outdated Show resolved Hide resolved
@yangby-cryptape yangby-cryptape force-pushed the pr/verify-incremental branch from 4d2a678 to 0ca6d56 Compare June 28, 2023 10:11
@yangby-cryptape yangby-cryptape requested review from quake and jjyr June 28, 2023 10:16
src/mmr.rs Outdated Show resolved Hide resolved
@yangby-cryptape yangby-cryptape force-pushed the pr/verify-incremental branch from 0ca6d56 to e92a3da Compare July 11, 2023 17:34
@yangby-cryptape yangby-cryptape requested a review from quake July 11, 2023 17:35
@yangby-cryptape yangby-cryptape force-pushed the pr/verify-incremental branch from e92a3da to e4ee698 Compare July 13, 2023 05:43
@yangby-cryptape
Copy link
Collaborator Author

Ping @quake: Updated!

@quake
Copy link
Member

quake commented Jul 14, 2023

@yangby-cryptape please checkout #33 (comment)

@yangby-cryptape yangby-cryptape force-pushed the pr/verify-incremental branch from e4ee698 to 91e624f Compare July 15, 2023 18:24
src/mmr.rs Outdated Show resolved Hide resolved
src/mmr.rs Outdated Show resolved Hide resolved
@jjyr jjyr added this pull request to the merge queue Jul 18, 2023
Merged via the queue into nervosnetwork:master with commit e68de73 Jul 18, 2023
@yangby-cryptape yangby-cryptape deleted the pr/verify-incremental branch July 18, 2023 06:50
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.

Could I prove a new root is base on the old root with the proof of all new appended items?
3 participants