Control RPCs
Debug
The debug
RPC changes the debug category from the console.
Parameter #1---debug category
Name | Type | Presence | Description |
---|---|---|---|
Debug category | string | Required (1 or more) | The debug category to activate. Use a + to specify multiple categories. Categories will be one of the following:• 0 - Disables all categories • 1 or all - Enables all categories • addrman • bench • cmpctblock • coindb • db • estimatefee • http • leveldb • libevent • mempool • mempoolrej • net • proxy • prune • qt • rand • reindex • rpc • selectcoins • tor • zmq • dash (all subcategories)The dash sub-categories can be enabled individually:• chainlocks • gobject • instantsend • keepass • llmq • llmq-dkg • llmq-sigs • mnpayments • mnsync • privatesend • spork Note: No error will be thrown even if the specified category doesn't match any of the above |
Example from Dash Core 0.15.0
dash-cli -testnet debug "net+mempool"
Result:
Debug mode: net+mempool
See also
- Logging: gets and sets the logging configuration
GetInfo
The getinfo
RPC prints various information about the node and the network.
Deprecation Warning
Warning:
getinfo
will be removed in a later version of Dash Core. Use the RPCs listed in the See Also subsection below instead.
Parameters: none
Result---information about the node and network
Name | Type | Presence | Description |
---|---|---|---|
result | object | Required (exactly 1) | Information about this node and the network |
→deprecation-warning | string | Required (exactly 1) | Warning that the getinfo command is deprecated and will be removed in a future version |
→version | number (int) | Required (exactly 1) | This node's version of Bitcoin Core in its internal integer format. For example, Dash Core 0.12.2 has the integer version number 120200 |
→protocolversion | number (int) | Required (exactly 1) | The protocol version number used by this node. See the protocol versions section for more information |
→walletversion | number (int) | Optional (0 or 1) | The version number of the wallet. Only returned if wallet support is enabled |
→balance | number (duffs) | Optional (0 or 1) | The total balance of the wallet in duffs. Only returned if wallet support is enabled |
→privatesend_balance | number (duffs) | Optional (0 or 1) | The PrivateSend balance of the wallet in duffs. Only returned if wallet support is enabled (Added in Dash Core 0.11.0) |
→blocks | number (int) | Required (exactly 1) | The number of blocks in the local best block chain. A new node with only the hardcoded genesis block will return 0 |
→timeoffset | number (int) | Required (exactly 1) | The offset of the node's clock from the computer's clock (both in UTC) in seconds. The offset may be up to 4200 seconds (70 minutes) |
→connections | number (int) | Required (exactly 1) | The total number of open connections (both outgoing and incoming) between this node and other nodes |
→proxy | string | Required (exactly 1) | The hostname/IP address and port number of the proxy, if set, or an empty string if unset |
→difficulty | number (real) | Required (exactly 1) | The difficulty of the highest-height block in the local best block chain |
→testnet | bool | Required (exactly 1) | Set to true if this node is on testnet; set to false if this node is on mainnet or a regtest |
→keypoololdest | number (int) | Optional (0 or 1) | The date as Unix epoch time when the oldest key in the wallet key pool was created; useful for only scanning blocks created since this date for transactions. Only returned if wallet support is enabled |
→keypoolsize | number (int) | Optional (0 or 1) | The number of keys in the wallet keypool. Only returned if wallet support is enabled |
→unlocked_until | number (int) | Optional (0 or 1) | The Unix epoch time when the wallet will automatically re-lock. Only displayed if wallet encryption is enabled. Set to 0 if wallet is currently locked |
→paytxfee | number (duffs) | Optional (0 or 1) | The minimum fee to pay per kilobyte of transaction; may be 0 . Only returned if wallet support is enabled |
→relayfee | number (duffs) | Required (exactly 1) | The minimum fee per kilobyte a transaction must pay in order for this node to accept it into its memory pool |
→errors | string | Required (exactly 1) | A plain-text description of any errors this node has encountered or detected. If there are no errors, an empty string will be returned. This is not related to the JSON-RPC error field |
Example from Dash Core 0.15.0 with wallet support enabled
dash-cli -testnet getinfo
Result:
{
"deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in a future version. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo.",
"version": 140100,
"protocolversion": 70215,
"walletversion": 61000,
"balance": 0.00000000,
"privatesend_balance": 0.00000000,
"blocks": 0,
"timeoffset": 0,
"connections": 0,
"proxy": "",
"difficulty": 0.000244140625,
"testnet": true,
"keypoololdest": 1507579068,
"keypoolsize": 617,
"unlocked_until": 0,
"paytxfee": 0.00000000,
"relayfee": 0.00010000,
"errors": ""
}
See also
- GetBlockChainInfo: provides information about the current state of the block chain.
- GetMemPoolInfo: returns information about the node's current transaction memory pool.
- GetMiningInfo: returns various mining-related information.
- GetNetworkInfo: returns information about the node's connection to the network.
- GetWalletInfo: provides information about the wallet.
GetMemoryInfo
Added in Dash Core 0.12.3 / Bitcoin Core 0.14.0
The getmemoryinfo
RPC returns information about memory usage.
Parameter #1---mode
Name | Type | Presence | Description |
---|---|---|---|
mode | string | Optional Default: stats | Added in Dash Core 0.15.0 Determines what kind of information is returned. - stats returns general statistics about memory usage in the daemon.- mallocinfo returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+). |
Result---information about memory usage
Name | Type | Presence | Description |
---|---|---|---|
result | object | Required (exactly 1) | An object containing information about memory usage |
→locked | string : object | Required (exactly 1) | An object containing information about locked memory manager |
→→used | number (int) | Required (exactly 1) | Number of bytes used |
→→free | number (int) | Required (exactly 1) | Number of bytes available in current arenas |
→→total | number (int) | Required (exactly 1) | Total number of bytes managed |
→→locked | number (int) | Required (exactly 1) | Amount of bytes that succeeded locking |
→→chunks_used | number (int) | Required (exactly 1) | Number allocated chunks |
→→chunks_free | number (int) | Required (exactly 1) | Number unused chunks |
Example from Dash Core 0.12.3
dash-cli getmemoryinfo
Result:
{
"locked": {
"used": 1146240,
"free": 426624,
"total": 1572864,
"locked": 1572864,
"chunks_used": 16368,
"chunks_free": 7
}
}
See also
- GetMemPoolInfo: returns information about the node's current transaction memory pool.
Help
The help
RPC lists all available public RPC commands, or gets help for the specified RPC. Commands which are unavailable will not be listed, such as wallet RPCs if wallet support is disabled.
Parameter---the name of the RPC to get help for
Name | Type | Presence | Description |
---|---|---|---|
RPC | string | Optional (0 or 1) | The name of the RPC to get help for. If omitted, Dash Core 0.10x will display an alphabetical list of commands; Dash Core 0.11.0 will display a categorized list of commands |
Result---a list of RPCs or detailed help for a specific RPC
Name | Type | Presence | Description |
---|---|---|---|
result | string | Required (exactly 1) | The help text for the specified RPC or the list of commands. The dash-cli command will parse this text and format it as human-readable text |
Example from Dash Core 0.12.2
Command to get help about the help
RPC:
dash-cli -testnet help help
Result:
help ( "command" )
List all commands, or get help for a specified command.
Arguments:
1. "command" (string, optional) The command to get help on
Result:
"text" (string) The help text
See also
Logging
The logging
RPC gets and sets the logging configuration
Parameter #1---include categories
Name | Type | Presence | Description |
---|---|---|---|
include | array of strings | Optional (0 or 1) | Enable debugging for these categories |
Parameter #2---exclude categories
Name | Type | Presence | Description |
---|---|---|---|
exclude | array of strings | Optional (0 or 1) | Enable debugging for these categories |
The categories are:
Type | Category |
---|---|
Special | • 0 - Disables all categories • 1 or all - Enables all categories • dash - Enables/disables all Dash categories |
Standard | addrman , bench cmpctblock , coindb , db , estimatefee , http , leveldb , libevent , mempool , mempoolrej , net , proxy , prune , qt , rand , reindex , rpc , selectcoins , tor , zmq |
Dash | chainlocks , gobject , instantsend , keepass , llmq , llmq-dkg , llmq-sigs , mnpayments , mnsync , privatesend , spork |
Result---a list of the logging categories that are active
Name | Type | Presence | Description |
---|---|---|---|
result | object | Required (exactly 1) | A JSON object show a list of the logging categories that are active |
Example from Dash Core 0.15.0
Include a category in logging
dash-cli -testnet logging '["llmq", "spork"]'
Result:
{
"net": 0,
"tor": 0,
"mempool": 0,
"http": 0,
"bench": 0,
"zmq": 0,
"db": 0,
"rpc": 0,
"estimatefee": 0,
"addrman": 0,
"selectcoins": 0,
"reindex": 0,
"cmpctblock": 0,
"rand": 0,
"prune": 0,
"proxy": 0,
"mempoolrej": 0,
"libevent": 0,
"coindb": 0,
"qt": 0,
"leveldb": 0,
"chainlocks": 0,
"gobject": 0,
"instantsend": 0,
"keepass": 0,
"llmq": 1,
"llmq-dkg": 0,
"llmq-sigs": 0,
"mnpayments": 0,
"mnsync": 0,
"privatesend": 0,
"spork": 1
}
Excluding a previously included category (without including any new ones):
dash-cli -testnet logging '[]' '["spork"]'
Result:
{
"net": 0,
"tor": 0,
"mempool": 0,
"http": 0,
"bench": 0,
"zmq": 0,
"db": 0,
"rpc": 0,
"estimatefee": 0,
"addrman": 0,
"selectcoins": 0,
"reindex": 0,
"cmpctblock": 0,
"rand": 0,
"prune": 0,
"proxy": 0,
"mempoolrej": 0,
"libevent": 0,
"coindb": 0,
"qt": 0,
"leveldb": 0,
"chainlocks": 0,
"gobject": 0,
"instantsend": 0,
"keepass": 0,
"llmq": 1,
"llmq-dkg": 0,
"llmq-sigs": 0,
"mnpayments": 0,
"mnsync": 0,
"privatesend": 0,
"spork": 0
}
See also
- Debug: changes the debug category from the console.
Stop
The stop
RPC safely shuts down the Dash Core server.
Parameters: none
Result---the server is safely shut down
Name | Type | Presence | Description |
---|---|---|---|
result | string | Required (exactly 1) | The string \Dash Core server stopping"" |
Example from Dash Core 0.12.2
dash-cli -testnet stop
Result:
Dash Core server stopping
See also: none
Uptime
The uptime
RPC returns the total uptime of the server.
Parameters: none
Result
Name | Type | Presence | Description |
---|---|---|---|
result | number (int) | Required (exactly 1) | The number of seconds that the server has been running |
Example from Dash Core 0.15.0
dash-cli -testnet uptime
Result:
5500
See also: none
Updated almost 5 years ago