BIP 141 transaction weight explained for miners: calculate base size, total size, virtual bytes, witness discount and four-million-unit block limits.
TL;DR
Segregated Witness replaced the single one-megabyte block-size measure with weight. Base size serialises the transaction without witness data. Witness data is needed to validate spends but is not required to determine the UTXO set in the same way as outputs and outpoints.
A block containing witness transactions commits to their WTXIDs through a witness merkle root embedded in a coinbase output, combined with a reserved value from the coinbase witness.
BIP 141 transaction weight in simple English
BIP 141 transaction weight: Segregated Witness replaced the single one-megabyte block-size measure with weight. Transaction weight is base size multiplied by three plus total serialised size, equivalently base bytes count four units and witness bytes count one.
Simple example
A node operator is checking BIP 141 transaction weight. If those facts are unknown, the operator cannot show which rules were actually applied before electricity was committed to the work.
Key terms in plain English
- BIP:
- Bitcoin Improvement Proposal: a document that suggests or explains a change to Bitcoin. A BIP number does not mean the idea is active.
- Bitcoin Core:
- Widely used Bitcoin software. It can check blocks and transactions and provide wallet, network and operator tools.
- Consensus:
- The shared rules that Bitcoin or another network uses to decide whether blocks and transactions are valid.
- Node:
- A computer running network software that checks data and talks to other computers on the network.
- ASIC:
- A computer built to do one specialised job. A mining ASIC is designed for a particular proof-of-work algorithm.
From bytes to weight units
Segregated Witness replaced the single one-megabyte block-size measure with weight. Transaction weight is base size multiplied by three plus total serialised size, equivalently base bytes count four units and witness bytes count one. Block weight is capped at four million units. Virtual size rounds weight upward in groups of four, providing the feerate denominator used by wallets, mempools and templates.
Start with the validating node, because the ASIC only hashes the candidate header it receives. Record the node release and the pool component that assembled the block. If those facts are unknown, the operator cannot show which rules were actually applied before electricity was committed to the work.
Base size and total size
Base size serialises the transaction without witness data. Total size includes marker, flag and witness fields when present. A non-witness transaction therefore has weight equal to four times its ordinary size. A SegWit transaction receives a lower marginal cost for witness bytes but no discount for version, inputs, outputs or locktime. Operators should calculate from exact serialisation rather than estimate from input count alone.
Treat status dashboards as observations, not as the source of truth. Compare them with an independently operated node and retain the raw deployment or template response. Period boundaries, chain reorganisations and cached pool pages can otherwise make a correct-looking percentage describe the wrong state.
Why witness receives a discount
Witness data is needed to validate spends but is not required to determine the UTXO set in the same way as outputs and outpoints. The weighting reflects different long-term resource costs while retaining a bounded maximum block transfer. The discount is a consensus design parameter, not a claim that signatures consume no bandwidth, validation time or storage.
Build the failure response before the boundary arrives. Define which rejection messages trigger an alert, who can pause a template source and how failover is prevented from returning miners to the same faulty validation stack. A second hostname is not independent when both endpoints share one node.
The coinbase witness commitment
A block containing witness transactions commits to their WTXIDs through a witness merkle root embedded in a coinbase output, combined with a reserved value from the coinbase witness. Nodes verify this commitment. A pool must preserve the template’s witness commitment and coinbase structure while changing extranonce and payout fields, or an otherwise valid proof of work can be rejected.
Separate readiness, signalling and enforcement in the operating log. Readiness is a claim about software and process, signalling is data carried by blocks, and enforcement is a validation result. Combining them into a single supported or unsupported label hides the point at which revenue is actually at risk.
Sigops and other limits
BIP 141 also scales the signature-operation cost limit and defines witness-program semantics. Staying below four million weight units does not guarantee a valid block: transaction validity, sigops, coinbase, merkle roots, locktimes and all active consensus rules still apply. Template builders must enforce the complete constraint set and leave room for pool-specific coinbase mutations.
Map responsibility across the full path: validating node, template server, pool protocol, proxy, firmware and ASIC. For each layer, state what it can alter and what it merely relays. This prevents a version-bit setting in firmware from being mistaken for complete consensus-rule support. Relate that responsibility map to the pool and job-control boundary in our Stratum V2 guide.
Template fee selection
Miners compare fees per virtual byte or weight while accounting for ancestor packages. Maximising a list of individual feerates can fail when transactions depend on parents. The chosen set must fit weight and other resources in topological order. Track the realised block fee, weight, sigop cost and unused capacity. Empty space may reflect timing or policy rather than a simple lost-revenue calculation.
Test the primary and failover paths with the same checks. Compare chain tip, chainwork, deployment state, required rules and template age, then save the result with a timestamp. The process should be repeatable by another operator without relying on an undocumented pool conversation.
Verification exercise
Serialise controlled legacy and SegWit transactions, compute stripped and total sizes, weight and rounded virtual size, then compare Bitcoin Core results. Build a candidate near the weight limit and mutate its coinbase to test reserved headroom. Confirm the witness commitment after every template change. Use consensus validation on the final candidate. Dashboard arithmetic is a diagnostic, not the acceptance authority.
Turn the conclusion into a business decision. State which chain and settlement venues the operation intends to serve, the maximum acceptable stale-block exposure and the point at which mining pauses. This connects protocol evidence to electricity cost, pool revenue and payout finality.
Operator decision record
A concise decision record for BIP 141 transaction weight should name the source documents, their dates, the node release tested, the responsible pool or template provider and the exact trigger for action. Include screenshots or machine-readable output for the deployment state. But keep the raw node response as the stronger evidence.
State whether a change affects policy, block construction or consensus validity, because those layers have different failure costs.
Run the check on every production and failover path. Confirm that monitoring alerts on stale templates, unexpected chain tips, rejected proposals and a rise in stale shares. Keep rollback instructions for node and pool configuration. But do not roll back across an active consensus boundary without understanding the rules the older release enforces.
If the evidence conflicts, pause the affected path and investigate before committing more electricity to uncertain work.
For related background, read our plain-English BIP-110 guide and technical BIP-110 review. Those articles use a modern proposal to show why signalling, activation, template construction and accepted chain history must be examined separately.
Conclusion
Bip 141 transaction weight is best understood as a defined interaction between validating software, mining infrastructure and economic acceptance. The safest operator does not infer consensus from a dashboard percentage or a pool slogan. They verify the rule source, the activation boundary, the template fields and the chain their payouts ultimately settle on.
That discipline reduces the chance of hashing an invalid or commercially unwanted block.
Frequently asked questions
What is the main point of BIP 141 transaction weight?
BIP 141 transaction weight: Segregated Witness replaced the single one-megabyte block-size measure with weight.
For BIP 141 transaction weight, what should a beginner know about from bytes to weight units?
Segregated Witness replaced the single one-megabyte block-size measure with weight.
For BIP 141 transaction weight, what should a beginner know about base size and total size?
Base size serialises the transaction without witness data. Total size includes marker, flag and witness fields when present.
For BIP 141 transaction weight, why witness receives a discount?
Witness data is needed to validate spends but is not required to determine the UTXO set in the same way as outputs and outpoints.
Primary sources
Primary specifications are living technical records. Check their current status and changelog before using this article for a production activation decision.
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.