-
Notifications
You must be signed in to change notification settings - Fork 831
Move the taproot module to crate root #1373
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
Move the taproot module to crate root #1373
Conversation
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.
ACK bbad1af96248a55c7a88fc2a5e59b5ed211fb4ed
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.
ACK bbad1af96248a55c7a88fc2a5e59b5ed211fb4ed
\me whispers excitedly merge merge merge merge merge |
@tcharding sorry, this needs a rebase!
It looks like #1381 caused a conflict :( |
bbad1af
to
b6eed32
Compare
Rebased! Felt so good to see |
b6eed32
to
676f9c2
Compare
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.
ACK 676f9c2bb5cf8d6ac5c2d9651ec4543de9495a19
676f9c2
to
4309108
Compare
Rebased, no other changes. |
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.
ACK 43091087e214c0e5c8827ff0892a8d01e799aee9
No changes since you last ack'ed @Kixunil, here is the range diff command for you to verify what I say, can I get another ack please |
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.
ACK 43091087e214c0e5c8827ff0892a8d01e799aee9
We are trying to flatten the `util` module. The `taproot` module can live in the crate root. If/when we create a `crypto` module/crate we may wish to pull some stuff out of this module but for now moving it gets us closer to removing `util` without making the directory structure any worse. Includes adding rustfmt attributes to skip formatting of macros.
Run `cargo +nightly fmt` and commit changes to the `taproot` module. No manual changes, only those introduced by `rustfmt`.
4309108
to
dce88b0
Compare
Rebased and added |
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.
ACK dce88b0
if let Some(Some(node)) = self.branch.pop() { | ||
Ok(TaprootSpendInfo::from_node_info(secp, internal_key, node)) | ||
} else { | ||
unreachable!("Size checked above. Builder guarantees the last element is Some") | ||
} | ||
} | ||
}, |
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.
I may be paranoid but this style seems to ask for heartbleed-style vulnerability.
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.
Heh, I agree it feels a bit treacherous, but Rust will at least require you put something (not just whitespace) before any following lines of code, so you can't be easily fooled into mistaking which block it belongs to.
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.
ACK dce88b0
We are trying to flatten the
util
module. Thetaproot
module can live in the crate root. If/when we create acrypto
module/crate we may wish to pull some stuff out of this module but for now moving it gets us closer to removingutil
without making the directory structure any worse.CC sanket1729, I did this after reviewing the
taproot
module during work on #1260 and your review comment.