

A blockchain transaction goes through several stages before it is finalized. First, a user signs a transaction with their private key and broadcasts it to the network. Validators or miners then check whether the transaction is valid, including verifying the signature, account balance, and nonce. Valid transactions are placed into a block and executed sequentially.
Execution is where success or failure is determined. If the transaction executes successfully, its state changes are recorded permanently on-chain. If it fails during execution, the blockchain still records that the transaction occurred, but the resulting state changes are handled differently depending on the failure.