-
Notifications
You must be signed in to change notification settings - Fork 19
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
Implement Pollard #27
Draft
Davidson-Souza
wants to merge
3
commits into
mit-dci:main
Choose a base branch
from
Davidson-Souza:feature/pollard
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Davidson-Souza
force-pushed
the
feature/pollard
branch
2 times, most recently
from
March 14, 2023 13:36
d204bb0
to
b49021c
Compare
Davidson-Souza
force-pushed
the
feature/pollard
branch
3 times, most recently
from
May 5, 2023 17:39
e23b64b
to
906adbf
Compare
Implement basic element addition for Pollard
Davidson-Souza
force-pushed
the
feature/pollard
branch
from
May 16, 2023 15:31
906adbf
to
735afdd
Compare
Davidson-Souza
force-pushed
the
feature/pollard
branch
2 times, most recently
from
May 29, 2023 17:59
eaa4323
to
80b1338
Compare
Pollard is a middle-ground between full tree and Stump that allows holding only a subset of UTXOs, while still allowing proving those elements. This implementation only allows for full pollards, where all leaves are present. Allowing partial pollard will be accomplished later. The implementation uses interior mutability to work. A Pollard is different from a normal Binary Tree because nodes points to it's sibling, not their children. This makes recursive algoritms more evolved, specially during deletions. This implementation is all iteractive, and carefully uses interior mutability with Cell and RefCell. Those smart pointers allows runtime borrow checking, if some of the Borrowing Rules is broken, it panics. Here, we take care of not holding reference to the interior of a Cell or RefCell for too log, and not passing `mut ref` arround. Only a few functions with very limited scope can use `mut ref`s. A extensible collection of tests is also provided, to check for code correctness and soundness.
Davidson-Souza
force-pushed
the
feature/pollard
branch
from
May 29, 2023 22:27
80b1338
to
bbdd8ab
Compare
Is this ready for review? |
Davidson-Souza
pushed a commit
to Davidson-Souza/rustreexo
that referenced
this pull request
Jun 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pollard is a data structure that holds prune-able trees to represent the current accumulator, thus, creating a client that may prove arbitrary UTXOs. This PR implements a Pollard struct in Rust with add/del methods.
The implementation is capable of passing our test cases used for stump. There's also a wide range of tests for different aspects of a Pollard.
All commits should compile and run on its own, modulo some warnings in the first ones.