TERM_DEF // TRANSACTION / WEIGHT_UNITS
WEIGHT
UNITS
UNITS
Weight Units. Per-byte cost: 4 WU for non-witness-data/">witness data, 1 WU for witness data; total block-weight/">block weight ≤ 4M WU.
This page sits in the Transaction section — How money moves: inputs, outputs, fees, signatures, sighash flags, and the formats that wrap them. Read on for what it is, why it exists, how it works under the hood, and what to watch out for.
This page sits in the Transaction section — How money moves: inputs, outputs, fees, signatures, sighash flags, and the formats that wrap them. Read on for what it is, why it exists, how it works under the hood, and what to watch out for.
WHAT_WEIGHT_UNITS_IS
Weight Units — at a glance
TRANSACTION
Weight Units is part of the FEE ECONOMY sub-family of transaction-level concepts. How many bytes a transaction occupies — measured in either raw bytes, weight units, or vbytes depending on context. Per-byte cost: 4 WU for non-witness data, 1 WU for witness data; total block weight ≤ 4M WU.
Why it exists
DESIGN
Block space is scarce; miners need a deterministic way to measure how much of a block each transaction consumes. Post-SegWit, witness data is discounted (4×) to incentivise SegWit adoption, so the size metric varies by what you're measuring.
HOW_IT_WORKS
Mechanism
HOW IT WORKS
raw size = byte count on disk. weight = 4 × (non-witness bytes) + 1 × (witness bytes). vbytes = weight / 4. Block weight limit: 4,000,000 WU. A P2WPKH spend ≈ 110 vbytes (was ~220 bytes pre-SegWit).
1. Wallet selects UTXOs whose total value covers the spend amount + estimated fee (coin selection).
2. Wallet builds the transaction body: version, inputs (each with prev txid + vout + sequence), outputs (each with value + scriptPubKey), locktime.
3. Wallet computes the sighash for each input (which parts of the tx the signature commits to — controlled by the SIGHASH flag).
4. Wallet signs each input with the right private key. Witness/scriptSig is populated with the resulting signatures + pubkeys.
5. Tx is broadcast to peers. Mempool propagation: tens of seconds globally.
6. A miner includes it in a block. Confirmation count grows by 1 per block; after ~6 the tx is effectively final.
WORKED_EXAMPLE
Weight Units — FEE ECONOMY
EXAMPLE
raw bytes weight units vbytes
1-in P2PKH 191 764 191
1-in P2SH-P2WPKH 169 661 165
1-in P2WPKH 140 564 141
1-in P2TR 111 444 111
Block limits : ≤ 1,000,000 raw bytes legacy + ≤ 4,000,000 weight units
Why feerate uses vbytes:
feerate = fee / vbytes → reflects the actual block-space consumption.
KEY_PROPERTIES
ATOMIC
A transaction is either fully accepted into a block or fully rejected. There is no partial spend.
IMMUTABLE INPUTS
A UTXO can only ever be spent once. After that, it is permanently consumed.
NO BALANCES
IRREVERSIBLE
After ~6 confirmations (~1 hour), reversing the tx would require more proof-of-work than the honest network produces.
COMMON_PITFALLS
Things that catch people out
PITFALLS
- address-reuse/">Address reuse degrades privacy — every reuse links more of your UTXOs together publicly. Modern wallets generate a fresh address per receive.
- Fee estimation matters: under-pay and your tx sits in the mempool for hours; over-pay and you tip the miner more than necessary. Use a fee estimator.
- "Change outputs" must go back to a fresh address you control. A missing output/">change output sends the difference to the miner as fee — a known footgun.
- RBF (Replace-By-Fee) lets you re-broadcast a tx with a higher fee. Useful for stuck txs but means a 0-confirmation tx is never truly final.
RELATED_CONCEPTS
Other terms from Transaction — click any to read its page:
TERMINOLOGY_INDEX
TERMINOLOGY
Weight Units
Per-byte cost: 4 WU for non-witness data, 1 WU for witness data; total block weight ≤ 4M WU.
Transaction (Tx)
A signed payload spending one or more UTXOs and creating new ones; every state change in Bitcoin is a tx.
Raw Transaction
The hex-serialized bytes of a transaction, ready to broadcast or analyze.
Transaction ID (TXID)
wTXID (Witness TXID)
HASH256 of the full transaction including witness data; commits to signatures and used in the witness commitment.
Input
A reference to a previous output being spent, plus the data (scriptSig/witness) authorizing the spend.
Output
An (amount, scriptPubKey) pair created by a transaction; spendable later by a tx whose input references it.
UTXO (Unspent Transaction Output)
An output that hasn't been spent yet; your "balance" is the sum of UTXOs you can sign for.