This commit updates `scripts/release.sh` to include a check for the
correct Go version before executing the release build. This ensures that
the release binaries are built with the specified Go version,
maintaining consistency and integrity for developer signatures.
Since most of our projects will use the same handler duo and apply the
config options the same way, let's make our lives easier and add a
default handler constructor.
This commit adds config options so that users can for both the console
logger and the file logger set the following things:
- disable the logger
- omit timestamps from log lines.
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.
This commit then also adds an implementation of the btclog.Handler
interface called `handlerSets` which basically lets us have a Handler
backed by many Handlers (we need one for the stdout and one for our log
file).
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.
Previously, LND log used to have such records:
[WRN] PEER: Peer(...): Link=%!v(MISSING) is not active
Now the short channel ID is printed there instead of "%!v(MISSING)".
During testing of this PR I figured out the the htlc interceptor
was not shutdown and started properly in terms of closing the
quit channel but also in terms of the relevant logs.
Describe the basics of the LND profiler so that node runners can
easily provide profile dumps to analyse faulty behaviour more
quickly.
Also update the description of LND's logging system.
In this commit, we make sig job handling when singing a next commitment
non-blocking by allowing the shutdown of a channel link to prevent
further waiting on sig jobs by the channel state machine. This addresses
possible cases where the aux signer may be shut down via a separate quit
signal, so the state machine could block indefinitely on receiving an
update on a sig job.
This is a requirement for replacing the quit channel with a Context.
The Done() channel of a Context is always recv-only, so all users of
that channel must not expect a bidirectional channel.
This adds the ContextGuard struct from the taproot-assets repository
that has been in use there for a while.
The context guard allows for easy creation of contexts that depend on a
central wait group and quit channel.
A context can either be created with a timeout and quit, meaning it will
cancel either on reaching the timeout or when the central quit channel
is closed.
Or a context can be created to block and use a timeout, meaning it will
_not_ cancel on quit but rather block the shutdown until it is completed
(or times out).
The third way is to create a context that just cancels on quit with no
timeout.