-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow user-provided ratchet seed and inumber #91
Conversation
Codecov Report
@@ Coverage Diff @@
## main #91 +/- ##
==========================================
+ Coverage 67.89% 69.25% +1.35%
==========================================
Files 26 27 +1
Lines 2003 2010 +7
Branches 482 470 -12
==========================================
+ Hits 1360 1392 +32
+ Misses 252 239 -13
+ Partials 391 379 -12
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Should we also add a matching function PrivateRef::from_seed(parent_bare_name: Namefilter, ratchet_seed: HashOutput, inumber: HashOutput) -> PrivateRef
?
- Remove Result from `PrivateNodeHeader::get_private_ref`
What's the reasoning on using That said, I may just not know the normal rust conventions yet! 😅 |
I don't mind either really but generally Maybe this is sth @zeeshanlakhani can help out with. |
Ah and @appcypher can you add a unit test that creates a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Summary
In some cases, we want to be able to deterministically create a directory with seeds generated at userland, for example, from private keys. There is a hacky solution to this by passing a carefully designed rng, but that is likely to break in future versions.
This PR adds the API for accepting user-specified ratchet seed and inumber that solves the problem outlined above.
This PR implements the following features
Test plan (required)
Testing
rs-wnfs test --all
Closing issues
Fixes #86