I wonder if orphan transactions are also stored in the memory pool? If yes, how do the Bitcoin client distinguish between the orphan and non-orphan transactions?

2 Answers 2


Bitcoin Core maintains a separate orphan pool, with transactions whose parents are missing. Its main purposes is dealing with peers that send us groups of independent transactions in the wrong order, so this pool does not need to be large.

Since Bitcoin Core v0.13.0, all transactions sent to peers are sent in batches, and within those batches in dependency order. This massively reduced the average size of orphan pools on the network (from hundreds to typically just a few).

  • Thanks, I've fixed the half-knowledge expended in my post.
    – Murch
    Jun 9, 2017 at 18:01

Orphan transaction

"Orphan transactions" are transactions for whom a parent is missing and therefore at least one input unknown to the node. This can happen when a node receives transactions in the wrong order or when the parent was doublespent and therefore one of the inputs of this new transaction will never manifest. Until the prerequisites for the transaction are met, such a transaction would essentially appear invalid, as the node will recognize that the transaction is spending money that the node is unaware of. The mempool does not store orphaned transactions, but it collects them in a separate orphan pool in case the parent still gets relayed.

Orphan block

An orphan block is one whose parent is unknown to the node. This could happen in earlier versions of Bitcoin, when a later block got relayed to your node before you received the parent, e.g. during synchronization. I believe that nodes would keep orphan blocks at least until they could tell for sure that it isn't part of the longest chain (i.e. they synchronized up to the height of the orphan block).

Stale block

Every now and then, there's a chainfork when two miners discover blocks at the same height. Once one of the two competing blocks gets a successor, the other block will become part of a "stale chaintip". Generally, nodes only consider one block at the same height as valid, and thus ignore confirmations in parallel blocks at the same height. Transactions that were only confirmed in one of the two blocks at the same height will be considered unconfirmed in the other block. Nodes will consider the second block they receive at the same height not to be part of the longest chain and just keep it to be able to follow a potential reorganization.

So, I'm afraid that I have no clue what issue you think there may be to distinguish between orphan and non-orphan blocks. ;) And for the most part what you probably consider "orphan transactions" are either invalid transactions or unconfirmed transactions.

In case I'm missing the point of your question, please update your post and tell me in a comment.

  • By orphan transaction I meant the transactions whose parents are missing or have not arrived yet. İn such a case, the node has to wait for the parent to be able to validate the transaction at hand. This is what I understood. Jun 9, 2017 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.