Skip to main content
£0.00 0

Basket

No products in the basket.

ASIC mining articles and advice

Bitcoin Core decoderawtransaction RPC: Transaction Inspection Guide

Bitcoin Core decoderawtransaction guide covering witness decoding, txid and wtxid, size and vsize, inputs, outputs, scripts and validation limits.

Bitcoin Core decoderawtransaction RPC guide cover

This guide explains Bitcoin Core decoderawtransaction 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 decoderawtransaction parsed serialised transaction hex into JSON fields including txid, witness-aware hash, size, virtual size, version, locktime, inputs and outputs. An optional iswitness flag overrode heuristic interpretation.
  • Why it matters: decoderawtransaction is a powerful inspection boundary, but readable JSON is only a description of supplied bytes. Complete analysis still needs previous outputs, exact value accounting, script validation and policy or business approval.
  • Current position: Bitcoin Core 0.16.0 decoderawtransaction parsed serialised transaction hex into JSON fields including txid, witness-aware hash, size, virtual size, version, locktime, inputs and outputs.

Bitcoin Core decoderawtransaction RPC in simple English

Bitcoin Core decoderawtransaction RPC: The required input is serialised transaction hex. Iswitness can state whether the serialisation includes witness. If omitted, the node uses heuristics.

Simple example

A miner is checking Bitcoin Core decoderawtransaction RPC. Do not use equality as a universal validity check and never substitute one identifier in a system that expects the other.

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.

Hex and witness mode

The required input is serialised transaction hex. Iswitness can state whether the serialisation includes witness; if omitted, the node uses heuristics. Ambiguous or adversarial data should be decoded under both explicit interpretations where relevant, then compared against the expected source format rather than accepting a heuristic result as provenance.

Transaction identifiers

txid excludes witness commitment details under SegWit rules, while the returned hash represents the witness transaction identifier and can differ. Monitoring, hardware signers and exchange APIs must label these identifiers correctly. Do not use equality as a universal validity check and never substitute one identifier in a system that expects the other.

Size and virtual size

size is serialised bytes, while vsize reflects transaction weight for fee-rate accounting. For witness transactions they can differ materially. Calculate fee rate from known input and output values divided by virtual size, not raw byte size, and preserve integer arithmetic and explicit units in logs and approval screens.

Bitcoin Core decoderawtransaction RPC technical diagram
Size and virtual size: the fields, validation boundary and operational evidence that implementations need to agree.

Inputs and previous outputs

vin exposes outpoints, scriptSig, witness items and sequence, but not the values of spent outputs. Fetch each previous output from a validating node or trusted UTXO snapshot, verify its script and confirmation state, and detect duplicate inputs. Without that external data the decoder cannot calculate fee or determine ownership.

Outputs and scripts

Each vout includes BTC value, index and a decoded scriptPubKey with type and possible addresses. Treat addresses as a presentation derived from script, not the authoritative output. Compare the raw script hex, exact satoshi value and network expectations; unusual scripts may not have meaningful addresses or a reliable reqSigs summary.

Parsing is not validation

Successful JSON output does not establish consensus validity, standardness, signature correctness, mempool acceptance or business approval. Run script verification and policy checks in the appropriate environment, and use testmempoolaccept in versions that support the required flow. Keep decoding services read-only and bounded against oversized input.

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 decoderawtransaction RPC?

Bitcoin Core decoderawtransaction RPC: The required input is serialised transaction hex. Iswitness can state whether the serialisation includes witness.

For Bitcoin Core decoderawtransaction RPC, what should a beginner know about hex and witness mode?

The required input is serialised transaction hex. Iswitness can state whether the serialisation includes witness.

For Bitcoin Core decoderawtransaction RPC, what should a beginner know about transaction identifiers?

txid excludes witness commitment details under SegWit rules, while the returned hash represents the witness transaction identifier and can differ.

For Bitcoin Core decoderawtransaction RPC, what should a beginner know about size and virtual size?

size is serialised bytes, while vsize reflects transaction weight for fee-rate accounting.

Conclusion

decoderawtransaction is a powerful inspection boundary, but readable JSON is only a description of supplied bytes. Complete analysis still needs previous outputs, exact value accounting, script validation and policy or business approval.

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.

ASIC MINER PICKS

Recommended ASIC Mining Hardware

Compare three of our highest ranked ASIC miners currently available, with live product details and pricing.
Browse all ASIC miners
MORE MINING ADVICE

More ASIC Mining Articles

Read practical advice about choosing hardware, calculating electricity costs, setting up miners, hosting and maintenance.
MINER COMMUNITY

Join the ASIC Mining Discussion

Ask a question or share what has worked for you. Your experience may help another miner make a better decision.

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.

Log in to read comments Register to join the discussion

Membership helps us protect the discussion from spam and keep answers useful.

ASIC MINING SUPPORT

Need Help Choosing an ASIC Miner?

Tell us what you want to mine, your electricity cost and where the machine will run. We can help you compare hardware, power requirements, hosting and repairs.
Contact our mining team
Browse ASIC miners