Commit Graph
52 Commits
Author SHA1 Message Date
George Tsagkarelis 2f8697152b lnd: provide aux closer to chain arbitrator
The final step is to provide the aux closer to the corresponding configs
from the server.
2025-12-04 12:18:46 +01:00
George Tsagkarelis 9a88999c41 contractcourt+lnwallet: move aux close finalization to chain watcher
We now execute the aux chan closer finalization within the chain
watcher. This is better as we don't need to rely on the remote party
being online and sending us a message. Instead we do the finalization
once the on-chain transaction has been confirmed.
2025-12-04 12:18:14 +01:00
George Tsagkarelis fd772d45b8 contractcourt: add aux chan closer to chain watcher 2025-12-04 12:17:40 +01:00
George Tsagkarelis e12008517e lnwallet+peer: extract close types to separate pkg
The aux close types will soon be used by a different package that would
otherwise cause an import cycle if used directly from
lnwallet/chancloser. We now create a new sub-package lnwallet/types that
will be improrted from all users of these types.
2025-12-04 12:16:54 +01:00
George Tsagkarelis e7f7fe418b docs: add release note 2025-09-25 11:15:31 +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
George Tsagkarelis 2302debd6c docs: add release note 2025-09-23 19:05:47 +02:00
George Tsagkarelis a58a52ee35 funding: notify aux negotiator on ChannelReady
We notify the aux channel negotiator that an established channel is now
ready to use.
2025-09-23 19:05:47 +02:00
George Tsagkarelis be4134553f lnwallet: include peer pub key in aux chan state
In order to help external components to query the custom records of a
channel we need to expose the remote peer pub key. We could look-up
custom records based on the funding outpoint, but that relation is
established when receiving the ChannelReady message. The external
components may query the AuxChanState before that message is received,
so let's make sure the peer pub key is also available.
2025-09-23 19:05:47 +02:00
George Tsagkarelis 6dff1bd5de htlcswitch+peer: set and read aux custom records
This is the final step, we actually call the interface and either
provide or retrieve the custom features over the message. We also notify
the aux components when channel reestablish is received.
2025-09-23 19:05:46 +02:00
George Tsagkarelis 68bd35f7ad lnwire: update tests for init message 2025-09-23 19:05:46 +02:00
George Tsagkarelis 7724d0fa6d lnwire: add custom records to init
Before calling the new interface we first add the ability for the peer
message itself to encode the new data records.
2025-09-23 19:02:59 +02:00
George Tsagkarelis 56c56060aa lnd: add AuxChannelNegotiator to AuxComponents
We now plug-in the aux channel negotiator to the server impl config. We
also provide it to the peer config as that's where it's needed in order
to inject custom records in the appropriate peer messages.
2025-09-23 19:02:59 +02:00
George Tsagkarelis 44406db82a lnwallet: introduce AuxChannelNegotiator interface
We introduce this new interface with the purpose of injecting and
handling custom records on the init message, and also notifying
external components when receiving the ChannelReady or
ChannelReestablish message.
2025-09-23 19:02:57 +02:00
George Tsagkarelis 97bbbf14f9 docs: update release notes for NoOp HTLCs 2025-08-08 20:03:30 +02:00
George Tsagkarelis 47d1365fde lnwallet: add table-driven test for evaluateNoOpHtlc helper 2025-08-08 20:03:30 +02:00
George Tsagkarelis 4a34f78fba lnwallet: add noop case to retransmit test
To make sure we don't cause force-closures because of commit sig
mismatches, we add a test case to verify that the retransmitted HTLC
matches the original HTLC.
2025-08-08 20:03:30 +02:00
George Tsagkarelis e0486697df lnwallet: add noop HTLC tests
Adds some simple tests to check the noop HTLC logic of the lightning
channel.
2025-08-08 20:03:30 +02:00
George Tsagkarelis a5a15f6401 lnwallet: detect and handle noop HTLCs
We update the lightning channel state machine in some key areas. If the
noop TLV is set in the update_add_htlc custom records then we change the
entry type to noop. When settling the HTLC if the type is noop we credit
the satoshi amount back to the sender.
2025-08-08 20:03:30 +02:00
George Tsagkarelis aacefb9055 lnwallet: add IsAdd helper to AuxHtlcDescriptor
We also add the IsAdd helper to the AuxHtlcDescriptor, as external
software using the aux framework might want to know which type of HTLC
this is.
2025-08-08 20:03:29 +02:00
George Tsagkarelis 138b716519 lnwallet: add noop updateType to paymendDescriptor
We add a new update type to the payment descriptor to describe this new
type of htlc. This type of HTLC will only end up being set if explicitly
signalled by external software.
2025-08-08 20:03:27 +02:00
George Tsagkarelis 9ef92d9ffd docs: add release note 2025-07-02 14:35:43 +02:00
George Tsagkarelis 4ad84627e1 htlcswitch+routing: PaymentBandwidth accepts channel peer pubkey argument 2025-07-02 12:09:24 +02:00
George Tsagkarelis 1793b1ab64 routing+htlcswitch: ProduceHtlcExtraData uses first hop pub key 2025-07-02 12:03:34 +02:00
George Tsagkarelis d0ef248ae2 htlcswitch: add HtlcView as PaymentBandwidth argument
In order to get more precise bandwidth reports, we also need to provide
this method with the latest htlc view. Since aux data is committed to in
the channel commitment, some uncommited HTLCs may not be accounted for,
so we need to manually provide them via the HTLC view.
2025-04-14 15:42:28 +02:00
George Tsagkarelis 53254c79b4 lnwallet: add FetchLatestHTLCView to LightningChannel
We add a public method for the lightning channel to expose the latest
HtlcView. This is used in a follow up commit by the channel link.
2025-04-14 15:34:09 +02:00
George Tsagkarelis a279058408 lnwallet: replace HtlcView with AuxHtlcView in existing code 2025-04-14 15:34:09 +02:00
George Tsagkarelis b96d57e88f lnwallet: add AuxHtlcView 2025-04-14 15:34:09 +02:00
George Tsagkarelis 231dd6b464 contractcourt: include custom records on replayed htlc
When notifying the invoice registry for an exit hop htlc we also want to
include its custom records. The channelLink, the other caller of this
method, already populates this field. So we make sure the contest
resolver does so too.
2024-12-16 10:29:27 +01:00
George Tsagkarelis c1f5908d9d docs: update release notes for fundpsbt max_fee_ratio 2024-11-05 19:56:39 +01:00
George Tsagkarelis b51dde7af8 cmd: expose max_fee_ratio to fundpsbt command 2024-11-05 19:56:38 +01:00
George Tsagkarelis 55c3da3d13 lnwallet+lnrpc: use maxFeeRatio across coin selection tests 2024-11-05 19:56:37 +01:00
George Tsagkarelis f2b76325d4 lnrpc: add maxFeeRatio to FundPsbtRequest 2024-11-05 19:56:36 +01:00
George Tsagkarelis a72dae314c lnwallet: use new maxFeeRatio for sanityCheckFee func 2024-11-05 19:55:07 +01:00
George Tsagkarelis 4b1bb102bf invoices: cancel htlc on HtlcModify signal 2024-10-24 12:59:29 +02:00
George Tsagkarelis 1c17356fdc lnrpc+invoices: add cancelSet to HtlcModifier interface 2024-10-24 12:59:28 +02:00
George Tsagkarelis f2adabb989 docs: update release notes 2024-10-02 18:10:12 -07:00
George Tsagkarelis d1a2dd6bd0 routing: add htlcAmt to PaymentBandwidth method of TlvTrafficShaper
This commit was added to the 0-19-staging branch recently and therefore
didn't make it into a previous part yet. So it's unrelated to the
changes in this part but is required for the whole custom channel saga.
2024-10-02 18:09:46 -07:00
George Tsagkarelis 427d41dc1e itest: add interceptor and first hop data tests 2024-09-05 18:00:53 +02:00
George Tsagkarelis aa17543d23 routing: use first hop records on path finding 2024-09-05 18:00:53 +02:00
George Tsagkarelis c39143052e lnd: use impl cfg TlvTrafficShaper 2024-09-05 18:00:52 +02:00
George Tsagkarelis 5b4de5f0d4 routing: add TlvTrafficShaper to bandwidth hints 2024-09-05 18:00:52 +02:00
George Tsagkarelis 5dcda25881 htlcswitch: expose custom channel blob from link 2024-09-05 18:00:49 +02:00
George Tsagkarelis 5cb68a59c5 lnwallet: expose commitment blob from channel 2024-09-05 11:18:17 +02:00
George Tsagkarelis 42e358e3d3 lnrpc: add wire records fields to payment+interceptor RPCs 2024-09-05 11:18:16 +02:00
George Tsagkarelis 878f964a33 multi: use wire records on payment and intercept flows 2024-09-05 11:18:16 +02:00
George Tsagkarelis 705e567357 itest: add dynamic scid alias routing test 2024-09-05 10:29:42 +02:00
George Tsagkarelis 70f82bc4ff routerrpc: add XAddLocalChanAliases & XDeleteLocalChanAliases 2024-09-05 10:29:42 +02:00
George Tsagkarelis ea92d0aecc multi: refresh htlcswitch aliases on aliasmgr update 2024-09-05 08:44:32 +02:00
George Tsagkarelis e31cdc4db3 aliasmgr: add delete local alias method 2024-09-05 08:44:32 +02:00
George Tsagkarelis dd93fc2539 routing: log node pubkey as hex 2023-04-25 21:27:24 +03:00