-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[Wallet] Simple HD/BIP32 support #7273
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
Conversation
|
The main benefits of this PR:
|
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.
Nit: Is there a compelling reason to do this?
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.
Encrypting the wallet does stop the process,... i think this is required.
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.
Riky
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.
Riky
|
concept ACK |
src/wallet/walletdb.h
Outdated
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.
Typo? Achive -> Active?
|
Note to test: If encrypting wallet fails for any reason at any late stage, the wallet should retain all unencrypted data. |
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.
Return value is ignored.
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.
Fixed.
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.
Oky
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.
Oky
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.
Oky
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.
Oky
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.
Oky
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.
Oky
|
Concept ACK |
src/init.cpp
Outdated
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.
Probably should make this clear it only happens upon first run of the wallet.
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.
Probably should make this clear it only happens upon first run of the wallet.
I agree, -hdseed as startup parameter is somehow not ideal. Not seeding the wallet at first start, would require an additional rpc command (something generatehdwallet, seedwallet, etc.).
Or an additional "bitcoin-wallet" tool that could allow generating and manipulating wallet.dat files.
But because I fear lack of reviewer, I don't want to make this PR more complex for now.
42d2a1a to
915b69d
Compare
|
Rebased and fixed reported nits. |
src/wallet/walletdb.cpp
Outdated
| return false; | ||
|
|
||
| Erase(std::make_pair(std::string("hdmasterseed"), hash)); | ||
| Erase(std::make_pair(std::string("hdmasterseed"), hash)); |
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.
double deletion?
- master seeds are kept seperated and can be encrypted
915b69d to
3494217
Compare
|
Rebased and fixed some nits. |
|
Concept ACK. I think on-ramping users to this safely/transparently will be the most difficult part. Warning users that the flag they've set can't be properly used until a new wallet is created(or some migration happens) is a must imo. There needs to be a tool/process to help with that migration, most likely with a backup/cloning step. |
|
@jonasschnelli Is it ok to delete the |
|
I deleted the branch. There is still some useful stuff in this branch (thinks like child key derivation by keypath-string) that could be re-used later. |
Most simplest HD feature.
ment as a starting point, have concrete plans to extend this, but don't want to overload this PR
getnewaddress "" true(last parametertrue= "show details") returns an object if the new address was hd derived:{ "address": "n1EU7TC4YqVYGQYy5eav1APHhS3z3Jrgf4", "keypath": "m/0'/230'" }(same for
getaddressesbyaccount)