Can a Smart Contract Execution Be Reversed after Consensus Is Reached?
No, a smart contract execution, once included in a confirmed block and consensus is reached, is final and cannot be reversed. This is due to the immutable nature of the blockchain.
If an error is made or an unintended action occurs, the only way to "fix" it is to create a new transaction that reverses the state change, assuming the contract's code allows for such an action. For example, to reverse a payment, a new payment of the same amount would have to be sent in the opposite direction.
The original transaction, however, will always remain in the blockchain's history.