Skip to main content

Two Phase Commitment

Definition

Two-phase commitment is a distributed algorithm that ensures all participating nodes in a distributed transaction either commit to the transaction or abort it, guaranteeing atomicity. It operates in two stages, a voting phase where nodes prepare to commit, and a decision phase where the coordinator instructs all nodes to either commit or roll back. While not directly a blockchain consensus mechanism, its principles of atomic execution are relevant for cross-chain transactions or multi-party smart contract interactions. It helps maintain data consistency.