fix(dashmate): local nodes missing envs after group reset#839
Closed
pshenmic wants to merge 8 commits into
Closed
Conversation
shumkov
requested changes
Mar 22, 2023
| * @param {generateHDPrivateKeys} generateHDPrivateKeys | ||
| * @return {configureTenderdashTask} | ||
| */ | ||
| function configureContractsPrivateKeysTaskFactory(generateHDPrivateKeys) { |
Collaborator
There was a problem hiding this comment.
generateSystemDataContractKeysTask
| config.set('platform.featureFlags', baseConfig.platform.featureFlags); | ||
| config.set('platform.masternodeRewardShares', baseConfig.platform.masternodeRewardShares); | ||
|
|
||
| subTasks.unshift({ |
…up-reset # Conflicts: # packages/dashmate/src/commands/group/reset.js # packages/dashmate/src/createDIContainer.js # packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js
shumkov
requested changes
Apr 19, 2023
Comment on lines
+66
to
+76
| // eslint-disable-next-line no-param-reassign | ||
| task.output = `DPNS Private Key: ${dpnsPrivateKey.toString()}`; | ||
|
|
||
| // eslint-disable-next-line no-param-reassign | ||
| task.output = `Feature Flags Private Key: ${featureFlagsPrivateKey.toString()}`; | ||
|
|
||
| // eslint-disable-next-line no-param-reassign | ||
| task.output = `Dashpay Private Key: ${dashpayPrivateKey.toString()}`; | ||
|
|
||
| // eslint-disable-next-line no-param-reassign | ||
| task.output = `Masternode Reward Shares Private Key: ${masternodeRewardSharesPrivateKey.toString()}`; |
Collaborator
There was a problem hiding this comment.
I think we don't need this anymore
| const subTasks = ctx.configGroup.map((config, i) => ( | ||
| { | ||
| title: `Create ${config.getName()} config`, | ||
| // eslint-disable-next-line consistent-return |
| task: () => generateSystemDataContractKeysTask(config, config.get('network')), | ||
| }, | ||
| { | ||
| task: () => resetNodeTask(config), |
Collaborator
There was a problem hiding this comment.
Didn't we reset config there?
shumkov
requested changes
Apr 19, 2023
| task: () => resetNodeTask(config), | ||
| }, | ||
| { | ||
| task: () => generateSystemDataContractKeysTask(config, config.get('network')), |
Collaborator
There was a problem hiding this comment.
Did you test it? I think it won't work because all configs will have different keys now so init chain won't be deterministic. If you see how it worked before. We generated it once on setup and set to all configs. You should do the same
pshenmic
marked this pull request as draft
April 20, 2023 14:11
Collaborator
Author
|
Fixed in #991 |
5 tasks
shumkov
added a commit
that referenced
this pull request
Jul 4, 2026
Bring the branch up to v4.1-dev, which bumps rust-dashcore to afcff156:
key-wallet now impls `Zeroize` + `Drop` on `ExtendedPrivKey`, and
`extended_public_key` moved into the new `ExtendedPubKeySigner` subtrait.
Conflicts resolved (take base's rust-dashcore, afcff156):
- Cargo.toml / Cargo.lock: base's afcff156 rev.
- packages/rs-sdk-ffi/src/mnemonic_resolver_core_signer.rs: reconcile the
derive-sign-destroy zeroization with the upstream change.
- `WipingXprv` REMOVED — it was a local workaround for `ExtendedPrivKey`
having no `Drop`, which key-wallet now provides (dashcore PR #833, added
specifically for this signer). The bare value self-wipes on every path.
- `WipingSecretKey` KEPT — the `secp256k1::SecretKey` copy at the two sign
sites is the one key intermediate #833 cannot cover (`SecretKey` is an
upstream type with no `Zeroize`, only `non_secure_erase()`), so the RAII
guard remains the only way to close its `?`-early-return / panic leak
window. Preserves the "no key bytes survive the trait boundary" invariant.
- `extended_public_key` moved into an `impl ExtendedPubKeySigner` block
(dashcore #839).
Bump ripple + follow-through:
- packages/rs-platform-wallet-ffi/src/dashpay.rs: import `ExtendedPubKeySigner`
for `receiving_xpub` (the method moved off `Signer`).
- packages/rs-platform-wallet-ffi/src/sign_with_mnemonic_resolver.rs: drop its
own now-redundant `WipingXprv`, relying on `ExtendedPrivKey`'s upstream Drop.
rs-sdk-ffi + platform-wallet-ffi build; 300 + 8 tests pass (incl. the 12
resolver-signer tests); full-workspace build green; fmt + clippy clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shumkov
added a commit
that referenced
this pull request
Jul 4, 2026
…endedPubKeySigner The v4.1-dev merge bumped rust-dashcore to afcff156, which (dashcore #839) moved `extended_public_key` out of `key_wallet::signer::Signer` into the new `ExtendedPubKeySigner: Signer` subtrait. Production callers were migrated in the merge, but four test-code signer impls still declared the method on `Signer` / `KwSigner`, so the workspace test build failed with `error[E0407]: method extended_public_key is not a member of trait ...` (dpp + platform-wallet lib tests). A plain `cargo build --workspace` compiles no test targets, which is why the merge's build looked clean; `cargo check --workspace --all-targets` surfaces it. Move the method into a separate `impl ExtendedPubKeySigner` block for each test signer (FixedKeySigner ×3, SeedSigner ×1); bodies are byte-for-byte identical (`ExtendedPubKeySigner: Signer` inherits the associated Error), so this is a pure trait-membership move, no behavior change. `cargo check --workspace --all-targets` clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
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.
Issue being fixed or feature implemented
After dashmate group reset, nodes fails to start due some contracts private key is missing
#785
What was done?
Moved contracts private keys generation in the separate factory and used it in the setup and reset phases
How Has This Been Tested?
Locally
Breaking Changes
No
Checklist:
For repository code-owners and collaborators only