State machine replication

Real-world consensus most frequently runs as a subroutine in a replicated state machine. State machine replication is a general technique for replicating a single-machine computer service onto $$N$$ independent computers, thereby adding failure resiliency. SMR works not by replicating the underlying service data, but by replicating the operations performed on each replica. If all replica servers start from the same initial state, they all execute the same operations in the same order, and they all act deterministically, then their underlying state always stays in lock-step conformity, and if any server fails, the other servers can pick up right where the failed server left off.

How to agree on the operation sequence? Well, using a consensus protocol! State machine replication logically uses one consensus instance per operation to decide on what the next operation should be. The values in the consensus protocol are encoded operations, including both operation name and operation contents. And this is where streamlined messages matters. A color (our example from CT consensus) could be encoded in a single bit, but encoded operations can be very large indeed—think a blockchain smart contract. So sending values fewer times is better!