-
Notifications
You must be signed in to change notification settings - Fork 624
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
Create crypto
submodules
#2152
Create crypto
submodules
#2152
Conversation
This PR can be merged two weeks after getting a single ACK under the "Refactor carve-out". |
084442c
to
caaf8e5
Compare
I'd prefer to get rid of |
I'm not exactly sure where we are up to with crate smashing but getting rid of |
In case it helps, I've put all crate smashing tasks on hold except the next step because its hard to get anywhere, the next piece of the puzzle is |
At the very least move the contents of |
I agree that we shouldn't have two modules named But maybe Kix is right that we should try flattening it. Or maybe we should just flatten the |
With the whole "two taproot modules" thing, I tried to hide it from downstream by making the |
@apoelstra while Also the code in |
I wouldn't mind renaming the bip* modules where there's a common well-known name. I think all of them except 32 can be changed. Having said that, I wonder if we need to back up and try to define the entire module structure of this crate before moving forward, since trying to make individual changes like this is starting to lead us in circles. |
1 similar comment
I wouldn't mind renaming the bip* modules where there's a common well-known name. I think all of them except 32 can be changed. Having said that, I wonder if we need to back up and try to define the entire module structure of this crate before moving forward, since trying to make individual changes like this is starting to lead us in circles. |
What if we come up with a prototypical set of applications/libraries that use rust-bitcoin. Allowing us to come up with concrete sets of things required by such users, then we have a clearer picture of what we are trying to achieve with the crate smashing. At some stage I rekon we need to get on a call (or plane) and nut this out. |
That sounds good to me. I think rust-lightning, rust-miniscript, bdk and esplora are the big ones. But we also want to support script hackery like whatever @stevenroose is currently working on as well as ICBOC. (Though I suspect that supporting the big things will imply that we support the small things.) |
I think @tcharding great idea! Among those mentioned by @apoelstra I would like to see a nice way of passing around primitive "interface" types (amount, address, txid...) without all complicated features so that different libraries can communicate them well without pulling in everything but a kitchen sink and blowing up the compilation time. |
You mean |
Not sure how much they diverged but FWIW the Roman's version uses P2P as well, so that might cover more API surface. |
Yeah, I didn't realize there was a difference. I meant |
We recently introduce a bunch of formatting issues with the new `io` crate, run the formatter.
Create a subdirectory `crytpo/ecdsa` and move `ecdsa.rs` to `ecdsa/mod.rs`. Done in preparation for further improvements to the `ecdsa` module. No other changes.
Move the error code out of the `ecdsa/mod.rs` file and into a private `error` submodule. Add public re-export so this not a breaking change. Code move only plus import/export changes to build cleanly. No other changes.
Create a subdirectory `crytpo/sighash` and move `sighash.rs` to `sighash/mod.rs`. Done in preparation for further improvements to the `sighash` module. No other changes.
Move the error code out of the `sighash/mod.rs` file and into a private `error` submodule. Add public re-export so this not a breaking change. Code move only plus import/export changes to build cleanly. No other changes.
Move the two sighash types (`TapSighashType` and `EcdsaSighashType`) to a `sighash_type` submodule. While we are at it lay the code out with impl blocks below the type definitions as is customary. Code move, re-order, and fix import/export paths only. No other changes.
caaf8e5
to
c76ca6a
Compare
Fuck, review time is more valuable than dev time. Closing. |
This PR is code move only.
Create two new submodules in the
crypto
module,ecdsa
andsighash
.All patches are code moves only (the last patch re-orders the code). The changes here were originally done in #1989, I redid the whole thing to make sure there were no rebase mistakes. Put up as a separate PR to ease review and qualify for the "Refactor carve-out".