Prepare moves the participants into prepared state.

highlighted = computed this step

Prepare

Prepare is the coordinator asking every listed participant to enter the prepared state. The compiler replays that transition for the whole participant set.

prepare moves participants\text{prepare moves participants}

All participants are prepared

The replay has 3 prepared participants out of 3 listed participants. The coordinator state is waiting in the compiled table.

prepared=3,participants=3\text{prepared}=3,\quad \text{participants}=3

two-phase commit is rendered here as a tiny exact FSM trace; timeouts, recovery, network partitions, availability, and database-product behavior are out of scope.

PrepareeventcoordinatordecisionvotesparticipantsinitialinitpendingnoneP1:init, P2:init, P3:initprepare CwaitingpendingnoneP1:prepared, P2:prepared, P3:prepared participant statesparticipantvotestateP1nonepreparedP2nonepreparedP3noneprepared compiled summaryfactvaluedecisionpendingoutcomependingcoordinatorwaitingcommitAllowednoabortReasonnone

Summary

A vote before prepare fails closed. Note: prepare here is a state transition only; no message timing is modeled.

prepare before votes\text{prepare before votes}