Commit graph

145 commits

Author SHA1 Message Date
Oliver Gugger
9faa4a8388
terminal: bump minimum lnd version to v0.18.5-beta
Before, this minimum version was driven by tapd. But we should keep the
minimum required version up to date in litd as well.
2025-01-30 09:41:49 +01:00
Elle Mouton
42a4c826cf
accounts: use clock.Clock
In this commit, we use the clock.Clock type instead of directly calling
time.Now().
2025-01-23 08:24:21 +02:00
Elle Mouton
82eeadd819
accounts: pass Store impl to NewService
We want to be able to pass different DB implementations to NewService.
In preparation for this, we make it implementation agnostic by letting
it take a `Store` instead of constructing one itself.

This this change, we also let LiT handle the closing of the accounts
Store instead of the accounts service
2025-01-16 09:19:04 +02:00
Elle Mouton
0407505e6c
autopilotserver: thread context through 2025-01-13 09:29:43 +02:00
Elle Mouton
1a30bdb83a
accounts: thread context through to accounts 2025-01-13 09:29:29 +02:00
Elle Mouton
83a3209a32
rpcmiddleware: thread context through to Start 2025-01-13 09:29:22 +02:00
Elle Mouton
0503cfd433
session_rpcsever: thread context through 2025-01-13 07:03:28 +02:00
Elle Mouton
1fc0e6f16d
terminal: use ctx instead of interceptor 2025-01-13 07:03:28 +02:00
Elle Mouton
db45e3afe3
terminal: thread one context through 2025-01-13 06:53:02 +02:00
Oliver Gugger
3f9a63876a
litd: allow faster startup by making re-try configurable
This change will speed up integration tests by not waiting a full 5
seconds before re-trying the connection to lnd if it fails the first
time.
2024-12-19 21:21:39 +01:00
Oliver Gugger
a027e4051d
litd: register tapd as aux component of lnd
This commit represents the main integration between lnd running in
integrated mode and tapd providing auxiliary components for custom
channels.
2024-12-19 21:21:38 +01:00
Oliver Gugger
d368f8a8fe
multi: bump to lnd/tapd/lndclient v0.18.4-beta/v0.5.0-alpha 2024-12-19 21:21:38 +01:00
Oliver Gugger
8790d3b3e2
config+terminal: allow configuring of lnd RPC timeout 2024-11-08 10:29:15 +01:00
Elle Mouton
9655dc6fa2
status: return error if subserver already registered
Let the status manager first check its map of subservers before
registering a new one to ensure that an existing subserver is not being
overridden.
2024-10-21 10:25:06 +02:00
Elle Mouton
73cadc5253
subservers: use a map indexed by name for subservers
So that we can quickly access a sub-server by its name.
2024-10-21 10:20:00 +02:00
Elle Mouton
b4f8224c54
multi: use ReadOnly param of BakeSuperMacaroon 2024-10-14 15:48:18 +02:00
Elle Mouton
d1e76950e5
terminal: move the location where statelessInitMode is set
So that it is set correctly by the time we potentially want to special
case the handling of the bakesupermacaroon method. This is required in
the case where the full LND connection takes long to create due to it
blocking on LND being fully synced.
2024-10-14 15:48:18 +02:00
Elle Mouton
d3dc753b9b
rpc_proxy: give the proxy access to basicLNDClient 2024-10-14 15:48:18 +02:00
Elle Mouton
2fc07fffee
lit: add a statelessInit bool in the config
So that it is easy to check elsewhere if we are in this mode.
2024-10-14 15:48:18 +02:00
sputn1ck
bc0bc687ae
multi: add support for building without UI
This commit adds support for building without UI.
If the build tag "litd no_ui" is set the UI will
be disabled.
2024-08-14 13:33:38 +02:00
Oliver Gugger
272409dc81
Merge pull request #806 from lightninglabs/lnd-readiness
terminal: allow wallet unlocker services REST calls
2024-07-29 04:06:08 -06:00
Oliver Gugger
175133104c
terminal: allow wallet unlocker services REST calls
When lnd isn't marked as fully ready yet, we didn't allow any REST
methods through. But to allow creating a wallet through REST, we also
need to allow these methods.
2024-07-29 11:00:51 +02:00
Elle Mouton
c68daf5981
go.mod: bump tapd and loop
tapd to 2bf18437 and loop to v0.28.6-beta
2024-07-26 08:32:12 +02:00
bitromortac
7489f0a0b2
rules: pass in lnd connection identifier
We pass a random lnd connection identifier to the rule enforcer that is
unique per lnd connection lifetime. It is used to generate unique
request identifiers that amend the non-unique request identifiers that
are passed from lnd.
2024-07-02 15:04:26 +02:00
Viktor Tigerström
5ccb6f36e4
terminal: update minimum lnd version to v0.17.0`
Loop `v0.28.0-beta` requires the minimum required lnd version to be set
to `v0.17.0`, and this commit therefore updates the litd requirement
accordingly.
2024-03-08 11:09:02 +01:00
Viktor Tigerström
33d6f6e4a3
terminal: retry to create lnd client on failure 2024-01-05 03:46:55 +01:00
Viktor Tigerström
b0dbbe93c2
terminal: allow lnd GetState RPC on Wallet Ready 2024-01-05 03:46:54 +01:00
Viktor Tigerström
3d4357287f
terminal: add a lnd Wallet Ready state 2024-01-05 03:46:54 +01:00
Viktor Tigerström
20fa2c0915
terminal: add disable accounts service cfg option 2023-09-28 13:09:33 +02:00
Viktor Tigerström
ec2a7a39b4
multi: add accounts service to status manager
Add the accounts service to status manager. This will allow us to query
the status of the accounts service and see if it is running or not.
For incoming gRPC requests to the accounts service, we also use the
status manager to check if the accounts service is running or not to
determine if we should let the request through or not.
2023-09-28 13:09:33 +02:00
Viktor Tigerström
32b2a5885f
terminal: don't stop litd on account system error 2023-09-28 12:58:37 +02:00
Elle Mouton
96779c965e
terminal: only shutdown sub-servers on shutdown 2023-09-22 11:59:25 +02:00
Elle Mouton
0f53f434d0
rpc_proxy+terminal: add LND and LiT to status server 2023-09-22 11:59:25 +02:00
Elle Mouton
75cfa0b053
rpc_proxy: only allow requests if sub-server is ready 2023-09-22 11:59:25 +02:00
Elle Mouton
3769467c24
subservers+terminal: integrate status server
Pass the status manager to the sub-server manager so that the sub-server
manager can inform the status manager of any sub-servers that have
started or failed to start.
2023-09-22 11:59:25 +02:00
Elle Mouton
6310eedbfc
multi: init status manager
Initialise an instance of the status manager in LightningTerminal.
Register its gRPC and REST endpoints and also add its method to the set
of LiT whitelisted permissions.
2023-09-22 11:59:24 +02:00
Elle Mouton
dc51e884de
terminal: register Proxy server with Lit's grpc server
We eventually want a few Lit grpc servers to continue functioning even
if LND did not start up properly. This means that we need to register
these servers with LiT's grpc server instead of using LND's.
Because of this change, we also need to update the itest a bit so that
calls to the proxy server are never expected to succeed if the call is
made via the LND port.
2023-09-22 11:55:16 +02:00
Elle Mouton
8db75cf11c
terminal: return errQueue error
If an error is returned from the errQueue channel, we want that error to
be returned so that LiT is shutdown with a non-0 exit code.
2023-09-22 11:55:16 +02:00
Elle Mouton
fb7f313c80
multi: add "disable" mode for all subservers
Just like for the Taproot Assets subserver, we add the option to disable
the Loop, Pool and Faraday subservers.
2023-09-22 11:55:16 +02:00
Elle Mouton
b0931f49b0
multi: let subserver manager handle disabled sub-server
Modify the sub-server Manager's AddServer method to take an `enabled`
boolean so that it can handle what to do with a disabled sub-server.
This will come into play in a future commit which adds a status server.
2023-09-17 16:50:42 +02:00
Elle Mouton
dd9711ecf1
terminal: dont block indefinitely on macaroon channel
In this commit, we ensure that when we wait on the macaroon channel for
the macaroon from the integrated LND, that we also listen to other exit
signals such as the interceptor, lndQuit chanel and the error channel.
This is to prevent shutdown from blocking forever in the case where
there was an issue preventing LND from sending the initial macaroon.
2023-09-08 09:11:49 +02:00
Elle Mouton
84df1bf966
terminal: don't verify macaroon for whitelisted calls 2023-09-07 11:00:02 +02:00
Elle Mouton
089e7180ec
terminal: register to the LND State REST server
Before this commit, LND's State server could not be accessed via Lit's
REST server.
2023-09-07 11:00:01 +02:00
Elle Mouton
a14d7ae17b
firewall: map session ID to group ID in privacy mapper interceptor 2023-08-30 12:34:29 +02:00
Elle Mouton
3c837a9bc6
firewall: map session ID to group ID 2023-08-30 12:34:29 +02:00
Elle Mouton
73110b6472
multi: give firewallDB access to session ID index 2023-08-30 12:34:29 +02:00
Elle Mouton
29b11261b9
multi: implement BakeSuperMacaroon method 2023-06-20 08:10:54 +02:00
positiveblue
219a9ccb85
multi: new disable mode for the taproot assets subserver
Enable to start litd with taproot asset subserver disabled.
The default mode for the new sub-server is "Disabled"
Add coverage in itests for flows with some subservers disabled (based on
Elle's #537)
2023-05-16 17:00:19 +02:00
positiveblue
4be6ffb31f
multi: Add Taproot Assets subserver 2023-05-16 16:59:28 +02:00
Elle Mouton
2a825f1009
multi: return error if connecting to remote sub-server fails 2023-05-03 08:51:45 +02:00