-
Notifications
You must be signed in to change notification settings - Fork 14
feat!: KeyChainStore, ChainStore, WalletStore and path registration feature #351
base: v0.22-dev
Are you sure you want to change the base?
Conversation
BREAKING-CHANGES : removed generateKetForPath, normalize base key to single rootKey, rename type to rootKeyType, remove unnecessary getKeyForChild duplicate of getKeyForType
BREAKING-CHANGES: keyChain in wallet and account is now accessed via keyChainStore.getWalletKeyChain
This pull request introduces 3 alerts when merging 07690fb into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 7 alerts when merging afb46ef into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 7 alerts when merging a43369a into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 38 alerts when merging 86a1b2d into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 38 alerts when merging f9eb15d into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 37 alerts when merging 426e919 into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 37 alerts when merging 6968c8f into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 37 alerts when merging 09d6b9a into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 37 alerts when merging ec7cc24 into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 39 alerts when merging 46ac52e into 9a67d0d - view on LGTM.com new alerts:
|
This pull request introduces 31 alerts when merging 1b5b1e4 into 9a67d0d - view on LGTM.com new alerts:
|
Issue being fixed or feature implemented
This Pull Request is pretty dense in the amount of internals that it modifies.
The goal is to modifies the way keys (and subsequently, addresses) are handled internally.
It comes with the addition of a KeyChainStore that manage one of multiple KeyChains.
It improve KeyChain so that it is possible to mark a specific key as watched.
Doing so allow to easily get other components to register path for being watched, by registering keys to the keychain, and adding keychain to the keystore.
One exemple of such usage is DashPay which create a HDPublicKey initialized KeyChain, of which their is a requirement to get the watched address to submit a bloomfilter that includes them.
About Storage :
About Bloomfilter and Address state :
As we now hold addresses state (balance, tx, utxos) in ChainStore, and WalletStore only keep some mapping of internal (eg: for unusedAddress purpose), we can allow any addition of new KeyChain to be added and their addresses to be added to watched address.
Therefore, we will be able to submit to bloomfilter all addresses from master keychain and afferent one that were generated (this is typically the case on DashPay Contacts).
It also allow plugins to have some limited control to which addresses get supplied to the SPV process, they will still need to access the information (e.g: getting TxHistory of those addresses).
It would be an option to generalise this on a Wallet level instead of an Account level, but this PR only implements watched address from Account keychainStore.
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only