Skip to content

Commit

Permalink
chore(dashmate): enable Core RPC whitelists (#1962)
Browse files Browse the repository at this point in the history
Co-authored-by: QuantumExplorer <[email protected]>
  • Loading branch information
shumkov and QuantumExplorer authored Jul 16, 2024
1 parent 1739623 commit d03e2ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/dashmate/configs/defaults/getBaseConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function getBaseConfigFactory(homeDir) {
tenderdash: {
password: 'rpcpassword',
whitelist: [
'quoruminfo', 'quorumverify', 'quorumplatformsign', 'masternodestatus', 'masternodelist',
'quoruminfo', 'quorumverify', 'quorumsign', 'masternodestatus', 'masternodelist',
'ping', 'getnetworkinfo',
],
lowPriority: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function getLocalConfigFactory(getBaseConfig) {
},
core: {
docker: {
image: 'dashpay/dashd:21.0.0-rc.1',
image: 'dashpay/dashd:21.0.0-devpr6115.db828177',
commandArgs: [],
},
p2p: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) {
},
core: {
docker: {
image: 'dashpay/dashd:21.0.0-rc.1',
image: 'dashpay/dashd:21.0.0-devpr6115.db828177',
commandArgs: [],
},
p2p: {
Expand Down
4 changes: 2 additions & 2 deletions packages/dashmate/templates/core/dash.conf.dot
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ rpcwallet=main
deprecatedrpc=hpmn
rpcworkqueue=64
rpcthreads=16
#rpcwhitelistdefault=0
rpcwhitelistdefault=0
rpcexternaluser={{= Object.entries(it.core.rpc.users).filter(([username, options]) => options.lowPriority).map(([username, options]) => username).join(',') }}
{{~ Object.keys(it.core.rpc.users) :user}}
{{ salt = it.crypto.randomBytes(16).toString('hex'); }}
{{ hmac = it.crypto.createHmac('sha256', salt).update(it.core.rpc.users[user].password); }}
rpcauth={{=user}}:{{=salt}}${{=hmac.digest('hex') }}
{{? it.core.rpc.users[user].whitelist !== null }}
#rpcwhitelist={{=user}}:{{=it.core.rpc.users[user].whitelist.join(',')}}
rpcwhitelist={{=user}}:{{=it.core.rpc.users[user].whitelist.join(',')}}
{{?}}
{{~}}

Expand Down

0 comments on commit d03e2ca

Please sign in to comment.