-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add remote signing binary #9293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ViktorTigerstrom
wants to merge
48
commits into
lightningnetwork:master
Choose a base branch
from
ViktorTigerstrom:2024-11-remote-signer-binary
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
5c024f1
lnd+lncfg: Refactor `RemoteSigner` Config
ViktorTigerstrom 27ebb83
multi: correct `DefaultRemoteSignerRPCTimeout` docs
ViktorTigerstrom 0e62619
lnd: add new `remotesigner` macaroon entity
ViktorTigerstrom cac0b86
walletrpc: add `SignCoordinatorStreams` RPC
ViktorTigerstrom 9e6f00b
rpcwallet: add `RemoteSignerConnection` interface
ViktorTigerstrom 7a5ac80
rpcwallet: add `OutboundConnection` implementation
ViktorTigerstrom 3deac01
rpcwallet: add `RemoteSignerConnectionBuilder`
ViktorTigerstrom c0157a9
rpcwallet: use `RemoteSignerConnection` in RPCKeyRing
ViktorTigerstrom 547c883
lnd: refactor `createLivenessMonitor` signature
ViktorTigerstrom cb9aea5
multi: use `RemoteSignerConnection` for health check
ViktorTigerstrom 392f118
multi: Add `watchonlynode` Namespace to `Config`
ViktorTigerstrom a5359ab
fn: add CancelOrQuit helper
ViktorTigerstrom eeba872
rpcwallet: add `RemoteSignerClient` struct
ViktorTigerstrom f4980b6
f - rpcwallet: use GoroutineManager in remote signer signer client
ViktorTigerstrom f907101
rpcwallet: Add `RemoteSignerClientBuilder`
ViktorTigerstrom f3caf7c
lnd: add `RemoteSignerClient` instance on startup
ViktorTigerstrom c1ab0da
lncfg: allow `watchonlynode.enable`
ViktorTigerstrom e6e7e57
conf: add `remotesigner.allowinboundconnection`
ViktorTigerstrom a322b63
rpcwallet: add `SignCoordinator` struct
ViktorTigerstrom c8a8e42
rpcwallet: add `InboundConnection` implementation
ViktorTigerstrom 2d65e77
lnrpc: add `AllowRemoteSigner` `WalletState` proto
ViktorTigerstrom 3c9273e
rpcperms: allow some RPCs before `rpcActive` state
ViktorTigerstrom e254d67
rpcperms: fix `SetServerActive` function docs typo
ViktorTigerstrom a7aba5b
multi: enable `RpcServer` before dependencies exist
ViktorTigerstrom 4faa3ba
multi: add `RemoteSignerConnection` to walletrpc conf
ViktorTigerstrom d84ac5d
walletrpc: implement `SignCoordinatorStreams` RPC
ViktorTigerstrom 47d4db2
multi: populate `RemoteSignerConnection` ref early
ViktorTigerstrom be62f29
f - multi: populate `RemoteSignerConnection` ref early
ViktorTigerstrom e0030c5
multi: add `ReadySignal` to `WalletController`
ViktorTigerstrom 01f1637
lnd: await remote signer connection on startup
ViktorTigerstrom ca5e017
multi: allow `remotesigner.allowinboundconnection`
ViktorTigerstrom ca280c8
docs: add outbound signer to remote signing docs
ViktorTigerstrom 403b996
docs: update release notes
ViktorTigerstrom 8bcf99e
lntest: separate creation/start of watch-only node
ViktorTigerstrom 83e159c
itest: fix testRemoteSignerRandomSeedOutbound typo
ViktorTigerstrom ba6d4e9
itest: add outbound remote signer itests
ViktorTigerstrom 6d87e66
itest: add testOutboundRSMacaroonEnforcement itest
ViktorTigerstrom 3ac2294
itest: wrap deriveCustomScopeAccounts at 80 chars
ViktorTigerstrom 0f06ef3
rpcwallet: allow remote signer to reconnect
ViktorTigerstrom 7340883
lncfg: Add `watchonlynode.allowinboundconnection`
ViktorTigerstrom b5ea30d
multi: Block non-whitelisted RPCs as remote signer
ViktorTigerstrom 9acf2d1
docs: recommend specifying that node acts as inbound signer
ViktorTigerstrom ae7999d
multi: Add `lndsigner` binary
ViktorTigerstrom 2f56beb
lnd+lncfg: Add `SignerConfig`
ViktorTigerstrom b9275f5
lnd: load `SignerConfig` into `lndsigner`
ViktorTigerstrom e19ebd5
f - lnd: Use interface for config loading instead
ViktorTigerstrom 5bbd3d1
make+scripts: add `lndsigner` to release script
ViktorTigerstrom 5f99200
docs: add `lndsigner` info to remote signing docs
ViktorTigerstrom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ _testmain.go | |
|
||
/lnd | ||
/lnd-debug | ||
/lndsigner | ||
/lndsigner-debug | ||
/lncli | ||
/lncli-debug | ||
/lnd-itest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package main | ||
|
||
import ( | ||
"errors" | ||
"fmt" | ||
"os" | ||
|
||
"github.com/jessevdk/go-flags" | ||
"github.com/lightningnetwork/lnd" | ||
"github.com/lightningnetwork/lnd/signal" | ||
) | ||
|
||
func main() { | ||
// Hook interceptor for os signals. | ||
shutdownInterceptor, err := signal.Intercept() | ||
if err != nil { | ||
_, _ = fmt.Fprintln(os.Stderr, err) | ||
os.Exit(1) | ||
} | ||
|
||
// Load the signer configuration, and parse any command line options. | ||
// This function will also set up logging properly. | ||
loadedConfig, err := lnd.LoadSignerConfig(shutdownInterceptor) | ||
if err != nil { | ||
var flagsErr *flags.Error | ||
if errors.As(err, &flagsErr) && flagsErr.Type == flags.ErrHelp { | ||
// Help was requested, exit normally. | ||
os.Exit(0) | ||
} | ||
|
||
// Print error if not due to help request. | ||
err = fmt.Errorf("failed to load config: %w", err) | ||
_, _ = fmt.Fprintln(os.Stderr, err) | ||
os.Exit(1) | ||
} | ||
implCfg := loadedConfig.ImplementationConfig(shutdownInterceptor) | ||
|
||
// Call the "real" main in a nested manner so the defers will properly | ||
// be executed in the case of a graceful shutdown. | ||
if err = lnd.Main( | ||
loadedConfig, lnd.ListenerCfg{}, implCfg, shutdownInterceptor, | ||
); err != nil { | ||
_, _ = fmt.Fprintln(os.Stderr, err) | ||
os.Exit(1) | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to note here is that
lncli
will be built with theRELEASE_TAGS
build tags, and not with theLND_SIGNER_TAGS
that the actuallncli
that's shipped along withlndsigner
in the zip file. I.e. thelncli
here will contain more functionality. IMO that's ok though, as it could be a bit confusing if we'd allow installing of 2 differentlncli
in thismake
command.Potentially we could give an option to the executer of this command choose which version they'd like to install though.