Full Nodes are supposed to validate every transaction and block in the blockchain, and provide valuable links for distributing blocks. And because the consensus algorithm is extremely good, there are no invalid transactions in the block chain.

But if an invalid transaction was somehow created on a mined block, and identified by a full node, how would the node respond? Would it show an error to the local user? Distribute some sort of warning or notice on the network? Simply crash?


From a local user's point of view, the most important function of the full node is to tell them when funds are received and confirmed. For instance, if the local user is a merchant, this is what they need to know in determining when to ship goods to customers.

So from this perspective, the most important thing for a full node to do if it finds an invalid transaction or block is to ignore it. For an invalid transaction, it needs to not report the transaction to the user as received funds. For an invalid block, it needs to not report this as confirmation for the transactions in the block, nor as an additional confirmation for transactions confirmed in previous blocks.

A merchant considers an invalid transaction to be the same as no transaction at all. A user who paid with an invalid transaction effectively just hasn't paid, and will be ignored until they come up with real funds. An invalid block simply isn't a confirmation, and if we are waiting for some number of confirmations before shipping goods, then we just have to keep waiting.

Sure, the node can ban the other node that sent the offending data, or log an error, or whatever. This is a good idea as far as saving bandwidth for valid data, or giving the user some general info about the state of network, or aiding in debugging. But all this is secondary.


When a node receives an invalid transaction, it will not include it in the mempool, and ban the peer that sent it the invalid transaction. I'm pretty sure it'll put something in the log about having received an invalid transaction.

When a node receives a block with an invalid transaction, it will notice this during the full validation of the block it performs. It will then reject the block, not add it to its blockchain and ban the node that relayed it.

Nodes will never relay information that they consider invalid. Nodes do not crash when they receive invalid blockchain data, that would be a huge vulnerability. I don't think it shows an error message, the node merely notes the event in the log.

The node will not distribute a warning. If it did, and other nodes were to trust such a warning, such a mechanism would be easy to exploit with a fake warning to induce DOS. Instead, every node that gets notice of the invalid block will simply arrive at the same conclusion and ban the malicious peer. If we manage to get fraudproofs, we could prove that a block was invalid and help lightweight clients defend themselves against it.

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.