<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
state	B-Operating_System
machine	I-Operating_System
replication	I-Operating_System
(	O
SMR	O
)	O
or	O
state	B-Architecture
machine	I-Architecture
approach	O
is	O
a	O
general	O
method	O
for	O
implementing	O
a	O
fault-tolerant	O
service	O
by	O
replicating	O
servers	O
and	O
coordinating	O
client	O
interactions	O
with	O
server	O
replicas	O
.	O
</s>
<s>
For	O
the	O
subsequent	O
discussion	O
a	O
State	B-Architecture
Machine	I-Architecture
will	O
be	O
defined	O
as	O
the	O
following	O
tuple	O
of	O
values	O
(	O
See	O
also	O
Mealy	B-General_Concept
machine	I-General_Concept
and	O
Moore	B-General_Concept
Machine	I-General_Concept
)	O
:	O
</s>
<s>
A	O
State	B-Architecture
Machine	I-Architecture
begins	O
at	O
the	O
State	O
labeled	O
Start	O
.	O
</s>
<s>
This	O
discussion	O
requires	O
a	O
State	B-Architecture
Machine	I-Architecture
to	O
be	O
deterministic	O
:	O
multiple	O
copies	O
of	O
the	O
same	O
State	B-Architecture
Machine	I-Architecture
begin	O
in	O
the	O
Start	B-Architecture
state	I-Architecture
,	O
and	O
receiving	O
the	O
same	O
Inputs	O
in	O
the	O
same	O
order	O
will	O
arrive	O
at	O
the	O
same	O
State	O
having	O
generated	O
the	O
same	O
Outputs	O
.	O
</s>
<s>
Typically	O
,	O
systems	O
based	O
on	O
State	B-Operating_System
Machine	I-Operating_System
Replication	I-Operating_System
voluntarily	O
restrict	O
their	O
implementations	O
to	O
use	O
finite-state	B-Architecture
machines	I-Architecture
to	O
simplify	O
error	O
recovery	O
.	O
</s>
<s>
Failures	O
caused	O
by	O
replicas	O
which	O
attempt	O
to	O
lie	O
,	O
deceive	O
,	O
or	O
collude	O
can	O
also	O
be	O
handled	O
by	O
the	O
State	B-Architecture
Machine	I-Architecture
Approach	O
,	O
with	O
isolated	O
changes	O
.	O
</s>
<s>
Faults	O
where	O
a	O
replica	O
sends	O
different	O
values	O
in	O
different	O
directions	O
(	O
for	O
instance	O
,	O
the	O
correct	O
Output	O
to	O
some	O
of	O
its	O
fellow	O
replicas	O
and	O
incorrect	O
Outputs	O
to	O
others	O
)	O
are	O
called	O
Byzantine	B-Operating_System
Failures	I-Operating_System
.	O
</s>
<s>
Byzantine	B-Operating_System
failures	I-Operating_System
may	O
be	O
random	O
,	O
spurious	O
faults	O
,	O
or	O
malicious	O
,	O
intelligent	O
attacks	O
.	O
</s>
<s>
2F+1	O
replicas	O
,	O
with	O
non-cryptographic	O
hashes	O
suffices	O
to	O
survive	O
all	O
non-malicious	O
Byzantine	B-Operating_System
failures	I-Operating_System
(	O
with	O
high	O
probability	O
)	O
.	O
</s>
<s>
The	O
preceding	O
intuitive	O
discussion	O
implies	O
simple	O
technique	O
for	O
implementing	O
a	O
fault-tolerant	O
service	O
in	O
terms	O
of	O
a	O
State	B-Architecture
Machine	I-Architecture
:	O
</s>
<s>
Place	O
copies	O
of	O
the	O
State	B-Architecture
Machine	I-Architecture
on	O
multiple	O
,	O
independent	O
servers	O
.	O
</s>
<s>
Receive	O
client	O
requests	O
,	O
interpreted	O
as	O
Inputs	O
to	O
the	O
State	B-Architecture
Machine	I-Architecture
.	O
</s>
<s>
Respond	O
to	O
clients	O
with	O
the	O
Output	O
from	O
the	O
State	B-Architecture
Machine	I-Architecture
.	O
</s>
<s>
Step	O
4	O
is	O
covered	O
by	O
the	O
State	B-Architecture
Machine	I-Architecture
Definition	O
.	O
</s>
<s>
The	O
critical	O
step	O
in	O
building	O
a	O
distributed	O
system	O
of	O
State	B-Architecture
Machines	I-Architecture
is	O
choosing	O
an	O
order	O
for	O
the	O
Inputs	O
to	O
be	O
processed	O
.	O
</s>
<s>
Inputs	O
to	O
the	O
State	B-Architecture
Machine	I-Architecture
may	O
be	O
executed	O
in	O
Causal	O
Order	O
,	O
guaranteeing	O
consistent	O
State	O
and	O
Output	O
for	O
all	O
non-faulty	O
replicas	O
.	O
</s>
<s>
The	O
problem	O
of	O
voting	O
for	O
a	O
single	O
value	O
by	O
a	O
group	O
of	O
independent	O
entities	O
is	O
called	O
Consensus	B-Operating_System
.	O
</s>
<s>
By	O
extension	O
,	O
a	O
series	O
of	O
values	O
may	O
be	O
chosen	O
by	O
a	O
series	O
of	O
consensus	B-Operating_System
instances	O
.	O
</s>
<s>
Inputs	O
may	O
be	O
ordered	O
by	O
their	O
position	O
in	O
the	O
series	O
of	O
consensus	B-Operating_System
instances	O
(	O
Consensus	B-Operating_System
Order	O
)	O
.	O
</s>
<s>
Consensus	B-Operating_System
Order	O
may	O
be	O
derived	O
independently	O
by	O
each	O
server	O
.	O
</s>
<s>
Inputs	O
to	O
the	O
State	B-Architecture
Machine	I-Architecture
may	O
be	O
executed	O
in	O
Consensus	B-Operating_System
Order	O
,	O
guaranteeing	O
consistent	O
State	O
and	O
Output	O
for	O
all	O
non-faulty	O
replicas	O
.	O
</s>
<s>
In	O
these	O
cases	O
,	O
it	O
is	O
possible	O
to	O
achieve	O
more	O
efficient	O
causal	O
or	O
consensus	B-Operating_System
ordering	O
for	O
the	O
Inputs	O
,	O
with	O
a	O
reduced	O
number	O
of	O
messages	O
,	O
fewer	O
message	O
rounds	O
,	O
or	O
smaller	O
message	O
sizes	O
.	O
</s>
<s>
Further	O
optimizations	O
are	O
available	O
when	O
the	O
semantics	O
of	O
State	B-Architecture
Machine	I-Architecture
operations	O
are	O
accounted	O
for	O
(	O
such	O
as	O
Read	O
vs	O
Write	O
operations	O
)	O
.	O
</s>
<s>
See	O
references	O
Generalized	O
Paxos	B-Operating_System
.	O
</s>
<s>
Client	O
requests	O
are	O
interpreted	O
as	O
Inputs	O
to	O
the	O
State	B-Architecture
Machine	I-Architecture
,	O
and	O
processed	O
into	O
Outputs	O
in	O
the	O
appropriate	O
order	O
.	O
</s>
<s>
In	O
a	O
system	O
with	O
no	O
failures	O
,	O
the	O
Inputs	O
may	O
be	O
discarded	O
after	O
being	O
processed	O
by	O
the	O
State	B-Architecture
Machine	I-Architecture
.	O
</s>
<s>
Checkpoints	O
may	O
be	O
added	O
to	O
any	O
State	B-Architecture
Machine	I-Architecture
by	O
supporting	O
an	O
additional	O
Input	O
called	O
CHECKPOINT	O
.	O
</s>
<s>
A	O
new	O
Input	O
is	O
added	O
to	O
the	O
State	B-Architecture
Machine	I-Architecture
called	O
QUIT	O
.	O
</s>
<s>
A	O
new	O
Input	O
is	O
added	O
to	O
the	O
State	B-Architecture
Machine	I-Architecture
called	O
JOIN	O
.	O
</s>
<s>
This	O
requires	O
knowledge	O
of	O
the	O
State	B-Architecture
Machine	I-Architecture
internals	O
.	O
</s>
<s>
Paxos	B-Operating_System
is	O
a	O
protocol	O
for	O
solving	O
consensus	B-Operating_System
,	O
and	O
may	O
be	O
used	O
as	O
the	O
protocol	O
for	O
implementing	O
Consensus	B-Operating_System
Order	O
.	O
</s>
<s>
Paxos	B-Operating_System
requires	O
a	O
single	O
leader	O
to	O
ensure	O
liveness	O
.	O
</s>
<s>
That	O
is	O
,	O
one	O
of	O
the	O
replicas	O
must	O
remain	O
leader	O
long	O
enough	O
to	O
achieve	O
consensus	B-Operating_System
on	O
the	O
next	O
operation	O
of	O
the	O
state	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
With	O
Paxos	B-Operating_System
,	O
multiple	O
replicas	O
may	O
believe	O
they	O
are	O
leaders	O
at	O
the	O
same	O
time	O
.	O
</s>
<s>
This	O
property	O
makes	O
Leader	O
Election	O
for	O
Paxos	B-Operating_System
very	O
simple	O
,	O
and	O
any	O
algorithm	O
which	O
guarantees	O
an	O
'	O
eventual	O
leader	O
 '	O
will	O
work	O
.	O
</s>
<s>
A	O
number	O
of	O
researchers	O
published	O
articles	O
on	O
the	O
replicated	O
state	B-Architecture
machine	I-Architecture
approach	O
in	O
the	O
early	O
1980s	O
.	O
</s>
<s>
Anita	O
Borg	O
described	O
an	O
implementation	O
of	O
a	O
fault	O
tolerant	O
operating	O
system	O
based	O
on	O
replicated	O
state	B-Architecture
machines	I-Architecture
in	O
a	O
1983	O
paper	O
.	O
</s>
<s>
Leslie	O
Lamport	O
also	O
proposed	O
the	O
state	B-Architecture
machine	I-Architecture
approach	O
,	O
in	O
his	O
1984	O
paper	O
on	O
.	O
</s>
<s>
Recent	O
work	O
by	O
Miguel	O
Castro	O
and	O
Barbara	O
Liskov	O
used	O
the	O
state	B-Architecture
machine	I-Architecture
approach	O
in	O
what	O
they	O
call	O
a	O
architecture	O
that	O
replicates	O
especially	O
sensitive	O
services	O
using	O
a	O
version	O
of	O
Lamport	O
's	O
original	O
state	B-Architecture
machine	I-Architecture
approach	O
,	O
but	O
with	O
optimizations	O
that	O
substantially	O
improve	O
performance	O
.	O
</s>
<s>
Most	O
recently	O
,	O
there	O
has	O
also	O
been	O
the	O
creation	O
of	O
the	O
BFT-SMaRt	O
library	O
,	O
a	O
high-performance	O
Byzantine	O
fault-tolerant	O
state	B-Operating_System
machine	I-Operating_System
replication	I-Operating_System
library	O
developed	O
in	O
Java	O
.	O
</s>
<s>
This	O
library	O
implements	O
a	O
protocol	O
very	O
similar	O
to	O
PBFT	B-Operating_System
's	O
,	O
plus	O
complementary	O
protocols	O
which	O
offer	O
state	O
transfer	O
and	O
on-the-fly	O
reconfiguration	O
of	O
hosts	O
(	O
i.e.	O
,	O
JOIN	O
and	O
LEAVE	O
operations	O
)	O
.	O
</s>
<s>
BFT-SMaRt	O
is	O
the	O
most	O
recent	O
effort	O
to	O
implement	O
state	B-Operating_System
machine	I-Operating_System
replication	I-Operating_System
,	O
still	O
being	O
actively	O
maintained	O
.	O
</s>
<s>
Raft	O
,	O
a	O
consensus	B-Operating_System
based	O
algorithm	O
,	O
was	O
developed	O
in	O
2013	O
.	O
</s>
<s>
Motivated	O
by	O
PBFT	B-Operating_System
,	O
Tendermint	O
BFT	O
was	O
introduced	O
for	O
partial	O
asynchronous	O
networks	O
and	O
it	O
is	O
mainly	O
used	O
for	O
Proof	O
of	O
Stake	O
blockchains	O
.	O
</s>
