VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Mempools and Transaction Inclusion: Compare Two Nodes Before Drawing Conclusions

Three students in school uniforms work through open books at a classroom table, with textbooks and stationery nearby and study notes on the whiteboard behind them.

中文版 · Blockchain learning guide · Previous article

Blockchain learning · Article BC034

Three students in school uniforms work through open books at a classroom table, with textbooks and stationery nearby and study notes on the whiteboard behind them.
Study photograph for illustration; it does not establish that the pictured students are studying blockchain.

A mempool is a node’s local collection of candidate transactions. It is not a single authoritative queue that every participant sees identically. A transaction can be present at one node, absent at another and later appear in a valid block that both accept.

This lesson turns that distinction into a practical observation exercise. You will compare two small pools, track an eviction and inspect a block containing transactions the observers did not retain. The goal is to report what the evidence shows without confusing submission, local admission, propagation and block inclusion.

Choose your reading route

In this guide

Start with the four observation stages and the explicit classroom retention rules. Follow the two-node timeline before reading the diagnosis checklist. The exercise then asks you to repair several plausible but unsupported status reports.

All transaction labels, priorities, capacities and events below are invented teaching data. There are no real addresses, fees or network submissions. The model isolates local candidate handling; it does not reproduce any production client’s complete mempool, transaction dependencies or block-building algorithm.

Back to contents · Next section

1. Four observations that should not share one label

“Sent” can describe a user’s attempt to submit bytes to an endpoint. “Accepted locally” describes a particular node retaining a candidate under its current checks and policy. “Relayed” describes communication to another participant. “Included” describes membership in a particular block.

These observations answer different questions. An endpoint may return a transaction identifier without demonstrating that every peer has received the transaction. A local pool can contain a candidate that no future block selects. Conversely, a block can introduce a valid transaction an observer never previously saw in its pool.

The Bitcoin peer-to-peer guide distinguishes network exchange from consensus rules. Its older implementation examples should not be read as current defaults; the useful principle here is that transaction communication and block validity are different layers.

When recording an event, include its actor and object: “node N retained transaction x at time t0” is much more informative than “x is on the blockchain.” A transaction hash can identify the object without establishing any of these later lifecycle stages.

Back to contents · Next section

2. Specify local admission separately from block validity

A candidate can fail a consensus-related check, fail a local admission policy or simply be unavailable to the observer. These are not interchangeable explanations for absence.

For example, a node may limit resources devoted to unconfirmed candidates. Its willingness to store and relay a candidate can therefore be narrower than the set of transactions that could appear in an otherwise valid block. A claim about local policy must identify the relevant client and configuration.

The versioned Bitcoin Core 30.0 testmempoolaccept documentation describes tests involving both consensus and policy rules. It reports an acceptance assessment under those conditions; it does not promise that a later block will contain the transaction. We cite the interface to illustrate the distinction, not to instruct readers to submit transactions.

Our classroom rules make the separation explicit. A transaction’s invented priority controls local retention only. It neither changes whether its authorization is valid nor imposes an ordering requirement on the block producer. Keeping those rules separate prevents a common circular argument: “my pool rejected it, so any block containing it must be invalid.”

Back to contents · Next section

3. The two observers and their supplied rules

Two nodes, N and P, begin at the same selected block H and agree on its accepted state. Their clocks use the same labelled observation steps for the exercise. They share the supplied block-validation rules but have different local candidate capacities.

  • N can retain at most three candidates.
  • P can retain at most two candidates.
  • When capacity is exceeded, each keeps the highest-ranked candidates it has received and still regards as eligible.
  • The invented ranks are x=1, y=2, z=3 and w=4, with higher values preferred locally.

These ranks are arbitrary classroom priorities. They are not transaction values, real fees or a claim that production clients always sort individual transactions by one number. All four transactions are independent and valid under the supplied state assumptions; none consumes another’s input or shares a conflicting sender position.

We also introduce q later as an independent valid transaction delivered to the producer through a separate route. There is no general promise that this route keeps q confidential or guarantees its inclusion. The only supplied fact is that N and P have not observed q before receiving its block.

Back to contents · Next section

4. First snapshot: equal counts, different contents

At t0, N retains {x,y}, while P retains {y,z}. Both report two candidates. Their pool counts match, but their sets do not.

The common transaction is y. The union of these two observed sets is {x,y,z}, containing three candidates. Neither node’s count of two describes the entire union even within this tiny exercise.

This is a useful warning about dashboards. Two endpoints returning the same total do not prove that they see the same transactions. Likewise, a union assembled from two observers is merely the union of those observations, not proof that all candidates anywhere in the network have been discovered.

At this stage, N’s lack of z does not mean z is invalid. P’s lack of x does not mean x has been cancelled. Our supplied trace says only that the nodes received different candidate sets. To explain an individual absence, we need the arrival and retention events, not just the snapshot.

The shared head H removes one possible source of difference in this exercise: divergent accepted pre-states. Real investigations must check that assumption rather than silently importing it.

Back to contents · Next section

5. Second snapshot: a policy decision leaves no retained record

At t1, N receives z. Its candidate set becomes {x,y,z}, exactly filling its capacity of three. No eviction is needed.

P receives x at the same labelled step. P already retains y and z and has capacity two. Under its supplied ranking rule, x ranks below both, so P does not retain x. Its set remains {y,z}.

The important difference is that P has now received x but declined to keep it. A later pool snapshot alone cannot distinguish that history from never having received x. Both can produce the same absence in the current set.

An observation log should therefore preserve the decision reason where available: arrival, validation result, policy decision and resulting pool membership. Without that record, a report should say “not currently retained by P,” rather than inventing an explanation.

Nothing in this local decision changes x’s supplied block validity. The teaching priority is not a consensus rule. A valid block producer may still include x if all actual block and transaction conditions hold.

Back to contents · Next section

6. Third snapshot: eviction changes availability, not signed contents

At t2, N receives w. N now has four eligible candidates competing for three local places. Its policy retains the highest three: {y,z,w}. It evicts x.

P has not received w in the supplied trace and still retains {y,z}. The observers again have different pools despite sharing the same selected head and agreeing on transaction-validity rules.

Eviction means x is no longer in N’s retained candidate set. It does not rewrite x’s bytes, revoke an authorization or erase copies held elsewhere. An observer who recorded x at t1 and cannot find it at t2 should not automatically label it “failed on-chain.”

There is no accepted-state transition involving x in this step. The event concerns local memory and policy. To infer a chain outcome, the observer must inspect the selected chain and relevant execution evidence separately.

Our trace supplies the exact eviction cause. In practice, absence can also reflect restart behavior, expiry rules, conflicts, changed state or incomplete access to an endpoint. Those are hypotheses to test under the specific client, not a menu from which to choose whichever explanation sounds most plausible.

Back to contents · Next section

7. A valid block can contain a transaction absent from both pools

At t3, both nodes receive block B extending H. Its transaction list contains x and q. The exercise supplies that B and both transactions pass all applicable block-validation checks, and both nodes select B as their new head.

Immediately before receipt, neither N nor P retained x. Neither had previously observed q. Nevertheless, their lack of earlier pool membership is not a reason to reject an otherwise valid B.

For x, we know a local retention history: N evicted it and P declined it. For q, we know only the supplied separate delivery route to the producer. These are different paths to the same observation: the transaction first becomes visible in the accepted block view at this step.

The nodes obtain and validate the block’s required transaction data. They do not simply trust the producer’s assertion that the transactions are valid. “Previously unseen by this observer” and “exempt from validation” are entirely different ideas.

Because x and q are independent of y, z and w under the exercise assumptions, N’s remaining pool is {y,z,w} and P’s is {y,z}. There is no automatic need to remove every pending candidate when a new block arrives. Real clients re-evaluate relevant dependencies and conflicts under their actual rules.

Back to contents · Next section

8. Inclusion removes a candidate for a different reason

At t4, both nodes accept and select valid block C extending B. C contains y. Now N removes y from its pool, leaving {z,w}; P removes y, leaving {z}.

This removal has a different explanation from x’s earlier eviction. y is now included in a selected block. x disappeared from N’s pool at t2 without being included until t3. A status display that uses one undifferentiated “gone” label loses the distinction.

The trace establishes selected-chain inclusion, not a finality guarantee. We have not supplied a finality certificate, confirmation threshold or irreversible downstream action. Those questions belong to a separate evidence layer.

If the selected branch later changes, pool eligibility may need re-evaluation. Do not assume every removed transaction automatically returns to every node’s pool. Its validity, conflicts, availability and local retention policy still matter. Our exercise stops with C selected and makes no reorganisation claim beyond that caution.

Back to contents · Next section

9. Local arrival order is not a consensus timestamp

N saw x before w, yet evicted x and retained w. The block producer later included x before the remaining candidates. Both outcomes are allowed by the supplied rules.

There is no single global “first seen” moment in this trace. Each observation belongs to a node and a time record. Different communication paths can produce different local arrival orders without any participant violating a block-validity rule.

This does not mean ordering is unimportant. Application behavior can depend on accepted order, and block construction may involve dependencies, resource limits and producer choices. It means that local arrival timestamps should not be silently promoted into a universal consensus ordering requirement.

The Ethereum MEV overview discusses the significance of transaction inclusion and ordering choices. We use that narrow point to motivate careful observation, not to teach extraction strategies or claim that every private delivery channel offers the same protections.

A fairness claim requires a defined rule and measurement method. “My endpoint saw this first” is an observation to investigate, not by itself proof that a different accepted order violated the protocol.

Back to contents · Next section

10. Read client interfaces with their scope attached

The Bitcoin Core 30.0 getrawmempool reference documents a local mempool query. Its output describes that responding node’s collection at the relevant observation, not a census signed by all nodes.

The Geth txpool namespace, last edited 16 August 2023, uses pending and queued groupings and can expose multiple candidates associated with one account and nonce. Those terms and data structures should not be projected unchanged onto every blockchain client.

When comparing interfaces, first align what each counts. Does it include only executable candidates, also future-nonce candidates, or another category? Is the response a full enumeration or a restricted view? Does the endpoint disclose its client and selected head?

Two counts can disagree because the definitions differ, even before network propagation enters the explanation. Conversely, matching counts do not prove matching definitions or sets. Preserve the raw identifiers and context needed for a reproducible comparison instead of relying solely on a headline number.

Back to contents · Next section

11. A practical evidence checklist

For a disputed transaction status, build a short record containing the following fields. Missing information should remain explicitly missing.

  • Network and client context: which chain, which endpoint, which software or documented interface.
  • Observation context: timestamp, selected block identity and whether the response is a local pool view or chain query.
  • Transaction identity: the exact candidate identifier, with bytes or decoded fields where legitimately available for the investigation.
  • Local lifecycle: observed arrival, admission, relay, replacement or eviction events and their recorded reasons.
  • Chain evidence: particular block membership, execution result where applicable and current selected-chain status.
  • Remaining uncertainty: unseen observers, unavailable logs, incomplete propagation data and unverified finality.

For our trace, a precise report is: “N retained x at t1, evicted it under the stated capacity rule at t2, then accepted block B containing x at t3.” This reports a change in evidence without inventing a contradiction.

A weak report would be: “x failed, but the blockchain unexpectedly revived it.” No such failure or revival mechanism was supplied. The apparent surprise came from using pool absence as a substitute for chain-state evidence.

Back to contents · Next section

12. Exercise: reconstruct the pools and repair the claims

Use the supplied capacities, priorities and independent-transaction assumptions. Do not add real network fee policies to the classroom rules.

  1. At t0, both pool counts are two. Are the sets identical? What are their intersection and observed union?
  2. After t1, what does each node retain, and why does P omit x?
  3. After t2, what does N retain? Has x been invalidated by eviction?
  4. May N and P accept the supplied valid block B containing x and q, despite their earlier pool observations?
  5. After C includes y at t4, what remains in each pool?
  6. Does the trace prove that q was secret from every other participant or that C is final?

Answers and reasoning

  1. The sets differ. Their intersection is {y}; their observed union is {x,y,z}. The matching counts conceal different contents, and this union does not establish a network-wide census.
  2. N retains {x,y,z}; P retains {y,z}. P received x but its two-place policy keeps the higher-ranked y and z.
  3. N retains {y,z,w}. Eviction changes local retention, not the supplied validity of x or copies elsewhere.
  4. Yes. The exercise supplies full block validity and selection. Prior membership in either observer’s pool is not an additional requirement. Both still validate the required block data.
  5. N retains {z,w}; P retains {z}. y was removed because of selected-chain inclusion, unlike x’s earlier capacity eviction.
  6. Neither conclusion follows. The trace supplies only that N and P did not observe q before B. It supplies selected-chain inclusion through C without a finality condition.

Extension: increase P’s capacity

Change only P’s capacity from two to three. At t1, after receiving x, P can retain {x,y,z}. At t2, it still has that set because the trace does not deliver w to P. After B includes x and q, P retains {y,z}; after C includes y, it retains {z}.

The final pool matches the original P outcome even though the intermediate history differs. This reinforces why one final snapshot cannot reconstruct every earlier admission or eviction decision.

Back to contents · Next section

13. Frequently asked questions

If a transaction is absent from my node, is it absent everywhere?

No. The claim concerns one observer. Other nodes or a producer may possess it, and a block can later introduce it to your node.

Does local acceptance guarantee inclusion?

No. It records local admission under current conditions. Selection, continued validity, propagation and later chain outcomes require additional evidence.

Are mempool policy and consensus rules the same?

No. A client’s candidate-retention and relay decisions have their own scope. A valid block is checked under the applicable consensus and execution rules, rather than requiring every transaction to have appeared in every validator’s pool.

Does private submission guarantee privacy or fair ordering?

No such guarantee follows from the label. The recipient, routing, disclosure and ordering commitments need separate examination. The worksheet assumes only one limited observation fact about q.

Back to contents · Next section

14. Sources and next reading

Primary sources checked on 12 October 2026, Singapore time. Versioned RPC references describe Bitcoin Core 30.0, rather than every client or future release.

Review the account-nonce lesson for dependency gaps within one sender’s sequence. Continue to gas for resource budgeting and to failed-transaction diagnosis for the difference between pre-inclusion rejection and included execution failure. Keep the two-node observation record as a template whenever a dashboard’s status seems inconsistent.

Back to contents