This guide explains Bitcoin Core getchaintxstats RPC in plain English. It shows what the command does, what its result means and what it cannot prove.
TL;DR
- What it is: Bitcoin Core 0.16.0 getchaintxstats calculated historical transaction-count and rate statistics over a block window. Operators could select the number of blocks and optionally the block hash ending the window.
- Why it matters: getchaintxstats provides a reproducible view of confirmed chain activity when its boundary and assumptions are retained. It cannot by itself measure demand, value, capacity or node health.
- Current position: Bitcoin Core 0.16.0 getchaintxstats calculated historical transaction-count and rate statistics over a block window.
Bitcoin Core getchaintxstats RPC in simple English
Bitcoin Core getchaintxstats RPC: The statistic counts confirmed transactions, not inputs, outputs, value transferred, fee demand, virtual bytes or rejected transactions. Batching can increase economic activity while reducing transaction count.
Simple example
A miner is checking Bitcoin Core getchaintxstats RPC. Validate positive integer bounds and record the resolved ending hash because an unanchored query can change between runs or after a reorganisation.
Key terms in plain English
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- RPC:
- A command that software sends to a node to request information or a local action.
- Consensus:
- The shared rules full nodes use to decide whether blocks and transactions are valid.
- Mempool:
- A node’s changing local collection of valid, unconfirmed transactions.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
Window arguments
nblocks selects the intended window and defaults to roughly one month in blocks. A supplied blockhash anchors the end; otherwise the current active tip is used. Validate positive integer bounds and record the resolved ending hash because an unanchored query can change between runs or after a reorganisation.
Returned counts
txcount is cumulative transactions through the ending block, while window_tx_count covers the selected interval. Window_block_count reports the actual number used and can be smaller near genesis. Do not subtract independently sampled cumulative counts unless their block identities and ancestry have also been verified.
Elapsed time and rate
window_interval is the difference between boundary block timestamps and txrate is the average transaction count per second over that interval. Miner-selected timestamps are consensus constrained but not precise wall-clock measurements. Short windows can be highly noisy and an interval of zero suppresses the rate field.
What the rate excludes
The statistic counts confirmed transactions, not inputs, outputs, value transferred, fee demand, virtual bytes or rejected transactions. Batching can increase economic activity while reducing transaction count. Capacity planning should add block weight, fee rates, mempool composition and application-specific settlement data.
Reorganisations and history
A recent ending hash can leave the active chain. Store the ending hash, height, chainwork and observation time, then recompute affected windows after a reorganisation. Historical comparisons should use stable buried anchors and preserve the original result rather than silently rewriting an operational report.
Monitoring design
Use several windows to distinguish short bursts from sustained change. Align comparisons by exact block boundaries and expose sample length, not just txrate. Alert on missing fields, implausible intervals and node lag. Never interpret a responsive statistic as evidence that the node is fully synced.
How specialists test it
Operators test the command on a non-production node first. They check a normal reply, an invalid request, a timeout and a restart. This shows what the response means and prevents one local result from being mistaken for a network-wide outcome.
Frequently asked questions
What is the main point of Bitcoin Core getchaintxstats RPC?
Bitcoin Core getchaintxstats RPC: The statistic counts confirmed transactions, not inputs, outputs, value transferred, fee demand, virtual bytes or rejected transactions.
For Bitcoin Core getchaintxstats RPC, what should a beginner know about window arguments?
nblocks selects the intended window and defaults to roughly one month in blocks.
For Bitcoin Core getchaintxstats RPC, what should a beginner know about returned counts?
txcount is cumulative transactions through the ending block, while window_tx_count covers the selected interval.
For Bitcoin Core getchaintxstats RPC, what should a beginner know about elapsed time and rate?
window_interval is the difference between boundary block timestamps and txrate is the average transaction count per second over that interval.
Conclusion
getchaintxstats provides a reproducible view of confirmed chain activity when its boundary and assumptions are retained. It cannot by itself measure demand, value, capacity or node health.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.