From c2919a5b9f5572a72219a031138ee3cc2982a80d Mon Sep 17 00:00:00 2001 From: George Tsagkarelis Date: Wed, 1 Oct 2025 15:47:47 +0200 Subject: [PATCH 01/10] build: bump lnd --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index d55e0ba..45bac73 100644 --- a/go.mod +++ b/go.mod @@ -7,9 +7,9 @@ require ( github.com/btcsuite/btcd/btcutil/psbt v1.1.8 github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b - github.com/btcsuite/btcwallet v0.16.15-0.20250811092146-05b3a40651e6 + github.com/btcsuite/btcwallet v0.16.17 github.com/btcsuite/btcwallet/wtxmgr v1.5.6 - github.com/lightningnetwork/lnd v0.19.0-beta.rc5.0.20250905045430-9d74ec47701c + github.com/lightningnetwork/lnd v0.20.0-beta.rc1 github.com/lightningnetwork/lnd/kvdb v1.4.16 github.com/stretchr/testify v1.10.0 google.golang.org/grpc v1.59.0 @@ -102,7 +102,7 @@ require ( github.com/lightningnetwork/lnd/fn/v2 v2.0.8 // indirect github.com/lightningnetwork/lnd/healthcheck v1.2.6 // indirect github.com/lightningnetwork/lnd/queue v1.1.1 // indirect - github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250905045430-9d74ec47701c // indirect + github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250930033359-90c96c7df117 // indirect github.com/lightningnetwork/lnd/ticker v1.1.1 // indirect github.com/lightningnetwork/lnd/tlv v1.3.2 // indirect github.com/lightningnetwork/lnd/tor v1.1.6 // indirect @@ -130,7 +130,7 @@ require ( github.com/rogpeppe/fastuuid v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect - github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/pflag v1.0.6 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect @@ -139,7 +139,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect - go.etcd.io/bbolt v1.3.11 // indirect + go.etcd.io/bbolt v1.4.3 // indirect go.etcd.io/etcd/api/v3 v3.5.12 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.12 // indirect go.etcd.io/etcd/client/v2 v2.305.12 // indirect diff --git a/go.sum b/go.sum index 43bdd4d..1ac132f 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,8 @@ github.com/btcsuite/btclog v0.0.0-20241003133417-09c4e92e319c/go.mod h1:w7xnGOhw github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b h1:MQ+Q6sDy37V1wP1Yu79A5KqJutolqUGwA99UZWQDWZM= github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b/go.mod h1:XItGUfVOxotJL8kkuk2Hj3EVow5KCugXl3wWfQ6K0AE= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcwallet v0.16.15-0.20250811092146-05b3a40651e6 h1:s6NCipDdvDK5rBrC4dIlni1iHsuDOKdfwpL32I3b6Tw= -github.com/btcsuite/btcwallet v0.16.15-0.20250811092146-05b3a40651e6/go.mod h1:H6dfoZcWPonM2wbVsR2ZBY0PKNZKdQyLAmnX8vL9JFA= +github.com/btcsuite/btcwallet v0.16.17 h1:1N6lHznRdcjDopBvcofxaIHknArkJ/EcVKgLKfGL4Dg= +github.com/btcsuite/btcwallet v0.16.17/go.mod h1:YO+W745BAH8n/Rpgj68QsLR6eLlgM4W2do4RejT0buo= github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5 h1:Rr0njWI3r341nhSPesKQ2JF+ugDSzdPoeckS75SeDZk= github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5/go.mod h1:+tXJ3Ym0nlQc/iHSwW1qzjmPs3ev+UVWMbGgfV1OZqU= github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 h1:YEO+Lx1ZJJAtdRrjuhXjWrYsmAk26wLTlNzxt2q0lhk= @@ -355,8 +355,8 @@ github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display h1:Y2WiPkBS github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9 h1:6D3LrdagJweLLdFm1JNodZsBk6iU4TTsBBFLQ4yiXfI= github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9/go.mod h1:EDqJ3MuZIbMq0QI1czTIKDJ/GS8S14RXPwapHw8cw6w= -github.com/lightningnetwork/lnd v0.19.0-beta.rc5.0.20250905045430-9d74ec47701c h1:GVMiT7IwHgRCCsih7KWlOHlsyFBy7JZIGKhiSTOzduw= -github.com/lightningnetwork/lnd v0.19.0-beta.rc5.0.20250905045430-9d74ec47701c/go.mod h1:qvNSmsYOEmvb6JIewrv7vF4S2mjUTEYSxAp9m/U94Lw= +github.com/lightningnetwork/lnd v0.20.0-beta.rc1 h1:8Rm3/pcSLQI+tpCjKfYADfMjmEVFkrtoEom470siKRA= +github.com/lightningnetwork/lnd v0.20.0-beta.rc1/go.mod h1:SgniBRmo5pE7IImxIfhUofhgdXkutcV9Znrf/rEZ7TM= github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0= github.com/lightningnetwork/lnd/clock v1.1.1/go.mod h1:mGnAhPyjYZQJmebS7aevElXKTFDuO+uNFFfMXK1W8xQ= github.com/lightningnetwork/lnd/fn/v2 v2.0.8 h1:r2SLz7gZYQPVc3IZhU82M66guz3Zk2oY+Rlj9QN5S3g= @@ -367,8 +367,8 @@ github.com/lightningnetwork/lnd/kvdb v1.4.16 h1:9BZgWdDfjmHRHLS97cz39bVuBAqMc4/p github.com/lightningnetwork/lnd/kvdb v1.4.16/go.mod h1:HW+bvwkxNaopkz3oIgBV6NEnV4jCEZCACFUcNg4xSjM= github.com/lightningnetwork/lnd/queue v1.1.1 h1:99ovBlpM9B0FRCGYJo6RSFDlt8/vOkQQZznVb18iNMI= github.com/lightningnetwork/lnd/queue v1.1.1/go.mod h1:7A6nC1Qrm32FHuhx/mi1cieAiBZo5O6l8IBIoQxvkz4= -github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250905045430-9d74ec47701c h1:tW4o/gn5OdQ8SiSso1SM5jdcXw6O6awKZ4bG7azX9vY= -github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250905045430-9d74ec47701c/go.mod h1:oOdZ7vjmAUmI9He+aFHTunnxKVefHZAfJttZdz16hSg= +github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250930033359-90c96c7df117 h1:f351uGAVayRRe7NEp94kGPC6X7u0lLEvGhLkE+4V3GI= +github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250930033359-90c96c7df117/go.mod h1:oOdZ7vjmAUmI9He+aFHTunnxKVefHZAfJttZdz16hSg= github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM= github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA= github.com/lightningnetwork/lnd/tlv v1.3.2 h1:MO4FCk7F4k5xPMqVZF6Nb/kOpxlwPrUQpYjmyKny5s0= @@ -481,8 +481,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -521,8 +521,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= -go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= +go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= +go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= go.etcd.io/etcd/api/v3 v3.5.12 h1:W4sw5ZoU2Juc9gBWuLk5U6fHfNVyY1WC5g9uiXZio/c= go.etcd.io/etcd/api/v3 v3.5.12/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= go.etcd.io/etcd/client/pkg/v3 v3.5.12 h1:EYDL6pWwyOsylrQyLp2w+HkQ46ATiOvoEdMarindU2A= From 1d0dbefd787a76752cdca59d95a05bdb0ee24550 Mon Sep 17 00:00:00 2001 From: George Tsagkarelis Date: Wed, 6 Aug 2025 12:45:13 +0200 Subject: [PATCH 02/10] lndclient: add XFindBaseLocalChanAlias --- router_client.go | 27 +++++++++++++++++++++++++++ testdata/permissions.json | 8 ++++++++ 2 files changed, 35 insertions(+) diff --git a/router_client.go b/router_client.go index 28cf129..d603be9 100644 --- a/router_client.go +++ b/router_client.go @@ -89,6 +89,11 @@ type RouterClient interface { // will not be communicated to the channel peer via any message. XDeleteLocalChanAlias(ctx context.Context, alias, baseScid lnwire.ShortChannelID) error + + // XFindBaseLocalChanAlias is an experimental API that looks up the base + // scid for a local chan alias that was registered. + XFindBaseLocalChanAlias(ctx context.Context, + alias lnwire.ShortChannelID) (lnwire.ShortChannelID, error) } // PaymentStatus describe the state of a payment. @@ -1174,3 +1179,25 @@ func (r *routerClient) XDeleteLocalChanAlias(ctx context.Context, alias, ) return err } + +// XFindBaseLocalChanAlias is an experimental API that looks up the base scid +// for a local chan alias that was registered. +func (r *routerClient) XFindBaseLocalChanAlias(ctx context.Context, + alias lnwire.ShortChannelID) (lnwire.ShortChannelID, error) { + + rpcCtx, cancel := context.WithTimeout(ctx, r.timeout) + defer cancel() + + res, err := r.client.XFindBaseLocalChanAlias( + r.routerKitMac.WithMacaroonAuth(rpcCtx), + &routerrpc.FindBaseAliasRequest{ + Alias: alias.ToUint64(), + }, + ) + + if err != nil { + return lnwire.ShortChannelID{}, err + } + + return lnwire.NewShortChanIDFromInt(res.Base), nil +} diff --git a/testdata/permissions.json b/testdata/permissions.json index e1d7873..f3dc691 100644 --- a/testdata/permissions.json +++ b/testdata/permissions.json @@ -912,6 +912,14 @@ } ] }, + "/routerrpc.Router/XFindBaseLocalChanAlias": { + "permissions": [ + { + "entity": "offchain", + "action": "read" + } + ] + }, "/signrpc.Signer/ComputeInputScript": { "permissions": [ { From 793110722cdcfb926d348eae4a88e7e13eec4478 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 11 Sep 2025 20:26:01 +0200 Subject: [PATCH 03/10] lndclient: handle CloseInstant update --- lightning_client.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lightning_client.go b/lightning_client.go index 8060274..200e6d9 100644 --- a/lightning_client.go +++ b/lightning_client.go @@ -3138,6 +3138,10 @@ func (p *PendingCloseUpdate) CloseTxid() chainhash.Hash { type ChannelClosedUpdate struct { // CloseTx is the closing transaction id. CloseTx chainhash.Hash + + // NumPendingHtlcs is the number of pending htlcs that we have + // present while a channel close with the NoWait option was in progress. + NumPendingHtlcs int32 } // CloseTxid returns the closing txid of the channel. @@ -3291,6 +3295,21 @@ func (s *lightningClient) CloseChannel(ctx context.Context, } sendUpdate(closeUpdate) + case *lnrpc.CloseStatusUpdate_CloseInstant: + instantUpdate := update.CloseInstant + if instantUpdate == nil { + sendErr(errors.New("instant update " + + "unavailable")) + + return + } + + numPendingHtlcs := instantUpdate.NumPendingHtlcs + closeUpdate := &ChannelClosedUpdate{ + NumPendingHtlcs: numPendingHtlcs, + } + sendUpdate(closeUpdate) + default: sendErr(fmt.Errorf("unknown channel close "+ "update: %T", resp.Update)) From 1fd28b9e01d3be62ac3dd4f1257b3838b1a1b6db Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Fri, 12 Sep 2025 09:16:17 +0200 Subject: [PATCH 04/10] lndclient: NumberOfPendingHtlcs method for close update --- lightning_client.go | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lightning_client.go b/lightning_client.go index 200e6d9..f64f408 100644 --- a/lightning_client.go +++ b/lightning_client.go @@ -3121,12 +3121,20 @@ func (s *lightningClient) OpenChannelStream(ctx context.Context, type CloseChannelUpdate interface { // CloseTxid returns the closing txid of the channel. CloseTxid() chainhash.Hash + + // NumberOfPendingHtlcs is the number of pending htlcs that we have + // present while a channel close with the NoWait option was in progress. + NumberOfPendingHtlcs() int32 } // PendingCloseUpdate indicates that our closing transaction has been broadcast. type PendingCloseUpdate struct { // CloseTx is the closing transaction id. CloseTx chainhash.Hash + + // NumPendingHtlcs is the number of pending htlcs that we have + // present while a channel close with the NoWait option was in progress. + NumPendingHtlcs int32 } // CloseTxid returns the closing txid of the channel. @@ -3134,6 +3142,12 @@ func (p *PendingCloseUpdate) CloseTxid() chainhash.Hash { return p.CloseTx } +// NumberOfPendingHtlcs returns the number of pending htlcs on a pending close +// channel. +func (p *PendingCloseUpdate) NumberOfPendingHtlcs() int32 { + return p.NumPendingHtlcs +} + // ChannelClosedUpdate indicates that our channel close has confirmed on chain. type ChannelClosedUpdate struct { // CloseTx is the closing transaction id. @@ -3149,6 +3163,12 @@ func (p *ChannelClosedUpdate) CloseTxid() chainhash.Hash { return p.CloseTx } +// NumberOfPendingHtlcs returns the number of pending htlcs on a pending close +// channel. +func (p *ChannelClosedUpdate) NumberOfPendingHtlcs() int32 { + return p.NumPendingHtlcs +} + // CloseChannelOption is a functional type for an option that modifies a // CloseChannelRequest. type CloseChannelOption func(r *lnrpc.CloseChannelRequest) @@ -3305,7 +3325,7 @@ func (s *lightningClient) CloseChannel(ctx context.Context, } numPendingHtlcs := instantUpdate.NumPendingHtlcs - closeUpdate := &ChannelClosedUpdate{ + closeUpdate := &PendingCloseUpdate{ NumPendingHtlcs: numPendingHtlcs, } sendUpdate(closeUpdate) From 08ce5749d586861ce3f1ec377e2e34c8cd653e98 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Fri, 10 Oct 2025 13:16:55 -0300 Subject: [PATCH 05/10] SubscribeSingleInvoice: provide full invoice --- invoices_client.go | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/invoices_client.go b/invoices_client.go index 452e1ef..5946419 100644 --- a/invoices_client.go +++ b/invoices_client.go @@ -2,7 +2,6 @@ package lndclient import ( "context" - "errors" "fmt" "io" "sync" @@ -89,9 +88,18 @@ type InvoicesClient interface { handler InvoiceHtlcModifyHandler) error } -// InvoiceUpdate contains a state update for an invoice. +// InvoiceUpdate embeds an Invoice to expose the complete invoice view along +// with the legacy satoshis-paid field used by existing callers. type InvoiceUpdate struct { - State invpkg.ContractState + // Invoice holds the current state of the invoice. + Invoice + + // AmtPaid is the amount that was accepted for this invoice, in sats. + // This will ONLY be set if this invoice has been settled or accepted. + // We provide this field as if the invoice was created with a zero + // value, then we need to record what amount was ultimately accepted. + // Additionally, it's possible that the sender paid MORE that was + // specified in the original invoice. So we'll record that here as well. AmtPaid btcutil.Amount } @@ -203,17 +211,19 @@ func (s *invoicesClient) SubscribeSingleInvoice(ctx context.Context, return } - state, err := fromRPCInvoiceState(invoice.State) + clientInvoice, err := unmarshalInvoice(invoice) if err != nil { errChan <- err return } - select { - case updateChan <- InvoiceUpdate{ - State: state, + invoiceUpdate := InvoiceUpdate{ + Invoice: *clientInvoice, AmtPaid: btcutil.Amount(invoice.AmtPaidSat), - }: + } + + select { + case updateChan <- invoiceUpdate: case <-ctx.Done(): return } @@ -254,26 +264,6 @@ func (s *invoicesClient) AddHoldInvoice(ctx context.Context, return resp.PaymentRequest, nil } -func fromRPCInvoiceState(state lnrpc.Invoice_InvoiceState) ( - invpkg.ContractState, error) { - - switch state { - case lnrpc.Invoice_OPEN: - return invpkg.ContractOpen, nil - - case lnrpc.Invoice_ACCEPTED: - return invpkg.ContractAccepted, nil - - case lnrpc.Invoice_SETTLED: - return invpkg.ContractSettled, nil - - case lnrpc.Invoice_CANCELED: - return invpkg.ContractCanceled, nil - } - - return 0, errors.New("unknown state") -} - // HtlcModifier is a bidirectional streaming RPC that allows a client to // intercept and modify the HTLCs that attempt to settle the given invoice. The // server will send HTLCs of invoices to the client and the client can modify From 4ae42de25658283debdd6131f3587e2885077e8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:45:57 +0000 Subject: [PATCH 06/10] build(deps): bump github.com/opencontainers/runc from 1.2.0 to 1.2.8 Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.2.0 to 1.2.8. - [Release notes](https://github.com/opencontainers/runc/releases) - [Changelog](https://github.com/opencontainers/runc/blob/v1.2.8/CHANGELOG.md) - [Commits](https://github.com/opencontainers/runc/compare/v1.2.0...v1.2.8) --- updated-dependencies: - dependency-name: github.com/opencontainers/runc dependency-version: 1.2.8 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 3 ++- go.sum | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 45bac73..7cd659c 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( require ( dario.cat/mergo v1.0.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect @@ -118,7 +119,7 @@ require ( github.com/ncruces/go-strftime v0.1.9 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/opencontainers/runc v1.2.0 // indirect + github.com/opencontainers/runc v1.2.8 // indirect github.com/ory/dockertest/v3 v3.10.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/go.sum b/go.sum index 1ac132f..02261c6 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,9 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -429,8 +430,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.2.0 h1:qke7ZVCmJcKrJVY2iHJVC+0kql9uYdkusOPsQOOeBw4= -github.com/opencontainers/runc v1.2.0/go.mod h1:/PXzF0h531HTMsYQnmxXkBD7YaGShm/2zcRB79dksUc= +github.com/opencontainers/runc v1.2.8 h1:RnEICeDReapbZ5lZEgHvj7E9Q3Eex9toYmaGBsbvU5Q= +github.com/opencontainers/runc v1.2.8/go.mod h1:cC0YkmZcuvr+rtBZ6T7NBoVbMGNAdLa/21vIElJDOzI= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= From 0377cc8fe9dd66cfbb57cb37e705ca350baa4a16 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 31 Aug 2025 19:36:26 -0300 Subject: [PATCH 07/10] SendCoins: use SatPerVbyte instead of SatPerByte SatPerByte is deprecated. --- lightning_client.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lightning_client.go b/lightning_client.go index f64f408..71e00d0 100644 --- a/lightning_client.go +++ b/lightning_client.go @@ -209,12 +209,12 @@ type LightningClient interface { // SendCoins sends the passed amount of (or all) coins to the passed // address. Either amount or sendAll must be specified, while - // confTarget, satsPerByte are optional and may be set to zero in which + // confTarget, satsPerVByte are optional and may be set to zero in which // case automatic conf target and fee will be used. Returns the tx id // upon success. SendCoins(ctx context.Context, addr btcutil.Address, amount btcutil.Amount, sendAll bool, confTarget int32, - satsPerByte int64, label string) (string, error) + satsPerVByte chainfee.SatPerVByte, label string) (string, error) // ChannelBalance returns a summary of our channel balances. ChannelBalance(ctx context.Context) (*ChannelBalance, error) @@ -3631,12 +3631,12 @@ func (s *lightningClient) Connect(ctx context.Context, peer route.Vertex, } // SendCoins sends the passed amount of (or all) coins to the passed address. -// Either amount or sendAll must be specified, while confTarget, satsPerByte are -// optional and may be set to zero in which case automatic conf target and fee -// will be used. Returns the tx id upon success. +// Either amount or sendAll must be specified, while confTarget, satsPerVByte +// are optional and may be set to zero in which case automatic conf target and +// fee will be used. Returns the tx id upon success. func (s *lightningClient) SendCoins(ctx context.Context, addr btcutil.Address, amount btcutil.Amount, sendAll bool, confTarget int32, - satsPerByte int64, label string) (string, error) { + satsPerVByte chainfee.SatPerVByte, label string) (string, error) { rpcCtx, cancel := context.WithTimeout(ctx, s.timeout) defer cancel() @@ -3644,12 +3644,12 @@ func (s *lightningClient) SendCoins(ctx context.Context, addr btcutil.Address, rpcCtx = s.adminMac.WithMacaroonAuth(rpcCtx) req := &lnrpc.SendCoinsRequest{ - Addr: addr.String(), - Amount: int64(amount), - TargetConf: confTarget, - SatPerByte: satsPerByte, - SendAll: sendAll, - Label: label, + Addr: addr.String(), + Amount: int64(amount), + TargetConf: confTarget, + SatPerVbyte: uint64(satsPerVByte), + SendAll: sendAll, + Label: label, } resp, err := s.client.SendCoins(rpcCtx, req) From 9d667a1c281626303e9802e0292ccec09145ef39 Mon Sep 17 00:00:00 2001 From: ffranr Date: Thu, 13 Nov 2025 12:21:26 +0000 Subject: [PATCH 08/10] go.mod: bump LND to v0.20.0-beta Updated LND dependency to v0.20.0-beta by running: go get github.com/lightningnetwork/lnd@v0.20.0-beta go mod tidy Also updated Go version in the lint Dockerfile to match go.mod. --- go.mod | 8 ++++---- go.sum | 12 ++++++------ tools/Dockerfile | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 45bac73..61b9332 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b github.com/btcsuite/btcwallet v0.16.17 github.com/btcsuite/btcwallet/wtxmgr v1.5.6 - github.com/lightningnetwork/lnd v0.20.0-beta.rc1 + github.com/lightningnetwork/lnd v0.20.0-beta github.com/lightningnetwork/lnd/kvdb v1.4.16 github.com/stretchr/testify v1.10.0 google.golang.org/grpc v1.59.0 @@ -99,10 +99,10 @@ require ( github.com/lightninglabs/neutrino/cache v1.1.2 // indirect github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9 // indirect github.com/lightningnetwork/lnd/clock v1.1.1 // indirect - github.com/lightningnetwork/lnd/fn/v2 v2.0.8 // indirect + github.com/lightningnetwork/lnd/fn/v2 v2.0.9 // indirect github.com/lightningnetwork/lnd/healthcheck v1.2.6 // indirect github.com/lightningnetwork/lnd/queue v1.1.1 // indirect - github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250930033359-90c96c7df117 // indirect + github.com/lightningnetwork/lnd/sqldb v1.0.11 // indirect github.com/lightningnetwork/lnd/ticker v1.1.1 // indirect github.com/lightningnetwork/lnd/tlv v1.3.2 // indirect github.com/lightningnetwork/lnd/tor v1.1.6 // indirect @@ -192,4 +192,4 @@ require ( // allows us to specify that as an option. replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display -go 1.24.6 +go 1.24.9 diff --git a/go.sum b/go.sum index 1ac132f..ba26003 100644 --- a/go.sum +++ b/go.sum @@ -355,20 +355,20 @@ github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display h1:Y2WiPkBS github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9 h1:6D3LrdagJweLLdFm1JNodZsBk6iU4TTsBBFLQ4yiXfI= github.com/lightningnetwork/lightning-onion v1.2.1-0.20240815225420-8b40adf04ab9/go.mod h1:EDqJ3MuZIbMq0QI1czTIKDJ/GS8S14RXPwapHw8cw6w= -github.com/lightningnetwork/lnd v0.20.0-beta.rc1 h1:8Rm3/pcSLQI+tpCjKfYADfMjmEVFkrtoEom470siKRA= -github.com/lightningnetwork/lnd v0.20.0-beta.rc1/go.mod h1:SgniBRmo5pE7IImxIfhUofhgdXkutcV9Znrf/rEZ7TM= +github.com/lightningnetwork/lnd v0.20.0-beta h1:ML+jgJ3UKDGJdUf0m73ZeR/szJKWVtHxpQP+yFC79b8= +github.com/lightningnetwork/lnd v0.20.0-beta/go.mod h1:8hc55AnE3mMSJ/UAEJZgmhgNCcH0yWaPg0olpxhhp4M= github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0= github.com/lightningnetwork/lnd/clock v1.1.1/go.mod h1:mGnAhPyjYZQJmebS7aevElXKTFDuO+uNFFfMXK1W8xQ= -github.com/lightningnetwork/lnd/fn/v2 v2.0.8 h1:r2SLz7gZYQPVc3IZhU82M66guz3Zk2oY+Rlj9QN5S3g= -github.com/lightningnetwork/lnd/fn/v2 v2.0.8/go.mod h1:TOzwrhjB/Azw1V7aa8t21ufcQmdsQOQMDtxVOQWNl8s= +github.com/lightningnetwork/lnd/fn/v2 v2.0.9 h1:ZytG4ltPac/sCyg1EJDn10RGzPIDJeyennUMRdOw7Y8= +github.com/lightningnetwork/lnd/fn/v2 v2.0.9/go.mod h1:aPUJHJ31S+Lgoo8I5SxDIjnmeCifqujaiTXKZqpav3w= github.com/lightningnetwork/lnd/healthcheck v1.2.6 h1:1sWhqr93GdkWy4+6U7JxBfcyZIE78MhIHTJZfPx7qqI= github.com/lightningnetwork/lnd/healthcheck v1.2.6/go.mod h1:Mu02um4CWY/zdTOvFje7WJgJcHyX2zq/FG3MhOAiGaQ= github.com/lightningnetwork/lnd/kvdb v1.4.16 h1:9BZgWdDfjmHRHLS97cz39bVuBAqMc4/p3HX1xtUdbDI= github.com/lightningnetwork/lnd/kvdb v1.4.16/go.mod h1:HW+bvwkxNaopkz3oIgBV6NEnV4jCEZCACFUcNg4xSjM= github.com/lightningnetwork/lnd/queue v1.1.1 h1:99ovBlpM9B0FRCGYJo6RSFDlt8/vOkQQZznVb18iNMI= github.com/lightningnetwork/lnd/queue v1.1.1/go.mod h1:7A6nC1Qrm32FHuhx/mi1cieAiBZo5O6l8IBIoQxvkz4= -github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250930033359-90c96c7df117 h1:f351uGAVayRRe7NEp94kGPC6X7u0lLEvGhLkE+4V3GI= -github.com/lightningnetwork/lnd/sqldb v1.0.11-0.20250930033359-90c96c7df117/go.mod h1:oOdZ7vjmAUmI9He+aFHTunnxKVefHZAfJttZdz16hSg= +github.com/lightningnetwork/lnd/sqldb v1.0.11 h1:X8J3OvdIhJVniQG78Qsp3niErl1zdGMTPvzgiLMWOOo= +github.com/lightningnetwork/lnd/sqldb v1.0.11/go.mod h1:oOdZ7vjmAUmI9He+aFHTunnxKVefHZAfJttZdz16hSg= github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM= github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA= github.com/lightningnetwork/lnd/tlv v1.3.2 h1:MO4FCk7F4k5xPMqVZF6Nb/kOpxlwPrUQpYjmyKny5s0= diff --git a/tools/Dockerfile b/tools/Dockerfile index 21d08d6..82cdc11 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.24.6-bookworm +FROM golang:1.24.9-bookworm RUN apt-get update && apt-get install -y git ENV GOCACHE=/tmp/build/.cache From 93872e011565c8701d2ac6d040a30f4d182a26a1 Mon Sep 17 00:00:00 2001 From: ffranr Date: Thu, 13 Nov 2025 13:18:51 +0000 Subject: [PATCH 09/10] lnd_services: bump minimum compatible LND version to v0.19.0 While v0.18.5-beta likely still works, raising the minimum version reduces the need to handle deprecated fields, even if they're technically still supported. --- lnd_services.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnd_services.go b/lnd_services.go index 257068c..9ef5653 100644 --- a/lnd_services.go +++ b/lnd_services.go @@ -41,8 +41,8 @@ var ( // fallback version if none is specified in the configuration. minimalCompatibleVersion = &verrpc.Version{ AppMajor: 0, - AppMinor: 18, - AppPatch: 5, + AppMinor: 19, + AppPatch: 0, BuildTags: DefaultBuildTags, } From 7f865a705ed78cde4f1bc1f17cbc0938f731ad46 Mon Sep 17 00:00:00 2001 From: ffranr Date: Thu, 13 Nov 2025 12:34:47 +0000 Subject: [PATCH 10/10] README: update and simplify compatibility matrix table --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4e2a754..98021bd 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,10 @@ different versions. There are two "levels" of depending on a version of The current compatibility matrix reads as follows: -| `lndclient` git tag | `lnd` version in `go.mod` | minimum required `lnd` version | -|---------------------------------------------------------------------------------------|---------------------------|--------------------------------| -| `master` / [`v0.18.5-13`](https://github.com/lightninglabs/lndclient/blob/v0.18.5-13) | `v0.18.5-beta` | `v0.18.5-beta` | +| tag | `lnd` version in `go.mod` | minimum required `lnd` version | +|--------------|---------------------------|--------------------------------| +| `v0.18.5-13` | `v0.18.5-beta` | `v0.18.5-beta` | +| `v0.20.0-4` | `v0.20.0-beta` | `v0.19.0-beta` | By default, `lndclient` requires (and enforces) the following RPC subservers to