Commit graph

67 commits

Author SHA1 Message Date
ffranr
a0e63124c0
multi: reformat long lines for readability
- Replace occurrences of `// nolint:lll` with `// nolint:ll` across
  files for consistency.
- Reformat multiline strings, comments, and function parameters to
  improve clarity and adhere to style guidelines.
- Add `// nolint:ll` comments where necessary to prevent linter
  warnings.
2025-12-09 16:12:03 +00:00
Bob Smith
2685477b45
config: add testnet4 network option 2025-07-30 13:08:06 -04:00
Viktor Tigerström
e30ac3d0a8
multi: update GetInfoResponse response
Add the `commit_hash` field to the GetInfoResponse. The `commit_hash`
field will contain the most recent commit_hash that the build was based
on. If the build had uncommitted changes, this field will contain the
most recent commit hash, suffixed by "-dirty".

The semantics of the `version` field is also updated to always contain
the most recent semantic version of the litd node, following the
semantic versioning 2.0.0 spec (http://semver.org/).
2025-05-13 12:27:19 +02:00
Elle Mouton
dbec9da31b
multi: update LND and friends
This commit updates:
- LND
- pool
- loop
- taproot-assets
- faraday
- lighting-node-connect
- aperture
- lndclient
- btclog

We start using the new btclog v2 library and the associated breaking
changes in the lnd/build package.

With this commit, we deprecate the `--remote.lit-maxlogfiles` and
`--remote.lit-maxlogfilesize` options and introduce new logging options
under the `--remote.lit-logging` namespace.

Finally, the LND update introduced a new `MaxBlocksMinedPerTest`
variable in the `lntest` package that we now need to override in order
for our itests to pass.
2025-03-26 09:20:52 -05:00
Elle Mouton
7a091fc773
config: introduce the concept of DevConfig
In this commit, we introduce a DevConfig struct which is embedded in the
main lit Config struct. It is defined in two separate files that are
made mutually exclusive using the `dev` build tag. The idea of this
struct is that it allows us to expose additional config options to LiT
if we build in a development environment such as our itests. In other
words, we will be able to start developing features and testing them
before making them available to users via the production build.

As of this commit, both implementations of the struct are the same.
2025-02-21 11:17:21 -03:00
Elle Mouton
a22689ce16
golangci: enable line length linter 2025-02-13 15:50:48 +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
Elle Mouton
e5e97f6708
config: add signet network option 2024-11-19 09:12:57 +02:00
Oliver Gugger
ab137035c6
docs: move previous item to correct category 2024-11-08 10:29:15 +01:00
Oliver Gugger
8790d3b3e2
config+terminal: allow configuring of lnd RPC timeout 2024-11-08 10:29:15 +01:00
Oliver Gugger
05fc878191
config: disable internal GRPC logger by default
The GRPC connection logger is very verbose and normally not very useful.
So it leads to more confusion and unnecessary log bloat than it actually
helps to debug things.
So we disable it by default, meaning that if GRPC=<level> doesn't appear
in the log level config string, we add GRPC=off.
That means we can still manually turn it on by adding ,GRPC=info to the
log config (e.g. --lnd.debuglevel=debug,GRPC=info).
2024-11-07 10:20:11 +01: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
Elle Mouton
2669c87f98
config: add version flag
This commit adds a new '--version' flag to litd.
2024-08-28 15:32:34 +02:00
Oliver Gugger
d627a2826d
config: update description of --httpslisten flag
Fixes #798 by specifying what is running on the main litd HTTPS port.
2024-07-18 13:02:21 +02:00
Viktor Tigerström
064bcd2488
terminal: add tlsextraip & tlsextradomain to conf
This commit adds the `tlsextraip` and `tlsextradomain` config fields to
the LiT config. This allows users to specify additional IPs and domains
to be included in the TLS certificate.
2024-06-24 23:59:03 +02:00
jamaljsr
cdbf3f70fc
config: allow taproot-assets-mode to be remote 2023-10-19 13:32:32 -05:00
Viktor Tigerström
c06a9579b7
multi: bump taproot-assets, loop & LNC
Bump taproot-assets to version `v0.3.0-alpha` and loop to `v0.26.4-beta`
and lightning-node-connect to `v0.2.7-alpha`.
2023-10-18 18:45:17 +02:00
Viktor Tigerström
20fa2c0915
terminal: add disable accounts service cfg option 2023-09-28 13:09:33 +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
c2e34d7138
config: fix macaroon path construction
Fix the macaroon path construction so that even if the network is not
mainnet, the path gets constructed correctly from a user specified
"--lit.dir" flag.
2023-07-17 10:55:30 +02:00
positiveblue
8e469d89d0
config: run taproot assets subserver by default
By default the taproot assets subserver will start in integrated mode
like the rest of subservers. An execption is if we are running in
"mainnet" where we want it disabled because it is not yet supported.

Users won't be able to start the sub-server in "mainnet" even if they
set the `--taproot-assets-mode=` flag.
2023-05-16 17:00:20 +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
daab70c040
config: register subserver loggers before validation
Ensure that all of Lit's subserver loggers have been registered _before_
the config is validated. This will allow users to use the
`--lnd.debuglevel` flag to set Lit specific subserever logger levels.
2023-05-03 08:51:45 +02:00
Elle Mouton
d02749a5a1
subservers: add new package to manage the lit subservers 2023-05-01 00:15:56 -07:00
Elle Mouton
0ec95086a8
multi: add DisableUI option
Add a new `disableui` config option. If this option is set then the user
no longer needs to set the `uipassword` config option. This also means
that the user will no longer be able to interact with the local UI.
2023-03-17 11:16:22 +02:00
positiveblue
c267ef64eb
multi: update lnd dependency to v0.16.0-beta.rc3
- Bump lnd and other module dependencies.
- Bump Go build version & RPCs
- Refactor itests to use the new lnd itest framework.
2023-03-15 08:36:23 -07:00
Elle Mouton
2c25ba48ca
multi: always use Lit's TLS cert
In this commit, we remove Lit's dependency on LND's tls cert in
integrated mode. With this commit, even if Lit is started in integrated
mode, it will create its own tls cert to use for serving the webserver.
2023-02-23 07:35:22 -08:00
Elle Mouton
8e61eb90da
multi: make request logger level configurable 2023-02-13 19:33:55 +02:00
Elle Mouton
683cdbd566
terminal: init the autopilot client 2023-01-27 06:47:13 +02:00
Oliver Gugger
c3cad46aa2
multi: fix linter issues 2022-10-19 10:57:18 +02:00
Oliver Gugger
1e8baeef13
multi: use filepath instead of path to work on Windows
This commit fixes an issue with file system paths on Windows. The path
package is only intended to be used with URIs or non file system paths.
For anything OS dependent, filepath should be used instead.
2022-10-13 14:07:41 +02:00
Oliver Gugger
0d416a5168
config+log+rpcmiddleware: add RPC middleware package 2022-09-22 15:59:05 +02:00
Elle Mouton
d5c26045f7
multi: add deadline for first connection of new LNC conn
In this commit, we add a deadline for the initial connection of an LNC
connection. So with this, the user is forced to use their pairing phrase
within a certain time frame. After this initial connection, future
connections are made with the second handshake version meaning that the
pairing phrase is rendered useless. By adding a time limit to the time
in which a user can use their pairing phrase, we reduce the risk created
by the users pairing phrase being leaked. The default time limit is set
to 10 minutes but can be customsed with the new `firstlncconndeadline`
flag.
2022-08-23 09:31:18 +02:00
Oliver Gugger
1444e7a180
multi: bump all dependencies to latest versions 2022-06-24 16:18:14 +02:00
Elle Mouton
50cfd3b823
multi: add macroon service to litd
Add a macaroonService to the main LightningTerminal struct.
2022-06-05 10:51:32 +02:00
Elle Mouton
9b84dbc7c9
cmd/litcli: add litcli for session functions 2021-11-24 13:44:26 -05:00
Turtle
a25426d374
multi: bake super macaroon in integrated mode
In integrated mode we hook directly into lnd's bufconn listener for any
connections to it. So we don't need any TLS setup and can bake a single
super macaroon that is used for all RPC calls.
2021-11-23 15:28:29 +01:00
Oliver Gugger
76b84e658f
multi: bump lnd to v0.14.0-beta final, release v0.6.0-alpha 2021-11-22 17:10:43 +01:00
Oliver Gugger
4ce887e906
multi: update lnd+loop+pool+faraday
With this commit we prepare to use the new version
v0.14.0-beta.rc1 of lnd.
2021-11-04 13:30:19 +01:00
Oliver Gugger
728a262ea4
config: fix default macaroon paths
We used the wrong constants for the default values of lnd's macaroon
paths. This commit sets the correct default values before the config is
parsed.
2021-06-25 21:17:01 +02:00
Oliver Gugger
e835163de7
config: set log level after setting up loggers
To make sure we set the log level for all registered loggers, we need to
move the call that sets the level. Since we only have one root logger,
we can only use one value for the global level. So we use the
--remote.lit-debuglevel in remote lnd mode and the --lnd.debuglevel in
integrated mode. Individual sub loggers can still be overwritten if the
following syntax is used: --lnd.debuglevel=debug,AUCT=trace for example.
2021-06-25 21:10:28 +02:00
Oliver Gugger
fe0b446d38
config: fix nil pointer if listening fails 2021-05-26 18:37:21 +02:00
Oliver Gugger
39214e121d
multi: bump lnd to version v0.13.0-beta.rc3 2021-05-26 18:37:13 +02:00
Oliver Gugger
d591d5a2f8
config+terminal: enable CORS and WebSocket support for REST
We want to give the REST proxy the same functionality as the lnd built
in REST proxy has and therefore enable CORS and WebSocket support on it
as well.
2021-04-27 15:28:30 +02:00
Oliver Gugger
0159e0a6a9
multi: add flag to enable REST calls on main listener(s)
Fixes #213 by allowing users to enable REST calls to be made directly to
the main HTTP(S) listener(s). This approach is chosen over spinning up
an additional listener (or multiple, if non-TLS is also needed) just for
REST because it should make everyone's lives easier if only one port
needs to be used. There also shouldn't be any security tradeoff since a
macaroon is still required and all communication happens over TLS
anyway.
2021-04-27 15:28:10 +02:00
Oliver Gugger
cbe71ac19a
config: fix empty default remote lnd admin mac path
Partially reverts c917e91f and fixes #195: The default remote lnd admin
macaroon path we added in c917e91f was a mistake since by default that
value isn't set until we call lnd.ValidateConfig() which we never do in
the remote mode.
We fix this by providing a sane default value for the admin macaroon
again.
2021-03-04 15:24:37 +01:00
Oliver Gugger
c554c9e6c7
config: update default lnd mode in help text 2021-02-22 09:20:25 +01:00
Oliver Gugger
977c63cd85
multi: use same order for daemons everywhere
This is a pure code-moving commit to use the same order of
faraday->loop->pool everywhere we handle the damons.
Only for consistency's sake.
2021-02-18 14:37:37 +01:00