Skip to content
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

Prepare for custom channels (lnd v0.18.4-beta) #848

Merged
merged 10 commits into from
Dec 19, 2024
Merged

Conversation

guggero
Copy link
Member

@guggero guggero commented Sep 19, 2024

This is the mother of all PRs for the custom channel saga. Merging this PR will be the final step for bringing custom channels to a non-experimental version of litd. There are many dependencies (see list/graph below), so it will remain in draft for a bit.
Most of the code in these PRs have already been reviewed on the 0-19-staging branch and have just been squashed down into easy-to-review pieces.

The following list is an ordered list of dependencies that need to be resolved before this PR can be merged (cc @dstadulis):

NOTE: This PR includes all recent changes to litd's 0-19-staging branch, including the new liquidity tests from #842. There haven't been any other in-flight PRs to the staging branch when writing this.

@guggero
Copy link
Member Author

guggero commented Oct 15, 2024

Similar to lightninglabs/loop#828, I bumped to lndclient v0.18.4-0 which references lightningnetwork/lnd#9183 (commit lightningnetwork/lnd@ca3bde9) which should remain stable, so we can start the main review work here.

We will want to wait with merging this until the full dependency chain above is resolved. But once lnd v0.18.4-beta is tagged, that should only entail bumping the versions in go.mod.

@dstadulis dstadulis added this to the tapd v0.4.2 milestone Oct 15, 2024
@guggero
Copy link
Member Author

guggero commented Oct 15, 2024

Need to add #861.

@guggero
Copy link
Member Author

guggero commented Oct 17, 2024

@jamaljsr I tagged you for review on this with the intention of asking you to run a full manual test run of this version within Polar (all the tests you've run previously).
Do you think you'll have time for that this or next week? Thank you!

@jamaljsr
Copy link
Member

@guggero Thanks for the clarification. I wasn't sure how I should test this or if it was ready. I will try it out in Polar by early next week at the latest, hopefully sooner. Excited to see this functionality getting mainlined 🙌

Copy link
Member

@ellemouton ellemouton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

config.go Show resolved Hide resolved
subservers/taproot-assets.go Show resolved Hide resolved
subservers/faraday.go Show resolved Hide resolved
subservers/manager.go Outdated Show resolved Hide resolved
config.go Show resolved Hide resolved
terminal.go Show resolved Hide resolved
cmd/litcli/main.go Outdated Show resolved Hide resolved
cmd/litcli/main.go Show resolved Hide resolved
cmd/litcli/main.go Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
@guggero guggero force-pushed the update-to-lnd-18-4 branch 2 times, most recently from 23d6696 to 1335e4b Compare October 21, 2024 13:58
@guggero
Copy link
Member Author

guggero commented Oct 21, 2024

This PR now contains all the recently merged PRs of the 0-19-staging branch up to commit 2194f1e.

@guggero guggero force-pushed the update-to-lnd-18-4 branch 3 times, most recently from 3d30a93 to 9476c03 Compare October 22, 2024 12:29
Copy link
Member

@jamaljsr jamaljsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK LGTM 🔥 🚀

I tested the following scenarios in Polar using this network structure with all litd nodes except for erin which is Core Lightning v24.08.1.

alice --[asset]-> bob --[sats]-> carol --[asset]-> dave
                                   |
                                 [sats]
                                   |
                                   v
                                  erin (core-ln)
  • fund asset channel using full asset balance after mint
  • fund asset channel using partial asset balance after mint
  • fund asset channel using full asset balance after mint + onchain send
  • fund asset channel using partial asset balance after mint + onchain send
  • fund asset channel using full asset balance from onchain receive
  • fund asset channel using partial asset balance from onchain receive
  • fund asset channel with push_sat=5000
  • create asset invoice on dave, pay with asset on alice (multi-hop)
  • create asset invoice on bob, pay with asset on alice (direct peer)
  • create asset invoice on alice, pay with asset on bob (direct peer, opposite direction)
  • create asset invoice on alice, pay with asset on dave (multi-hop, opposite direction)
  • create asset invoice on dave, pay with sats on bob (sats -> asset)
  • create sats invoice on bob, pay with asset on dave (asset -> sats)
  • create asset invoice on alice, pay with sats on erin (cln sats -> asset)
  • create sats invoice on erin, pay with asset on alice (asset -> cln sats)
  • create sats invoice on bob, pay with sats on alice (direct peer, sats -> sats)
  • create sats invoice on dave, pay with sats on alice (multi-hop, sats -> sats)
  • send asset keysend payment from alice to bob
  • send asset keysend payment from alice to carol

Note: I was using commit 35e6aea. I see there have been more pushes since I started testing. Let me know if you'd like another round of testing using the final commits before merging.

@guggero guggero force-pushed the update-to-lnd-18-4 branch from 9476c03 to cf2458e Compare October 22, 2024 14:05
@guggero guggero force-pushed the update-to-lnd-18-4 branch 3 times, most recently from 8ac370b to 8371d03 Compare December 10, 2024 08:28
Copy link
Member

@ellemouton ellemouton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from a Lit standpoint! I do think we should get a tap-asset engineer to ACK the itests and commands specifically though 🙏

Holding back on the green check until LND 18.4 is out of RC phase

subservers/taproot-assets.go Show resolved Hide resolved
@guggero guggero force-pushed the update-to-lnd-18-4 branch 2 times, most recently from dd49654 to 890764a Compare December 11, 2024 16:08
Copy link
Contributor

@ViktorTigerstrom ViktorTigerstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from a LiT standpoint from me as well 🚀! Will do final testing and hit approve once lnd 0.18.4 is released!

subservers/taproot-assets.go Show resolved Hide resolved
cmd/litcli/ln.go Show resolved Hide resolved
cmd/litcli/ln.go Outdated Show resolved Hide resolved
itest/litd_node.go Outdated Show resolved Hide resolved
itest/litd_accounts_test.go Outdated Show resolved Hide resolved
itest/litd_custom_channels_test.go Show resolved Hide resolved
README.md Show resolved Hide resolved
@guggero guggero force-pushed the update-to-lnd-18-4 branch 3 times, most recently from 47f213d to b674ce2 Compare December 17, 2024 18:55
@guggero guggero marked this pull request as ready for review December 19, 2024 19:11
Copy link
Contributor

@ViktorTigerstrom ViktorTigerstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK LGTM 🚀🔥!!

Leaving some minor comments, but no need to address them.

cmd/litcli/ln.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
guggero and others added 9 commits December 19, 2024 21:21
This commit represents the main integration between lnd running in
integrated mode and tapd providing auxiliary components for custom
channels.
This change will speed up integration tests by not waiting a full 5
seconds before re-trying the connection to lnd if it fails the first
time.
Co-authored-by: Olaoluwa Osuntokun <laolu32@gmail.com>
Co-authored-by: Gijs van Dam <gijs@lightning.engineering>
Co-authored-by: George Tsagkarelis <george.tsagkarelis@gmail.com>
Add the `priceoraclerpc`, `rfqrpc`, and the `tapchannelrpc` JSON
callbacks to the litclient's `Registrations` array. This allows the
litclient to use the rpc functions contained in these JSON callbacks.
@guggero guggero merged commit f73b43a into master Dec 19, 2024
13 checks passed
@guggero guggero deleted the update-to-lnd-18-4 branch December 19, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[tracking]: merge custom-channel features into lnd and litd
6 participants