bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 5쪽
IZE . Eliminating D allows a single static EXTERNALIZE message to help
other nodes catch up arbitrarily far in the future, even if quorum slices have changed
significantly in the meantime.
Only one RPC is needed to exchange ballot messages. The argument is the sender’s
latest message and the return value is the receiver’s latest message. As with NOMI -
NATE , if D or the values x in ballots are cryptographic hashes, then a separate RPC is
needed to retrieve uncached hash preimages.
6.2.2. Timeouts and ballot updates. If all intact nodes start with the same ballot b, then
steps 1 to 9 on the previous page are sufficient to confirm commit b and externalize
value b:x. Unfortunately, if the ballot protocol starts before the nomination protocol
has converged, nodes may start off with different values for z. If a ballot fails, or takes
long enough that it may fail because of unresponsive nodes, then nodes must time out
and try again with a higher ballot. For this reason, nodes employ a timer as follows:
(a) A node v with ’v EXTERNALIZE arms a timer whenever ˙S Ó M v such that
the set of senders U = ^ vm Ý m ¸ S ‘ is a quorum, v ¸ U, and ¯m ¸ S, bm:n g bv:n.
(b) If the timer fires, v updates its ballot by setting bv } Œbv:n + 1; zvº.
Different nodes may start ballots at different times. However, condition (a) delays
setting a timer at a node v that has gotten ahead of a quorum. Conversely, step 9 on
the preceding page allows nodes that have fallen too far behind to catch up without
waiting for timers. Taken together, these rules ensure that given long enough timers,
intact nodes will spend time together on the same ballot; moreover, this time will grow
proportionally to the timer duration. To ensure timeouts are long enough without pre-
dicting latencies, an implementation can increase the timeout as a function of b:n.
6.3. Correctness
An SCP node cannot vote to confirm commit b until it has voted to confirm abort for all
lower-numbered incompatible ballots. Because a well-behaved node cannot accept (and
26 D. Mazi`eres
hence vote to confirm) contradictory statements, this means that for a given ŒV; Qº,
Theorem 5 ensures a set S of well-behaved nodes cannot externalize contradictory
values so long as S enjoys quorum intersection despite V ä S. This safety holds if V and
Q change only between slots, but what if they change mid-slot (for instance, in reaction
to node crashes)?
To reason about safety under reconfiguration, we join all old and new quorum slice
sets, reflecting the fact that nodes may make decisions based on a combination of mes-
sages from different configuration eras. To be very conservative, we might require
quorum intersection of the aggregation of the present configuration with every past
configuration. However, we can relax this slightly by separating nodes that have sent
illegal messages from those that have merely crashed.
THEOREM 13. Let ŒV1; Q1º; § ;ŒVk; Qkº be the set of configurations an FBAS has
experienced during agreement on a single slot. Let V = V1 ä5 ä Vk and Q.v/ = ^ q Ý
˙j such that v ¸ Vj Æ q ¸ Qj.v/ ‘. Let B Ó V be a set such that B contains all ill-
behaved nodes that have sent illegal messages, though V ä B may still contain crashed
(unresponsive) nodes. Suppose nodes v1 and v2 are well-behaved, v1 externalizes x1 for
the slot, and v2 externalizes x2. If ŒV; QºB enjoys quorum intersection, then x1 = x2.
PROOF. For v1 to externalize x1, it must have ratified accept .commit Œn1; x1º/ in col-
laboration with a pseudo-quorum U1 Ó V. We say pseudo-quorum because U1 might
not be a quorum in ŒVj; Qjº for any particular j, as ratification may have involved
messages spanning multiple configurations. Nonetheless, for ratification to succeed
¯v ¸ U1; ˙j; ˙q ¸ Qj.v/ such that q Ó U 1. It follows from the construction of Q that
q ¸ Q.v/. Hence U1 is a quorum in ŒV; Qº. By a similar argument a pseudo-quorum
U2 must have ratified accept .commit Œn2; x2º/, and U2 must be a quorum in ŒV; Qº. By
quorum intersection of ŒV; QºB, there must exist some v ¸ V ä B such that v ¸ U1 ª U2.
By assumption, such a v Ì B could not claim to accept incompatible ballots. Since v
confirmed accepting commit for ballots with both x1 and x2, it must be that x1 = x2.
For liveness of a node v, we care about several things when an FBAS has undergone
a series of reconfigurations ŒV1; Q1º; § ;ŒVk; Qkº within a single slot. First, the safety
prerequisites of Theorem 13 must hold for v and the set of nodes v cares about, since
violating safety undermines liveness and Theorem 11 requires quorum intersection.
Second, the set of ill-behaved nodes in the latest state,ŒVk; Qkº, must not bev-blocking,
as this could deny v a quorum and prevent it from ratifying statements. Finally, v’s
state must never have been poisoned by a v-blocking set falsely claiming to accept a
statement.
To summarize, then, if B is the set of nodes that have sent illegal messages, we
consider a node v to be cumulatively intact when the following conditions hold:
(1) v is intact in the latest configuration ŒVk; Qkº,
(2) The aggregation of the present and all past configurations has quorum intersec-
tion despite B (i.e., the prerequisite for Theorem 13 holds), and
(3) B is not v-blocking in ŒVj; Qjº for any 1 f j f k.
The next few theorems show that ill-behaved nodes cannot drive intact nodes into
dead-end stuck states:
THEOREM 14. In an FBAS with quorum intersection, if no intact node is in the
EXTERNALIZE phase and an intact node with ballot Œn; xº arms its timer as described
in Section 6.2.2, then, given sufficient communication, every intact nodev can set bv g n
before any timer fires.
The Stellar Consensus Protocol 27
PROOF. Let S = ^ v Ý bv g n ‘ be the set of nodes with counters at leastn. By assump-
tion, S contains an intact node. Furthermore, because that intact node armed its timer,
S must also encompass a quorum. Let S+ be the intact subset of S, and S* be the set
of intact nodes not in S. By Theorem 10, either S* = ç (in which case the theorem is
trivial), or S+ is v-blocking for some v ¸ S. By step 9 on page 24, v will adjust its ballot
so bv:n g n. At this point, repeat the argument with S } S ä ^v‘ until such point as
S* = ç.
THEOREM 15. Given long enough timeouts, if an intact node has reached the CON -
FIRM phase with b:x = x, then eventually all intact nodes will terminate.
PROOF. If an intact node has reached the EXTERNALIZE phase, it has confirmed
commit c for some ballot c. By Theorem 11, all intact nodes will confirm commit c,
after which they will terminate in step 7 on page 24.
Otherwise, an intact node in the CONFIRM phase has accepted commit c where c =
Œn; xº. Beforehand, an intact node confirmed c was prepared. By Theorem 11, all intact
nodes will eventually have h g c. Moreover, by Theorem 8, no intact node v can accept
abort c, so no intact node can accept as prepared any ballot p such that p - c. Hence,
after sufficient communication, every intact node will permanently have h À c . The
intact node or nodes with the lowest b will, by Theorem 14, raise their ballots until
such point as all intact nodes with armed timers have the same ballot counter. Since
they also have identical z = h:x = x, they will all have the same ballot. If they cannot
complete the protocol because one or more intact nodes have higher ballots, the nodes
with higher numbered ballots will not have timers set. Hence, the nodes with lower-
numbered ballots will after a timeout set set b } Œb:n + 1; xº until eventually all intact
nodes are on the same ballot and can complete the protocol
THEOREM 16. Regardless of past ill-behavior, given long enough timeouts and peri-
ods in which ill-behaved nodes do not send new messages, intact nodes running SCP
will terminate.
PROOF. By Theorem 12, all intact nodes will eventually have identical sets Z of
candidate values. Assume this point has passed and every intact node v has the same
composite value z = combine.Z/. If no intact node ever confirms any ballot b prepared
without b:x = z, then after at most one timeout, all new ballots of intact nodes will
have value z and, given a sufficient timeout, complete the protocol. By Theorem 15,
nodes will also complete if any intact node has progressed beyond the PREPARE phase.
The remaining case is that an intact node has h 0 and all intact nodes have ’ =
PREPARE . By Theorem 14, when the intact node or nodes with the highestb:n arm their
timers, if timers are long enough, other nodes will catch up. Moreover, by Theorem 11,
if timers are long enough, nodes will converge on the value of h (the highest confirmed
prepared ballot) before the next timeout, at which point all intact nodes will raise b to
the same value and complete the protocol.
Theorem 16 assures us there are no dead-end states in SCP. However, a set of ill-
behaved nodes with very good timing could perpetually preempt an SCP system by
delaying messages so that some fraction of intact nodes update h right before timers
fire and the remaining update it after, preventing intact nodes from converging on the
next ballot. Nodes can recover from such an attack by removing ill-behaved nodes from
their slices.
An alternative would be to add randomness to the protocol, for instance changing
step 2 on page 24 to update z with probability 1_2 (or even with probability propor-
tional to the fraction of the timer remaining). Such an approach would terminate with
28 D. Mazi`eres
probability 1, but in worse expected running time for the common case that most or all
nodes are well-behaved or fail-stop.
7. LIMITATIONS
SCP can only guarantee safety when nodes choose adequate quorum slices. Section 3.2
discusses why we can reasonably expect them to do so. Nonetheless, when security
depends upon a user-configurable parameter, there is always the possibility people
will set it wrong.
Even when people set quorum slices correctly and SCP guarantees safety, safety
alone does not rule out other security issues that may arise in a federated system.
For example, in a financial market, widely trusted nodes could leverage their position
in the network to gain information with which to engage in front running or other
unethical activities.
Byzantine nodes may attempt to filter transactions on the input side of SCP while
otherwise producing the correct output. If well-behaved nodes accept all transactions,
the combine function takes the union of transactions, and there are intact nodes, then
such filtering will eventually fail to block victim transactions with probability 1, but
may nonetheless impose delays.
Though SCP’s safety is optimal, its performance and communication latency are not.
In the common case that nodes have not previously voted to commit ballots incompati-
ble with the current one, it is possible to reduce the number of communication rounds
by one. An earlier version of SCP did so, but the protocol description was more com-
plex. First, it required nodes to cache and retransmit signed messages previously sent
by failed nodes. Second, it was no longer possible to gloss over the distinction between
votes and confirmations of abort statements in PREPARE messages, so nodes had to
send around potentially unbounded lists of exceptions to their abort votes.
SCP can suffer perpetual preemption as discussed in Section 6.3. An open question is
whether, without randomness, a different protocol could guarantee termination assum-
ing bounded communication latency but tolerating Byzantine nodes that continuously
to inject bad messages at exactly the point where timeouts fire. Such a protocol is not
ruled out by the FLP impossibility result [Fischer et al. 1985]. However, the two main
techniques to guarantee termination assuming synchrony do not directly apply in the
FBA model: PBFT [Castro and Liskov 1999] chooses a leader in round-robin fashion,
which is not directly applicable when nodes do not agree on membership. (Possibly
something along the lines of priority in Section 6.1 could be adapted.) The Byzan-
tine Generals protocol [Lamport et al. 1982] relays messages so as to compensate for
ill-behaved nodes saying different things to different honest nodes, an approach that
cannot help when nodes depend on distinct ill-behaved nodes in their slices. Still an-
other possibility might be to leverage both randomness and synchrony to terminate
with probability 1, but in shorter expected time than Ben Or-style randomized proto-
cols [Ben-Or 1983] that make no synchrony assumptions. Public coin techniques [ ?]
that speed up randomized centralized Byzantine agreement protocols appear to be dif-
ficult to adapt to the federated model, barring some cryptographic breakthrough in
federated threshold signatures.
Unfortunately, changing slices mid-slot to accommodate failed nodes is problematic
for liveness if a well-behaved node v has ever experienced a wholly malicious and col-
luding v-blocking set. The good news is that Theorem 13 guarantees safety to any set
S of well-behaved nodes enjoying quorum intersection despite V ä S, even when S has
befouled members. The bad news is that updating Q may be insufficient to unblock
nodes if well-behaved nodes were tricked into voting to confirm a badcommit message.
In such a situation, nodes must disavow past votes, which they can do only by rejoin-
ing the system under a new node names. There may exist a way to automate such
The Stellar Consensus Protocol 29
recovery, such as having other nodes recognize reincarnated nodes and automatically
update their slices.
The FBA model requires continuity of participants over time. Should all nodes si-
multaneously and permanently leave, restarting consensus would require central co-
ordination or human-level agreement. By contrast, a proof-of-work system such as
Bitcoin could undergo sudden complete turnover yet continue to operate with little hu-
man intervention. On the other hand, if nodes do return, an FBAS can recover from
an arbitrarily long outage, while a proof-of-work scheme would face the possibility of
an attacker working on a fork during the outage.
An intriguing possibility is to leverage SCP to mediate tussles [Clark et al. 2005] by
voting on changes to configuration parameters or upgrades to an application protocol.
One way to do this is to nominate special messages that update parameters. Candidate
values could then consist of both a set of values and a set of parameter updates. A big
limitation of this approach is that a set of malicious nodes large enough to deny the
system a quorum but not large enough to undermine safety could nonetheless trigger
configuration changes by lying and putting configuration changes inY that were never
ratified. It remains an open question how to vote on parameter changes in a way that
requires the consent of a full quorum but also never jeopardizes liveness.
8. SUMMARY
Byzantine agreement has long enabled distributed systems to achieve consensus with
efficiency, standard cryptographic security, and flexibility in designating trusted par-
ticipants. More recently, Bitcoin introduced the revolutionary notion of decentralized
consensus, leading to many new systems and research challenges. This paper intro-
duces federated Byzantine agreement (FBA), a model for achieving decentralized con-
sensus while preserving the traditional benefits of Byzantine agreement. The key dis-
tinction between FBA and prior Byzantine agreement systems is that FBA forms quo-
rums from participants’ individual trust decisions, allowing an organic growth model
similar to that of the Internet. The Stellar Consensus Protocol (SCP) is a construction
for FBA that achieves optimal safety against ill-behaved participants.
Acknowledgments
Jed McCaleb inspired this work and provided feedback, terminology suggestions, and
help thinking through numerous conjectures. Jessica Collier collaborated on writing
the paper. Stan Polu created the first implementation of SCP and provided invaluable
corrections, suggestions, simplifications, and feedback in the process. Jelle van den
Hooff provided the key idea to restructure the paper around quorum intersection and
federated voting, as well as other crucial suggestions for terminology, organization,
and presentation. Nicolas Barry found several bugs in the paper as he implemented
the protocol, as well as identifying necessary clarifications. Ken Birman, Bekki Bolt-
house, Joseph Bonneau, Mike Hamburg, Graydon Hoare, Joyce Kim, Tim Makarios,
Mark Moir, Robert Morris, Lucas Ryan, and Katherine Tom slogged through drafts
of the paper, identifying errors and sources of confusion as well as providing helpful
suggestions. Eva Gantz provided helpful motivation and references. Winnie Lim pro-
vided guidance on figures. The reddit community and Tahoe-LAFS group pointed out
a censorship weakness in an earlier version of SCP, leading to the improved nomina-
tion protocol. Finally, the author would like to thank the whole Stellar team for their
support, feedback, and encouragement.
Disclaimer
Professor Mazi`eres’s contribution to this publication was as a paid consultant, and was
not part of his Stanford University duties or responsibilities.
30 D. Mazi`eres
REFERENCES
Eduardo A. Alchieri, Alysson Neves Bessani, Joni Silva Fraga, and Fab´ıola Greve. 2008. Byzantine
Consensus with Unknown Participants. In Proceedings of the 12th International Conference on
Principles of Distributed Systems. 22–40.
James Aspnes. 2010. A Modular Approach to Shared-memory Consensus, with Applications to the
Probabilistic-write Model. In Proceedings of the 29th Symposium on Principles of Distributed
Computing. 460–467.
Rachel Banning-Lover. 2015. Boatfuls of cash: how do you get money into fragile states? (February 2015).
http://www.theguardian.com/global-development-professionals-network/2015/feb/19/boatfuls-
of-cash-how-do-you-get-money-into-fragile-states .
David Basin, Cas Cremers, Tiffany Hyun-Jin Kim, Adrian Perrig, Ralf Sasse, and Pawel Szalachowski.
2014. ARPKI: Attack Resilient Public-Key Infrastructure. In Proceedings of the 2014 ACM SIGSAC
Conference on Computer and Communications Security. 382–393.
Michael Ben-Or. 1983. Another Advantage of Free Choice (Extended Abstract): Completely Asynchronous
Agreement Protocols. In Proceedings of the 2nd Symposium on Principles of Distributed Computing.
27–30.
Joseph Bonneau, Andrew Miller, Jeremy Clark, Arvind Narayanan, Joshua A. Kroll, and Edward W.
Felten. 2015. Research Perspectives and Challenges for Bitcoin and Cryptocurrencies. In Proceedings
of the 36th IEEE Symposium on Security and Privacy.
Gabriel Bracha and Sam Toueg. 1985. Asynchronous Consensus and Broadcast Protocols. Journal of the
ACM 32, 4 (Oct. 1985), 824–840.
Danny Bradbury. 2013. Feathercoin hit by massive attack. (June 2013).
http://www.coindesk.com/feathercoin-hit-by-massive-attack/ .
Vitalik Buterin. 2014. Slasher: A Punitive Proof-of-Stake Algorithm. (January 2014).
https://blog.ethereum.org/2014/01/15/slasher-a-punitive-proof-of-stake-algorithm/ .
Miguel Castro and Barbara Liskov. 1999. Practical byzantine fault tolerance. In Proceedings of the 3rd
Symposium on Operating Systems Design and Implementation. 173–186.
CGAP. 2008. Making Money Transfers Work for Microfinance Institutions. (March 2008).
http://www.cgap.org/sites/default/files/CGAP-Technical-Guide-Making-Money-Transfers-Work-
for-Microfinance-Institutions-A-Technical-Guide-to-Developing-and-Delivering-Money-
Transfers-Mar-2008.pdf .
David D. Clark, John Wroclawski, Karen R. Sollins, and Robert Braden. 2005. Tussle in Cyberspace:
Defining Tomorrow’s Internet. IEEE/ACM Transactions on Networking 13, 3 (June 2005), 462–475.
crazyearner. 2013. TERRACOIN ATTACK OVER 1.2TH ATTACK CONFIRMD [sic]. (July 2013).
https://bitcointalk.org/index.php?topic=261986.0.
Kourosh Davarpanah, Dan Kaufman, and Ophelie Pubellier. 2015. NeuCoin: the First Secure,
Cost-efficient and Decentralized Cryptocurrency. (March 2015).
http://www.neucoin.org/en/whitepaper/download.
Asli Demirguc-Kunt, Leora Klapper, Dorothe Singer, and Peter Van Oudheus프로젝트로 돌아가기