Commit Graph

1026 Commits

Author SHA1 Message Date
George Tsagkarelis
42e358e3d3
lnrpc: add wire records fields to payment+interceptor RPCs 2024-09-05 11:18:16 +02:00
George Tsagkarelis
70f82bc4ff
routerrpc: add XAddLocalChanAliases & XDeleteLocalChanAliases 2024-09-05 10:29:42 +02:00
Olaoluwa Osuntokun
cc9e2b783e
Merge pull request #8961 from yyforyongyu/fix-leaseoutput
Improve the performace of `LeaseOutput`
2024-08-21 16:31:26 -07:00
MPins
cde5c5b59d lnd: Update the DebugLevel on main cfg 2024-08-14 14:42:49 -03:00
yyforyongyu
d7381ce3fe
rpcserver: remove redundant call to FetchInputInfo 2024-08-09 22:01:56 +08:00
Elle Mouton
5e84ba92af
multi: add IsBlinded to lnrpc.Invoice for nicer UX
The BlindedPathConfig struct is nice for invoice creation but when we
use the Invoice message for viewing an invoice, it would be nicer to see
an "is_blinded" field.
2024-08-08 16:46:01 +02:00
Elle Mouton
48a9a8d20e
zpay32: add functional opt to error out on unknown feature bit
This commit adds two functional options to the zpay32.Decode function.
`WithKnownFeatureBits` allows the caller to overwrite the default set of
known feature bits used by the function.
`WithErrorOnUnknownFeatureBit` allows the caller to instruct the
function to error out if the invoice that is decoded contaijns unknown
feature bits. We then use this new error-out option from the
`rpcServer`'s `extractPaymentIntent` method.
2024-08-07 17:03:12 +02:00
Elle Mouton
e4619afc08
multi: add node omission list for blinded paths 2024-08-07 17:03:11 +02:00
Elle Mouton
3de6c5415a
multi: let blinded path invoice options be set per addinvoice call
Extend the configurability of blinded paths in invoices by adding the
ability to change the global config options on a per-RPC basis.
2024-08-07 17:02:55 +02:00
Elle Mouton
ca91e17115
invoicesrpc: move blinded path config to AddInvoiceData
since `AddInvoiceData` is config _per invoice_ where as `AddInvoiceConfig`
is config for the invoice server itself and so pretty much should stay
the same for the lifetime of LND. This change sets us up for moving some
of the blinded path config options to be changeable per AddInvoice call
rather that having fixed config values in the config file.
2024-08-07 17:01:21 +02:00
Ononiwu Maureen
b50a1e6360
lnd: modify sendcoin rpc impl for select utxos
Signed-off-by: Ononiwu Maureen <59079323+Chinwendu20@users.noreply.github.com>
2024-08-07 20:42:28 +08:00
Ononiwu Maureen
13bad2c20c
sweep: Add selectUtxos to CraftSweepAllTx args 2024-08-07 20:42:28 +08:00
Ononiwu Maureen
99339f706f
multi: expand SendOutputs and CreateSimpleTx to take utxos
This commit updates the interface methods from
`lnwallet.WalletController` to take optional input set which can be used
to create the tx.
2024-08-07 20:42:27 +08:00
Elle Mouton
4a22ec8413
routing: pass BlindedPaymentPathSet around everywhere
Building on from the previous commit, here we pass the PathSet around
everywhere where we previously passed around the single BlindedPayment.
2024-07-31 09:14:28 +02:00
Elle Mouton
3d5f20b70f
multi: introduce BlindedPaymentPathSet
This commit introduces a new type, `BlindedPaymentPathSet`. For now, it
holds only a single `BlindedPayment` but eventually it will hold and
manage a set of blinded payments provided for a specific payment. To
make the PR easier to follow though, we start off just letting it hold a
single one and do some basic replacements.
2024-07-31 09:11:49 +02:00
Olaoluwa Osuntokun
9decf80a68
Merge pull request #8735 from ellemouton/rb-receives
[2/4] Route Blinding Receives: Receive and send to a single blinded path in an invoice.
2024-07-29 19:00:06 -07:00
Oliver Gugger
b7c59b36a7
Merge pull request #8896 from ziggie1984/batchopen-feerate-fix
Fix batchopen fee calculation
2024-07-26 05:52:48 -06:00
Elle Mouton
c490279002
blindedpath: smarter dummy hop policy selection
This commit introduces more sophisticated code for selecting dummy hop
policy values for dummy hops in blinded paths.

For the case where the path does contain real hops, the dummy hop policy
values are derived by taking the average of those hop polices. For the
case where there are no real hops (in other words, we are the
introduction node), we use the default policy values used for normal
ChannelUpdates but then for the MaxHTLC value, we take the average of
all our open channel capacities.
2024-07-26 13:03:07 +02:00
ziggie
d0a7765c68
rpcserver: include fee calc. for psbt flow.
Include the fee calculaltion for the psbt flow. Moreover include
fee rate testing in the itest environment.
2024-07-26 10:48:00 +02:00
Elle Mouton
398623bde5
blindedpath: move blinded path logic to own pkg 2024-07-26 09:54:59 +02:00
Elle Mouton
735d7d9738
multi: send to a blinded path in an invoice
Update the SendPayment flow so that it is able to send to an invoice
containing a blinded path.
2024-07-26 09:54:37 +02:00
Elle Mouton
de975334cd
multi: add blinded paths to invoices
Expose the ability to add blinded paths to an invoice. Also expose
various configuration values.

We also let the lncfg.Invoices struct satisfy the Validator interface so
that we can verify all its config values in one place.
2024-07-26 09:54:17 +02:00
yyforyongyu
d992cf94d6
multi: add SpewLogClosure to avoid code repetition 2024-07-25 22:18:49 +08:00
yyforyongyu
b6049ff94b
multi: add NewLogClosure in lnutils to avoid repetition
And replaces all usage of `logClosure` with `lnutils.LogClosure`.
2024-07-25 21:25:23 +08:00
Elle Mouton
fe34d62eb1
graph+routing: address linter errors
This is done in a separate commit so as to keep the original code-move
commit mostly a pure code move.
2024-07-15 15:56:33 +02:00
Elle Mouton
7f1be39d45
refactor: move various duties from ChannelRouter to graph.Builder
This commit is a large refactor that moves over various responsibilities
from the ChannelRouter to the graph.Builder. These include all graph
related tasks such as:
- graph pruning
- validation of new network updates & persisting new updates
- notifying topology update clients of any changes.

This is a large commit but:
- many of the files are purely moved from `routing` to `graph`
- the business logic put in the graph Builder is copied exactly as is
  from the ChannelRouter with one exception:
- The ChannelRouter just needs to be able to call the Builder's
  `ApplyChannelUpdate` method. So this is now exported and provided to
the ChannelRouter as a config option.
- The trickiest part was just moving over the test code since quite a
  bit had to be duplicated.
2024-07-15 15:56:33 +02:00
Elle Mouton
e9c89ae0ec
multi+refactor: create ForEachNodeChannel with no tx param
In prep for a clean Graph DB interface, we add a version of
ForEachNodeChannel that does not take in an existing db transaction.
2024-07-15 15:13:58 +02:00
Elle Mouton
c20d759d41
refactor: create FetchLightningNode with no tx param
In preparation for adding a clean Graph DB interface, we create a
version of FetchLightningNode that doesnt allow a caller to provide in a
transaction.
2024-07-15 15:13:57 +02:00
Elle Mouton
8c0df98439
multi: add abstraction for Router and SessionSource graph access
In this commit, we completely remove the Router's dependence on a Graph
source that requires a `kvdb.RTx`. In so doing, we are more prepared for
a future where the Graph source is backed by different DB structure such
as pure SQL.

The two areas affected here are: the ChannelRouter's graph access that
it uses for pathfinding. And the SessionSource's graph access that it
uses for payments.

The ChannelRouter gets given a Graph and the SessionSource is given a
GraphSessionFactory which it can use to create a new session. Behind the
scenes, this will acquire a kvdb.RTx that will be used for calls to the
Graph's `ForEachNodeChannel` method.
2024-07-15 15:13:57 +02:00
Elle Mouton
90d6b863a8
routing+refactor: remove the need to give CachedGraph source node access
In preparation for the next commit.
2024-07-15 13:10:24 +02:00
Elle Mouton
93f89512ae
lnrpc+rpcserver: Add blinded payment paths to PayReq
This commit adds a blinded_paths field to the PayReq proto message. A
new helper called `CreateRPCBlindedPayments` is then added to convert
the zpay32 type to the existing `lnrpc.BlindedPaymentPath` type and add
this to the `PayReq` in the `DecodePayReq` rpc method.
2024-07-10 17:51:55 +02:00
Oliver Gugger
931b3dc0c3
Merge pull request #8815 from yyforyongyu/fix-edge-policy
trivial: fix linter errors and return verbose errors
2024-06-10 12:48:59 -06:00
yyforyongyu
e61cba8d22
multi: return verbose errors when fetching edges 2024-06-10 08:40:18 +08:00
yyforyongyu
78cc1619d7
multi: fix complaints from IDE and linter
Fixed unused param and nilness cond.
2024-06-07 00:45:15 +08:00
Slyghtning
7923ca0de4
rpcserver: retrieve channel info for channel point 2024-06-06 13:37:58 +02:00
feelancer21
f62c00fe34
multi: Inbound fees are retained when not provided
Fixes the problem that inbound base fee and fee rate are overwritten
with 0 if they are not specified in PolicyUpdateRequest. This ensures
backward compatibility with older rpc clients that do not yet support
the inbound feature.
2024-05-22 20:48:42 +02:00
Bufo
af9858c3ed
feat: add inbound fees to channel notifications 2024-05-07 18:58:25 +02:00
Oliver Gugger
3d56ffd0e4
Merge pull request #8662 from fuyangpengqi/master
chore: fix function names in comment
2024-04-29 15:10:20 +02:00
fuyangpengqi
5f22d97b51 chore: fix function names in comment
Signed-off-by: fuyangpengqi <995764973@qq.com>
2024-04-27 00:04:09 +08:00
yyforyongyu
d0441a2a29
multi: add default conf targt in SendCoins/SendMany/OpenChannel/CloseChannel 2024-04-26 10:42:44 +08:00
Mohamed Awnallah
5c3015b223
rpcserver: validate DeleteAllPayments options 2024-04-24 18:48:57 +02:00
ziggie
b954ee4c72
rpcserver: allow unconf. inputs for psbt shim.
Allow unconfirmed inputs to be used when funding a channel via
the psbt channel opening flow. We do now check for unstable utxos.
2024-04-24 13:58:20 +01:00
Olaoluwa Osuntokun
7af195768a
Merge pull request #8667 from lightningnetwork/elle-new-sweeper
Merge new sweeper branch to master
2024-04-22 11:20:49 -07:00
Oliver Gugger
73fd389e9a
Merge pull request #8627 from feelancer21/inbound-fees-reject
lnrpc: rejects positive inbound fees by default
2024-04-22 01:56:02 -06:00
feelancer21
a2319e4313 lnrpc: rejects positive inbound fees by default
Positive inbound are now rejected by default. The user can enable positive
inbound fees with the option 'accept-positive-inbound-fees'.
2024-04-20 00:11:36 +02:00
yyforyongyu
61e9c11881
rpcserver: skip calculating fee rate for PSBT funding 2024-04-19 21:33:22 +08:00
yyforyongyu
530eed92a0
multi: rename FeePreference to FeeEstimateInfo
Results from running,
```
gofmt -d -w -r 'FeePreference -> FeeEstimateInfo' .
```
2024-04-19 21:33:21 +08:00
yyforyongyu
6ff6c86155
multi: merge DetermineFeePerKw and Estimate
This commit moves `DetermineFeePerKw` into the `Estimate` method on
`FeePreference`. A few callsites previously calling `DetermineFeePerKw`
without the max fee rate is now also temporarily fixed by forcing them
to use `Estimate` with the default sweeper max fee rate.
2024-04-19 21:33:21 +08:00
Oliver Gugger
648fb22f63
multi: wrap all errors 2024-04-11 15:04:03 +02:00
Oliver Gugger
b1175514f9
Merge pull request #8515 from mohamedawnallah/add-coin-selection-strategy-on-chain-rpc
coin select: add coin selection strategy option to all on-chain RPCs
2024-04-02 11:20:08 +00:00