THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Mempool Policy vs Consensus: Standardness, Relay, and Mining

permalink THAMER
#bitcoin-core#bitcoin-mempool-policy#consensus-rules#relay#standardness

A transaction can be valid under Bitcoin consensus rules yet not be accepted into a particular node's mempool. That is because consensus and mempool policy answer different questions. Consensus determines which transactions may appear in valid blocks; policy determines which unconfirmed transactions a node chooses to store and relay.

Consensus rules govern blocks

Consensus rules include signature and script requirements, input availability, locktime conditions, value conservation, and block limits. If a block violates a consensus rule, independently validating nodes reject it. These rules cannot be relaxed by a miner's preference or a node's mempool settings.

Policy governs unconfirmed transactions

A node may apply minimum relay fees, standard transaction templates, ancestor and descendant limits, replacement rules, dust thresholds, and other resource-management restrictions. Policies can differ between node implementations, versions, and local configurations. Policy rejection does not automatically prove a transaction is consensus-invalid.

What does 'non-standard' mean?

A non-standard transaction is one that fails a node's standardness policy, even though it may still satisfy consensus. Standardness aims to make public relay predictable and reduce certain denial-of-service and compatibility risks. A miner can sometimes include a consensus-valid non-standard transaction directly in a block, bypassing ordinary public mempool relay.

Why does one node see a transaction and another not?

Nodes have different peer connections, mempool contents, minimum accepted fee rates, and local policy. Their views of unconfirmed transactions are not globally synchronized. A transaction's appearance in one mempool does not prove that all miners received it, that it will confirm, or that it is irreversible.

Replacement and package considerations

Replace-by-fee behavior, package acceptance, and child-pays-for-parent interactions are particularly policy-sensitive. Applications should query the actual node and software version in use, handle rejection reasons, and avoid treating a single relay policy as a permanent protocol guarantee.

Developer implications

Distinguish 'transaction created', 'accepted by my node', 'observed by peers', and 'confirmed in a valid block'. These are different states. Use transaction and mempool diagnostics to explain failures rather than labeling every rejected broadcast as invalid Bitcoin.

Primary references

Bitcoin Core policy source — https://github.com/bitcoin/bitcoin/tree/master/src/policy
Bitcoin Core RPC documentation — https://bitcoincore.org/en/doc/
Bitcoin Developer Guide — https://developer.bitcoin.org/devguide/transactions.html

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects