--- title: "Gridcoin - Daemon Commands" layout: layout ---

Gridcoin Daemon Commands

Generic commands

Command Description
-conf=<file> Specify configuration file (default: gridcoin.conf)
-pid=<file> Specify pid file (default:
-datadir=<dir> Specify data directory
-dbcache=<n> Set database cache size in megabytes (default: 25)
-timeout=<n> Specify connection timeout in milliseconds (default: 5000)
-proxy=<ip:port> Connect through socks proxy
-socks=<n> Select the version of socks proxy to use (4-5, default: 5)
-tor=<ip:port> Use proxy to reach tor hidden services (default: same as -proxy)
-dns Allow DNS lookups for -addnode, -seednode and -connect
-port=<port> Listen for connections on <port> (default: 32760 or testnet: 32759)
-maxconnections=<n> Maintain at most <n> connections to peers (default: 125)
-addnode=<ip> Add a node to connect to and attempt to keep the connection open
-connect=<ip> Connect only to the specified node(s)
-seednode=<ip> Connect to a node to retrieve peer addresses, and disconnect
-externalip=<ip> Specify your own public address
-onlynet=<net> Only connect to nodes in network <net> (IPv4, IPv6 or Tor)
-discover Discover own IP address (default: 1 when listening and no -externalip)
-checkpoints Only accept block chain matching built-in checkpoints (default: 1)
-listen Accept connections from outside (default: 1 if no -proxy or -connect)
-bind=<addr> Bind to given address and always listen on it. Use [host]:port notation for IPv6
-dnsseed Find peers using DNS lookup (default: 1 unless -connect)
-banscore=<n> Threshold for disconnecting misbehaving peers (default: 100)
-bantime=<n> Number of seconds to keep misbehaving peers from reconnecting (default: 86400)
-maxreceivebuffer=<n> Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)
-maxsendbuffer=<n> Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)
-bloomfilters Allow peers to set bloom filters (default: 0)
-upnp Use UPnP to map the listening port (default: 1 when listening)
-paytxfee=<amt> Fee per KB to add to transactions you send
-mininput=<amt> When creating transactions, ignore inputs with value less than this (default: 0.0001)
-server Accept command line and JSON-RPC commands
-daemon Run in the background as a daemon and accept commands
-testnet Use the test network
-debug Output extra debugging information. Implies all other -debug* options
-debugnet Output extra network debugging information
-logtimestamps Prepend debug output with timestamp
-shrinkdebugfile Shrink debug.log file on client startup (default: 1 when no -debug)
-printtoconsole Send trace/debug info to console instead of debug.log file
-printtodebugger Send trace/debug info to debugger
-rpcuser=<user> Username for JSON-RPC connections
-rpcpassword=<pw> Password for JSON-RPC connections
-rpcport=<port> Listen for JSON-RPC connections on <port> (default: 32760 or testnet: 32759)
-rpcallowip=<ip> Allow JSON-RPC connections from specified IP address
-rpcconnect=<ip> Send commands to node running on <ip> (default:
-rpcthreads=<n> Set the number of threads to service RPC calls (default: 4)
-blocknotify=<cmd> Execute command when the best block changes (%s in cmd is replaced by block hash)
-walletnotify=<cmd> Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
-alertnotify=<cmd> Execute command when a relevant alert is received (%s in cmd is replaced by message)
-upgradewallet Upgrade wallet to latest format
-keypool=<n> Set key pool size to <n> (default: 100)
-rescan Rescan the block chain for missing wallet transactions
-salvagewallet Attempt to recover private keys from a corrupt wallet.dat
-checkblocks=<n> How many blocks to check at startup (default: 288, 0 = all)
-checklevel=<n> How thorough the block verification is (0-4, default: 3)
-txindex Maintain a full transaction index (default: 0)
-loadblock=<file> Imports blocks from external blk000??.dat file
-reindex Rebuild block chain index from current blk000??.dat files
-par=<n> Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)

Block creation options

Command Description
-blockminsize=<n> Set minimum block size in bytes (default: 0)
-blockmaxsize=<n> Set maximum block size in bytes (default: 250000)
-blockprioritysize=<n> Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)

SSL option

Command Description
-rpcssl Use OpenSSL (https) for JSON-RPC connections
-rpcsslcertificatechainfile=<file.cert> Server certificate file (default: server.cert)
-rpcsslprivatekeyfile=<file.pem> Server private key (default: server.pem)
-rpcsslciphers=<ciphers> Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)

Runtime Commands

Command Parameters Description Requires unlocked wallet?
addmultisigaddress <nrequired> <'["key","key"]'> [account] Add a nrequired-to-sign multisignature address to the wallet. Each key is a bitcoin address or hex-encoded public key. If [account] is specified, assign address to [account]. N
addnode <node> <add|remove|onetry> Attempts add or remove <node> from the addnode list or try a connection to <node> once. N
backupwallet <destination> Safely copies wallet.dat to destination, which can be a directory or a path with filename. N
createmultisig <nrequired> <'["key","key"]'> Creates a multi-signature address and returns a json object N
createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...} Creates a raw transaction spending given inputs. N
decoderawtransaction <hex string> Produces a human-readable JSON object for a raw transaction. N
dumpprivkey <gridcoinaddress> Reveals the private key corresponding to <bitcoinaddress> Y
encryptwallet <passphrase> Encrypts the wallet with <passphrase>. N
execute <string::itemname>
getaccount <gridcoinaddress> Returns the account associated with the given address. N
getaccountaddress <account> Returns the current bitcoin address for receiving payments to this account. If does not exist, it will be created along with an associated new address that will be returned. N
getaddednodeinfo <dns> [node] Returns information about the given added node, or all added nodes.
(Note that onetry addnodes are not listed here) If dns is false, only a list of added nodes will be provided, otherwise connected information will also be available.
getaddressesbyaccount <account> Returns the list of addresses for the given account.
getbalance [account] [minconf=1] If [account] is not specified, returns the server's total available balance.
If [account] is specified, returns the balance in the account.
getbestblockhash Returns the hash of the best (tip) block in the longest block chain. N
getblock <hash> [verbose=true] Returns information about the block with the given hash. N
getblockbynumber <hash> N
getblockcount Returns the number of blocks in the longest block chain. N
getblockhash <index> Returns hash of block in best-block-chain at <index>; index 0 is the genesis block N
getblocktemplate [params] Returns data needed to construct a block to work on. See BIP_0022 for more info on params. N
getconnectioncount Returns the number of connections to other nodes. N
getdifficulty Returns the proof-of-work difficulty as a multiple of the minimum difficulty. N
getinfo Returns an object containing various state info. N
getmininginfo Returns an object containing mining-related information:
  • blocks
  • currentblocksize
  • currentblocktx
  • difficulty
  • errors
  • networkhashps
  • pooledtx
  • Pool Mining
  • Testnet
  • Difficulty_PoB
  • Errors
  • PoB Mining Enabled
  • Active PoB Thread Count
  • Boinc Magnitude
  • PoB Thread Limit
  • PoB HashesPerSec
  • CPU Mining Project
  • CPU Mining RAC
  • CPU Mining Network RAC
  • GPU Mining Project
  • GPU Mining CPID
  • GPU Mining RAC
  • GPU Mining Network RAC
  • PoB Mining Errors
getnetworkhashps [blocks] [height] Returns a recent hashes per second performance measurement while generating. N
getnewaddress [account] Returns a new bitcoin address for receiving payments. If [account] is specified payments received with the address will be credited to [account]. N
getpeerinfo Returns data about each connected node. N
getrawmempool Replaced with getblocktemplate, submitblock, getrawmempool N
getrawtransaction <txid> [verbose=0] Returns raw transaction representation for given transaction id. N
getreceivedbyaccount <account> [minconf=1] Returns the total amount received by addresses with [account] in transactions with at least [minconf] confirmations. If [account] not provided return will include all transactions to all accounts. N
getreceivedbyaddress <gridcoinaddress> [minconf=1] Returns the amount received by <bitcoinaddress> in transactions with at least [minconf] confirmations. It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0. N
gettransaction <txid> Adds signatures to a raw transaction and returns the resulting raw transaction. N
gettxout <txid> <n> [includemempool=true] Returns details about an unspent transaction output (UTXO) N
gettxoutsetinfo Returns statistics about the unspent transaction output (UTXO) set N
getwork [data] If [data] is not specified, returns formatted hash data to work on: midstate, data, hash1, target. If [data] is specified, tries to solve the block and returns true if it was successful. N
getworkex [data, coinbase] ??? ???
help [command] List commands, or get help for a command. N
importprivkey <gridcoinprivkey> [label] [rescan=true] Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, as a rescan is done, looking for existing transactions. Optional [rescan] parameter added in 0.8.0. Y
keypoolrefill Fills the keypool, requires wallet passphrase to be set. Y
listaccounts [minconf=1] Returns Object that has account names as keys, account balances as values. N
listaddressgroupings Returns all addresses in the wallet and info used for coincontrol. N
listitem <string::itemname> ??? ???
listlockunspent Returns list of temporarily unspendable outputs. N
listreceivedbyaccount [minconf=1] [includeempty=false] Returns an array of objects containing: account, amount, confirmations N
listreceivedbyaddress [minconf=1] [includeempty=false] Returns an array of objects containing: address, account, amount, confirmations. To get a list of accounts on the system, execute litecoind listreceivedbyaddress 0 true. N
listsinceblock [blockhash] [target-confirmations] Get all transactions in blocks since block [blockhash], or all transactions if omitted. N
listtransactions [account] [count=10] [from=0] Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] not provided will return recent transaction from all accounts. N
listunspent [minconf=1] [maxconf=9999999] ["address",...] Returns array of unspent transaction inputs in the wallet. N
lockunspent unlock? [array-of-Objects] Updates list of temporarily unspendable outputs N
move <fromaccount> <toaccount> <amount> [minconf=1] [comment] Move from one account in your wallet to another N
sendfrom <fromaccount> <togridcoinaddress> <amount> [minconf=1] [comment] [comment-to] <amount> is a real and is rounded to 8 decimal places. Will send the given amount to the given address, ensuring the account has a valid balance using [minconf] confirmations. Returns the transaction ID if successful (not in JSON object). Y
sendmany <fromaccount> {address:amount,...} [minconf=1] [comment] Amounts are double-precision floating point numbers. Y
sendrawtransaction <hex string> Submits raw transaction (serialized, hex-encoded) to local node and network. N
sendtoaddress <gridcoinaddress> <amount> [comment] [comment-to] <amount> is a real and is rounded to 8 decimal places. Returns the transaction ID <txid> if successful. Y
sendtoinvalidaddress <gridcoinaddress> <amount> [comment] [comment-to] ??? ???
sendtoself <gridcoinaddress> <amount> [comment] [comment-to] ??? ???
setaccount <gridcoinaddress> <account> Sets the account associated with the given address. Assigning address that is already assigned to the same account will create a new address associated with that account. N
setmininput <amount> <amount> is a real and is rounded to the nearest 0.00000001 N
settxfee <amount> <amount> is a real and is rounded to the nearest 0.00000001
showblock <index> ??? ???
signmessage <gridcoinaddress> <message> Sign a message with the private key of an address. Y
signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex,"redeemScript":hex},...] [<privatekey1>,...] [sighashtype="ALL"] Adds signatures to a raw transaction and returns the resulting raw transaction. Y/N
stop Stop Gridcoin server. N
submitblock <hex data> [optional-params-obj] Attempts to submit new block to network. N
upgrade Upgrade qt client. N
validateaddress <gridcoinaddress> Return information about <litecoinaddress>. N
verifychain [check level] [num blocks] ??? ???
verifymessage <gridcoinaddress> <signature> <message> Verify a signed message. N