I have been reading about the validation of transactions. And I understand the actual method in which a transaction is composed (by inputs and outputs). And I know a transaction ends up in a transaction pool before being put in a block.

However, I want to know what happens in between. How many nodes need to validate my transaction before it ends up in the transaction pool?


The transaction pool (or mempool, as it's usually called) is not a network-wide pool. Each node maintains its own mempool.

When a node receives your tx, it will validate and add it to its own mempool, and possibly broadcast it further on. In some cases, such as a lot of unconfirmed txs, a node's mempool may be full, in which case it will not be added.

There is no network-wide consensus required to add your transaction to the mempool, each node does so individually, regardless of how many other nodes have validated that transaction.


What Raghav said is entirely correct. Furthermore, if an invalid transaction was added to a node's transaction pool for some reason (e.g., the node wanted to cheat the network), the node would still have to do all the expensive mining (finding the right nonce) before it gets a chance of publishing the invalid transaction to the blockchain. If somehow it got lucky and was the first node in the network to find the correct hash, the transactions still had to be independently validated by every other node in the network. At which point, the other nodes will reject this invalid transaction (assuming other nodes are not collaborating) and the first node did all the mining for nothing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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