Bitcoin Transaction Standardness: Consensus Rules vs Relay Policy
A Bitcoin transaction can satisfy consensus rules and still be rejected from a node's mempool. This is not a contradiction: consensus validity determines whether a transaction may appear in a valid block, while standardness and relay policy determine which unconfirmed transactions a node is willing to accept and forward. Developers must distinguish these layers when diagnosing failed broadcasts.
Two separate rule sets
Consensus rules are mandatory for every fully validating node following the same chain. They govern matters such as valid signatures, permitted transaction structure, coin availability, locktime constraints, and block limits. A block containing a transaction that breaks an active consensus rule is invalid.
Standardness is a node's local policy, not a new consensus requirement. Bitcoin Core's default policy limits which transaction and output patterns are accepted into its mempool. These defaults aim to make transaction relay predictable, limit resource abuse, and reduce the risk of propagating transactions that cannot be mined efficiently.
A miner can, in principle, include a consensus-valid but nonstandard transaction directly in a block. Other nodes evaluate that block against consensus, not their own mempool admission policy. Conversely, a transaction admitted by one mempool has no guarantee of inclusion in a future block.
Examples of policy-level restrictions
Bitcoin Core policy has historically included limits on transaction size or weight, standard output templates, script complexity, dust outputs, and fees needed for relay. The precise defaults and exceptions are software-version dependent. They should not be described as permanent Bitcoin consensus constants.
A transaction can also be rejected for reasons unrelated to standardness: missing parent outputs, conflicts with mempool transactions, insufficient fee under local policy, non-final sequence locks, or resource limits. Diagnostic software should preserve the node's actual rejection reason instead of labeling every failure "invalid."
How to debug admission
First, check that inputs exist and are unspent, signatures are valid, and the transaction satisfies consensus conditions. Then inspect fee rate, output values, scripts, transaction weight, ancestor relationships, and current mempool policy. On Bitcoin Core, testmempoolaccept can provide policy-oriented diagnostics without broadcasting; its result reflects the node and version used.
Finally, remember that relay is distributed. Different nodes can have different mempool contents and policies. Successful submission to one node is evidence of local acceptance, not proof of global propagation or confirmation.
Why the distinction matters
Wallets, exchanges, and payment processors should distinguish consensus-invalid, locally rejected, unconfirmed, and confirmed. This prevents confusing users when a transaction is valid in principle but cannot be relayed under common policies.
Primary references
Bitcoin Core policy source: https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp
Bitcoin Core RPC testmempoolaccept: https://bitcoincore.org/en/doc/
Bitcoin developer reference: https://developer.bitcoin.org/devguide/transactions.html
