-
Notifications
You must be signed in to change notification settings - Fork 122
Update to upstream LDK after 4263 and 4370 #780
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
Update to upstream LDK after 4263 and 4370 #780
Conversation
lightningdevkit/rust-lightning#4263 and lightningdevkit/rust-lightning#4370 changed the `lightning` API, which we update to here. We also switch to using a `Cargo.toml` `[patch...]` to avoid having to update the `bitcoin-payment-instructions` dep after each bump.
|
I've assigned @tnull as a reviewer! |
| [patch.'https://github.com/lightningdevkit/rust-lightning'] | ||
| # Cargo won't let us patch a git dependency with another rev from the same git dependency, so we | ||
| # have to pick another copy of `rust-lightning` and pin the rev. | ||
| lightning = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "0bc5c95484345c6289dffd9a379982a9b66d688f" } |
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 don't see how this is preferable. We'll still need to keep that third repository in-sync.
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.
It doesn't work for me out of the box also
Updating git repository `https://git.bitcoin.ninja/rust-lightning`
warning: spurious network error (3 tries remaining): unexpected http status code: 413; class=Http (34)
warning: spurious network error (2 tries remaining): unexpected http status code: 413; class=Http (34)
warning: spurious network error (1 try remaining): unexpected http status code: 413; class=Http (34)
error: failed to load source for dependency `lightning`
Caused by:
Unable to update https://git.bitcoin.ninja/rust-lightning?rev=0bc5c95484345c6289dffd9a379982a9b66d688f
Caused by:
failed to fetch into: /Users/joost/.cargo/git/db/rust-lightning-94d3943701373680
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
unexpected http status code: 413; class=Http (34)
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 don't see how this is preferable. We'll still need to keep that third repository in-sync.
FWIW this repository is ~always in sync. Annoying, yes, but this shouldn't be an issue. We could also have a repo that's more automated.
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.
It doesn't work for me out of the box also
Wat? I've never seen this....I bumped the max but...weird, honestly.
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.
It doesn't work for me out of the box also
Wat? I've never seen this....I bumped the max but...weird, honestly.
I think at the time Joost tested it lightningdevkit/rust-lightning#4370 wasn't merged. I then went reviewed and landed that PR, bumped bitcoin-payment-instructions, opened the other PR, and asked him to review so we can be unblocked, as he in particular was held up today due to LDK's API breaks. IMO it shows once more that we need to go back to the drawing board on depedency mgmt and merge policy. Maybe we need a hard CI check in LDK that requires fixes are up before we merge any breaking change.
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.
Hmm, should still have worked. the Commit here was the top commit on that PR, rather than the future merge commit. I think it was just a git oddity hitting an nginx max request body size issue.
As for the general issue, I'm a bit confused why someone was blocked on an update to LDK Node syncing to two trivial upstream PRs? Testing against upstream without those PRs should have been pretty easy, and waiting a day for the update doesn't seem like an issue to me.
But, either way, the limitation in this case wasn't a desire for rust-lightning devs to update LDK Node, but rather that it currently requires you to do something on your bitcoin-payment-instructions fork, which means you're the only one who actually can update LDK Node.
I wonder if we can't automate that part - just have a git repo that maintains a bitcoin-payment-instructions that gets its Cargo.toml auto-updated (as long as no API changes have impacted it) and maintains branches for the last few week's worth of commits to rust-lightning so that there's always a commit to point to.
tnull
left a comment
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.
Thanks for the fixes, but not convinced switching to patch solves anything. Also, rustfmt was unhappy here. So opened #781 to supersede this.
lightningdevkit/rust-lightning#4263 and lightningdevkit/rust-lightning#4370 changed the
lightningAPI, which we update to here.We also switch to using a
Cargo.toml[patch...]to avoid having to update thebitcoin-payment-instructionsdep after each bump.