Clean up dependencies, feature flags, format, lint, and kick the tires on rbmt#37
Conversation
|
Thanks! All good except a1e6753
I'd say just drop that patch and we remove the whole kludge once we upgrade to bitcoin 0.33 |
My intention was to hide the
I started experimenting with this and it got a little hairy, which is why I thought it would be worth to at least clean up the interface for now. |
3f82c1c to
fa93071
Compare
|
Ah no worries, TIL. |
|
I'm dealing with some dependency issues atm, still teasing it apart. I think easiest to just bump the bitcoin dep to 0.32.7, but learning the whys. |
ccf55ed to
348c69a
Compare
|
@tcharding I went kinda ham on this and made the leap to |
I assume its the 'don't run CI for first time contributors setting' but I didn't bother checking. |
Mad, happy to use this repo as a testbed. |
|
I invited you as a collaborator to the repo, can make you a maintainer if you like? |
|
@tcharding I think collaborator is fine. Do you want to ACK these PRs before merge or should I just go wild? Separately, should we bump the MSRV here to 1.74 as well? |
We want to have at least one review before merge. Lets use the ack with commit hash same as in |
Sounds good!
Nope, what's that? (just noticed The min versions are still broken, i'll iron that out) |
|
It comes from Core's maintainer tools repo. I have a local copy, I don't track its developement. Its what I use to merge into any repos I control. Andrew used to use it but now he has a custom tool for merging into |
6193316 to
f91e4ad
Compare
src/v0/bitcoin/mod.rs
Outdated
| let signature = { | ||
| let mut rng = thread_rng(); | ||
| secp.sign_schnorr_with_rng(&msg, &key_pair, &mut rng) | ||
| }; |
There was a problem hiding this comment.
Ah, i think I was getting tripped up on not having rand-std enabled or something. Let me see where I got confused.
|
In 984eacd there are changes |
| # master branch uses hex-conservative 0.3.0+ which has the fix. | ||
| # | ||
| # This override can be removed when upgrading to bitcoin 0.33.0 or later. | ||
| hex-conservative = { version = "0.2.1", default-features = false } |
There was a problem hiding this comment.
Can we keep the optional deps separated by a line of whitespace below the non-optional ones please?
Cargo.toml
Outdated
| actual-serde = { package = "serde", version = "1.0.103", default-features = false, features = [ "derive", "alloc" ], optional = true } | ||
| actual-serde = { package = "serde", version = "1.0.103", default-features = false, features = ["derive", "alloc"], optional = true } |
There was a problem hiding this comment.
Excuse me in advance, I'm in a state today.
If you put random whitespace changes like this in a patch it makes the reviewer have to spend some clock cycles trying to workout why the diff contains these lines, and what exactly changed. As a general principle just throw whitespace changes in a separate patch up front. Thanks
There was a problem hiding this comment.
Yea, my bad man, I ran with this one too long tryin to get it a happy spot. I'll try to clean up the commits.
|
|
||
| cargo install --quiet --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools \ | ||
| --rev "$RBMT_VERSION" \ | ||
| rust-bitcoin-maintainer-tools |
There was a problem hiding this comment.
This script could live in rust-bitcoin-maintainer-tools repo also, right? Is it here for a reason? And we could install rmbt duing the prepare job, would that be better? Open questions, I'm in no way implying how you should proceed.
There was a problem hiding this comment.
Yea, I am not sure the best way to integrate the tooling yet. I originally thought it would be nice to have the hash set in Cargo.toml in a dev-dependency, but after some trial and error, realized it is kinda difficult to run a binary from there (please let me know if I am mistaken there).
If the script lived over in rust-bitcoin-maintainer-tools we would need to like, curl it over here at somepoint or something right?
There was a problem hiding this comment.
Oh I meant the install-rbmt.sh script could live there. Its going to be the same everywhere, right?
There was a problem hiding this comment.
Yea, but if it lived there how would this repo integrate with it? Just clone rust-bitcoin-maintainer-tools kinda like we do now in rust-bitcoin for the script version?
Another thought I had is that this script is so simple, a single cargo install at this point, I could just drop the script.
There was a problem hiding this comment.
Oh of coures, you are right. Now we install rmbt (or cargo rmbt) we don't need the repo. My bad.
| # Tests each feature alone, all pairs, and all together. | ||
| # Note: rand is a little weird until we can upgrade secp256k1 to v0.30.0 | ||
| # Note: miniscript is not included here as it has its own no-std handling | ||
| features_without_std = ["serde", "base64"] |
There was a problem hiding this comment.
Whip time again, sorry bro. In patch 99c1db8 you add empty arrays for exact_features and features_with_no_std then later in the PR they are removed. In general please don't make changes to a series of patches like this because it makes reviewers who review with there terminal (read: proper geeks) jump over to github to add a review suggestion only to find the change no longer exists. Each patch should be discreet both in what it does and in how it is reviewed. Just slap me for the sermons, I warned you I was in a state.
|
I whinged alot there, I guess I'm not exactly sure what level of review you want. I'm also totally happy for you to just patch this repo however you like. We don't have to be super anal if you want to just go wild. |
Eh, I got sloppy here. Let me clean it up. Now that I know its possible to get the builds to pass I can take my time gettin the code and history right. |
b75766f to
f31949a
Compare
e0a9510 to
4ffcab3
Compare
|
Thanks man |
4ffcab3 to
3db7939
Compare
The underlying consensus encoding trait was "loosened" from requiring a BufRead to just a Read.
3db7939 to
8f949f2
Compare
8f949f2 to
233ff10
Compare
|
Nice, clean. |
|
@tcharding I gave the merge script a whirl, I think all went well. |
|
Boss! |
|
I had a shower thought that I should have merged this yesterday, glad you did it. The oversight was not intentional. |
Bit of mess, but the first patch gets the code compiling again, some fallout from the BufRead -> Read change in rust-bitcoin. The next three patches use the 1.60+ rust features for a cleaner feature flag interface with less footguns for users. And finally the rest of the patches introduce the
rbmttooling and fix up format, lint, and minimal version issues.Supersedes #36
Closes #32