-
Notifications
You must be signed in to change notification settings - Fork 403
bitcoin 0.32 upgrade followups #3249
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
bitcoin 0.32 upgrade followups #3249
Conversation
4b8dd7d
to
ff558f6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3249 +/- ##
=======================================
Coverage 89.72% 89.72%
=======================================
Files 124 124
Lines 102386 102352 -34
Branches 102386 102352 -34
=======================================
- Hits 91867 91840 -27
+ Misses 7819 7816 -3
+ Partials 2700 2696 -4 ☔ View full report in Codecov by Sentry. |
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.
Mostly looks good to me, just a few questions.
I'm honestly not entirely sure about the patch changes yet. Will have to see how working with hard-coded patch
will be in practice.
CI-shellcheck is unhappy, btw.
lightning/src/util/ser.rs
Outdated
@@ -66,6 +66,7 @@ impl<W: Write> Writer for W { | |||
} | |||
} | |||
|
|||
// Drop this entirely if rust-bitcoin releases a version bump with https://github.com/rust-bitcoin/rust-bitcoin/pull/3173 |
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.
Prefix with TODO
or FIXME
for discoverability? Maybe also open an issue for it to make really sure we don't forget as shipping this might have quite an impact on efficiency?
ff558f6
to
066be33
Compare
When working directly on LDK it seems to be fine (just have to get used to |
9f001e5
to
2e4480f
Compare
Added two more commits but I think sadly we can't materially change the feature set on the |
31c4206
to
3cc9c8e
Compare
3cc9c8e
to
af6c226
Compare
Mh, yeah, that's what I thought. It would def. make my life easier if we'd find a solution that would allow me to |
CI is unhappy as you seem to have introduced a bunch of (mostly Feel free to squash the fixup. |
3adf57d
to
fe79cf0
Compare
Okay, moved them all to |
fa79998
to
a07ec51
Compare
ci/ci-tests.sh
Outdated
cargo test -p $DIR --verbose --color always --no-default-features --features no-std | ||
# check if there is a conflict between no-std and the default std feature | ||
cargo test -p $DIR --verbose --color always --features no-std | ||
done | ||
|
||
for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do | ||
for DIR in lightning lightning-rapid-gossip-sync; do |
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.
do we need a separate loop for the bindings tests?
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.
Grouping by RUSTFLAGS
avoids rebuilding the dependencies again and again.
FYI regarding |
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.
LGTM, I think.
Feel free to squash the fixups. I don't feel too strongly about patch
vs. path
s, so feel free to go either way.
a07ec51
to
983feaf
Compare
Squashed without further changes, gonna keep |
When we reach EOF we may return a full buffer when we should return an empty one.
`rust-bitcoin` doesn't ever actually *use* its `BufRead` requirement when deserializing objects, and forcing it is somewhat inefficient, so we optimize the only (actual) case here by passing reads straight through to the backing stream.
In order to ensure our crates depend on the workspace copies of each other in test builds we need to override the crates.io dependency with a local `path`. We can do this in one of two ways - either specify the `path` in the dependency listing in each crate's `Cargo.toml` or use the workspace `Cargo.toml` to `patch` all dependencies. The first is tedious while the second lets us have it all in one place. However, the second option does break `cargo *` in individual crate directories (forcing the use of `cargo -p crate *` instead) and makes it rather difficult to depend on local versions of workspace crates. Thus, here we drop the `patch.crates-io` from our top-level `Cargo.toml` entirely. Still, we do update the `ci/ci-tests.sh` script here to use `cargo -p crate` instead of switching to each crate's directory as it allows `cargo` to use a shared `target` and may speed up tests.
Now that we don't have to have everything in our entire ecosystem use the same `std`/`no-std` feature combinations we should start by untangling our own features a bit. This takes the first step by removing the `no-std` feature entirely from the `lightning-background-processor` crate and removing most feature implications on dependencies from the remaining `std` feature. It also addresses a CI oversight where we were not testing `lightning-background-processor` without the `std` feature in CI at all.
Now that we don't have to have everything in our entire ecosystem use the same `std`/`no-std` feature combinations we should start by untangling our own features a bit. This takes another step by removing the `no-std` feature entirely from the `lightning-invoice` crate and removing all feature implications on dependencies from the remaining `std` feature.
Now that we don't have to have everything in our entire ecosystem use the same `std`/`no-std` feature combinations we should start by untangling our own features a bit. This takes another step by removing the `no-std` feature entirely from the `lightning-rapid-gossip-sync` crate and removing all feature implications on dependencies from the remaining `std` feature.
This exists just for tests, so there's no reason for it to be publicly visible.
Now that we don't have to have everything in our entire ecosystem use the same `std`/`no-std` feature combinations we should start by untangling our own features a bit. This takes one last step, removing the implications of the `std` feature from the `lightning` crate.
983feaf
to
8049f99
Compare
Rebased (and fixed the commit message to note that we are doing the |
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.
lgtm!
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.
LGTM, a little bit not sure about the rust-bitcoin (rust-bitcoin/rust-bitcoin#3173) but I think I just need to read the rust-bitcoin PR in deep
Mostly feature list cleanups now that we can, but also tiny tweaks to
BufReader
.Fixes #3097