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

partialmmr: Method add with support for a single peak and tracking #263

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

hackaugusto
Copy link
Contributor

Describe your changes

Adds a method add to the PartialMmr.

fixes: #258

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM!

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I left a few comments inline - most a very minor but I also think there is bug in the algorithm which could result in partial MMR authentication paths becoming invalid on update.

src/merkle/mmr/partial.rs Outdated Show resolved Hide resolved
src/merkle/mmr/partial.rs Outdated Show resolved Hide resolved
src/merkle/mmr/partial.rs Outdated Show resolved Hide resolved
src/merkle/mmr/partial.rs Show resolved Hide resolved
@hackaugusto hackaugusto requested a review from bobbinth January 24, 2024 15:47
@hackaugusto hackaugusto dismissed bobbinth’s stale review January 24, 2024 15:47

applied requested changes, fixed the bug

src/merkle/mmr/partial.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you! I left just one small nit inline.

Before merging, could you check if it will break anything in the vm/base (I think VM should be fine, but base my need a small update).

Also, we should coordinate the update with @igamigo not to break the client for too long.

src/merkle/mmr/partial.rs Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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.

3 participants