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

Make MerkleBuoy generic utility #138

Merged
merged 4 commits into from
Oct 9, 2023
Merged

Make MerkleBuoy generic utility #138

merged 4 commits into from
Oct 9, 2023

Conversation

dr-orlovsky
Copy link
Member

@dr-orlovsky dr-orlovsky commented Oct 6, 2023

MerkleBuoy is a helper that ensures that unbalanced Merkle trees iterated over their leaves run iteration in full.

Previously MerkleBuoy was used only internally for merging two MPC Merkle blocks. While implementing taproot support in new bp-std and psbt crates I stumbled upon the need for a similar structure with different max depth. So instead of creating a new one, I export this structure putting it into merkle module (where it belongs to, since it is not just MPC-specific anymore) and making it generic over the depth. None of the existing business logic or validation code must be affected.

@dr-orlovsky dr-orlovsky added enhancement New feature or request refactoring Refactoring of the existing code labels Oct 6, 2023
@dr-orlovsky dr-orlovsky added this to the v0.10.x milestone Oct 6, 2023
@dr-orlovsky dr-orlovsky mentioned this pull request Oct 8, 2023
Copy link
Member

@zoedberg zoedberg left a comment

Choose a reason for hiding this comment

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

I've patched commit_verify on rgb-lib and ran tests, they all pass so IMO this can be merged.

P.S. Also here I see some lint warnings, as already said in BP-WG/bp-core#56 (comment) I think we should solve them and fix the CI

@dr-orlovsky dr-orlovsky merged commit b8ae567 into master Oct 9, 2023
22 checks passed
@dr-orlovsky dr-orlovsky deleted the buoy branch September 4, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Refactoring of the existing code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants