98 Commits
Author SHA1 Message Date
Gijs van Dam 07dc74e198 multi: endpoints for onion messages
This commit creates the necessary endpoints for onion messages.
Specifically, it adds the following:

- `SendOnionMessage` endpoint to send onion messages.
- `SubscribeOnionMessages` endpoint to subscribe to incoming onion
  messages.

It uses the `msgmux` package to handle the onion messages.
2025-11-12 22:54:04 +08:00
ziggie 3aec40293d paymentsdb: add subsystem logging for payments package 2025-08-11 16:44:14 +02:00
Elle Mouton 240966de90 graph/db+log: use v2 logger for graph subsystem 2025-07-29 11:34:47 +02:00
Olaoluwa Osuntokun 21ca1e650b acessman: improve access manager logging and error handling
This commit adds logs to the new access manager. This'll help us monitor
the new system behavior, and may make debugging easier in the future.
2025-04-17 17:20:11 -07:00
yyforyongyu 07f60bd910 lnd: enable logging for sqldb 2025-03-21 08:06:18 +08:00
Olaoluwa Osuntokun 720d98cc15 msgmux: fix arg expectation for mock in unit test 2025-03-18 11:44:59 -05:00
Olaoluwa Osuntokun 29afeb42fb lnd: register protofsm logger 2025-03-18 11:44:20 -05:00
yyforyongyu 8fc9154506 lnd: start blockbeatDispatcher and register consumers 2024-12-20 17:54:03 +08:00
Alex Akselrod a0e5a14574 log: add sub-logger for kvdb/sqlbase 2024-12-12 10:40:34 -08:00
Elle Mouton ab7aae0708 multi: rename nolint:lll to nolint:ll
Find and replace all nolint instances refering to the `lll` linter and
replace with `ll` which is the name of our custom version of the `lll`
linter which can be used to ignore log lines during linting.

The next commit will do the configuration of the custom linter and
disable the default one.
2024-12-02 09:14:21 +02:00
Elle Mouton 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
Jesse de Wit 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
Elle Mouton b4d098fb29 go.mod: update LND sub-module deps 2024-10-29 15:01:00 +02:00
Elle Mouton 23602e017e multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
Elle Mouton cd697913ef build: switch to slog Handlers
Start using the new slog handlers. With this commit we also remove the
need for the LogWriter since we let our LogRotator implement io.Writer
and pass that in to our log file handler.
2024-10-22 17:03:51 +02:00
Elle Mouton 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
ziggie 7ea2080abe lnd: add logger for rpcclient 2024-10-02 11:51:24 +02:00
Elle Mouton 95477390a4 log: register blindedpath pkg logger 2024-08-07 17:03:12 +02:00
Elle Mouton de975334cd multi: add blinded paths to invoices
Expose the ability to add blinded paths to an invoice. Also expose
various configuration values.

We also let the lncfg.Invoices struct satisfy the Validator interface so
that we can verify all its config values in one place.
2024-07-26 09:54:17 +02:00
yyforyongyu b6049ff94b multi: add NewLogClosure in lnutils to avoid repetition
And replaces all usage of `logClosure` with `lnutils.LogClosure`.
2024-07-25 21:25:23 +08:00
Elle Mouton 0b7364f54b graph+server: add template for new graph Builder sub-system
This is preparation for an upcoming commit that will move over various
responsibilities from the ChannelRouter to the graph Builder. So that
that commit can be a pure code-move commit, the template for the new
sub-system is added up front here.
2024-07-15 15:56:33 +02:00
yyforyongyu 2451e6ae50 lnd: fix orders when initializing subsystem loggers
This commit fixed a wrong ordering of initializing subsystem loggers. We
need to make sure "third party" loggers are initialized first such that
when we customize the names later in `lnd`'s packages, the overwriting
of the logger names will take effect.
2023-06-20 18:34:16 +08:00
ErikEk 635cffa871 multi: add sub-server dep 2022-04-30 08:55:49 +02:00
positiveblue e4e0935816 lnrpc/peers: skeleton logic for updateNodeAnnouncement
Basic logic for the endpoint:

- Get the current nodeAnn information
- Calculate modifications
- Apply modifications
- Return changes
2022-04-01 18:36:21 -07:00
Oliver Gugger ffee7d1bcf multi: fix newly detected linter issues 2022-02-10 11:02:02 +01:00
Andras Banki-Horvath 1a8f094503 lnrpc: add the devrpc development only subserver + devrpc.ImportGraph
This commits adds the devrpc package which implements a subserver that
adds clean separation for RPC calls useful for development and
debugging. This subserver is only compiled in if the dev tag is set.
Furthermore the commit adds the devrpc.ImportGraph call which can
import a graph dump obtained from another node by calling DescribeGraph.
Since the graph dump does not include the auth proofs, the imported
channels will be considered private.
2022-01-24 17:42:59 +01:00
Oliver Gugger c24763b3da lnd+lnwallet: add logger for btcwallet+rpcwallet 2022-01-06 13:24:32 +01:00
yyforyongyu 0b80d4feaa tor: add logging to tor controller 2021-10-11 13:11:53 +08:00
Olaoluwa Osuntokun 7bde1662e2 multi: move breach arbiter and utxo nursery into contractcourt package
In this commit, we take an initial step towards converting the existing
breach arbiter and utxo nursery logic into contract resolvers by moving
the files as is, into the `contractcourt` pacakge.

This commit is primarily move only, though we had to massage some
interfaces and config names along the way to make things compile and the
tests run properly.
2021-09-27 19:10:31 -07:00
Oliver Gugger 8509d92070 log+rpcperms: add custom RPCP logger to rpcperms package
The custom RPC middleware logic that we are going to add in the next
commits will need to log under their own sub logger so we add one with a
new subsystem name.
2021-09-20 13:05:47 +02:00
Andras Banki-Horvath e62dbca11a cluster: add cluster package skeleton and LeaderElector interface 2021-05-04 17:33:07 +02:00
Hampus Sjöberg ada1bc701c signal: handle shutdown properly
This addresses issues related to the mobile lnd builds, where
calling `stopDaemon` and subsequently calling LndMobile's `Start`
results in crash.
2021-03-18 12:54:25 +01:00
Johan T. Halseth 3c81a5dd73 rpcperms: add RPC interceptor chain
This adds a new package rpcperms which houses the InterceptorChain
struct.  This is a central place where we'll craft interceptors to use
for the GRPC server, which includes macaroon enforcement.

This let us add the interceptor chain to the GRPC server before the
macaroon service is ready, allowing us to avoid tearing down the GRPC
server after the wallet has been unlocked.
2021-03-11 13:05:23 +01:00
eugene dcdf36f410 lnd+funding: move Manager to funding, change references 2020-12-17 10:45:05 -05:00
eugene 1b84d07c4d lnd+funding: register funding logger 2020-12-17 09:36:34 -05:00
carla 54c3e98b40 multi: move channel acceptor logic out of rpcserver
This commit moves and partially refactors the channel acceptor logic
added in c2a6c86e into the channel acceptor package. This allows us to
use the same logic in our unit tests as the rpcserver, rather than
needing to replicate it in unit tests.

Two changes are made to the existing implementation:
- Rather than having the Accept function run a closure, the closure
  originally used in the rpcserver is moved directly into Accept
- The done channel used to signal client exit is moved into the acceptor
  because the rpc server does not need knowledge of this detail (in
  addition to other fields required for mocking the actual rpc).

Crediting orginal committer as co-author:
Co-authored-by: Crypt-iQ
2020-11-10 11:38:45 +02:00
carla 5668b335d3 chainreg: register logger 2020-11-09 14:11:31 +02:00
carla c365a16656 healthcheck: monitor access to chain backend
Add a new health check package which will periodically poll health
check functions and shutdown if we do not succeed after our set number
of attempts. The first check that we add is one for our chain backend,
to ensure that we are connected to a bitcoin node.
2020-08-24 09:35:36 +02:00
nsa cbd54101f8 multi: remove peer.go, change all references to point to peer pkg 2020-07-06 19:16:07 -04:00
nsa 2d68a64a5b chancloser: new package for cooperative channel closure
Introduces a new chancloser package which exposes a ChanCloser
struct that handles the cooperative channel closure negotiation
and is meant to replace chancloser.go in the lnd package. Updates
all references to chancloser.go to instead use chancloser package.
2020-06-16 20:34:44 -04:00
Oliver Gugger 75f916b026 log+config: remove global RootLogWriter variable 2020-05-27 09:43:59 +02:00
Olaoluwa Osuntokun c2516d9352 Merge pull request #4286 from guggero/remove-global-cfg
multi: remove global cfg variable
2020-05-18 19:45:43 -07:00
Wilmer Paulino b195d39ad7 rpc: use existing rpc logger for wtclientrpc
The logger string used to identify the wtclient and wtclientrpc loggers
was the same, leading to being unable to modify the log level of the
wtclient logger as it would be overwritten with the wtclientrpc's one.
To simplify things, we decide to use the existing RPC logger for
wtclientrpc.
2020-05-14 13:35:03 -07:00
Oliver Gugger bc3909050e multi: rename and export logWriter as RootLogWriter 2020-05-14 14:37:50 +02:00
Conner Fromknecht a25269c4d3 lnrpc/verrpc: add Versioner RPC server 2020-04-10 16:39:23 -07:00
Joost Jager 9f1720dea8 build: prevent loggers from overwriting each other.
Previously only the last registered logger would receive debug level
changes.
2019-12-11 15:22:00 +01:00
Joost Jager 74c2df658e localchans: log policy update error 2019-12-11 00:17:06 +01:00
Joost Jager f289dbd826 routing: define subsystem constant 2019-12-11 00:17:04 +01:00
Olaoluwa Osuntokun d422ebbc66 lnwallet/chanfunding: introduce new channel funding abstractions
In this commit, we introduce a series of new abstractions for channel
funding. The end goal is to enable uses cases that construct the funding
transaction externally, eventually handing the funding outpoint to lnd.
An example of such a use case includes channel factories and external
channel funding using a hardware wallet.

We also add a new chanfunding.Assembler meant to allow external channel
funding in contexts similar to how channel factories
can be constructed. With this channel funder, we'll only obtain the
channel point and funding output from it, as this alone is enough to
carry out a funding flow as normal.
2019-12-02 17:11:32 -06:00
carla 744876003d chanfitness: Add channel event log structure
This commit adds a chanfitness package which will be used to track
channel health and performance metrics. It adds a channel event
structure which will be used to track channel opens/closes and peer
uptime.

The eventLog implements an uptime function which calcualtes uptime
over a given period and a lifespan function which returns the time
when the log began monitoring the channel and, if the channel is
closed, the time when it stopped moitoring it.
2019-10-25 09:51:07 +02:00