forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(wallet): derive masternode operator keys from seed #7594
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
Open
PastaPastaPasta
wants to merge
6
commits into
dashpay:develop
Choose a base branch
from
PastaPastaPasta:feat/wallet-derived-mn-operator-keys
base: develop
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
6 commits
Select commit
Hold shift + click to select a range
f1903eb
feat(evo): expose whether an operator key is in use at the chain tip
PastaPastaPasta 198a9e2
feat(wallet): derive masternode operator keys from seed
PastaPastaPasta 84f6700
refactor(wallet): isolate masternode operator implementation
PastaPastaPasta 0ae8ebf
refactor(wallet): align masternode operator filenames
PastaPastaPasta 4a03d9f
fix(wallet): enforce operator issuance lock contract
PastaPastaPasta 11f564b
refactor(wallet): rely on operator lock annotation
PastaPastaPasta 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 hidden or 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,8 @@ | ||
| Wallet | ||
| ------ | ||
|
|
||
| - Mnemonic-backed descriptor wallets can now derive DashSync-compatible | ||
| masternode operator BLS keys from the wallet seed, so the recovery phrase | ||
| also backs up operator keys. Restored wallets avoid keys that are currently | ||
| registered, but may reuse a key that was retired in the past. Other wallet | ||
| types remain unchanged and can continue using `bls generate`. (#7594) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,43 @@ | ||
| // Copyright (c) 2026 The Dash Core developers | ||
| // Distributed under the MIT software license, see the accompanying | ||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
|
||
| #ifndef BITCOIN_INTERFACES_MASTERNODE_OPERATOR_H | ||
| #define BITCOIN_INTERFACES_MASTERNODE_OPERATOR_H | ||
|
|
||
| #include <support/allocators/secure.h> | ||
|
|
||
| #include <cstdint> | ||
| #include <string> | ||
| #include <vector> | ||
|
|
||
| namespace interfaces { | ||
|
|
||
| //! Result of a deterministic masternode operator-key operation. | ||
| enum class MasternodeOperatorKeyStatus : uint8_t { | ||
| SUCCESS, | ||
| NOT_SUPPORTED, | ||
| WALLET_LOCKED, | ||
| EXHAUSTED, | ||
| INVALID_KEY, | ||
| NOT_FOUND, | ||
| DATABASE_ERROR, | ||
| DERIVATION_ERROR, | ||
| }; | ||
|
|
||
| //! A deterministic masternode operator key returned by the wallet. The public | ||
| //! key uses the canonical basic-scheme serialization. | ||
| struct MasternodeOperatorKey { | ||
| SecureVector secret_key; | ||
| std::vector<unsigned char> public_key; | ||
| std::string path; | ||
| }; | ||
|
|
||
| struct MasternodeOperatorKeyResult { | ||
| MasternodeOperatorKeyStatus status{MasternodeOperatorKeyStatus::DERIVATION_ERROR}; | ||
| MasternodeOperatorKey key; | ||
| }; | ||
|
|
||
| } // namespace interfaces | ||
|
|
||
| #endif // BITCOIN_INTERFACES_MASTERNODE_OPERATOR_H |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
what is meaning of "watermark" in this context? Is it counter for used indexes in derivation path?
if so, I assume that's a bad naming because I hadn't seen watermark anywhere in wallet's codebase or any DIP / BIP