-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add remote signing binary #9293
Open
ViktorTigerstrom
wants to merge
41
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
41 commits
Select commit
Hold shift + click to select a range
de5b1c1
lnd+lncfg: add outbound remote signer to config
ViktorTigerstrom 759b817
lncfg: correct `DefaultRemoteSignerRPCTimeout` docs
ViktorTigerstrom 33b8286
lnd: add new `remotesigner` macaroon entity
ViktorTigerstrom 0ab64ff
walletrpc: add `SignCoordinatorStreams` RPC
ViktorTigerstrom 7643663
rpcwallet: add `RemoteSigner` interface
ViktorTigerstrom 80b0ad3
rpcwallet: add InboundRemoteSigner implementation
ViktorTigerstrom c375590
rpcwallet: add `RemoteSignerBuilder`
ViktorTigerstrom 22173bb
rpcwallet: use `RemoteSigner` in RPCKeyRing
ViktorTigerstrom 27cb7eb
lnd+rpcwallet: use `RemoteSigner` for health check
ViktorTigerstrom 96569ea
rpcwallet: add `RemoteSignerClient` struct
ViktorTigerstrom e469852
f - rpcwallet: use GoroutineManager in remote signer signer client
ViktorTigerstrom 66d22b3
rpcwallet: Add `RemoteSignerClientBuilder`
ViktorTigerstrom 748c28a
lnd: add RemoteSignerClient instance on startup
ViktorTigerstrom 16fdc25
lncfg: enable signerrole `signer-outbound`
ViktorTigerstrom bc1a52b
rpcwallet: add `SignCoordinator` struct
ViktorTigerstrom 6257910
rpcwallet: add OutboundRemoteSigner implementation
ViktorTigerstrom d252d69
lnrpc: add AllowRemoteSigner WalletState proto
ViktorTigerstrom 300047b
rpcperms: allow some RPCs before rpcActive state
ViktorTigerstrom 3173439
rpcperms: fix SetServerActive function docs typo
ViktorTigerstrom 73ee337
multi: enable RpcServer before dependencies exist
ViktorTigerstrom 71f512c
multi: add `RemoteSigner` to walletrpc config
ViktorTigerstrom 2213b95
walletrpc: implement `SignCoordinatorStreams` RPC
ViktorTigerstrom 3f1bd7c
multi: add RemoteSigner before other dependencies
ViktorTigerstrom 6694892
multi: add `ReadySignal` to `WalletController`
ViktorTigerstrom 0221e2d
lnd: await remote signer connection on startup
ViktorTigerstrom 5d51427
multi: enable signerrole `watchonly-outbound`
ViktorTigerstrom 8d4233c
docs: add outbound signer to remote signing docs
ViktorTigerstrom 1ce108a
docs: update release notes
ViktorTigerstrom ebe7025
lntest: separate creation/start of watch-only node
ViktorTigerstrom c9fcf12
itest: add outbound remote signer itest
ViktorTigerstrom bfdd795
itest: add testOutboundRSMacaroonEnforcement itest
ViktorTigerstrom 5d6e40b
itest: wrap deriveCustomScopeAccounts at 80 chars
ViktorTigerstrom fd933d6
lncfg: Add `signer-inbound` `signerrole`
ViktorTigerstrom a563368
multi: Block non-whitelisted RPCs as remote signer
ViktorTigerstrom 55d16b7
docs: recommend setting signer-inbound signerrole
ViktorTigerstrom c7784e4
multi: Add `lndsigner` binary
ViktorTigerstrom 570b34f
lnd+lncfg: Add `SignerConfig`
ViktorTigerstrom 2b03e06
lnd: load `SignerConfig` into `lndsigner`
ViktorTigerstrom 76e4caf
f - lnd: Use interface for config loading instead
ViktorTigerstrom 37e2ffc
make+scripts: add `lndsigner` to release script
ViktorTigerstrom bc0c0dc
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 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 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 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.