Skip to content
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

Switch to wallet-backed chain io in dcrlnd #94

Merged
merged 3 commits into from
Jul 9, 2020

Conversation

matheusd
Copy link
Member

Rebased on top of #93

Part of #80

This switches the main dcrlnd package to use the recently introduced wallet-backed drivers for chain IO operations.

The net result is that chain IO operations are now fully performed by the underlying dcrwallet instance and dcrlnd no longer requires a connection to a running dcrd to perform its job.

For dcrlnd operating in remote wallet mode (such as those running from within Decrediton) the change is automatic.

For dcrlnd operating with an embedded dcrwallet, a new value for the node config option (dcrw) must be specified to use the new IO mode. Both the old dcrd mode and the dcrw mode are tested via itests running in the Github Actions CI.

@matheusd matheusd mentioned this pull request Mar 30, 2020
9 tasks
@matheusd matheusd force-pushed the wallet-chainio branch 3 times, most recently from a984811 to 935b74e Compare March 31, 2020 17:54
This introduces an implementation of the lnwallet.BlockchainIO interface
via the Dcrwallet driver used with embedded-wallet dcrlnd instances.

This allows the wallet driver to be used for all blockchain-related
operations, removing the need for a direct connection between dcrlnd and
a dcrd instance.

This is work towards eventually supporting an SPV mode in dcrlnd.
This introduces an implementation of the lnwallet.BlockchainIO interface
via the RemoteDcrwallet driver used in remote wallet dcrlnd instances.

This allows the wallet driver to be used for all blockchain-related
operations, removing the need for a direct connection to a dcrd
instance.

This is work towards supporting an SPV mode in dcrlnd.
This changes the root dcrlnd package to allow using the wallet as source
for chain data.

For remote wallets, the node is changed to unconditionally use the
wallet instead of relying on a dcrd connection.

For embedded wallets, a new node option is added ("dcrw") which
specifies if the node will use the wallet as the source for chain
operations.

The intention is to eventually phase out the old "dcrd" node connection
mode, but that is not done in this commit so that we can maintain the
legacy mode for comparison and testing.

The Github Actions CI script has been changed to test both the old
("dcrd") connection mode and the new ("dcrw") connection modes so we can
ensure the new mode is working correctly.
@matheusd matheusd merged commit 9f9767c into decred:master Jul 9, 2020
@matheusd matheusd deleted the wallet-chainio branch July 9, 2020 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant