forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
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
WIP: Demonstrate remote signing w/ lightning-signer #1
Draft
ksedgwic
wants to merge
71
commits into
master
Choose a base branch
from
remotesigner
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.
Conversation
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 commit changes the key derivation algo we use to emulate buckets similar to bbolt. The issue with prefixing keys with either a bucket or a value prefix is that the cursor couldn't effectively iterate trough all keys in a bucket, as it skipped the bucket keys. While there are multiple ways to fix that issue (eg. two pointers, iterating value keys then bucket keys, etc), the cleanest is to instead of prefixes in keys we use a postfix indicating whether a key is a bucket or a value. This also simplifies all operations where we (recursively) iterate a bucket and is equivalent with the prefixing key derivation with the addition that bucket and value keys are now continous.
… tests This commit moves makeTestDB to db.go and exports it so that we'll be able to use this function in other unit tests to make them testable with etcd if needed.
This commit removes the lock set which was used to only add bucket keys to the tx predicate while also bumping their mod version. This was useful to reduce the size of the compare set but wasn't useful to reduce contention as top level buckets were always in the lock set.
This commit extends compatibility with the bbolt kvdb implementation, which returns ErrIncompatibleValue in case of a bucket/value key collision. Furthermore the commit also adds an extra precondition to the transaction when a key doesn't exist. This is needed as we fix reads to a snapshot revision and other writers may commit the key otherwise.
kvdb+etcd+tests: change etcd flattened bucket key derivation to make it compatible with bbolt
…nlocker-split mobile: remember walletunlocker.proto
This value actually isn't read anywhere, since it's no longer used. Instead, `cfg.Db.Bolt.NoSyncFreeList` is what's evaluated when we go to open the DB.
In this commit, unify the old and new values for `sync-freelist`, and also ensure that we don't break behavior for any users that're using the _old_ value. To do this, we first rename what was `--db.bolt.no-sync-freelist`, to `--db.bolt.sync-freelist`. This gets rid of the negation on the config level, and lets us override that value if the user is specifying the legacy config option. In the future, we'll deprecate the old config option, in favor of the new DB scoped option.
This commit adds an integration test that runs on a Windows virtual machine on Travis. The tests run inside of a "Git Bash" environment which supports the same command line syntax as a proper bash but doesn't have all the tooling installed. Some tools also behave differently on Windows. Therefore we also have to simplify the command to upload the logs to termbin and remove the upload to file.io on Windows because both the find and tar command don't work as expected.
We use the event timestamp of a forwarding event as its primary storage key. On systems with a bad clock resolution this can lead to collisions of the events if some of the timestamps are identical. We fix this problem by shifting the timestamps on the nanosecond level until only unique values remain.
devrandom
reviewed
Aug 5, 2020
This corrects the output of the chain notifier RPC error. It has been displayed as: "chain notifier RPC *isstill* in the process of starting"
…-config-fix config: make bbolt freelist settings mutually exclusive
rpc: add missing space to error message
According to the recent discussion `noseedbackup` is not deprecated. This change clarifies the message about deprecation. Also fixes a typo. Closes lightningnetwork#4499
For security reasons, browsers are limited in the header fields they can send when opening a WebSocket connection. Specifically, the macaroon cannot be sent in the Grpc-Metadata-Macaroon header field as that would be possible for normal REST requests. Instead we only have the special field "Sec-Websocket-Protocol" that can be used to transport custom data. We allow the macaroon to be sent there and transform it into a proper header field for the target request.
We add a new document that shows two examples of how to use the WebSocket REST API with JavaScript.
ksedgwic
changed the title
Demonstrate remote signing w/ lightning-signer
WIP: Demonstrate remote signing w/ lightning-signer
Aug 6, 2020
In this commit, we fix a mistake in the split for the new `peer` package/struct when instantiating the config needed. The existing code had the DB's swapped. In this commit, we fix this to pass the remote DB for generic channeldb access, and the local DB for channel graph access.
If a concurrent call to cancel is made while the notifier is shutting down, this would cause a panic (close of closed channel) since the events are not removed from the notification sets.
lnd: properly pass peer remote db for graph, local db for rest
…double-cancel chainntnfs/txnotifier: remove events on teardown
rpcserver: no manual close of restored channels
trivial: typo fix
This version fixes a race condition related to some of the new coin selection calls. Fixes lightningnetwork#4532.
In this commit, we make a new wrapper method around the internal `WalletController` method to ensure it holds the coin select mutex while the balance is being computed.
In this commit, we update the hop hint selection to account for the fact that with MPP, a single payment may consume multiple channels. As is, if a user only has two 0.5 BTC channels, and tries to make a 1 BTC channel, then the current logic won't include any hop hints. To solve this, we first add all the channels which in isolation can carry the payment in question. We then do another pass that accumulates channels until either we reach our hop-hint limit, or the total bandwidth that we've accumulate is greater than 2x the payment amount.
lnrpc/invoicesrpc: extend hop hint selection to account for MPP
btcwallet: update btcwallet version, ensure ConfirmedBalance holds the coin select mutex
In this commit, we update our btcwallet dep to the latest version. This version includes a bug fix for dust calculation. Without this bug fix, users would potentially significantly overpay on fees, as dust was computed using the desired fee of the transaction rather than the min relay fee.
…-fix build: update to btcwallet version with dust bug fix
…bedded PubKeyECDH.
ChannelAnnouncement not encountered by integration tests.
Implemented remote GetChannelBasepoints
* upgraded GetChannelBasepoints debugging * Added remotesigner.ReadyChannel, improved debugging.
* Added remote sign-remote-commitment * Replaced option_static_remotekey w/ CommitmentType.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Checklist
Contribution Guidelines
the positive and negative (error paths) conditions (if applicable)
the bug being fixed to prevent regressions
logging level
go fmt
lnrpc/**/*.proto
) have been formatted withmake rpc-format
and compiled withmake rpc
(the tab character should be counted as 8 characters, not 4, as some IDEs do
per default)
make check
does not fail any testsgo vet
does not report any issuesmake lint
does not report any new issues that did notalready exist
cases it can be justifiable to violate this condition. In that case, the
reason should be stated in the commit message.