Repository navigation
Closed
Labels
bugSomething isn't working
Description
Expected Behavior
Command should be documented and dashmate wallet:mint 10 should add 10 DASH to the account
Current Behavior
On the fresh setup, after dashmate setup with local configuration, mint command does not see default local configuration, so the command dashmate wallet:mint 10 results in error:
Error: Only local network supports generation of dash
If you pass --config=local manually, then the core service fails to read spork address and crashes immediately
% yarn dashmate wallet:mint 10 --config=local --verbose
[STARTED] Generate 10 dash to address
[STARTED] Start Core
[FAILED] Could not connect to Core RPC
[FAILED] Could not connect to Core RPC
The log of core is:
2022-08-16T16:07:36Z Dash Core version v18.0.0-5d32741d4 (release build)
2022-08-16T16:07:36Z InitParameterInteraction: parameter interaction: -externalip set -> setting -discover=0
2022-08-16T16:07:36Z InitParameterInteraction: parameter interaction: additional indexes -> setting -checklevel=4
2022-08-16T16:07:36Z Validating signatures for all blocks.
2022-08-16T16:07:36Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000
2022-08-16T16:07:36Z fDisableGovernance 0
2022-08-16T16:07:36Z Using the 'arm_shani(1way,2way)' SHA256 implementation
2022-08-16T16:07:36Z Default data directory /dash/.dashcore
2022-08-16T16:07:36Z Using data directory /dash/.dashcore/regtest
2022-08-16T16:07:36Z Config file: /dash/.dashcore/dash.conf
2022-08-16T16:07:36Z Using at most 256 automatic connections (1048576 file descriptors available)
2022-08-16T16:07:36Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2022-08-16T16:07:36Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2022-08-16T16:07:36Z Script verification uses 4 additional threads
Error: Invalid spork address specified with -sporkaddr
2022-08-16T16:07:36Z CSporkManager::SetSporkAddress -- Failed to parse spork address
2022-08-16T16:07:36Z Error: Invalid spork address specified with -sporkaddr
2022-08-16T16:07:36Z PrepareShutdown: In progress...
2022-08-16T16:07:36Z Shutdown: done
Possible Solution
If we look into created dashmate configuration file, we can see that spork parameters are null:
"spork": {
"address": null,
"privateKey": null
}
Need to find out why they are nulled and fix command to pass proper command line parameters to the Core
Steps to Reproduce (for bugs)
- dashmate setup local
- dashmate wallet:mint 10
- dashmate wallet:mint 10 --config=local
Context
Your Environment
- Version used: dashmate 0.22.13
- Environment name and version (e.g. Chrome 39, node.js 5.4): Node v16.14.2
- Operating System and version (desktop, server, or mobile): Apple M1 arm64
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
pshenmic commentedon Mar 15, 2023
The original error with Could not connect to core RPC is gone, but invoking it without
--config=localwill result an error. Maybe we should consider just moving wallet mint comand inside the group folder?shumkov commentedon Apr 19, 2023
Actually, the right option here is
--config=local_seedif you use it for the local network. This command doesn't support config groups so It behaves as expected.pshenmic commentedon Jun 25, 2023
I agree, but it does not support regular nodes either, because this command does not make sense for mainnet, testnet, and devnet nodes. It is only supported for regtest nodes I believe
shumkov commentedon Sep 26, 2024
@pshenmic What do you recommend? Add a check that the specified config has network == local? I wouldn't say I like the idea to hardcode config name there because a user can manually create any configuration for local network and name configs differently.
shumkov commentedon Sep 26, 2024
Let's update documentation at least :)
chore(dashmate): do not call mint on masternodes