Commit Graph

1081 Commits

Author SHA1 Message Date
82b7891e2d rpcserver: add custom channel data to pending channels
The pending force close and pending waiting close channels didn't have
their custom channel data populated yet.
2025-03-27 12:38:49 -05:00
bab5cabd90 lnrpc+rpcserver: add custom channel data for closed channels
This commit adds the custom channel data for closed channels which
represents the initial funding state as well as the final balances at
closing time.
2025-03-27 12:38:47 -05:00
43409c7840 rpcserver: use HtlcIndex as the unique key 2025-03-26 18:24:47 +08:00
70dec8e169 lnd: log sync status in GetInfo
This is added to fix a flake found in starting the node.
2025-03-26 18:24:47 +08:00
44161a3643 Merge pull request #9631 from hieblmi/degrade-err
rpcserver: warn if sendcoins default conf target is used
2025-03-25 08:09:11 -06:00
2221aaa889 graph/db: move Topology client management to ChannelGraph
We plan to later on add an option for a remote graph source which will
be managed from the ChannelGraph. In such a set-up, a node would rely on
the remote graph source for graph updates instead of from gossip sync.
In this scenario, however, our topology subscription logic should still
notify clients of all updates and so it makes more sense to have the
logic as part of the ChannelGraph so that we can send updates we receive
from the remote graph.
2025-03-24 15:05:48 +02:00
06c7cd82e9 rpcserver: warn if sendcoins default conf target is used 2025-03-24 13:20:47 +01:00
0892b595dd lnrpc+rpcserver: add new field LockedIn for HTLCs
In this commit, we add a new field `LockedIn` on HTLCs so it can be used
to decide whether an HTLC found on the local commitment has been
committed on the remote commitment.
2025-03-21 03:25:23 +08:00
3a18bf088c multi: enable RBF co-op bumps after reconnection
In this commit, we alter the existing co-op close flow to enable RBF
bumps after re connection. With the new RBF close flow, it's possible
that after a success round _and_ a re connection, either side wants to do
another fee bump. Typically we route these requests through the switch,
but in this case, the link no longer exists in the switch, so any
requests to fee bump again would find that the link doesn't exist.

In this commit, we implement a work around wherein if we have an RBF
chan closer active, and the link isn't in the switch, then we just route
the request directly to the chan closer via the peer. Once we have the
chan closer, we can use the exact same flow as prior.
2025-03-18 11:44:21 -05:00
81d34c4ac2 peer+rpc: set new rbf coop close rbf update fields 2025-03-18 11:44:20 -05:00
bf3007a2ce multi: thread thru RPC caller context from CloseChannel 2025-03-18 11:44:20 -05:00
4569c07e08 multi: Add itest for funding timeout
This commit adds an integration test that
verifies the funding timeout behavior in the
funding manager, in dev/integration test.
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-03-07 21:32:38 +05:30
1227eb1cce Merge pull request #9491 from ziggie1984/closechannel-rpc
Allow coop closing a channel with HTLCs on it via lncli
2025-02-21 05:05:53 -06:00
f458844412 lnd: add max fee rate check to closechannel rpc 2025-02-20 17:43:18 +01:00
59443faa36 multi: coop close with active HTLCs on the channel
For the lncli cmd we now always initiate the coop close even if
there are active HTLCs on the channel. In case HTLCs are on the
channel and the coop close is initiated LND handles the closing
flow in the background and the lncli cmd will block until the
transaction is broadcasted to the mempool. In the background LND
disallows any new HTLCs and waits until all HTLCs are resolved
before kicking of the negotiation process.
Moreover if active HTLCs are present and the no_wait param is not
set the error msg is now highlightning it so the user can react
accordingly.
2025-02-20 17:43:18 +01:00
8ec08fbfa4 multi: remove the need for NewRoutingGraph
The `graphsession.NewRoutingGraph` method was used to create a
RoutingGraph instance with no consistent read transaction across calls.
But now that the ChannelGraph directly implements this, we can remove
The NewRoutingGraph method.
2025-02-18 07:59:57 -03:00
59759f861f rpcserver: check blockbeatDispatcher when deciding isSynced
This commit changes `GetInfo` to include `blockbeatDispatcher`'s current
state when deciding whether the system is synced to chain. Previously we
check the best height against the wallet and the channel graph, we
should also do this to the blockbeat dispatcher to make sure the
internal consumers are also synced to the best block.
2025-02-12 09:48:02 +08:00
9b86ee53db graph+autopilot: let autopilot use new graph ForEachNode method
Which passes a NodeRTx to the call-back instead of a `kvdb.RTx`.
2025-02-10 09:46:15 +02:00
ed2989ae33 multi: update to fn v2 2024-12-04 13:19:00 -07:00
4089fbcb44 multi: fix linter errors 2024-11-28 13:51:15 +02:00
adcaa8802f multi: remove kvdb.Tx from ChannelGraphSource.ForAllOutgoingChannels
and the same for ChannelStateDB.FetchChannel. Most of the calls to these
methods provide a `nil` Tx anyways. The only place that currently
provides a non-nil tx is in the `localchans.Manager`. It takes the
transaction provided to the `ForAllOutgoingChannels` callback and passes
it to it's `updateEdge` method. Note, however, that the
`ForAllOutgoingChannels` call is a call to the graph db and the call to
`updateEdge` is a call to the `ChannelStateDB`. There is no reason that
these two calls need to happen under the same transaction as they are
reading from two completely disjoint databases. And so in the effort to
completely split untangle the relationship between the two databases, we
now dont use the same transaction for these two calls.
2024-11-28 13:49:41 +02:00
6e13898981 multi: move LightningNode struct to models package 2024-11-28 13:36:32 +02:00
ccb8f0eeb8 refactor: move graphsession pkg to graph package 2024-11-28 13:36:15 +02:00
74a4b1922b refactor: move graph related DB code to graph/db from channeldb
This is a pure refactor commit. It moves over all the graph related CRUD
code from `channeldb` to `graph/db`.
2024-11-28 13:36:13 +02:00
9f54ec90aa multi+refactor: move models package to graph/db
All the structs defined in the `channeldb/models` package are graph
related. So once we move all the graph CRUD code to the graph package,
it makes sense to have the schema structs there too. So this just moves
the `models` package over to `graph/db/models`.
2024-11-28 13:34:33 +02:00
fbeab726e1 Merge pull request #8390 from carlaKC/7883-experimental-endorsement
Add Experimental Endorsement Signalling
2024-11-26 09:43:22 +02:00
66940024ac Merge pull request #9290 from w3irdrobot/broadcast-misspelling
docs: fix broadcast misspelling
2024-11-25 12:25:51 +01:00
d3bff47167 docs: fix broadcast misspelling 2024-11-22 16:20:02 -05:00
f02bb58486 multi: add experimental endorsement feature bit and disable option 2024-11-22 09:16:58 -05:00
4bb5b0c27c lnrpc: set a zero value endorsement signal on sender outgoing htlc
Before we have sufficient signaling in the network to relay this
signal, set a zero value experimental endorsement value on the sender's
outgoing htlc. Once the network is relaying this signal and a flag day
has been set, we'll be able to set a non-zero value here.
2024-11-22 09:16:57 -05:00
94f7ed46de Merge pull request #8998 from Abdulkbk/trx-pagination
pagination: add pagination to wallet transactions
2024-11-22 09:30:11 +01:00
38ec1a1c64 Merge pull request #8805 from breez/jssdwt-insert-edge-when-not-found
localchans: recreate missing edge if not found
2024-11-22 08:42:51 +01:00
762d01536b multi: return txns first and last indices
In this commit we introduce first and last indices for the
tranasctions returned which can be used to seek for further
transactions in a pagination style.

Signed-off-by: Abdullahi Yunus <abdoollahikbk@gmail.com>
2024-11-22 08:22:55 +01:00
cd1df4ac34 multi: modify listtxn definition
This commit modifies listtransactiondetails method definition to
take in additional params: index_offset and maxTxn
2024-11-22 08:21:27 +01:00
ed6a246439 rpcserver: add robustness check 2024-11-20 09:18:25 +01:00
bb4d3db8bc localchans: recreate missing edge if not found
If a node contains a channel, but doesn't have a corresponding edge in
the graph database, updating the channel policy would fail. In this
commit the edge is recreated if the channel exists. This ensures a node
can recover from a missing edge in the graph database by calling
updatechanpolicy.
2024-11-13 12:13:11 +01:00
0e5c724b64 rpcserver: fix formatting and grammar issues 2024-11-06 15:30:29 +01:00
45e13cead1 lnrpc+rpcserver: return meaningful responses instead of empty 2024-11-06 15:30:24 +01:00
d8c920fa7a chanbackup+rpcserver+server: return number of recovered channels 2024-11-06 15:30:23 +01:00
15a5fe7704 channeldb+rpcserver: return number of deleted payments 2024-11-06 15:30:21 +01:00
387a1a8831 build: separate sublogger and rotator pipe management
These are two separate concerns. So this commit splits them up and just
passes a LogWriter from the one to the other. This will become cleaner
in an upcoming commit where the Rotator will implement io.Writer and
there will no longer be a need for LogWriter.
2024-10-22 15:19:58 +02:00
8d4d3e0323 rpc: return loglevels of the current subsystems 2024-10-18 13:03:29 +02:00
5d60da54a3 rpcserver: don't write any custom channel data if empty 2024-10-15 09:56:32 +02:00
e9fbbe2528 Merge pull request #9143 from ellemouton/rb-set-bit-required
feature+rpcserver: add SetBit helper to set dependent bits
2024-10-04 19:16:34 -07:00
2d333178c3 Merge pull request #8960 from lightningnetwork/0-19-staging-rebased
[custom channels 5/5]: merge custom channel staging branch into master
2024-10-03 10:07:16 -07:00
2395c4d0a1 rpc+funding: add taproot overlay as RPC chan type 2024-10-02 18:10:09 -07:00
4d44d11ece rpcserver: use SetBit helper for setting Bolt11 blinded bit
This commit uses the new SetBit helper for setting the Bolt11 route
blinding required bit in a generated invoice. This helper will take care
of setting the dependent bits of the feature bit (namely the route
blinding and TLV feature bits and will use the required variant of
both).
2024-10-02 10:52:59 +02:00
8126930d6c routing: support multiple namespaced MissionControls 2024-10-01 14:11:05 +02:00
f0f4f2df21 routing: separate MissionControl from MissionControlManager
This commit renames the previous MissionControl to MissionController and
the previous MissionController interface to MissionControlQuerier. This
is done because soon the (new) MissionController will back multiple
namespaced MissionControl instances.  For now, it just houses a single
MissionControl in the default namespace.

This commit also replaces the MissionControl's `now` function with a
`clock.Clock`.
2024-10-01 14:06:50 +02:00
7dc86acb8c multi: update PaymentAddr to use fn.Option
Since it is allowed to not be set and so can lead to nil deref panics if
it is a pointer.
2024-09-25 11:14:35 +09:00