When setting up a network of masternodes with the local preset, the wallet is not accessible on the seed node. Trying to access wallet RPCs gives a 'Method not found' error (code -32601).
A fix that would work is to change the command in the docker-compose file. Instead of starting dashd directly, change the command to a bash script with a conditional clause, if the current node is a masternode (CORE_MASTERNODE_ENABLE=true) then start it with the -masternodeblsprivkey flag, and otherwise start it without any flags.
Something like:
command: bash -c "if [[ $CORE_MASTERNODE_ENABLE = true ]]; then dashd -masternodeblsprivkey=$CORE_MASTERNODE_OPERATOR_PRIVATE_KEY; else dashd; fi
Steps to Reproduce (for bugs)
Setup local dash network with dashmate setup local
Try to create a wallet (or use any other wallet rpc) on the seed node in the created network
Context
It is impossible to make transactions in the local Dash network without access to wallets. Making transactions is desirable functionality for local testing.
Your Environment
Version used: 0.21.0
Environment name and version (e.g. Chrome 39, node.js 5.4): node v16.13.0
Operating System and version (desktop, server, or mobile): linux-x64 20.04 desktop
When setting up a network of masternodes with the local preset, the wallet is not accessible on the seed node. Trying to access wallet RPCs gives a 'Method not found' error (code -32601).
Expected Behavior
Wallet should be accessible on the seed node.
Current Behavior
Calling wallet RPC's returns error.
Possible Solution
As discussed in dc, this is caused by the way the nodes are started with docker-compose: https://github.com/dashevo/dashmate/blob/v0.22-dev/docker-compose.yml#L15
A fix that would work is to change the command in the docker-compose file. Instead of starting dashd directly, change the command to a bash script with a conditional clause, if the current node is a masternode (CORE_MASTERNODE_ENABLE=true) then start it with the -masternodeblsprivkey flag, and otherwise start it without any flags.
Something like:
command: bash -c "if [[ $CORE_MASTERNODE_ENABLE = true ]]; then dashd -masternodeblsprivkey=$CORE_MASTERNODE_OPERATOR_PRIVATE_KEY; else dashd; fi
Steps to Reproduce (for bugs)
dashmate setup local
Context
It is impossible to make transactions in the local Dash network without access to wallets. Making transactions is desirable functionality for local testing.
Your Environment