Bitcoin-SONs Sanity Checks
After installing a Bitcoin SON node, you might want to run some basic tests to ensure everything is running smoothly with your Bitcoin node. Here are a few bitcoin-cli commands that you can run to check your node's functionality.
You can use these commands to get an overview of the Bitcoin network, how your node connects to the network, and your configured wallet and address settings.

1. bitcoin-cli help

List all commands, or get help for a specified command.
1
bitcoin-cli help "command"
2
3
# For example...
4
# bitcoin-cli help "getblockchaininfo"
Copied!
The "command" in the above code block can be one of any bitcoin-cli commands listed in the reference doc. It's also optional and if left out will list all available commands. The help command is a good place to start to ensure the bitcoin-cli is actually available on your system.

2. getblockchaininfo

Returns an object containing various state info regarding blockchain processing.
1
bitcoin-cli getblockchaininfo
Copied!
This command doesn't have any parameters. Running this command will list a lot of important information about the chain and your node. This is the command to use to see how much of the chain your node has validated and that you are connected to Bitcoin's mainnet. Here's what is returned in the call:
1
{ (json object)
2
"chain" : "str", (string) current network name (main, test, regtest)
3
"blocks" : n, (numeric) the height of the most-work fully-validated chain. The genesis block has height 0
4
"headers" : n, (numeric) the current number of headers we have validated
5
"bestblockhash" : "str", (string) the hash of the currently best block
6
"difficulty" : n, (numeric) the current difficulty
7
"mediantime" : n, (numeric) median time for the current best block
8
"verificationprogress" : n, (numeric) estimate of verification progress [0..1]
9
"initialblockdownload" : true|false, (boolean) (debug information) estimate of whether this node is in Initial Block Download mode
10
"chainwork" : "hex", (string) total amount of work in active chain, in hexadecimal
11
"size_on_disk" : n, (numeric) the estimated size of the block and undo files on disk
12
"pruned" : true|false, (boolean) if the blocks are subject to pruning
13
"pruneheight" : n, (numeric) lowest-height complete block stored (only present if pruning is enabled)
14
"automatic_pruning" : true|false, (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
15
"prune_target_size" : n, (numeric) the target size used by pruning (only present if automatic pruning is enabled)
16
"softforks" : { (json object) status of softforks
17
"xxxx" : { (json object) name of the softfork
18
"type" : "str", (string) one of "buried", "bip9"
19
"bip9" : { (json object) status of bip9 softforks (only for "bip9" type)
20
"status" : "str", (string) one of "defined", "started", "locked_in", "active", "failed"
21
"bit" : n, (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status)
22
"start_time" : xxx, (numeric) the minimum median time past of a block at which the bit gains its meaning
23
"timeout" : xxx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
24
"since" : n, (numeric) height of the first block to which the status applies
25
"statistics" : { (json object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
26
"period" : n, (numeric) the length in blocks of the BIP9 signalling period
27
"threshold" : n, (numeric) the number of blocks with the version bit set required to activate the feature
28
"elapsed" : n, (numeric) the number of blocks elapsed since the beginning of the current period
29
"count" : n, (numeric) the number of blocks with the version bit set in the current period
30
"possible" : true|false (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
31
}
32
},
33
"height" : n, (numeric) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
34
"active" : true|false (boolean) true if the rules are enforced for the mempool and the next block
35
},
36
...
37
},
38
"warnings" : "str" (string) any network and blockchain warnings
39
}
Copied!

3. getmempoolinfo

Returns details on the active state of the TX memory pool.
The TX memory pool, or "mempool", is the pool of unverified transactions that don't yet belong to a block in the chain. These transactions are basically waiting for miners to verify and include them in blocks to make them official.
1
bitcoin-cli getmempoolinfo
Copied!
This command is useful to view the network backlog of transactions. Here's what is returned:
1
{ (json object)
2
"loaded" : true|false, (boolean) True if the mempool is fully loaded
3
"size" : n, (numeric) Current tx count
4
"bytes" : n, (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted
5
"usage" : n, (numeric) Total memory usage for the mempool
6
"maxmempool" : n, (numeric) Maximum memory usage for the mempool
7
"mempoolminfee" : n, (numeric) Minimum fee rate in BTC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee
8
"minrelaytxfee" : n, (numeric) Current minimum relay fee for transactions
9
"unbroadcastcount" : n (numeric) Current number of transactions that haven't passed initial broadcast yet
10
}
Copied!

4. getnetworkinfo

Returns an object containing various state info regarding P2P networking.
1
bitcoin-cli getnetworkinfo
Copied!
This command is important for understanding the network connections of your node. Here is what is returned in this call:
1
{ (json object)
2
"version" : n, (numeric) the server version
3
"subversion" : "str", (string) the server subversion string
4
"protocolversion" : n, (numeric) the protocol version
5
"localservices" : "hex", (string) the services we offer to the network
6
"localservicesnames" : [ (json array) the services we offer to the network, in human-readable form
7
"str", (string) the service name
8
...
9
],
10
"localrelay" : true|false, (boolean) true if transaction relay is requested from peers
11
"timeoffset" : n, (numeric) the time offset
12
"connections" : n, (numeric) the total number of connections
13
"connections_in" : n, (numeric) the number of inbound connections
14
"connections_out" : n, (numeric) the number of outbound connections
15
"networkactive" : true|false, (boolean) whether p2p networking is enabled
16
"networks" : [ (json array) information per network
17
{ (json object)
18
"name" : "str", (string) network (ipv4, ipv6 or onion)
19
"limited" : true|false, (boolean) is the network limited using -onlynet?
20
"reachable" : true|false, (boolean) is the network reachable?
21
"proxy" : "str", (string) ("host:port") the proxy that is used for this network, or empty if none
22
"proxy_randomize_credentials" : true|false (boolean) Whether randomized credentials are used
23
},
24
...
25
],
26
"relayfee" : n, (numeric) minimum relay fee for transactions in BTC/kB
27
"incrementalfee" : n, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in BTC/kB
28
"localaddresses" : [ (json array) list of local addresses
29
{ (json object)
30
"address" : "str", (string) network address
31
"port" : n, (numeric) network port
32
"score" : n (numeric) relative score
33
},
34
...
35
],
36
"warnings" : "str" (string) any network and blockchain warnings
37
}
38
39
Examp
Copied!

5. getwalletinfo

Returns an object containing various wallet state info.
1
bitcoin-cli getwalletinfo
Copied!
This shows the configuration of any wallets belonging to your node. In our case this will show us the "son-wallet" we should have set up. Here's what's returned:
1
{ (json object)
2
"walletname" : "str", (string) the wallet name
3
"walletversion" : n, (numeric) the wallet version
4
"format" : "str", (string) the database format (bdb or sqlite)
5
"balance" : n, (numeric) DEPRECATED. Identical to getbalances().mine.trusted
6
"unconfirmed_balance" : n, (numeric) DEPRECATED. Identical to getbalances().mine.untrusted_pending
7
"immature_balance" : n, (numeric) DEPRECATED. Identical to getbalances().mine.immature
8
"txcount" : n, (numeric) the total number of transactions in the wallet
9
"keypoololdest" : xxx, (numeric) the UNIX epoch time of the oldest pre-generated key in the key pool. Legacy wallets only.
10
"keypoolsize" : n, (numeric) how many new keys are pre-generated (only counts external keys)
11
"keypoolsize_hd_internal" : n, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used)
12
"unlocked_until" : xxx, (numeric, optional) the UNIX epoch time until which the wallet is unlocked for transfers, or 0 if the wallet is locked (only present for passphrase-encrypted wallets)
13
"paytxfee" : n, (numeric) the transaction fee configuration, set in BTC/kvB
14
"hdseedid" : "hex", (string, optional) the Hash160 of the HD seed (only present when HD is enabled)
15
"private_keys_enabled" : true|false, (boolean) false if privatekeys are disabled for this wallet (enforced watch-only wallet)
16
"avoid_reuse" : true|false, (boolean) whether this wallet tracks clean/dirty coins in terms of reuse
17
"scanning" : { (json object) current scanning details, or false if no scan is in progress
18
"duration" : n, (numeric) elapsed seconds since scan start
19
"progress" : n (numeric) scanning progress percentage [0.0, 1.0]
20
},
21
"descriptors" : true|false (boolean) whether this wallet uses descriptors for scriptPubKey management
22
}
Copied!

6. getaddressinfo

Return information about the given bitcoin address.
Some of the information will only be present if the address is in the active wallet.
1
bitcoin-cli getaddressinfo "address"
2
3
# For example...
4
# bitcoin-cli getaddressinfo "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
Copied!
This is how you can view the pubkey for your Bitcoin addresses. Much more than that is returned:
1
{ (json object)
2
"address" : "str", (string) The bitcoin address validated.
3
"scriptPubKey" : "hex", (string) The hex-encoded scriptPubKey generated by the address.
4
"ismine" : true|false, (boolean) If the address is yours.
5
"iswatchonly" : true|false, (boolean) If the address is watchonly.
6
"solvable" : true|false, (boolean) If we know how to spend coins sent to this address, ignoring the possible lack of private keys.
7
"desc" : "str", (string, optional) A descriptor for spending coins sent to this address (only when solvable).
8
"isscript" : true|false, (boolean) If the key is a script.
9
"ischange" : true|false, (boolean) If the address was used for change output.
10
"iswitness" : true|false, (boolean) If the address is a witness address.
11
"witness_version" : n, (numeric, optional) The version number of the witness program.
12
"witness_program" : "hex", (string, optional) The hex value of the witness program.
13
"script" : "str", (string, optional) The output script type. Only if isscript is true and the redeemscript is known. Possible
14
types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash,
15
witness_v0_scripthash, witness_unknown.
16
"hex" : "hex", (string, optional) The redeemscript for the p2sh address.
17
"pubkeys" : [ (json array, optional) Array of pubkeys associated with the known redeemscript (only if script is multisig).
18
"str", (string)
19
...
20
],
21
"sigsrequired" : n, (numeric, optional) The number of signatures required to spend multisig output (only if script is multisig).
22
"pubkey" : "hex", (string, optional) The hex value of the raw public key for single-key addresses (possibly embedded in P2SH or P2WSH).
23
"embedded" : { (json object, optional) Information about the address embedded in P2SH or P2WSH, if relevant and known.
24
... Includes all getaddressinfo output fields for the embedded address, excluding metadata (timestamp, hdkeypath, hdseedid)
25
and relation to the wallet (ismine, iswatchonly).
26
},
27
"iscompressed" : true|false, (boolean, optional) If the pubkey is compressed.
28
"timestamp" : xxx, (numeric, optional) The creation time of the key, if available, expressed in UNIX epoch time.
29
"hdkeypath" : "str", (string, optional) The HD keypath, if the key is HD and available.
30
"hdseedid" : "hex", (string, optional) The Hash160 of the HD seed.
31
"hdmasterfingerprint" : "hex", (string, optional) The fingerprint of the master key.
32
"labels" : [ (json array) Array of labels associated with the address. Currently limited to one label but returned
33
as an array to keep the API stable if multiple labels are enabled in the future.
34
"str", (string) Label name (defaults to "").
35
...
36
]
37
}
Copied!

7. References

RPC API Reference — Bitcoin