Skip to main content

Two-Phase Commit

Definition

Two-phase commit is a distributed consensus algorithm used to ensure all participants in a transaction either commit or abort it uniformly. In blockchain contexts, this protocol helps coordinate operations across multiple independent chains or shards, ensuring atomicity for cross-chain transactions. The first phase involves participants voting on whether to commit, and the second phase executes the final decision based on those votes. It guarantees that all parts of a distributed transaction reach the same outcome, preventing inconsistencies.