16577 Commits

Author SHA1 Message Date
Oliver Gugger
7953d67dbc
lnrpc: fix incorrectly removed field 2024-05-14 20:05:57 +02:00
Oliver Gugger
b811f3e6c9
multi: remove custom data from openchannel RPC 2024-05-14 09:03:47 +02:00
Olaoluwa Osuntokun
cd0e15fd73 htlcswitch: allow custom HTLCs to bypass the amt to fwrd check
As this is a exit hop HTLC, we'll rely on the decision from the invoice registry to decide if we should continue or not.
2024-05-07 21:31:41 -07:00
ffranr
3b8a3fac10
invoicesrpc: add InvoiceAcceptor RPC endpoint and acceptor RPC server
This commit introduces a singleton invoice acceptor RPC server and
an endpoint to activate it. The server interfaces with the internal
invoice settlement interpreter, handling the marshalling between RPC
types and internal formats.

Named "acceptor," it allows clients to accept invoice settlements, but
not to reject them.
2024-05-07 21:55:54 +02:00
ffranr
260b7a7af4
invoicesrpc: add settlement interceptor to invoices RPC server
This commit integrates the settlement interceptor service into the
invoices RPC server.
2024-05-07 21:55:54 +02:00
ffranr
dba195a890
lnd: initialize invoice settlement interceptor at server startup
This commit initiates the invoice settlement interceptor during the
main server startup, assigning it a handle within the server.
2024-05-07 21:55:54 +02:00
ffranr
692395591a
invoices: integrate settlement interceptor with invoice registry
This commit updates the invoice registry to utilize the settlement
interceptor during the invoice settlement routine. It allows the
interceptor to capture the invoice, providing interception clients an
opportunity to determine the settlement outcome.
2024-05-07 21:55:54 +02:00
ffranr
974b34bde6
invoices: add SkipAmountCheck field to invoiceUpdateCtx type
This commit introduces the `SkipAmountCheck` field to the
`invoiceUpdateCtx` type. This field serves as a flag to determine
whether to bypass the amount verification during the invoice settlement
process. It is set based on the client's input, allowing the invoice to
be settled even if the HTLC amount is less than the stated invoice
amount.
2024-05-07 21:55:53 +02:00
ffranr
a7d25a4497
invoices: add invoice settlement interceptor service
This commit introduces a new invoice settlement interceptor service
that intercepts invoices during their settlement phase. It forwards
invoices to subscribed clients to determine their settlement outcomes.

This commit also introduces an interface to facilitate integrating the
interceptor with other packages.
2024-05-07 21:55:53 +02:00
Oliver Gugger
8a4531fc96
multi: fix up custom records 2024-05-07 21:54:11 +02:00
Oliver Gugger
a7fa041a0b
cmd: export AddInvoiceCommand 2024-05-06 15:49:03 +02:00
Oliver Gugger
b4be8c24f6
lnd+config_builder: add DependenciesReceiver 2024-05-06 15:02:07 +02:00
George Tsagkarelis
166be912c1
multi: refresh htlcswitch aliases on aliasmgr update 2024-05-06 15:00:32 +02:00
George Tsagkarelis
ca5f034ee0
aliasmgr: add delete local alias method 2024-05-06 15:00:32 +02:00
Oliver Gugger
b93fee2f06
rpcserver+config_builder: add AuxDataParser 2024-05-06 15:00:32 +02:00
Oliver Gugger
d5b1f57116
multi: add incoming htlc amount to interceptor 2024-05-03 17:33:59 +02:00
Oliver Gugger
17a05186d3
multi: fixes to tlv traffic shaper 2024-05-03 17:33:45 +02:00
George Tsagkarelis
4c7d2d4e99
routing: invoke htlc ExtraData producer on update_add_htlc 2024-05-02 20:32:37 +02:00
George Tsagkarelis
309a1564d0
routing: use first hop records on path finding 2024-05-02 20:32:37 +02:00
George Tsagkarelis
d0e41b4409
lnd: use impl cfg TlvTrafficShaper 2024-05-02 20:32:37 +02:00
George Tsagkarelis
57e975be6d
routing: add TlvTrafficShaper to bandwidth hints 2024-05-02 20:32:36 +02:00
George Tsagkarelis
4a4724dc12
htlcswitch: expose custom channel blob from link 2024-05-02 20:32:36 +02:00
George Tsagkarelis
4b020caac7
itest: add interceptor wire records access test 2024-05-02 20:32:36 +02:00
George Tsagkarelis
44427a7467
htlcswitch+lnwallet: persist peer custom records 2024-05-02 20:32:36 +02:00
George Tsagkarelis
995f1fe53d
lnrpc: add wire records to intercept request 2024-05-02 20:32:36 +02:00
ffranr
ab9b3c95b0
itest: add itest for field modification HTLC interception response
Implement an integration test where an HTLC is intercepted and the
interception response modifies fields in the resultant p2p message.
2024-05-02 20:32:36 +02:00
ffranr
25d8cd95da
routerrpc: extend HTLC forward interceptor resp with modification fields
This commit extends the forward HTLC intercept response with fields that
can be used in conjunction with a `ResumeModified` action to modify the
intercepted HTLC p2p message.
2024-05-02 20:32:36 +02:00
ffranr
1f857ee950
htlcswitch: add resume modified HTLC action to switch
Introduce `ResumeModified` action to resume standard behavior of a p2p
message with optional modifications as specified by the client during
interception.
2024-05-02 20:32:35 +02:00
ffranr
fb2f9a0531
lnwire: add encoding/decoding unit tests for UpdateAddHtlc message 2024-05-02 20:32:35 +02:00
ffranr
ba043fa1d1
lnwire: add custom records field to type UpdateAddHtlc
- Introduce the field `CustomRecords` to the type `UpdateAddHtlc`.
- Encode and decode the new field into the `ExtraData` field of
  the `update_add_htlc` wire message.
2024-05-02 20:32:35 +02:00
ffranr
7c2d6586b8
lnwire: add type CustomRecords
This commit introduces the `CustomRecords` type in the `lnwire` package,
designed to hold arbitrary byte slices. Each entry in this map can
associate with TLV type values that are greater than or equal to 65536.
2024-05-02 20:32:35 +02:00
ffranr
267cfa2118
htlcswitch: add missing method doc 2024-05-02 20:32:35 +02:00
ffranr
9da4addbf1
multi: improve comment grammar 2024-05-02 20:32:35 +02:00
Oliver Gugger
e9f2f169e2
gissiper: only set tapscript root if optional fields available 2024-05-02 19:14:05 +02:00
Oliver Gugger
fb2a9026f3
cmd/commands: export StripPrefix 2024-05-02 14:38:13 +02:00
Oliver Gugger
3ba83dd111
funding: add ChannelReady hook 2024-05-02 10:01:07 +02:00
Olaoluwa Osuntokun
82a969bba5 multi: hook up protofsm to logging 2024-05-01 23:30:56 -05:00
Olaoluwa Osuntokun
bdfd79425b tlv: generate types for the custom message range
We generate the first 100 custom messages. For anything beyond this, a custom struct can be created.
2024-05-01 00:43:03 -05:00
Olaoluwa Osuntokun
1bac89dda7 lnwallet: copy over the HTLC extra data in commit diff 2024-05-01 00:41:43 -05:00
Olaoluwa Osuntokun
53117548de htlcswitch: properly set AuxSigBlob 2024-05-01 00:40:37 -05:00
Oliver Gugger
8d5d15904b
lnwallet: don't flip local/remote leaves 2024-04-29 21:28:05 +02:00
Oliver Gugger
0af8ce4c54
lnwallet: set NextHeight in HtlcView 2024-04-29 19:13:51 +02:00
Olaoluwa Osuntokun
9795a7856b lnwallet: add NextHeight to HtlcView 2024-04-27 18:14:17 -07:00
Olaoluwa Osuntokun
3f4fa79cf5 multi: add tapscript root to chan ann (temp)
Needed so the router can validate the musig2 output w/ a custom tweak.
2024-04-26 20:14:52 -07:00
Olaoluwa Osuntokun
2ba7a531ae record: temp disable record validation
Existing code relies on the TLV value in the HTLC being zero, which
needs to change.
2024-04-26 19:17:47 -07:00
Olaoluwa Osuntokun
d221298b56 cmd: export payment related CLI structs+funcs 2024-04-26 17:09:48 -07:00
Olaoluwa Osuntokun
7c69966cf3 fixup! routing: add first hop TLVs to ExtraData 2024-04-26 16:40:54 -07:00
Olaoluwa Osuntokun
cf80b7cd9c
routing: add first hop TLVs to ExtraData 2024-04-26 16:39:56 -07:00
George Tsagkarelis
cbdcdac213 routing: encode first hop records in update_add_htlc message 2024-04-26 16:13:31 -07:00
George Tsagkarelis
3a53b16549 lnrpc: add first hop records field to SendPayment 2024-04-26 16:13:03 -07:00