Invalid extrinsics are stored in the block #9651
-
According to this wiki https://wiki.polkadot.network/docs/maintain-errors, and how extrinsics are processed in the substrate. I have found that they even the extrinsic become invalid it is still added into the blockchain, but without the state mutating. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
what do you mean precisely by invalid extrinsic ? a failing extrinsic (i.e. an extrinsic which returns a dispatch error) is still included in the block and usually does contains some state mutation like the payment of the fee of the extrinsic for instance. |
Beta Was this translation helpful? Give feedback.
-
You add "invalid" extrinsics into the block because you still need to charge a fee. This is the same reason you add transaction which "run out of gas" on the Ethereum network. If the blockchain would not include the extrinsic or charge a fee, then it becomes easy to attack the chain with bad transactions which still does computation and waste resources of the node. |
Beta Was this translation helpful? Give feedback.
You add "invalid" extrinsics into the block because you still need to charge a fee.
This is the same reason you add transaction which "run out of gas" on the Ethereum network.
If the blockchain would not include the extrinsic or charge a fee, then it becomes easy to attack the chain with bad transactions which still does computation and waste resources of the node.