This guide explains Bitcoin Core gettxout 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 gettxout inspected one transaction output by txid and vout index. By default it overlaid the mempool, so a confirmed output already spent by an unconfirmed transaction did not appear.
- Why it matters: gettxout offers a precise UTXO snapshot only when its mempool overlay and best-block context are retained. Spendability still requires ownership, maturity, policy and race-safe coin selection.
- Current position: Bitcoin Core 0.16.0 gettxout inspected one transaction output by txid and vout index.
Bitcoin Core gettxout RPC in simple English
Bitcoin Core gettxout RPC: Validate a 32-byte txid and non-negative output index. The pair, not an address, identifies a UTXO.
Simple example
A miner is checking Bitcoin Core gettxout RPC. Fetch and decode the parent transaction when ownership, amount or script provenance affects a financial decision. Gather transaction, mempool and chain evidence before classifying.
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.
- UTXO:
- An unspent transaction output: a piece of bitcoin that can be used as an input to a later transaction.
Outpoint validation
Validate a 32-byte txid and non-negative output index. The pair, not an address, identifies a UTXO. Fetch and decode the parent transaction when ownership, amount or script provenance affects a financial decision.
Mempool overlay
include_mempool defaults true. An unconfirmed spend makes the output disappear even though chainstate still contains it. Query false only for an explicitly named chainstate diagnostic; do not present that result as currently available to spend.
Absence semantics
A null result is not one diagnosis. The output may be spent in-chain, spent in the local mempool, unknown, pruned from related retrieval paths or addressed with the wrong index. Gather transaction, mempool and chain evidence before classifying.
Best-block consistency
bestblock identifies the chain tip against which the lookup was evaluated. Retain it with confirmations and compare it to the application’s expected tip. A reorganisation can resurrect or remove outpoints and change depth.
Value and script
value is BTC and scriptPubKey contains assembly, hex, signature expectation, type and rendered addresses. Use satoshi arithmetic and treat script hex as authoritative. Address arrays are presentation aids and may not exist for every script.
Coinbase maturity
coinbase flags outputs created by block subsidy transactions. Consensus maturity restricts when they may be spent. Verify height and required maturity independently rather than inferring spendability from mere presence.
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 gettxout RPC?
Bitcoin Core gettxout RPC: Validate a 32-byte txid and non-negative output index. The pair, not an address, identifies a UTXO.
For Bitcoin Core gettxout RPC, what should a beginner know about outpoint validation?
Validate a 32-byte txid and non-negative output index. The pair, not an address, identifies a UTXO.
For Bitcoin Core gettxout RPC, what should a beginner know about mempool overlay?
include_mempool defaults true. An unconfirmed spend makes the output disappear even though chainstate still contains it.
For Bitcoin Core gettxout RPC, what should a beginner know about absence semantics?
A null result is not one diagnosis. The output may be spent in-chain, spent in the local mempool, unknown, pruned from related retrieval paths or addressed with the wrong index.
Conclusion
gettxout offers a precise UTXO snapshot only when its mempool overlay and best-block context are retained. Spendability still requires ownership, maturity, policy and race-safe coin selection.
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.