Commit Graph

1437 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
7fcbbd44ca build: update CI+release version to Go 1.25.2
We also update the go.mod files to pin to Go 1.24.8.
2025-10-11 13:39:51 +01:00
Elle Mouton
b8abe130a5 multi: rename lnwire.NodeAnnouncement
In preparation for adding a NodeAnnouncement2 struct along with a
NodeAnnouncement interface, this commit renames the existing
NodeAnnouncment struct to NodeAnnouncement1.
2025-10-01 13:13:32 +02:00
George Tsagkarelis
f14190c02d lnrpc: add XFindBaseLocalChanAlias rpc
Add the new RPC method that looks up the base scid for a given alias.
Given the previous stepping stones this commit is fairly simple, we just
call into the alias manager and return the lookup result.
2025-09-25 11:15:31 +02:00
George Tsagkarelis
472a2f967e multi: add base lookup option to AddLocalAlias
We add an extra option to the AddLocalAlias method which only controls
whether we store a reverse lookup from the alias back to the base scid
it corresponds to. The previous flag "gossip" is still maintained, and
in a way supercedes the new flag (it will also store the base scid
lookup even if the base lookup flag isn't set). The only call that sets
this option is the XAddLocalChanAlias RPC endpoint, where we want to
make sure that a reverse lookup is stored in the alias manager in order
to later expose it via the new RPC method.
2025-09-25 11:15:27 +02:00
yyforyongyu
e50ecac2f2 lnrpc: update docs for FlapCount and LastFlapNs 2025-09-18 22:24:45 +08:00
Yong
5082566ed7 Merge pull request #9677 from NishantBansal2003/conf-count
Expose confirmation count for pending 'channel open' transactions
2025-09-11 22:36:05 +08:00
Nishant Bansal
5fd42ac61d lnrpc+rpcserver: add ConfirmationsUntilActive and ConfirmationHeight
Introduce ConfirmationsUntilActive and ConfirmationHeight in
PendingChannelsResponse_PendingChannel. ConfirmationsUntilActive indicates
the remaining confirmations needed for the channel to become active. If the
funding transaction is unconfirmed, ConfirmationsUntilActive defaults to the
total required confirmations (NumConfsRequired). ConfirmationHeight records
the block height at which the funding transaction was first confirmed; if
unconfirmed, it will be 0.

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-09-11 18:27:14 +05:30
Yong
d1d3a82010 Merge pull request #9884 from ellemouton/relaxFeatureBitCheck
multi: use relaxed feature bit `Set` method for peer features
2025-09-10 17:22:16 +08:00
Elle Mouton
060219780b multi: rename AddLightningNode methods
to AddNode
2025-09-03 10:14:35 +02:00
Elle Mouton
c663a557c4 multi: rename models.LightningNode to models.Node 2025-09-03 10:14:35 +02:00
Boris Nagaev
630108b13d multi: golang.org/x/net/context -> context 2025-08-30 14:13:44 -03:00
Boris Nagaev
dee8ad3754 multi: context.Background() -> t.Context()
Use the new feature of Go 1.24, fix linter warnings.

This change was produced by:
 - running golangci-lint run --fix
 - sed 's/context.Background/t.Context/' -i `git grep -l context.Background | grep test.go`
 - manually fixing broken tests
 - itest, lntest: use ht.Context() where ht or hn is available
 - in HarnessNode.Stop() we keep using context.Background(), because it is
   called from a cleanup handler in which t.Context() is canceled already.
2025-08-30 14:13:44 -03:00
Boris Nagaev
6ffe257004 multi: bump Go to 1.24.6 2025-08-30 14:13:44 -03:00
ziggie
2b856f036e multi: fix linter 2025-08-14 19:53:18 +02:00
ziggie
df9bac2ecf multi: move PaymentCreationInfo to payment pkg 2025-08-14 19:53:18 +02:00
ziggie
d138e23919 multi: move FailureReason to payment package 2025-08-14 19:53:18 +02:00
ziggie
03af9858d2 multi: move payment related code into own package
This commit moves most of the code into its own package. It is
the smallest code move possible without moving import cycles and
keeping the changes to the code base as small as possible during
refactor.
2025-08-14 19:53:15 +02:00
Yong
c6a9116e3a Merge pull request #9844 from ziggie1984/refactor-payments-code-03
Refactor Payment PR 3
2025-08-13 06:05:01 -04:00
ziggie
18afd4442d multi: introduce new paymentsDB package
We introduce a new package paymentsDB and start by moving the
payment specifc errors from the channeldb package to the
paymentsDB package. We also fix linter issues which showed up
due to changing this code part.
2025-08-11 16:44:14 +02:00
ziggie
87844cd5b4 multi: bump Golang version to v1.23.12 2025-08-07 16:53:45 +02:00
Boris Nagaev
c22768283c walletrpc: allow conf_target=1 in FundPsbt
Modified 'fund_psbt' itest to test this scenario.
2025-08-01 17:16:02 -03:00
Boris Nagaev
b0e9a4b79f walletrpc: allow conf_target=1 in EstimateFee
See https://github.com/lightningnetwork/lnd/pull/9611#issuecomment-3082770038
2025-08-01 17:15:09 -03:00
MPins
0146e374fd lnrpc: add the deletecanceledinvoice rpc call 2025-07-25 21:09:18 -03:00
Oliver Gugger
6b1c85265f lnrpc+rpcserver: add QoL flag for permission check
To make it even more obvious that by default the permissions to check
aren't taken from the full method provided, we add a new flag that does
that on request.
2025-07-21 13:07:43 +02:00
Oliver Gugger
66340500e9 lnrpc+rpcserver: improve docs for CheckMacaroonPermissions
Fixes #10026.
2025-07-21 13:06:25 +02:00
Boris Nagaev
643fbb8af6 multi: update Go to 1.23.10 2025-07-16 01:19:58 -03:00
Abdullahi Yunus
7faf20bd56 lnrpc: deprecate OutgoingChanId
In this commit we deprecate the OutgoingChanId field in the
QueryRoutes in favor of OutgoingChanIds.
2025-07-15 18:42:56 +01:00
Abdullahi Yunus
e3838c5dd2 routerrpc: use multiple chanids in route request
In this commit we allow for setting more than one outgoing chan ids
to the restrictions of in router's query route request.
2025-07-15 18:42:23 +01:00
Abdullahi Yunus
51882e130f lnrpc: add outchan ids to proto 2025-07-15 18:34:24 +01:00
Oliver Gugger
f5b27bf057 lnrpc+rpcserver: add missing channel update event type
Fixes the error "unexpected channel event update" in
SubscribeChannelEvents.
2025-07-15 17:12:17 +02:00
yyforyongyu
43ea309f2c lnrpc: update description for RoutingPolicy.CustomRecords 2025-07-01 19:59:51 +08:00
Elle
e8213dbc44 Merge pull request #9752 from erickcestari/reject-payment-without-invoice
routerrpc: reject payment to invoice that don't have payment secret or blinded paths
2025-06-30 13:11:36 +02:00
Oliver Gugger
e75c82e25a Merge pull request #9988 from starius/remove-used-proto-message
lnrpc: remove unused type ConfirmationUpdate
2025-06-26 17:15:18 +02:00
Elle Mouton
b41a079901 multi: use relaxed feature bit Set method for peer features
The spec says: `The origin node MUST NOT set both the optional and
mandatory bits`. and so this is why we have the SafeSet method which
prevents us from accidentally setting both optional and required bits
for any of our own feature bits. But the spec then also says `if both
the optional and the mandatory feature bits in a pair are set, the
feature should be treated as mandatory.` which means that when we read
the feature vectors of our peers or from a payment request, we should be
a bit less strict and not error out. We should just set both bits which
will result in "IsRequired" returning true.

Update the `TestExtractIntentFromSendRequest` test to show the new
behaviour.
2025-06-25 13:14:31 +02:00
Elle Mouton
9ee3bebc6a lnrpc: add test case to TestExtractIntentFromSendRequest
Here we add a test case to TestExtractIntentFromSendRequest which shows
that an error is returned if the destination feature bit vector of a
payment request contains both the required and optional bits for a given
feature. This will be updated in an upcoming commit to be less strict.
2025-06-25 13:10:48 +02:00
ziggie
43edfeb101 routerrpc: rename var and add more comments 2025-06-25 10:37:06 +02:00
ziggie
fd7f6caa4a routerrpc: add log line for probing the invoice request 2025-06-25 10:37:05 +02:00
Boris Nagaev
5dcafeca19 lnrpc: remove unused type ConfirmationUpdate
The type is not used since 237f2b6d4b
2025-06-24 15:28:33 -03:00
Erick Cestari
118e0a99c1 routerrpc: reject invoices missing secret/path
Ensure that a payment is only sent if the invoice includes either a
payment address (payment secret) or at least one blinded path.
2025-06-20 09:23:09 -03:00
Erick Cestari
c01a66783f routerrpc: inject clock for testable expiry validation
Refactors payment request expiry validation to use an injected clock
dependency instead of calling time.Now() directly.
2025-06-20 09:23:02 -03:00
Boris Nagaev
7a70dcb36e lnrpc: add auth_proof to graph APIs
Added flag include_auth_proof to DescribeGraph, GetNodeInfo, GetChanInfo
and the corresponding lncli commands. With the flag, these APIs add AuthProof
(signatures from the channel announcement) to the returned ChannelEdge.

This is useful to extract this data from the DB.
2025-06-19 18:19:33 -03:00
Elle Mouton
81c063eb96 graph/db: thread context through to UpdateEdgePolicy 2025-06-19 14:49:31 +02:00
Elle Mouton
3fdb9b84f4 graph/db: thread context to AddChannelEdge 2025-06-19 14:47:41 +02:00
Elle Mouton
65049ddd02 graph/db: thread context through to SetSourceNode 2025-06-19 14:47:40 +02:00
Elle Mouton
d1cfb47428 graph/db: thread context to AddLightningNode 2025-06-17 19:20:27 +02:00
Shivam Chawla
bfe1edf4ec lnrpc: add filters to forwardhistoryrequest
This commit adds incoming and outgoing channel ids filter to forwarding history request to filter events received/forwarded from/to a particular channel
2025-06-11 09:10:13 +05:30
Abdullahi Yunus
a0634e4ade lnd+lnrpc: update fwdinghistory message
In this commit we update the returned message for fwdinghistory
to include the htlcindex for all forwarded htlcs.
2025-06-06 12:21:46 +01:00
Oliver Gugger
fc906f2a65 Merge pull request #9127 from MPins/issue-8993
Add the option on path creator to specify the incoming channel on blinded path
2025-06-05 08:47:05 +02:00
Elle Mouton
95d34be0d3 autopilot: revert passing ctx to Start methods 2025-05-22 14:14:40 +02:00
Elle Mouton
3f218dfbbe autopilot: update AttachmentHeuristics with context
Continue threading context through the autopilot system and remove the
remaining context.TODOs.
2025-05-22 14:14:38 +02:00