스텔라 합의 프로토콜

The Stellar Consensus Protocol

โดย David Mazières · 2015

โหมดเดี่ยว stellar.org

Abstract

Abstract

International payments are slow and expensive, in part because of multi-hop payment routing through heterogeneous banking systems. Stellar is a new global payment network that can directly transfer digital money anywhere in the world in seconds. The key innovation is a secure transaction mechanism across untrusted intermediaries, using a new Byzantine agreement protocol called SCP. With SCP, each institution specifies other institutions with which to remain in agreement; through the global interconnectedness of the financial system, the whole network then agrees on atomic transactions spanning arbitrary institutions, with no solvency or exchange-rate risk from intermediary asset issuers or market makers. We present SCP’s model, protocol, and formal verification; describe the Stellar payment network; and finally evaluate Stellar empirically through benchmarks and our experience with several years of production use. CCS Concepts • Security and privacy →Distributed systems security; • Computer systems organization → Peer-to-peer architectures; • Information systems → Electronic funds transfer. Keywords blockchain, BFT, quorums, payments ACM Reference Format: Marta Lokhava, Giuliano Losa, David Mazières, Graydon Hoare, Nicolas Barry, Eli Gafni, Jonathan Jove, Rafał Malinowsky, Jed McCaleb. 2019. Fast and secure global payments with Stellar. In SOSP ’19: Symposium on Operating Systems Principles, October 27–30, 2019, Huntsville, ON, Canada. ACM, New York, NY, USA, 17 pages. https://doi.org/10.1145/3341301.3359636

초록

국제 결제는 느리고 비용이 많이 듭니다. 부분적으로는 이기종을 통한 멀티홉 결제 라우팅 때문입니다. 은행 시스템. Stellar는 새로운 글로벌 결제 네트워크입니다. 어디서나 디지털 화폐를 직접 전송할 수 있는 몇 초 만에 세계. 핵심 혁신은 안전한 거래입니다 새로운 메커니즘을 사용하여 신뢰할 수 없는 중개자를 통한 메커니즘 SCP라고 불리는 비잔틴 합의 프로토콜. SCP를 사용하면 각각 기관은 남아 있을 다른 기관을 지정합니다. 동의하다; 글로벌 상호 연결을 통해 금융 시스템, 전체 네트워크는 원자에 동의합니다. 중개 자산 발행자의 지급 능력이나 환율 위험 없이 임의의 기관에 걸친 거래 또는 시장 조성자. 우리는 SCP의 모델, 프로토콜 및 공식적인 검증; Stellar 결제 네트워크를 설명하세요. 마지막으로 벤치마크를 통해 경험적으로 Stellar을 평가합니다. 수년간의 생산 사용 경험. CCS 개념 • 보안 및 개인정보 보호 →분산 시스템 보안; • 전산시스템 구성 → 피어 투 피어 아키텍처 • 정보시스템 → 전자 자금 이체. 키워드 blockchain, BFT, 정족수, 지불 ACM 참조 형식: 마르타 로카바, 줄리아노 로사, 데이비드 마지에르, 그레이던 호어, 니콜라스 배리, 엘리 가프니, 조나단 조브, 라파우 말리노프스키, 제드 맥칼렙. 2019. Stellar를 통한 빠르고 안전한 글로벌 결제. SOSP에서는 ’19: 운영 체제 원칙에 관한 심포지엄, 10월 27~30일 2019, 헌츠빌, 온타리오, 캐나다. ACM, 뉴욕, 뉴욕, 미국, 17페이지. https://doi.org/10.1145/3341301.3359636

Introduction

Introduction

International payments are notoriously slow and costly [32]. Consider the impracticality of sending $0.50 from the U.S. to *Galois, Inc. †UCLA Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada © 2019 Association for Computing Machinery. ACM ISBN 978-1-4503-6873-5/19/10...$15.00 https://doi.org/10.1145/3341301.3359636 Mexico, two neighboring countries. End users pay nearly $9 for the average such transfer [32], and a bilateral agreement brokered by the countries’ central banks could only reduce the underlying bank cost to $0.67 per item [2]. On top of fees, the latency of international payments is generally counted in days, making it impossible to get money abroad quickly in emergencies. In countries where the banking system doesn’t work or doesn’t serve all citizens, or where fees are intolerable, people resort to sending payments by bus [38], by boat [19], and occasionally now by Bitcoin [55], all of which incur risk, latency, or inconvenience. While there will always be compliance costs, evidence suggests a significant amount is lost to lack of competition [21], which is exacerbated by inefficient technology. Where people can innovate, prices and latencies go down. For instance, remittances from bank accounts in Q2 2019 cost an average of 6.99%, while the figure for mobile money was only 4.88% [13]. An open, global payment network that attracts innovation and competition from non-bank entities could drive down costs and latencies at all layers, including compliance [83]. This paper presents Stellar, a blockchain-based payment network specifically designed to facilitate innovation and competition in international payments. Stellar is the first system to meet all three of the following goals (under a novel but empirically valid “Internet hypothesis”): 1. Open membership – Anyone can issue currency-backed digital tokens that can be exchanged among users. 2. Issuer-enforced finality – A token’s issuer can prevent transactions in the token from being reversed or undone. 3. Cross-issuer atomicity – Users can atomically exchange and trade tokens from multiple issuers. Achieving the first two is easy. Any company can unilaterally offer a product such as Paypal, Venmo, WeChat Pay, or Alipay and ensure the finality of payments in the virtual currencies they have created. Unfortunately, transacting atomically across these currencies is impossible. In fact, despite Paypal having acquired Venmo’s parent company in 2013, it is still impossible for end users to send Venmo dollars to Paypal users [78]. Only recently can merchants even accept both with a single integration. Goals 2 and 3 can be achieved in a closed system. In particular, a number of countries have efficient domestic payment networks, typically overseen by a universally trusted regulatory authority. However, membership is limited to a closed set of chartered banks and the networks are limited to the reach of a country’s regulatory authority.

SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Lokhava et al. Goals 1 and 3 have been achieved in mined blockchains, most notably in the form of ERC20 tokens on Ethereum [3]. The key idea of these blockchains is to create a new cryptocurrency with which to reward people for making settled transactions hard to revert. Unfortunately, this means token issuers do not control transaction finality. If software errors cause transactions history to be reorganized [26, 73], or when the spoils of defrauding people exceed the cost of reorganizing history [74, 97], issuers may be liable for tokens they have already redeemed for real-world money. The Stellar blockchain has two distinguishing properties. First, it natively supports efficient markets between tokens from different issuers. Specifically, anyone can issue a token, the blockchain provides a built-in orderbook for trade between any pair of tokens, and users can issue path payments that atomically trade across several currency pairs while guaranteeing an end-to-end limit price. Second, Stellar introduces a new Byzantine agreement protocol, SCP (Stellar Consensus Protocol), through which token issuers designate specific validator servers to enforce transaction finality. So long as no one compromises an issuer’s validators (and the underlying digital signatures and cryptographic hashes remain secure), the issuer knows exactly which transactions have occurred and avoids the risk of losses from blockchain history reorganization. SCP’s key idea is that most asset issuers benefit from liquid markets and want to facilitate atomic transactions with other assets. Hence, validator administrators configure their servers to agree with other validators on the exact history of all transactions on all assets. A validator v1 can be configured to agree with v2, or v2 can be configured to agree with v1, or both may be configured to agree with each other; in all cases, neither will commit to a transaction history until it knows the other cannot commit to a different history. By transitivity, if v1 cannot disagree with v2 and v2 cannot disagree with v3 (or vice versa), v1 cannot disagree with v3, whether or not v3 represents assets v1 has even heard of. Under the hypothesis that these agreement relationships transitively connect the whole network, SCP guarantees global agreement, making it a global Byzantine agreement protocol with open membership. We call this new connectedness assumption the Internet hypothesis, and note that it holds of both “the Internet” (which everyone understands to mean the single largest transitively connected IP network) and legacy international payments (which are hop-by-hop non-atomic, but leverage a transitively connected, global network of financial institutions). Stellar has been in production use since September, 2015. To keep the blockchain length manageable, the system runs SCP at 5-second intervals—fast by blockchain standards, but far slower than typical applications of Byzantine agreement. Though the primary use has been payments, Stellar has also proven appealing for non-money fungible tokens that benefit from immediate secondary markets (see Section 7.1). The next section discusses related work. Section 3 presents SCP. Section 4 describes our formal verification of SCP. Section 5 describes Stellar’s payment layer. Section 6 relates some of our deployment experience and lessons learned. Section 7 evaluates the system. Section 8 concludes.

소개

국제 결제는 느리고 비용이 많이 드는 것으로 악명 높습니다 [32]. 미국에서 다음 국가로 0.50달러를 보내는 것은 비실용적입니다. *갈로이스 주식회사 †UCLA 본 저작물의 전부 또는 일부를 디지털 또는 하드 카피로 만들 수 있는 권한 개인 또는 교실 사용은 사본이 아닌 한 무료로 허용됩니다. 영리 또는 상업적 이익을 위해 제작 또는 배포되었으며 그 사본에는 다음과 같은 내용이 포함됩니다. 이 통지문과 첫 페이지에 전체 인용문이 나와 있습니다. 구성 요소에 대한 저작권 ACM이 아닌 타인이 소유한 이 저작물은 존중되어야 합니다. 추상화 신용이 허용됩니다. 다른 방식으로 복사하거나 다시 게시하거나 서버에 게시하거나 목록으로 재배포하려면 사전 특정 허가 및/또는 수수료가 필요합니다. 요청 [email protected]의 권한입니다. SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 © 2019 컴퓨팅 기계 협회. ACM ISBN 978-1-4503-6873-5/19/10...$15.00 https://doi.org/10.1145/3341301.3359636 멕시코, 두 이웃 국가. 최종 사용자는 거의 9달러를 지불합니다. 평균 전송 [32] 및 양자간 합의 국가의 중앙은행이 중개하는 것은 단지 감소할 수 있을 뿐이다. 기본 은행 비용은 항목당 $0.67 [2]입니다. 수수료 외에, 일반적으로 국제 결제 지연 시간이 계산됩니다. 며칠 안에 해외로 빨리 돈을 가져갈 수 없게 만듭니다. 긴급 상황. 은행 시스템이 없는 국가에서는 일하거나 모든 시민에게 서비스를 제공하지 않거나 수수료가 감당할 수 없는 곳에서는 사람들이 버스([38])로 지불금을 보내는 데 의지합니다. 보트 [19], 때로는 지금 Bitcoin [55]까지, 모두 위험, 지연 또는 불편이 발생합니다. 규정 준수 비용은 항상 존재하지만 경쟁 부족으로 인해 상당한 금액의 손실이 발생한다는 증거가 있습니다 [21], 이는 비효율적인 기술로 인해 더욱 악화됩니다. 사람들이 있는 곳 혁신할 수 있고 가격과 지연 시간이 줄어듭니다. 예를 들어, 2019년 2분기 은행 계좌에서 송금하는 데 드는 평균 비용은 6.99%, 모바일 머니 수치는 4.88% [13]에 불과했습니다. 혁신을 불러일으키는 개방형 글로벌 결제 네트워크 비은행 기업과의 경쟁이 위축될 수 있습니다. 규정 준수를 포함한 모든 계층의 비용 및 대기 시간 [83]. 이 백서는 blockchain 기반 결제인 Stellar을 제시합니다. 혁신을 촉진하고 국제 결제 경쟁. Stellar이 첫 번째입니다 다음 세 가지 목표를 모두 충족하는 시스템( 참신하지만 경험적으로 유효한 "인터넷 가설"): 1. 오픈멤버십 – 누구나 통화담보 발행 가능 사용자 간에 교환할 수 있는 디지털 token입니다. 2. 발급자 시행 최종성 – token의 발급자는 이를 방지할 수 있습니다. token의 거래가 취소되거나 실행 취소되지 않습니다. 3. 발행자 간 원자성 – 사용자는 원자적으로 교환할 수 있습니다. 여러 발행자로부터 token을 거래하세요. 처음 두 개를 달성하는 것은 쉽습니다. 어떤 회사라도 Paypal, Venmo, WeChat과 같은 제품을 일방적으로 제공할 수 있습니다. 지불 또는 Alipay를 통해 지불의 최종성을 보장합니다. 그들이 만든 가상 화폐. 불행하게도 이러한 통화 간에 원자적으로 거래하는 것은 불가능합니다. 사실, Paypal이 Venmo의 모회사를 인수했음에도 불구하고 2013년에는 여전히 최종 사용자가 Venmo를 보내는 것이 불가능합니다. PayPal 사용자에게 [78] 달러를 지급합니다. 최근에야 상인들이 단일 통합으로 두 가지를 모두 수용할 수도 있습니다. 목표 2와 3은 폐쇄형 시스템에서 달성할 수 있습니다. 특히 국내결제가 효율적인 국가가 많습니다. 일반적으로 보편적으로 신뢰할 수 있는 규제 기관이 감독하는 네트워크입니다. 단, 회원가입은 비공개로 제한됩니다. 공인 은행 집합과 네트워크는 다음으로 제한됩니다. 국가의 규제 당국에 도달합니다.SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 Lokhavaet al. 목표 1과 3은 채굴된 blockchain에서 달성되었습니다. 특히 Ethereum [3]의 ERC20 tokens 형식입니다. 이 blockchains의 핵심 아이디어는 사람들이 정착에 대해 보상할 수 있는 새로운 암호화폐를 만드는 것입니다. 되돌리기 어려운 거래. 불행하게도 이는 token 발행자가 거래 최종성을 제어하지 않는다는 것을 의미합니다. 소프트웨어인 경우 오류로 인해 거래 내역이 재구성됩니다 [26, 73], 또는 사람들을 속여 얻은 전리품이 그 비용을 초과하는 경우 기록 재구성 [74, 97], 발행자는 tokens에 대해 책임을 질 수 있습니다. 그들은 이미 실제 돈으로 교환했습니다. Stellar blockchain에는 두 가지 구별되는 속성이 있습니다. 첫째, 기본적으로 tokens 간의 효율적인 시장을 지원합니다. 다른 발행자로부터. 특히 누구나 token을 발행할 수 있습니다. blockchain은 token 쌍 간의 거래를 위한 내장 주문서를 제공하며 사용자는 경로 지불을 발행할 수 있습니다. 여러 통화쌍에 걸쳐 원자적으로 거래되는 반면 종단간 한계 가격을 보장합니다. 둘째, Stellar은 새로운 비잔틴 계약을 도입합니다. 프로토콜, SCP(Stellar 합의 프로토콜)를 통해 token 발급자는 시행할 특정 validator 서버를 지정합니다. 거래 최종성. 발행자의 validator(및 기본 디지털 서명 및 암호화 hashes는 안전하게 유지됩니다.) 발행자는 어떤 거래가 발생했는지 정확히 알고 위험을 방지합니다. blockchain 기록 재구성으로 인한 손실. SCP의 핵심 아이디어는 대부분의 자산 발행자가 다음으로부터 이익을 얻는다는 것입니다. 유동적인 시장이며 원자 거래를 촉진하기를 원합니다. 다른 자산과 함께. 따라서 validator 관리자는 해당 서버는 정확한 내용에 대해 다른 validator과 동의합니다. 모든 자산에 대한 모든 거래 내역. validator v1은 다음과 같습니다. v2에 동의하도록 구성하거나 v2에 동의하도록 구성할 수 있습니다. v1을 사용하거나 둘 다 서로 동의하도록 구성할 수 있습니다. 모든 경우에 어느 쪽도 거래 내역을 약속하지 않습니다. 다른 사람이 다른 역사를 맡을 수 없다는 것을 알고 있습니다. 전이성에 따라 v1이 v2에 동의하지 않고 v2가 v3에 동의하지 않으면(또는 그 반대) v1은 v2에 동의하지 않을 수 있습니다. v3, v3이 v1이 들어본 자산을 나타내는지 여부 의. 이러한 합의 관계가 성립한다는 가설 하에 전체 네트워크를 전이적으로 연결, SCP 보장 글로벌 협약, 이를 글로벌 비잔틴 협약으로 만듭니다. 공개 멤버십을 갖춘 프로토콜. 우리는 이 새로운 연결성 가정을 인터넷 가설이라고 부르며, 모두가 이해하는 "인터넷"을 모두 보유하고 있습니다. 전이적으로 연결된 단일 최대 규모의 IP 네트워크를 의미함) 기존 국제 결제(홉별 결제) 비원자적이지만 전이적으로 연결된 글로벌 금융 기관 네트워크). Stellar은 2015년 9월부터 프로덕션에서 사용되었습니다. blockchain 길이를 관리 가능하게 유지하기 위해 시스템이 실행됩니다. 5초 간격의 SCP—blockchain 표준으로는 빠르지만, 비잔틴 계약의 일반적인 적용보다 훨씬 느립니다. 주요 용도는 결제였지만 Stellar은(는) 비화폐 대체 가능 token에 대한 매력이 입증되었습니다. 즉각적인 2차 시장에서 제공됩니다(섹션 7.1 참조). 다음 섹션에서는 관련 작업에 대해 설명합니다. 섹션 3은 다음과 같습니다. SCP. 섹션 4에서는 SCP의 공식 검증을 설명합니다. 섹션 5에서는 Stellar의 결제 계층에 대해 설명합니다. 섹션 6 관련 우리의 배포 경험과 교훈 중 일부. 섹션 7에서는 시스템을 평가합니다. 섹션 8이 마무리됩니다.

Stellar consensus protocol

Stellar consensus protocol

The Stellar consensus protocol (SCP) is a quorum-based Byzantine agreement protocol with open membership. Quorums emerge from the combined local configuration decisions of individual nodes. However, nodes only recognize quorums to which they belong themselves, and only after learning the local configurations of all other quorum members. One benefit of this approach is that SCP inherently tolerates heterogeneous views of what nodes exist. Hence, nodes can join and leave unilaterally with no need for a “view change” protocol to coordinate membership. 3.1 Federated Byzantine agreement The traditional Byzantine agreement problem consists of a closed system of N nodes, some of which are faulty and may behave arbitrarily. Nodes receive input values and exchange messages to decide on an output value among the inputs. A Byzantine agreement protocol is safe when no two wellbehaved nodes output different decisions and the unique decision was a valid input (for some definition of valid agreed

SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Lokhava et al. upon beforehand). A protocol is live when it guarantees that every honest node eventually outputs a decision. Typically, protocols assume N = 3f + 1 for some integer f > 0, then guarantee safety and some form of liveness so long as at most f nodes are faulty. At some stage in these protocols, nodes vote on proposed values and a proposal receiving 2f + 1 votes, called a quorum of votes, becomes the decision. With N = 3f + 1 nodes, any two quorums of size 2f + 1 overlap in at least f + 1 nodes; even if f of these overlapping nodes are faulty, the two quorums share at least one non-faulty node, preventing contradictory decisions. However, this approach only works if all nodes agree on what constitutes a quorum, which is impossible in SCP where two nodes may not even know of each other’s existence. With SCP, each node v unilaterally declares sets of nodes, called its quorum slices, such that (a) v believes that if all members of a slice agree about the state of the system, then they are right, and (b) v believes that at least one of its slices will be available to provide timely information about the state of the system. We call the resulting system, consisting of nodes and their slices, a Federated Byzantine Agreement (FBA) system. As we will see next, a quorum system emerges from nodes’ slices. Informally, an FBA node’s slices express with whom the node requires agreement. E.g., a node may require agreement with 4 specific organizations, each running 3 nodes; to accommodate downtime, it may set its slices to be all sets consisting of 2 nodes from each organization. If this “requires agreement with” relation transitively relates any two nodes, we get global agreement. Otherwise, we can get divergence, but only between organizations neither of which requires agreement with the other. Given the topology of today’s financial system, we hypothesize that widespread convergence will keep producing a singe ledger history people call “the Stellar network,” much as we speak of the Internet. Quorums arise from slices as follows. Every node specifies its quorum slices in every message it sends. Let S be the set of nodes from which a set of messages originated. A node considers the set of messages to have reached quorum threshold when every member of S has a slice included in S. By construction, such a set S, if unanimous, satisfies the agreement requirements of each of its members. A faulty peer may advertise slices crafted to change what well-behaved nodes consider quorums. For the sake of protocol analysis, we define a quorum in FBA to be a non-empty set S of nodes encompassing at least one quorum slice of each non-faulty member. This abstraction is sound, as any set of messages purporting to represent a unanimous quorum actually does (even if it contains messages from faulty nodes), and it is precise when S contains only well-behaved nodes. In this section, we also assume that nodes’ slices do not change. Nevertheless, our results transfer to the changing-slice case because a system in which slices change is no less safe than a fixed-slice system in which a node’s slices consist of all the slices it ever uses in the changing-slices case (see Theorem 13 in [68]). As explained in Section 4, liveness depends on well-behaved nodes eventually removing unreliable nodes from their slices. Because different nodes have different agreement requirements, FBA precludes a global definition of safety. We say non-faulty nodes v1 and v2 are intertwined when every quorum of v1 intersects every quorum of v2 in at least one non-faulty node. An FBA protocol can ensure agreement only between intertwined nodes; since SCP does so, its fault tolerance for safety is optimal. The Internet hypothesis, underlying Stellar’s design, states that the nodes people care about will be intertwined. We say a set of nodes I is intact if I is a uniformly nonfaulty quorum such that every two members of I are intertwined even if every node outside of I is faulty. Intuitively, then, I should remain impervious to the actions of non-intact nodes. SCP guarantees both non-blocking liveness [93] and safety to intact sets, though nodes themselves do not need to know (and may not be able to know) which sets are intact. Furthermore, the union of two intact sets that intersect is an intact set. Therefore, intact sets define a partition of the well-behaved nodes, where each partition is safe and live (under some conditions), but different partitions may output divergent decisions. 3.1.1 Safety vs. Liveness considerations in FBA With limited exceptions [64], most closed Byzantine agreement protocols are tuned to the equilibrium point at which safety and liveness have the same fault tolerance. In FBA, that means configurations in which, regardless of failures, all intertwined sets are also intact. Given that FBA determines quorums in a decentralized way, it is unlikely that individual slice choices will lead to this equilibrium. Moreover, at least in Stellar, equilibrium is not desirable: the consequences of a safety failure (namely double-spent digital money) are far worse than those of a liveness failure (namely delays in payments that anyway took days before Stellar). People therefore should and do select large quorum slices such that their nodes are more likely to remain intertwined than intact. Further tipping the scales, it is easier to recover from typical liveness failures in an FBA system than in a traditional closed one. In closed systems, all messages must be interpreted with respect to the same set of quorums. Hence, adding and removing nodes to recover from failure requires reaching consensus on a reconfiguration event, which is difficult once consensus is no longer live. By contrast, with FBA, any node can unilaterally adjust its quorum slices at any time. In response to an outage at a systemically important organization, node administrators can adjust their slices to work around the problem, a bit like coordinating responses to BGP catastrophes [63] (though without the constraints of routing over physical network links).

Fast and secure global payments with Stellar SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada 3.1.2 The cascade theorem SCP follows the template of the basic round model [42]; nodes progress through a series of numbered ballots, each attempting three tasks: (1) identify a “safe” value not contradicted by any decision in a previous ballot (often termed preparing the ballot), (2) agree on the safe value, and (3) detect that agreement was successful. However, FBA’s open membership stymies several common techniques, making it impossible to “port” traditional closed protocols to the FBA model by simply changing the definition of quorum. One technique employed by many protocols is rotating through leader nodes in round-robin fashion following timeouts. In a closed system, round-robin leader selection ensures that eventually a unique honest leader ends up coordinating agreement on a single value. Unfortunately, round-robin cannot work in an FBA system with unknown membership. Another common technique that fails with FBA is assuming a particular quorum can convince all nodes. For instance, if everyone recognizes any 2f + 1 nodes as a quorum, then 2f + 1 signatures suffice to prove protocol state to all nodes. Similarly, if a node receives a quorum of identical messages through reliable broadcast [24], the node can assume all nonfaulty nodes will also see a quorum. In FBA, by contrast, a quorum means nothing to nodes outside the quorum. Finally, non-federated systems often employ “backwards” reasoning about safety: if f + 1 nodes are faulty, all safety guarantees are lost. Hence, if node v hears f + 1 nodes all state some fact F, v can assume at least one is telling the truth (and hence that F is true) with no loss of safety. Such reasoning fails in FBA because safety is a property of pairs of nodes, so a node that has lost safety to some peers can always lose safety to more nodes by assuming bad facts. FBA can, however, reason backwards about liveness. Define a v-blocking set as a set of nodes that intersects every slice of v. If a v-blocking set B is unanimously faulty, B can deny node v a quorum and cost it liveness. Hence, if B unanimously states fact F, then v knows that either F is true or v is not intact. However, v still needs to see a full quorum to know that intertwined nodes won’t contradict F, which leads to a final round of communication in SCP and other FBA protocols [47] that is not required in analogous closed-membership protocols. The result is that we have three possible levels of confidence in potential facts: indeterminate, safe to assume among intact nodes (which we will term accepted facts), and safe to assume among intertwined nodes (which we will term confirmed facts). Node v can efficiently determine whether a set B is vblocking by checking whether B intersects all its slices. Interestingly, if nodes always announce the statements they accept and a full quorum accepts a statement, it sets off a cascading process by which statements propagate throughout intact sets. We call the key fact underlying this propagation the cascade theorem, which sates the following: If I is an intact set, Q is a quorum of any member of I, and S is any superset of Q, then either \(S \supseteq I\) or there is a member \(v \in I\) such that \(v \notin S\) and \(I \cap S\) is \(v\)-blocking. Intuitively, were this not the case, the complement of S would contain a quorum that intersects I but not Q, violating quorum intersection. Note that if we start with S = Q and repeatedly expand S to include all nodes it blocks, we obtain a cascading effect until, eventually, S encompasses all of I. 3.2 Protocol description SCP is a partially synchronous consensus protocol [42] consisting of a series of attempts to reach consensus called ballots. Ballots employ timeouts of increasing duration. A ballot-synchronization protocol ensures that nodes stay on the same ballot for increasing periods of time until the ballots are effectively synchronous. Termination is not guaranteed until ballots are synchronous, but two synchronous ballots in which faulty members of well-behaved nodes’ slices do not interfere are sufficient for SCP to terminate. A balloting protocol specifies the actions taken during each ballot. A ballot begins with a prepare phase, in which nodes try to determine a value to propose that does not contradict any previous decision. Then, in a commit phase, nodes try to make a decision on the prepared value. Balloting employs an agreement sub-protocol called federated voting, in which nodes vote on abstract statements that may eventually be confirmed or get stuck. Some statements might be designated contradictory, and the safety guarantee of federated voting is that no two members of an intertwined set confirm contradictory statements. Confirmation of a statement is not guaranteed except for an intact set whose members all vote the same way. However, if a member of an intact set does confirm a statement, federated voting guarantees that all members of the intact set eventually confirm that statement. Hence, taking irreversible steps in response to confirming statements preserves liveness for intact nodes. Nodes initially propose values obtained from a nomination protocol that increases the chances of all members of an intact set proposing the same value, and that eventually converges (though with no way to determine convergence is complete). Nomination combines federated voting with leader selection. Because round-robin is impossible in FBA, nomination uses a probabilistic leader-selection scheme. The cascade theorem plays a crucial role both in ballot synchronization and in avoiding blocked states from which termination is no longer possible. 3.2.1 Balloting SCP nodes proceed through a series of numbered ballots, employing federated voting to agree on statements about which values are or are not decided in which ballots. If asynchrony or faulty behavior prevents reaching a decision in ballot n, nodes time out and try again in ballot n + 1.

SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Lokhava et al. Recall federated voting might not terminate. Hence, some statements about ballots can get stuck in a permanently indeterminate state where nodes can never determine if they are still in progress or stuck. Because nodes cannot rule out the possibility of indeterminate statements later proving true, they must never attempt federated voting on new statements contradicting indeterminate ones. In each ballot n, nodes use federated voting on two types of statement: • prepare ⟨n,x⟩– states that no value other than x was or will ever be decided in any ballot \(\leq n\). • commit \(\langle n, x \rangle\) – states \(x\) is decided in ballot \(n\). Importantly, note that prepare \(\langle n, x \rangle\) contradicts commit \(\langle n', x' \rangle\) when \(n \geq n'\) and \(x \neq x'\). A node starts ballot n by attempting federated voting on a statement prepare ⟨n,x⟩. If any previous prepare statement was successfully confirmed through federated voting, the node chooses x from the confirmed prepare of the highest ballot. Otherwise, the node sets x to the output of the nomination protocol described in the next subsection. If and only if a node successfully confirms prepare ⟨n,x⟩ in ballot n, it attempts federated voting on commit ⟨n,x⟩. If that succeeds, it means SCP has decided, so the node outputs the value from the confirmed commit statement. Consider an intertwined set S. Since at most one value can be confirmed prepared by members of S in a given ballot, no two different values may be confirmed committed by members of S in a given ballot. Moreover, if commit ⟨n,x⟩ is confirmed, then prepare ⟨n,x⟩was confirmed too; since prepare ⟨n,x⟩contradicts any earlier commit for a different value, by the agreement guarantees of federated voting we get that no different value may be decided in an earlier ballot by members of S. By induction on ballot numbers, we therefore get that SCP is safe. For liveness, consider an intact set I and a long enough synchronous ballot n. If faulty nodes appearing in the slices of well-behaved nodes do not interfere in n, then by ballot n + 1 all members of I have confirmed the same set P of prepare statements. If P = ∅and ballot n was long enough, the nomination protocol will have converged on some value x. Otherwise, let x be the value from the prepare with the highest ballot in P. Either way, I will uniformly attempt federated voting on prepare ⟨n + 1,x⟩in the next ballot. Therefore, if n + 1 is also synchronous, a decision for x inevitably follows. 3.2.2 Nomination Nomination entails federated voting on statements: • nominate x – states x is a valid decision candidate. Nodes may vote to nominate multiple values—different nominate statements are not contradictory. However, once a node confirms any nominate statement, it stops voting to nominate new values. Federated voting still allows a node to confirm new nominate statements it didn’t vote for, which vote-or-accept a from quorum accept a from quorum a is valid accept a from blocking set uncommitted voted a accepted a confirmed a voted ¬a Figure 1. Stages of federated voting allows members of an intact set to confirm one another’s nominated values while still withholding new votes. The (evolving) result of nomination is a deterministic combination of all values in confirmed nominate statements. If x represents a set of transactions, nodes can take the union of sets, the largest set, or the one with the highest hash, so long as all nodes do the same. Because nodes withhold new votes after confirming one nominate statement, the set of confirmed statements can contain only finitely many values. The fact that confirmed statements reliably spread through intact sets means intact nodes eventually converge on the same set of nominated values and hence nomination result, though at an unknown point arbitrarily late in the protocol. Nodes employ federated leader selection to reduce the number of different values in nominate statements. Only a leader who has not already voted for a nominate statement may introduce a new x. Other nodes wait to hear from leaders and just copy their leaders’ (valid) nominate votes. To accommodate failure, the set of leaders keeps growing as timeouts occur, though in practice only a few nodes introduce new values of x. 3.2.3 Federated voting Federated voting employs a three-phase protocol shown in Figure 1. Nodes try to agree on abstract statements by first voting, then accepting, and finally confirming statements. A node v may vote for any valid statement a that does not contradict its other outstanding votes and accepted statements. It does so by broadcasting a signed vote message. v then accepts a if a is consistent with other accepted statements and either (case 1)v is a member of a quorum in which each node either votes for a or accepts a, or (case 2) even if v didn’t vote for a, a v-blocking set accepts a. In case 2, v may have previously cast votes contradicting a, which have now been overruled. v is allowed to forget about overruled votes and pretend it never cast them because ifv is intact, it knows overruled votes cannot complete a quorum through case 1. v broadcasts that it accepts a, then confirms a when it is in a quorum that unanimously accepts a. Figure 2 shows the effect of v-blocking sets and the cascade theorem during federated voting. Two intertwined nodes cannot confirm contradictory statements, as the two required quorums would have to share a

Fast and secure global payments with Stellar SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada 3 4 2 1 5 7

Stellar 합의 프로토콜

Stellar 합의 프로토콜(SCP)은 쿼럼 기반입니다. 공개 멤버십을 갖춘 비잔틴 계약 프로토콜. 쿼럼은 개별 노드의 결합된 로컬 구성 결정에서 나타납니다. 그러나 노드는 오직 자신이 속한 정원회, 그리고 그 이후에만 다른 모든 정원회 구성원의 로컬 구성을 학습합니다. 이 접근 방식의 한 가지 이점은 SCP가 본질적으로 어떤 노드가 존재하는지에 대한 이질적인 관점을 허용합니다. 따라서, 노드는 별도의 작업 없이 일방적으로 합류하고 나갈 수 있습니다. 멤버십을 조정하기 위한 "변경 보기" 프로토콜입니다. 3.1 연합 비잔틴 계약 전통적인 비잔틴 합의 문제는 다음과 같이 구성됩니다. N개 노드로 구성된 폐쇄형 시스템. 그 중 일부는 결함이 있으며 임의로 행동하십시오. 노드는 입력 값을 받고 교환합니다. 입력 중 출력 값을 결정하는 메시지입니다. 비잔틴 합의 프로토콜은 선의로 행동하는 두 노드가 서로 다른 결정과 고유한 결과를 출력하지 않을 때 안전합니다. 결정은 유효한 입력이었습니다(유효한 합의의 일부 정의에 대해).SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 Lokhavaet al. 사전에). 프로토콜은 다음을 보장할 때 활성화됩니다. 모든 정직한 노드는 결국 결정을 내립니다. 일반적으로 프로토콜은 일부 정수에 대해 N = 3f + 1이라고 가정합니다. f > 0이면 안전성과 어떤 형태의 활성도 보장됩니다. 최대 f 노드에 결함이 있는 한. 이들 중 어느 단계에서는 프로토콜, 노드는 제안된 값과 제안에 투표합니다. 투표 정족수라고 불리는 2f + 1 표를 받는 것은 다음과 같습니다. 결정. N = 3f + 1개 노드의 경우 두 쿼럼은 크기 2f + 1은 최소 f + 1개 노드에서 겹칩니다. 만약 이것들이 f개라도 겹치는 노드에 결함이 있는 경우 두 쿼럼은 최소한 결함이 없는 노드 하나를 사용하여 모순된 결정을 방지합니다. 그러나 이 접근 방식은 모든 노드가 동의하는 경우에만 작동합니다. 쿼럼을 구성하는 것은 SCP에서는 불가능합니다. 두 노드는 서로의 존재조차 알지 못할 수도 있습니다. SCP를 사용하면 각 노드 v가 일방적으로 노드 집합을 선언합니다. (a) v는 쿼럼 슬라이스라고 부릅니다. 슬라이스의 구성원이 시스템 상태에 동의하면 그들은 옳고, (b) v는 그 조각 중 적어도 하나가 에 관한 정보를 적시에 제공할 수 있을 것입니다. 시스템 상태. 우리는 결과 시스템을 다음과 같이 부릅니다. 노드와 그 조각, 연합 비잔틴 계약 (FBA) 시스템. 다음에 살펴보겠지만, 정족수 시스템이 등장합니다. 노드의 조각에서. 비공식적으로 FBA 노드의 슬라이스는 누구와 함께 있는지 표현합니다. 노드에는 동의가 필요합니다. 예를 들어, 노드는 각각 3개의 노드를 실행하는 4개의 특정 조직과의 계약이 필요할 수 있습니다. 에 가동 중지 시간을 수용하여 슬라이스를 모든 세트로 설정할 수 있습니다. 각 조직의 2개 노드로 구성됩니다. 이것이 "필요하다면 '합의' 관계는 임의의 두 노드를 전이적으로 관련시킵니다. 우리는 세계적인 합의를 얻었습니다. 그렇지 않으면 우리는 발산을 얻을 수 있습니다. 그러나 어느 쪽도 요구하지 않는 조직 사이에서만 가능합니다. 상대방과의 합의. 오늘의 토폴로지를 고려하면 금융 시스템에서 우리는 광범위한 수렴이 사람들이 부르는 단일 원장 기록을 계속 생성할 것이라고 가정합니다. 우리가 인터넷에 대해 말하는 것과 마찬가지로 "Stellar 네트워크"입니다. 쿼럼은 다음과 같이 조각에서 발생합니다. 모든 노드는 지정합니다 보내는 모든 메시지에서 쿼럼 조각이 삭제됩니다. S를 메시지 집합이 시작된 노드 집합입니다. 에이 노드는 메시지 집합이 쿼럼에 도달한 것으로 간주합니다. S의 모든 구성원이 S에 포함된 슬라이스를 가질 때 임계값입니다. 구성에 따르면, 그러한 집합 S는 만장일치로 다음을 만족합니다. 각 회원의 동의 요구 사항. 결함이 있는 피어는 무엇을 변경하기 위해 제작된 슬라이스를 광고할 수 있습니다. 선의로 행동하는 노드는 쿼럼을 고려합니다. 프로토콜 분석을 위해 FBA의 쿼럼을 비어 있지 않은 것으로 정의합니다. 적어도 하나의 쿼럼 슬라이스를 포함하는 노드 집합 S 결함이 없는 각 멤버. 이 추상화는 어떤 집합과 마찬가지로 건전합니다. 만장일치로 정족수를 대표한다고 주장하는 메시지 실제로 그렇습니다(결함 있는 노드의 메시지가 포함된 경우에도). S가 선의로 행동하는 노드만 포함하면 정확합니다. 에서 이 섹션에서는 노드의 슬라이스가 변경되지 않는다고 가정합니다. 그럼에도 불구하고 우리의 결과는 슬라이스 변경 사례로 이전됩니다. 슬라이스가 변경되는 시스템은 다음과 같이 안전하기 때문입니다. 노드의 슬라이스가 모든 항목으로 구성되는 고정 슬라이스 시스템 슬라이스 변경 사례에서 사용한 슬라이스(정리 참조) [68]의 13). 섹션 4에서 설명했듯이 활성 상태는 다음에 따라 달라집니다. 선량하게 행동하는 노드는 결국 신뢰할 수 없는 노드를 제거합니다. 그들의 조각에서. 노드마다 계약 요구 사항이 다르기 때문에 FBA에서는 안전에 대한 글로벌 정의를 배제합니다. 우리는 말한다 결함이 없는 노드 v1과 v2는 다음과 같은 경우 서로 얽혀 있습니다. v1의 쿼럼은 적어도 하나의 v2의 모든 쿼럼과 교차합니다. 결함이 없는 노드. FBA 프로토콜은 합의를 보장할 수 있습니다. 얽힌 노드 사이에서만; SCP가 그렇게 하기 때문에, 그것의 잘못이다 안전에 대한 내성이 최적입니다. 인터넷 가설, Stellar의 기본 디자인에는 사람들이 관심을 갖는 노드가 명시되어 있습니다. 대략 얽히게 됩니다. I 외부의 모든 노드에 결함이 있더라도 I의 모든 두 구성원이 서로 얽혀 있는 균일하게 결함이 없는 쿼럼인 경우 노드 집합 I는 손상되지 않습니다. 직관적으로, 그러면 나는 손상되지 않은 사람의 행동에 영향을 받지 않는 상태를 유지해야 합니다. 노드. SCP는 비차단 활성 [93]과 노드 자체는 필요하지 않지만 손상되지 않은 세트에 대한 안전성 어떤 세트가 손상되지 않았는지 알 수 있습니다(알지 못할 수도 있음). 게다가, 교차하는 두 개의 온전한 집합의 합집합은 다음과 같습니다. 온전한 세트. 따라서 손상되지 않은 세트는 다음의 파티션을 정의합니다. 각 파티션이 안전하고 활성화되어 있는 잘 동작하는 노드 (일부 조건 하에서)하지만 다른 파티션이 출력될 수 있습니다. 다양한 결정. 3.1.1 FBA의 안전 및 활성 고려 사항 제한된 예외([64])를 제외하고 대부분의 폐쇄형 비잔틴 합의 프로토콜은 균형점에 맞춰 조정됩니다. 안전성과 활성성은 동일한 내결함성을 갖습니다. FBA에서는 이는 장애에 관계없이 모든 것이 가능한 구성을 의미합니다. 얽힌 세트도 그대로 유지됩니다. FBA가 결정한다는 점을 고려하면 분산된 방식으로 쿼럼을 구성하는 경우 개별 슬라이스 선택이 이러한 균형으로 이어질 가능성은 거의 없습니다. 더욱이, 적어도 Stellar에서는 균형이 바람직하지 않습니다. 그 결과 안전 실패(즉, 이중 지출 디지털 화폐)는 활성 실패(즉, 지연)보다 훨씬 더 나쁩니다. 어쨌든 Stellar 전에 며칠이 걸린 지불). 사람 그러므로 큰 쿼럼 조각을 선택해야 하며 그렇게 해야 합니다. 그들의 노드는 손상되지 않은 것보다 서로 얽혀 있을 가능성이 더 높습니다. 저울을 더 기울이면 회복하기가 더 쉽습니다. 기존의 폐쇄형 시스템보다 FBA 시스템의 일반적인 활성 오류입니다. 폐쇄형 시스템에서는 모든 메시지가 다음과 같아야 합니다. 동일한 정원회 집합을 기준으로 해석됩니다. 따라서, 장애 복구를 위해 노드를 추가 및 제거하려면 다음이 필요합니다. 합의가 더 이상 활성화되지 않으면 재구성 이벤트에 대한 합의에 도달하기가 어렵습니다. 이에 반해 FBA의 경우 모든 노드는 언제든지 쿼럼 슬라이스를 일방적으로 조정할 수 있습니다. 시간. 시스템적으로 중요한 서비스의 중단에 대응하여 조직에서 노드 관리자는 슬라이스를 다음과 같이 조정할 수 있습니다. 문제를 해결하세요. 대응을 조정하는 것과 비슷합니다. BGP 재앙 63 물리적 네트워크 링크를 통한 라우팅).

Stellar을 통한 빠르고 안전한 글로벌 결제 SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 3.1.2 캐스케이드 정리 SCP는 기본 원형 모델 [42]의 템플릿을 따릅니다. 노드는 번호가 매겨진 일련의 투표를 통해 진행됩니다. 세 가지 작업 시도: (1) 이전 투표의 결정과 모순되지 않는 "안전한" 값을 식별합니다(종종 투표용지 준비), (2) 안전한 값에 동의하고, (3) 합의가 성공적이었음을 감지합니다. 그러나 FBA는 열려 있습니다. 멤버십은 몇 가지 일반적인 기술을 방해합니다. 기존의 폐쇄형 프로토콜을 FBA로 "포팅"하는 것은 불가능합니다. 단순히 쿼럼의 정의를 변경하여 모델을 만들 수 있습니다. 많은 프로토콜에서 사용되는 기술 중 하나는 회전입니다. 시간 초과 후 라운드 로빈 방식으로 리더 노드를 통과합니다. 폐쇄형 시스템에서는 라운드 로빈 리더 선택이 보장됩니다. 결국 독특하고 정직한 리더는 단일 가치에 대한 합의를 조정하게 됩니다. 아쉽게도 라운드 로빈 멤버십을 알 수 없는 FBA 시스템에서는 작업할 수 없습니다. FBA에서 실패하는 또 다른 일반적인 기술은 특정 쿼럼이 모든 노드를 설득할 수 있다고 가정하는 것입니다. 예를 들어, 모든 사람이 2f + 1 노드를 쿼럼으로 인식하면 2f + 1개의 서명이면 모든 노드에 대한 프로토콜 상태를 증명하는 데 충분합니다. 마찬가지로, 노드가 동일한 메시지의 쿼럼을 수신하는 경우 신뢰할 수 있는 브로드캐스트 [24]을 통해 노드는 결함이 없는 모든 노드도 쿼럼을 볼 것이라고 가정할 수 있습니다. 이와 대조적으로 FBA에서는 쿼럼은 쿼럼 외부의 노드에 아무런 의미가 없습니다. 마지막으로, 비연합 시스템은 종종 "역방향"을 사용합니다. 안전에 대한 추론: f + 1개 노드에 결함이 있는 경우 모든 안전 보증이 손실됩니다. 따라서 노드 v가 f + 1개 노드를 모두 듣는다면 어떤 사실 F를 진술하고, v는 적어도 하나가 F를 말하고 있다고 가정할 수 있습니다. 안전의 손실 없이 진실(따라서 F가 참)입니다. 그러한 안전은 쌍의 속성이기 때문에 FBA에서는 추론이 실패합니다. 따라서 일부 피어에 대한 안전성을 잃은 노드는 항상 나쁜 사실을 가정하여 더 많은 노드에 대한 안전을 잃습니다. 그러나 FBA는 활성에 대해 거꾸로 추론할 수 있습니다. v-차단 세트를 모든 노드와 교차하는 노드 세트로 정의합니다. v의 슬라이스. v-차단 세트 B가 만장일치로 결함이 있는 경우 B 노드 v 쿼럼을 거부하고 활성 상태를 저하할 수 있습니다. 따라서 만약 B가 만장일치로 사실 F를 진술하면, v는 F가 다음 중 하나라는 것을 알게 됩니다. true 또는 v가 손상되지 않았습니다. 그러나 v는 여전히 전체 내용을 확인해야 합니다. 얽힌 노드가 F와 모순되지 않는다는 것을 알기 위한 쿼럼 이는 SCP에서의 마지막 의사소통으로 이어지며 유사하게 필요하지 않은 다른 FBA 프로토콜 [47] 폐쇄형 멤버십 프로토콜. 그 결과 우리는 잠재적인 사실에 대한 세 가지 가능한 신뢰 수준: 불확정, 온전한 노드 사이에서 가정해도 안전함(우리는 이를 용어로 인정된 사실), 서로 얽혀 있는 것으로 가정해도 안전합니다. 노드(확인된 사실이라고 부르겠습니다). 노드 v는 B가 모든 슬라이스와 교차하는지 여부를 확인하여 집합 B가 vblocking인지 여부를 효율적으로 결정할 수 있습니다. 흥미롭게도 노드가 항상 성명을 발표한다면 전체 쿼럼이 성명을 수락하면 성명이 전체에 전파되는 계단식 프로세스가 시작됩니다. 온전한 세트. 우리는 이 전파의 기초가 되는 핵심 사실을 다음과 같이 부릅니다. 캐스케이드 정리는 다음과 같습니다. 만약 내가 온전한 집합, Q는 I의 임의 구성원의 쿼럼이고 S는 임의의 구성원입니다. Q의 상위 집합, S ⊇I 또는 멤버 v ∈I가 있음 v < S이고 I ∩S는 v-차단입니다. 직관적으로 이랬나? 그렇지 않은 경우 S의 보수에는 쿼럼이 포함됩니다. 이는 I와 교차하지만 Q와는 교차하지 않아 쿼럼 교차를 위반합니다. S = Q로 시작하여 S를 반복적으로 확장하면 차단하는 모든 노드를 포함하면 계단식 효과를 얻을 수 있습니다. 결국 S는 I를 모두 포함합니다. 3.2 프로토콜 설명 SCP는 합의에 도달하기 위한 일련의 시도로 구성된 부분 동기식 합의 프로토콜 [42]입니다. 투표용지. 투표용지는 지속 시간이 늘어나는 타임아웃을 사용합니다. 에이 투표 동기화 프로토콜은 노드가 계속 유지되도록 보장합니다. 투표용지가 나올 때까지 동일한 투표용지를 점점 더 오랜 기간 동안 사용함 효과적으로 동기식입니다. 종료가 보장되지 않습니다. 투표용지가 동기식일 때까지는 두 개의 동기식 투표용지가 있습니다. 선의로 행동하는 노드 슬라이스의 결함이 있는 구성원이 수행하는 작업 방해하지 않으면 SCP가 종료되기에 충분합니다. 투표 프로토콜은 각 투표 동안 취해지는 조치를 지정합니다. 투표. 투표는 준비 단계로 시작됩니다. 모순되지 않는 제안 가치를 결정하려고 노력하십시오. 이전 결정. 그런 다음 커밋 단계에서 노드는 다음을 시도합니다. 준비된 가치에 대한 결정을 내립니다. 투표는 연합 투표라는 합의 하위 프로토콜을 사용합니다.n 어떤 노드가 추상 진술에 투표하는지 결국 확인되거나 중단될 수 있습니다. 일부 진술은 모순되는 것으로 지정될 수 있으며 안전성은 연합 투표의 보장은 두 명의 구성원이 참여하지 않는다는 것입니다. 서로 얽힌 세트는 모순되는 진술을 확인합니다. 손상되지 않은 경우를 제외하고 명세서의 확인은 보장되지 않습니다. 구성원이 모두 같은 방식으로 투표하도록 설정합니다. 그러나 만약 온전한 집합의 구성원이 연합된 진술을 확인합니다. 투표는 온전한 세트의 모든 구성원이 결국 해당 진술을 확인하도록 보장합니다. 그러므로 되돌릴 수 없는 조치를 취하는 것은 확인 진술에 대한 응답으로 다음의 활성 상태를 유지합니다. 온전한 노드. 노드는 처음에 추천을 통해 얻은 가치를 제안합니다. 손상되지 않은 모든 구성원의 가능성을 높이는 프로토콜 동일한 가치를 제안하는 세트는 결국 수렴됩니다. (그러나 수렴이 완료되었는지 확인할 방법은 없습니다). 지명은 연합 투표와 리더 선택을 결합합니다. FBA에서는 라운드 로빈이 불가능하기 때문에 지명은 다음을 사용합니다. 확률론적 리더 선택 계획. 캐스케이드 정리는 투표에서 중요한 역할을 합니다. 동기화 및 차단된 상태를 방지하는 데 있어 더 이상 종료가 불가능합니다. 3.2.1 투표 SCP 노드는 일련의 번호가 매겨진 투표를 진행하며 연합 투표를 사용하여 다음 사항에 대한 진술에 동의합니다. 가치는 어느 투표에서 결정되거나 결정되지 않습니다. 비동기인 경우 또는 잘못된 행동으로 인해 투표 n에서 결정을 내리지 못하는 경우, 노드는 시간 초과되고 투표 n + 1에서 다시 시도합니다.

SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 Lokhavaet al. 소환 연합 투표는 종료되지 않을 수 있습니다. 따라서 일부 투표 용지에 대한 진술은 영구적으로 정체될 수 있습니다. 노드가 자신인지 여부를 결코 결정할 수 없는 불확정 상태 아직 진행 중이거나 중단되었습니다. 노드는 배제할 수 없기 때문에 불확실한 진술이 나중에 사실로 판명될 가능성, 새로운 진술에 대해 연합 투표를 시도해서는 안 됩니다. 불확실한 것에 반대되는 것. 각 투표 n에서 노드는 두 가지 유형에 대한 연합 투표를 사용합니다. 성명서 : • prepare ⟨n,x⟩ – x 이외의 값은 없음을 나타냅니다. ≤n 투표에서 결정되었거나 결정될 예정입니다. • commit ⟨n,x⟩ – x가 투표 n에서 결정되었음을 나타냅니다. 중요한 것은 ⟨n,x⟩contradicts 커밋을 준비하는 것입니다. ⟨n′,x ′⟩n ≥n′이고 x , x ′인 경우. 노드는 a에 대한 연합 투표를 시도하여 n 투표를 시작합니다. 명령문은 ⟨n,x⟩를 준비합니다. 이전 준비 문이 있는 경우 연합투표를 통해 성공적으로 확인되었으며, 노드는 확인된 가장 높은 투표 준비에서 x를 선택합니다. 그렇지 않으면 노드는 x를 다음의 출력으로 설정합니다. 다음 하위 섹션에 설명된 지명 프로토콜. 노드가 준비 ⟨n,x⟩를 성공적으로 확인한 경우에만 투표 n에서는 커밋 ⟨n,x⟩에 대해 연합 투표를 시도합니다. 만약에 성공하면 SCP가 결정했음을 의미하므로 노드는 다음을 출력합니다. 확인된 커밋 문의 값입니다. 얽힌 집합 S를 생각해 보세요. 최대 하나의 값이므로 특정 투표에서 S 구성원이 작성한 것을 확인할 수 있지만 두 가지 다른 값이 확인되지는 않습니다. 특정 투표 용지에 S 멤버가 포함됩니다. 게다가 ⟨n,x⟩를 커밋하면 확인되면 준비 ⟨n,x⟩도 확인되었습니다. 이후 prepare ⟨n,x⟩는 연합 투표의 합의 보장에 따라 다른 값에 대한 이전 커밋과 모순됩니다. 우리는 이전에 다른 값이 결정될 수 없다는 것을 알고 있습니다. S회원의 투표. 투표용지 번호 유도를 통해 우리는 그러므로 SCP가 안전하다는 것을 알아내십시오. 활성을 위해서는 온전한 세트 I와 충분히 긴 세트를 고려하세요. 동기식 투표 n. 조각에 결함이 있는 노드가 나타나는 경우 선의로 행동하는 노드 중 n개는 간섭하지 않고 투표를 통해 간섭합니다. n + 1 I의 모든 멤버는 동일한 준비문 세트 P를 확인했습니다. P = ∅이고 투표용지 n이 충분히 길면, 지명 프로토콜은 어떤 값 x에 수렴될 것입니다. 그렇지 않은 경우 x를 P에서 가장 높은 투표로 준비한 값으로 둡니다. 어느 쪽이든 균일하게 페더레이션을 시도합니다. 다음 투표에서 준비 ⟨n + 1,x⟩에 투표하세요. 그러므로 만일 n + 1도 동기식이므로 x에 대한 결정은 필연적으로 따릅니다. 3.2.2 지명 지명에는 다음 진술에 대한 연합 투표가 수반됩니다. • x 지명 – x가 유효한 결정 후보임을 명시합니다. 노드는 여러 가치를 지명하기 위해 투표할 수 있습니다. 지명 진술은 모순되지 않습니다. 그러나 일단 노드는 지명 성명을 확인하고 투표를 중단합니다. 새로운 가치를 지명합니다. 연합 투표는 여전히 노드가 다음을 수행할 수 있도록 허용합니다. 투표하지 않은 새로운 지명 성명을 확인합니다. 투표 또는 수락 정족수에서 받아들이다 정족수에서 a는 유효하다 ~로부터 받다 차단 세트 커밋되지 않은 투표했다 받아들였다 확인했다 ¬a에 투표했습니다 그림 1. 연합 투표 단계 온전한 집합의 구성원이 서로 확인할 수 있도록 허용 새로운 투표를 보류하면서 가치를 지명합니다. 지명의 (진화하는) 결과는 확인된 지명 명세서에 있는 모든 값의 결정론적 조합입니다. 만약에 x는 일련의 거래를 나타내며, 노드는 합집합을 취할 수 있습니다. 세트 중 가장 큰 세트 또는 가장 높은 hash을 가진 세트입니다. 모든 노드가 동일한 작업을 수행하는 한. 노드가 새로운 것을 보류하기 때문에 하나의 지명 성명을 확인한 후 투표합니다. 확인된 문에는 한정된 수의 값만 포함될 수 있습니다. 확인된 진술이 확실하게 전파된다는 사실 손상되지 않은 세트는 손상되지 않은 노드가 결국 다음으로 수렴됨을 의미합니다. 동일한 지정 값 세트 및 그에 따른 지정 결과, 하지만 프로토콜의 임의로 늦은 시점에 알 수 없는 지점이 있습니다. 노드는 연합 리더 선택을 사용하여 지명 진술서의 다양한 값 수. 만 지명 성명서에 아직 투표하지 않은 리더는 새로운 x를 도입할 수 있습니다. 다른 노드는 응답을 기다립니다. 리더의 (유효한) 지명 투표를 복사하면 됩니다. 실패를 수용하기 위해 리더 세트는 다음과 같이 계속 성장합니다. 시간 초과가 발생하지만 실제로는 소수의 노드에서만 새로운 x 값이 도입됩니다. 3.2.3 연합 투표 연합 투표는 다음과 같은 3단계 프로토콜을 사용합니다. 그림 1. 노드는 먼저 추상적 진술에 동의하려고 시도합니다. 투표하고, 수락하고, 최종적으로 진술을 확인합니다. 노드 v는 그렇지 않은 유효한 진술 a에 투표할 수 있습니다. 다른 것과 모순된다미결제 투표 및 수락된 성명서. 이는 서명된 투표 메시지를 방송함으로써 이루어집니다. v 그런 다음 a가 다른 승인된 진술과 일치하고 (사례 1) v가 다음과 같은 쿼럼의 구성원인 경우 a를 승인합니다. 각 노드는 a에 투표하거나 a를 수락합니다. 또는 (케이스 2) v인 경우에도 마찬가지입니다. a에 투표하지 않았으면 v-차단 세트가 a를 수락합니다. 경우 2의 경우, v는 이전에 a에 반대되는 투표를 한 적이 있는데, 지금은 기각되었습니다. v 기각된 투표를 잊어버리는 것이 허용됩니다. v가 손상되지 않은 경우 이를 알고 있기 때문에 결코 캐스팅하지 않은 척합니다. 기각된 투표는 사례 1을 통해 정족수를 완료할 수 없습니다. v는 a를 수락한다고 브로드캐스트한 다음 a가 수신되면 확인합니다. 만장일치로 a를 받아들이는 정족수. 그림 2는 v-차단 세트의 효과와 캐스케이드 정리 연합투표. 서로 얽힌 두 개의 노드는 모순되는 진술을 확인할 수 없습니다. 두 개의 필수 쿼럼이 공유해야 하기 때문입니다.Stellar를 통한 빠르고 안전한 글로벌 결제 SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 3 4 2 1 5 7

Vote X

Vote X

Vote Y (a) 3 4 2 1 5 7 6 Vote X Vote X Vote X Vote Y Vote X Vote Y Vote Y (b) 3 4 2 1 5 7 6 Accept X Vote X Accept X Vote Y Accept X Vote Y Vote Y (c) 3 4 2 1 5 7 6 Accept X Accept X Accept X Vote Y Accept X Accept X Vote Y (d) 3 4 2 1 5 7 6 Accept X Vote X Accept X Accept X Accept X Accept X Accept X (e) Figure 2. Cascade effect in federated voting. Each node has one quorum slice indicated by arrows to members of the slice. (a) Contradictory statements X and Y are introduced. (b) Nodes vote for valid statements. (c) Node 1 accepts X after its quorum {1, 2, 3, 4} unanimously votes for X. (d) Nodes 1, 2, 3, and 4 all accept X; set {1} is 5-blocking, so node 5 accepts X, overruling its previous vote for Y. (e) Set {5} is 6- and 7-blocking, so 6 and 7 both accept X. non-faulty node that could not accept contradictory statements. Confirmation of a statement is not guaranteed: in case of a split vote, both statements may be permanently stuck waiting for a quorum in the voting phase. However, if a node in an intact set I confirms a statement, the cascade theorem and accept case 2 ensure that all of I will eventually confirm that statement. 3.2.4 Ballot synchronization If nodes are unable to confirm a commit statement for the current ballot, they give up after a timeout. The timeout gets longer with each ballot so as to adjust to arbitrary bounds on network delay. However, timeouts alone are not sufficient to synchronize ballots of nodes that did not start at the same time or got desynchronized for other reasons. To achieve synchronization, nodes start the timer only once they are part of a quorum that is all at the current (or a later) ballot n. This slows down nodes that started early and ensures that no member of an intact set stays too far ahead of the group. Moreover, if a node v ever notices a v-blocking set at a later ballot, it immediately skips to the lowest ballot such that this is no longer the case, regardless of any timers. The cascade theorem then ensures that all stragglers catch up. The result is that ballots are roughly synchronized throughout an intact set once the system becomes synchronous. 3.2.5 Federated leader selection Leader selection allows each node to pick leaders in such a way that nodes generally only choose one or a small number of leaders. To accommodate leader failure, leader selection proceeds through rounds. If leaders of the current round appear not to be fulfilling their responsibilities, then after a certain timeout period nodes proceed to the next round to expand the set of leaders that they follow. Each round employs two unique cryptographic hash functions, H0 and H1, that output integers in the range [0,hmax). For instance, Stellar uses Hi(m) = SHA256(i∥b∥r ∥m), where b is the overall SCP instance (block or ledger number), r is the leader selection round number, and hmax = 2256. Within a round, we define the priority of node v as: priority(v) = H1(v) One strawman would be for each node to choose as leader the nodev with the highest priority(v). This approach works well with nearly identical quorum slices, but doesn’t properly capture the importance of nodes in imbalanced configurations. For instance, if Europe and China each contribute 3 nodes to every quorum, but China runs 1,000 nodes and Europe 4, then China will have the highest-priority node 99.6% of the time. We therefore introduce a notion of slice weight, where \(\text{weight}(u,v) \in [0, 1]\) is the fraction of node \(u\)'s quorum slices containing node \(v\). When node \(u\) is selecting a new leader, it only considers neighbors, defined as follows:

\[\text{neighbors}(u) = \{ v \mid H_0(v) < h_{\max} \cdot \text{weight}(u,v) \}\]

A node \(u\) then starts with an empty set of leaders, and at each round adds to it the node \(v\) in \(\text{neighbors}(u)\) with the highest \(\text{priority}(v)\). If the neighbors set is empty in any round, \(u\) instead adds the node \(v\) with lowest value of \(H_0(v)/\text{weight}(u,v)\).

X 투표

Y에 투표하세요 (아) 3 4 2 1 5 7 6 투표 X 투표 X 투표 X 투표 Y 투표 X 투표 Y 투표 Y (비) 3 4 2 1 5 7 6 수락 X 투표 X 수락 X 투표 Y 수락 X 투표 Y 투표 Y (다) 3 4 2 1 5 7 6 수락 X 수락 X 수락 X 투표 Y 수락 X 수락 X 투표 Y (디) 3 4 2 1 5 7 6 수락 X 투표 X 수락 X 수락 X 수락 X 수락 X 수락 X (e) 그림 2. 연합 투표의 계단식 효과. 각 노드에는 슬라이스 구성원에 대한 화살표로 표시된 하나의 쿼럼 슬라이스가 있습니다. (a) 모순되는 진술 X와 Y가 도입됩니다. (b) 노드는 유효한 진술에 투표합니다. (c) 노드 1은 쿼럼 후에 X를 수락합니다. {1, 2, 3, 4}는 만장일치로 X에 투표합니다. (d) 노드 1, 2, 3, 4는 모두 X를 수락합니다. 세트 {1}은 5-차단이므로 노드 5는 X를 허용하여 무시합니다. Y에 대한 이전 투표입니다. (e) 세트 {5}는 6 및 7 차단이므로 6과 7은 모두 X를 허용합니다. 모순되는 진술을 받아들일 수 없는 결함이 없는 노드입니다. 진술 확인은 보장되지 않습니다. 분할 투표의 경우 두 진술 모두 영구적일 수 있습니다. 투표 단계에서 정족수를 기다리지 못했습니다. 그러나 만일 온전한 세트의 노드 나는 진술, 즉 캐스케이드를 확인합니다. 정리와 사례 2를 수락하면 결국 모든 것이 보장됩니다. 그 진술을 확인하십시오. 3.2.4 투표지 동기화 노드가 해당 커밋 문을 확인할 수 없는 경우 현재 투표용지에서 시간 초과 후 포기합니다. 시간 초과가 발생합니다. 임의의 범위에 맞게 조정하기 위해 각 투표 용지의 길이를 늘립니다. 네트워크 지연에. 그러나 시간 초과만으로는 동시에 시작되지 않은 노드의 투표를 동기화하는 데 충분하지 않습니다. 다른 이유로 동기화가 해제되었습니다. 동기화를 달성하기 위해 노드는 노드가 노드의 일부인 경우에만 타이머를 시작합니다. 현재(또는 이후) 투표 n에 모두 참여하는 정족수. 이 일찍 시작된 노드의 속도를 늦추고 온전한 세트의 구성원이 그룹보다 너무 앞서 있습니다. 게다가 노드 v가 나중에 v-blocking 세트를 발견한 경우 즉시 가장 낮은 투표지로 건너뜁니다. 타이머에 관계없이 더 이상 그렇지 않습니다. 캐스케이드 정리는 모든 낙오자들이 따라잡을 수 있도록 보장합니다. 결과 투표용지는 온전한 전체에 걸쳐 대략적으로 동기화된다는 것입니다. 시스템이 동기화되면 설정됩니다. 3.2.5 연합 리더 선택 리더 선택을 통해 각 노드는 다음과 같은 리더를 선택할 수 있습니다. 노드가 일반적으로 하나 또는 작은 숫자만 선택하는 방식 지도자의. 리더 실패를 수용하기 위해 리더 선택 라운드를 통해 진행됩니다. 현재 라운드의 리더인 경우 자신의 책임을 다하지 않는 것처럼 보이다가 나중에 특정 시간 초과 기간 노드는 다음 라운드로 진행됩니다. 그들이 따르는 리더의 집합을 확장합니다. 각 라운드에서는 [0,hmax) 범위의 정수를 출력하는 두 개의 고유한 암호화 hash 함수인 H0 및 H1을 사용합니다. 예를 들어 Stellar은 Hi(m) = SHA256(ib||r||m)을 사용합니다. 여기서 b는 전체 SCP 인스턴스(블록 또는 원장 번호)이고, r은 리더 선택 라운드 번호, hmax = 2256. 내 라운드마다 노드 v의 우선순위를 다음과 같이 정의합니다. 우선순위(v) = H1(v) 각 노드마다 하나의 Stratman이 리더로 선택됩니다. 우선순위가 가장 높은 노드(v). 이 접근 방식은 효과적입니다. 거의 동일한 쿼럼 슬라이스를 사용하지만 제대로 작동하지 않습니다. 불균형 구성에서 노드의 중요성을 포착합니다. 예를 들어 유럽과 중국이 각각 3씩 기여한다면 모든 쿼럼에 노드를 할당하지만 중국은 1,000개의 노드를 실행하고 유럽은 4개를 실행하는 경우 중국이 99.6%의 가장 높은 우선순위 노드를 갖게 됩니다. 시간의. 따라서 우리는 슬라이스 가중치의 개념을 도입합니다. Weight(u,v) ∈[0, 1]은 노드 u의 쿼럼 슬라이스의 비율입니다. 노드 v를 포함합니다. 노드 u가 새로운 리더를 선택할 때, 다음과 같이 정의된 이웃만 고려합니다. 이웃(u) = {v | H0(v) < hmax · 가중치(u,v) } 그런 다음 노드는 빈 리더 세트로 시작하고 각 라운드는 그것에 가장 높은 이웃(u)의 노드 v를 추가합니다. 우선순위(동사). 모든 라운드에서 이웃 세트가 비어 있으면 u는 대신 H0(v)/weight(u,v)의 가장 낮은 값을 가진 nodev를 추가합니다.

Formal verification of SCP

Formal verification of SCP

To eliminate design errors, we formally verified SCP’s safety and liveness properties (see [65]). Specifically, we verified that intertwined nodes never disagree and that, under conditions discussed below, every member of an intact set eventually decides. Interestingly, verification revealed that the conditions under which SCP guarantees liveness are subtle, and stronger than initially thought [68]: as discussed below, malicious nodes that manipulate timing without otherwise deviating from the protocol may need to be manually evicted from quorum slices.

SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Lokhava et al. To ensure that the properties proved hold in all possible FBA configurations and executions, we consider an arbitrary number of nodes with arbitrary local configurations. This includes scenarios with disjoint intact sets, as well as potentially infinitely long executions. The drawback is that we face the challenging problem of verifying a parameterized infinite-state system. To keep verification tractable, we modeled SCP in firstorder logic (FOL) using Ivy [69] and the methodology of [82]. The verification process consists of manually providing inductive conjectures that are then automatically checked by Ivy. The FOL model of SCP abstracts over some aspects of FBA systems that are difficult to handle in FOL (e.g., the cascade theorem is taken as an axiom), so we verify the soundness of the abstraction using Isabelle/HOL [75]. After expressing the verification problem in FOL, we verify safety by providing an inductive invariant. The inductive invariant consists of a dozen one-line conjectures for about 150 lines of protocol specification. We then specify SCP’s liveness properties in Ivy’s Linear Temporal Logic and use the liveness to safety reduction of [80, 81] to reduce the liveness verification problem to the problem of finding an inductive invariant. While SCP’s safety is relatively straightforward to prove, SCP’s liveness argument is much more intricate and consists of around 150 single-line invariants. Proving liveness required a precise formalization of the assumptions under which SCP ensures termination. We initially thought an intact set I would always terminate if all members removed faulty nodes from their slices [68]. However, this turned out to be insufficient: a well-behaved (but not intact) node in a quorum of a member of I can, under the influence of faulty nodes, prevent termination by completing a quorum just before the end of a ballot, thereby causing members of I to chose different values of x in the next ballot. We must therefore additionally assume that, informally, each node in a quorum of a member of I eventually either becomes timely or doesn’t send messages at all for a sufficient period. In practice, this means members of I may need to adjust their slices until the condition holds. This issue is not inherent to FBA systems: Losa et al. [47] present a protocol whose liveness depends on the strictly weaker assumptions of just eventual synchrony and eventual leaderelection, without the need to remove faulty nodes from slices.

SCP의 공식 검증

설계 오류를 없애기 위해 SCP의 안전성을 정식으로 검증했습니다. 및 활성 속성([65] 참조). 구체적으로 우리는 확인했습니다. 서로 얽힌 노드는 결코 동의하지 않으며 아래에 설명된 조건 하에서 온전한 세트의 모든 구성원이 결국 결정합니다. 흥미롭게도 검증 결과 SCP가 활성을 보장하는 조건은 미묘합니다. 처음에 생각했던 것보다 더 강합니다 [68]: 아래에 설명된 대로, 별다른 조치 없이 타이밍을 조작하는 악성 노드 프로토콜에서 벗어나면 수동으로 제거해야 할 수도 있습니다. 쿼럼 조각에서.

SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 Lokhavaet al. 속성이 가능한 모든 측면에서 유지되는지 확인하기 위해 FBA 구성 및 실행은 임의적인 것으로 간주됩니다. 임의의 로컬 구성이 있는 노드 수. 이 분리된 온전한 세트가 있는 시나리오와 잠재적으로 무한히 긴 실행이 포함됩니다. 단점은 우리가 매개변수화된 값을 검증하는 어려운 문제에 직면합니다. 무한 상태 시스템. 검증을 다루기 쉽게 유지하기 위해 우리는 Ivy [69] 및 [82] 방법론을 사용하여 1차 논리(FOL)로 SCP를 모델링했습니다. 검증 프로세스는 수동으로 귀납적 추측을 제공한 다음 자동으로 확인하는 것으로 구성됩니다. 아이비. SCP의 FOL 모델은 다음의 일부 측면을 추상화합니다. FOL에서 다루기 어려운 FBA 시스템(예: 캐스케이드 정리는 공리로 간주되므로) Isabelle/HOL [75]을 사용한 추상화의 건전성. FOL에서 검증 문제를 표현한 후 귀납적 불변량을 제공하여 안전성을 검증합니다. 유도성 불변은 약 12개의 한 줄 추측으로 구성됩니다. 150라인의 프로토콜 사양. 그런 다음 Ivy의 선형 시간 논리에서 SCP의 활성 속성을 지정하고 liveness를 줄이기 위해 [80, 81]의 안전 감소에 대한 liveness 검증 문제에서 귀납적 문제를 찾는 문제 불변. SCP의 안전은 상대적으로 간단하지만 증명하자면, SCP의 생존성 주장은 훨씬 더 복잡하고 약 150개의 단일 행 불변성으로 구성됩니다. 활성을 증명하려면 다음의 정확한 형식화가 필요합니다. SCP가 종료를 보장한다는 가정. 우리는 처음에 온전한 세트가 모두 있는 경우 항상 종료할 것이라고 생각했습니다. 구성원이 슬라이스 [68]에서 결함이 있는 노드를 제거했습니다. 그러나 이것은 불충분한 것으로 판명되었습니다. 손상되지 않음) I can 구성원의 쿼럼에 있는 노드, 결함이 있는 노드의 영향을 완료하여 종료를 방지합니다. 투표가 끝나기 직전에 정족수를 확보하여 I 멤버는 다음 투표에서 다른 x 값을 선택했습니다. 따라서 우리는 비공식적으로 다음을 추가로 가정해야 합니다. I 구성원의 쿼럼에 있는 각 노드는 결국 다음 중 하나를 수행합니다. 적시에 메시지를 보내거나 충분한 기간 동안 메시지를 전혀 보내지 않습니다. 실제로 이는 I의 구성원이 조건이 유지될 때까지 슬라이스를 조정해야 합니다. 이 문제는 FBA 시스템에 고유한 것이 아닙니다: Losa et al. [47] 현재 활성도가 엄격하게 약한 프로토콜에 따라 달라지는 프로토콜 슬라이스에서 결함이 있는 노드를 제거할 필요 없이 최종 동기화 및 최종 리더 선택만 가정합니다.

Payment network

Payment network

This section describes Stellar’s payment network, implemented as a replicated state machine [88] on top of SCP. 5.1 Ledger model Stellar’s ledger is designed around an account abstraction (in contrast to the more coin-centric unspent transaction output or UTXO model of Bitcoin). The ledger contents consists of a set of ledger entries of four distinct types: accounts, trustlines, offers, and account data. Accounts are the principals that own and issue assets. Each account is named by a public key. By default, the corresponding private key can sign transactions for the account. However, accounts can be reconfigured to add other signers and deauthorize the key that names the account, with a “multisig” option to require multiple signers. Each account also contains: a sequence number (included in transactions to prevent replay), some flags, and a balance in a “native” pre-mined cryptocurrency called XLM, intended to mitigate some denial-of-service attacks and facilitate market making as a neutral currency. Trustlines track the ownership of issued assets, which are named by a pair consisting of the issuing account and a short asset code (e.g., “USD” or “EUR”). Each trustline specifies an account, an asset, the account’s balance in that asset, a limit above which the balance cannot rise, and some flags. An account must explicitly consent to holding an asset by creating a trustline, preventing spammers from saddling accounts with unwanted assets. Know-your-customer (KYC) regulations require many financial institutions to know whose deposits they are holding, for instance by checking photo ID. To comply, issuers can set an optional auth_reqired flag on their accounts, restricting ownership of the assets they issue to authorized accounts. To grant such authorization, the issuer sets an authorized flag on customers’ trustlines. Offers correspond to an account’s willingness to trade up to a certain amount of a particular asset for another at a given price on the order book; they are automatically matched and filled when buy/sell prices cross. Finally, account data consists of account, key, value triples, allowing account holders to publish small metadata values. To prevent ledger spam, there is a minimum XLM balance, called the reserve. An account’s reserve increases with each associated ledger entry and decreases when the ledger entry disappears (e.g., when an order is filled or canceled, or when a trustline is deleted). Currently the reserve grows by 0.5 XLM (∼$0.03) per ledger entry. Regardless of the reserve, it is possible to reclaim the entire value of an account by deleting it with an AccountMerge operation. A ledger header, shown in Figure 3, stores global attributes: a ledger number, parameters such as the reserve balance per ledger entry, a hash of the previous ledger header (actually several hashes forming a skiplist), the SCP output including a hash of new transactions applied at this ledger, a hash of the results of those transactions (e.g., success or failure for each), and a snapshot hash of all ledger entries. Because the snapshot hash includes all ledger contents, validators need not retain history to validate transactions. However, to scale to hundreds of millions of anticipated accounts, we cannot rehash all ledger entry tables on every ledger close. Moreover, it is not practical to transfer a ledger

Fast and secure global payments with Stellar SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada ledger # = 4 H(prev hdr) SCP output H∗(results) H∗(snapshot) ... header ledger # = 5 H(prev hdr) SCP output H∗(results) H∗(snapshot) ... header . . . Figure 3. Ledger contents. H is SHA-256, while H ∗represents hierarchical or recursive application of H. SCP output also depends the previous header hash. CreateAccount Create and fund new account ledger entry AccountMerge Delete account ledger entry SetOptions Change account flags and signers Payment Pay specific quantity of asset to dest. acct. PathPayment Like Payment, but pay in different asset (up to limit); specify up to 5 intermediary assets ManageOffer Create/delete/change offer ledger entry, -PassiveOffer with passive variant to allow zero spread ManageData Create/delete/change acct. data ledger entry ChangeTrust Create/delete/change trustline AllowTrust Set or clear authorized flag on trustline BumpSequence Increase seq. number on account Figure 4. Principal ledger operations of that size every time a node has been disconnected from the network for too long. The snapshot hash is therefore designed to optimize both hashing and state reconciliation. Specifically, the snapshot stratifies ledger entries by time of last modification in a set of exponentially-sized containers called buckets. The collection of buckets is called the bucket list, and bears some similarity to log-structured merge-trees (LSM-trees) [77]. The bucket list is not read during transaction processing (see Section 5.4). Hence, certain design aspects of LSM-trees can be relaxed. In particular, random access by key is not required, and buckets are only ever read sequentially as part of merging levels. Hashing the bucket list is done by hashing each bucket as it is merged and calculating a new cumulative hash of the bucket hashes (a small, fixed index of reference hashes) at each ledger close. Reconciling the bucket list after disconnection requires downloading only buckets that differ. 5.2 Transaction model A transaction consists of a source account, validity criteria, a memo, and a list of one or more operations. Figure 4 lists available operations. Each operation has a source account, which defaults to that of the overall transaction. A transaction must be signed by keys corresponding to every source account in an operation. Multisig accounts can require higher signing weight for some operations (such as SetOptions) and lower for others (such as AllowTrust). Transactions are atomic—if any operation fails, none of them execute. This simplifies multi-way deals. Suppose an issuer creates an asset to represent land deeds, and user A wants to exchange a small land parcel plus $10,000 for a bigger land parcel owned by B. The two users can both sign a single transaction containing three operations: two land payments and one dollar payment. A transaction’s main validity criterion is its sequence number, which must be one greater than that of the transaction’s source account ledger entry. Executing a valid transaction (successfully or not) increments the sequence number, preventing replay. Initial sequence numbers contain the ledger number in the high bits to prevent replay even after deleting and re-creating an account. The other validity criterion is an optional limit on when a transaction can execute. Returning to the land and dollar swap above, if A signs the transaction before B, A may not want B to sit on the transaction for a year before submitting it, and so could place a time limit invalidating the transaction after a few days. Multisig accounts can also be configured to give signing weight to the revelation of a hash pre-image, which, combined with time bounds, permits atomic crosschain trading [1]. A transaction’s source account pays a trivial fee in XLM, 10−5 XLM unless there is congestion. Under congestion, the cost of operations is set by Dutch auction. Validators are not compensated by fees because validators are analogous to Bitcoin full nodes, not miners. Rather than destroy XLM, fees are recycled and distributed proportionally by vote of existing XLM holders, which in retrospect might or might not have been worth the complexity. 5.3 Consensus values For each ledger, Stellar uses SCP to agree on a data structure with three fields: a transaction set hash (including a hash of the previous ledger header), a close time, and upgrades. When multiple values are confirmed nominated, Stellar takes the transaction set with the most operations (breaking ties by total fees, then transaction set hash), the union of all upgrades, and the highest close time. A close time is only valid if it is between the last ledger’s close time and the present, so nodes do not nominate invalid times. Upgrades adjust global parameters such as the reserve balance, minimum operation fee, and protocol version. When combined during nomination, higher fees and protocol version numbers supersede lower ones. Upgrades effect governance through a federated-voting tussle space [34], neither egalitarian nor centralized. Each validator is configured as either governing or non-governing (the default), according to whether its operator wants to participate in governance. Governing validators consider three kinds of upgrade: desired, valid, and invalid (anything the validator does not

SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Lokhava et al. validator core horizon FS DB DB submit client client other validators Figure 5. Stellar validator architecture know how to implement). Desired upgrades are configured to trigger at a specific time, intended to be coordinated among operators. Governing nodes always vote to nominate desired upgrades, accept but do not vote to nominate valid upgrades (i.e., go along with a blocking quorum), and never vote for or accept invalid upgrades. Non-governing validators echo any vote they see for a valid upgrade, essentially delegating the decision on what upgrades are desired to those who opt for a governance role. 5.4 Implementation Figure 5 shows Stellar’s validator architecture. A daemon called stellar-core (∼92k lines of C++, not counting thirdparty libraries) implements the SCP protocol and the replicated state machine. Producing values for SCP requires reducing large numbers of ledger entries to small cryptographic hashes. By contrast, transaction validation and execution requires looking up account state and order matching at the best price. To serve both functions efficiently, stellar-core keeps two representations of the ledger: an external representation containing the bucket list, stored as binary files that can be efficiently updated and incrementally rehashed, and an internal representation in a SQL database (PostgreSQL for production nodes). Stellar-core creates a write-only history archive containing each transaction set that was confirmed and snapshots of buckets. The archive lets new nodes bootstrap themselves when joining the network. It also provides a record of ledger history—there needs to be some place one can look up a transaction from two years ago. Since history is append-only and accessed infrequently, it can be kept in cheap places such as Amazon Glacier or any service allowing one to store and retrieve flat files. Validator hosts typically do not host their own archives so as to avoid any impact on validation performance from serving history. To keep stellar-core simple, it is not intended to be used directly by applications and exposes only a very narrow interface for the submission of new transactions. To support clients, most validators run a daemon called horizon (∼18k lines of Go) that provides an HTTP interface for submitting and learning of transactions. horizon has read-only access to stellar-core’s SQL database, minimizing the risk of horizon destabilizing stellar-core. Features such as payment path finding are implemented entirely in horizon and can be upgraded unilaterally without coordinating with other validators. Several optional higher-layer daemons are clients to horizon, rounding out the ecosystem. A bridge server facilitates integration of Stellar with existing systems, e.g., posting notifications of all payments received by a specific account. A compliance server provides hooks for financial institutions to exchange and approve of sender and beneficiary information on payments, for compliance with sanctions lists. Finally, a federation server implements a human-readable naming system for accounts. 6 Deployment experience Stellar grew for several years into a state with a moderate number of reasonably-reliable full node operators. However, nodes’ configurations were such that liveness (though not safety) depended on us, the Stellar Development Foundation (SDF); had SDF suddenly disappeared, other node operators would have needed to intervene and manually remove us from quorum slices for the network to continue. While we and many others want to reduce SDF’s systemic importance, this goal received increasing priority after researchers [58] quantified and publicized the network’s centralization without differentiating the risks to safety and liveness. A number of operators reacted with active configuration adjustments, primarily increasing the size of their quorum slices in an effort to dilute SDF’s importance; ironically this only increased the risk to liveness. Two problems exacerbated the situation. First, a popular third-party Stellar monitoring tool [5] was systematically overestimating validator uptime by not actually verifying that stellar-core was running; this lead people to include unreliable nodes in their quorum slices. Second, a bug in stellar-core meant once a validator moved to the next ledger, it didn’t adequately help remaining nodes complete the previous ledger in the event of lost messages. As a result, the network experienced 67 minutes of downtime and required manual coordination by validator administrators to restart. Worse, while attempting to restart the network, simultaneous rushed reconfigurations on multiple nodes resulted in a collective misconfiguration that allowed some nodes to diverge, requiring a manual shutdown of those nodes and resubmission of the transactions accepted during the divergence. Luckily, this divergence was caught and corrected quickly and contained no conflicting transactions, but the risk of the network failing to enjoy quorum intersection— splitting while continuing to accept potentially conflicting transactions, simply due to misconfiguration—was made very concrete by this incident. Reviewing these experiences led to two major conclusions and corresponding corrective actions.

Fast and secure global payments with Stellar SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Critical, 100% 51% 51% High, 67% 51% Medium, 67% 51% Low, 67% 51% 51% ... ... ... 51% ... 51% Figure 6. Validator quality hierarchy. Highest quality nodes require the highest threshold of 100%, whereas lower qualities are configured to 67% threshold. Nodes within a single organization require a simple 51% majority. 6.1 Configuration complexity and fragility Stellar expresses quorum slices as nested quorum sets consisting of n entries and a threshold k where any set of k entries constitutes a quorum slice. Each of the n entries then is either a validator public key or, recursively, another quorum set. While flexible and compact, we realized nested quorum sets simultaneously afforded node operators too much flexibility and too little guidance: it was easy to write unsafe (or even nonsensical) configurations. The criteria for grouping nodes into sets, for organizing subsets into a hierarchy, and for choosing thresholds were all insufficiently clear and contributed to operational failures. It wasn’t clear whether to treat a “level” in the nested-set hierarchy as a level of trust, or an organization, or both; many configurations in the field mixed these concepts, in addition to specifying dangerous or meaningless thresholds. We therefore added a simpler configuration mechanism that separates two aspects of nested quorum sets: grouping nodes together by organization, and labeling each organization with a simple trust classification (low, medium, high, or critical). Organizations at and above high are required to publish history archives. The new system synthesizes nestedquorum sets in which each organization is represented as a 51% threshold set, and organizations are grouped into sets with 67% or 100% thresholds (depending on group quality). Each group is a single entry in the next (higher quality) group, as illustrated in Figure 6. This simplified model reduces the likelihood of misconfiguration, both in terms of the structure of the synthesized nested sets and the thresholds chosen for each set. 6.2 Proactive detection of misconfiguration Second, we realized that detecting collective misconfiguration by waiting to observe its negative effects is too late. Especially with respect to misconfigurations that can diverge—a more serious failure mode than halting—the network needs to be able to detect misconfiguration immediately so that operators can revert it before any divergence actually hapens. To address this need, we built a mechanism into the validator software that continuously gathers the collective configuration state of all the peers in the node’s transitive closure and detects the potential for divergence—i.e., disjoint quorums—within that collective configuration. 6.2.1 Checking quorum intersection While gathering quorum slices is easy, finding disjoint quorums among them is co-NP-hard [62]. However, we adopted a set of algorithmic heuristics and case-elimination rules proposed by Lachowski [62] that check typical instances of the problem several orders of magnitude faster than the worst-case cost. Practically speaking, the current network’s quorum slice transitive closures are on the order of 20–30 nodes and, with Lachowski’s optimizations, typically check in a matter of seconds on a single CPU. Should the need arise to enhance performance, we may parallelize the search. 6.2.2 Checking risky configurations Detecting that the network admits disjoint quorums is a step in the right direction, but flags the danger uncomfortably late for such a critical issue. Ideally, we want node operators to receive warnings when the network’s collective configuration is merely approaching a risky state. We therefore extended the quorum-intersection checker to detect a condition we call criticality: when the current collective configuration is one misconfiguration away from a state that admits disjoint quorums. To detect criticality, the checker repeatedly replaces each organization’s configuration with a simulated worst-case misconfiguration, then re-runs the inner quorum intersection checker on the result. If any such critical misconfiguration exists one step away from the current state, the software issues a warning and reports the organization posing a misconfiguration risk. These changes give the community of operators two layers of notice and guidance to insulate against the worst forms of collective misconfiguration.

결제 네트워크

이 섹션에서는 SCP 위에 복제된 상태 머신 [88]으로 구현된 Stellar의 결제 네트워크에 대해 설명합니다. 5.1 원장 모델 Stellar의 원장은 계정 추상화를 중심으로 설계되었습니다( 보다 코인 중심의 사용되지 않은 거래 출력과 대조 또는 UTXO 모델의 Bitcoin). 원장 내용은 다음과 같이 구성됩니다. 계정, 신탁선, 등 네 가지 유형의 원장 항목 집합 제안 및 계정 데이터. 계정은 자산을 소유하고 발행하는 주체입니다. 각각 계정의 이름은 공개 키로 지정됩니다. 기본적으로 해당 개인 키는 계정에 대한 거래에 서명할 수 있습니다. 그러나 다른 서명자를 추가하고 계정 이름을 지정하는 키의 인증을 취소하도록 계정을 재구성할 수 있습니다. 여러 서명자를 요구하는 "다중 서명" 옵션. 각 계정 또한 다음을 포함합니다: 시퀀스 번호(트랜잭션에 포함됨) 재생을 방지하기 위해), 일부 플래그 및 "네이티브"의 균형 XLM이라는 사전 채굴된 암호화폐로, 일부 서비스 거부 공격 및 시장 형성 촉진 중립 통화로. Trustlines는 발행된 자산의 소유권을 추적합니다. 발행 계좌와 숏 계좌로 구성된 쌍으로 명명 자산 코드(예: 'USD' 또는 'EUR'). 각 신뢰선은 다음을 지정합니다. 계정, 자산, 해당 자산의 계정 잔액, 잔고를 초과할 수 없는 한도 및 일부 플래그. 계정은 자산 보유에 명시적으로 동의해야 합니다. 스패머가 안장하는 것을 방지하는 신뢰 라인 생성 원하지 않는 자산이 있는 계정. 고객 파악(KYC) 규정에 따라 많은 금융 기관은 자신이 보유하고 있는 예금이 누구인지 알아야 합니다. 예를 들어 사진이 있는 신분증을 확인하는 것입니다. 이를 준수하기 위해 발급자는 다음을 설정할 수 있습니다. 계정에 선택적인 auth_reqired 플래그를 추가하여 발행한 자산의 소유권을 승인된 계정으로 제한합니다. 그러한 승인을 부여하기 위해 발급자는 승인된 권한을 설정합니다. 고객의 신뢰선에 플래그를 지정합니다. 제안은 계정의 거래 의지에 따라 결정됩니다. 특정 자산의 일정 금액을 다른 자산에 대해 특정 금액으로 주문서의 가격; 자동으로 일치하고 매수/매도 가격이 교차할 때 채워집니다. 마지막으로 계정 데이터는 계정, 키, 값의 세 가지로 구성되어 계정 소유자를 허용합니다. 작은 메타데이터 값을 게시합니다. 원장 스팸을 방지하기 위해 최소 XLM 잔액이 있습니다. 예비라고. 계정의 준비금은 각각 증가합니다. 관련 원장 입력 및 원장 입력 시 감소 사라집니다(예: 주문이 완료되거나 취소되는 경우, 또는 신뢰라인이 삭제되었습니다). 현재 준비금은 0.5 XLM 증가합니다. (~$0.03) 원장 항목당. 보유금액에 상관없이, 삭제를 통해 계정의 전체 가치를 회수 가능 AccountMerge 작업을 사용하여 이를 수행합니다. 그림 3에 표시된 원장 헤더는 전역 속성을 저장합니다. 원장 번호, 예비 잔액과 같은 매개변수 원장 항목, 이전 원장 헤더의 hash(실제로는 여러 hashes가 건너뛰기 목록을 형성함), SCP 출력에는 다음이 포함됩니다. 이 원장에 적용된 새로운 거래의 hash, 의 hash 해당 거래의 결과(예: 성공 또는 실패) 각각) 및 모든 원장 항목의 스냅샷 hash. 스냅샷 hash에는 모든 원장 내용이 포함되어 있으므로, validators는 거래를 검증하기 위해 기록을 보유할 필요가 없습니다. 그러나 예상되는 수억 규모로 확장하려면 계정마다 모든 원장 항목 테이블을 다시hash할 수는 없습니다. 장부를 닫습니다. 또한, 원장을 이전하는 것은 실용적이지 않습니다.Stellar를 통한 빠르고 안전한 글로벌 결제 SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 원장 # = 4 H(이전 hdr) SCP 출력 H(결과) H(스냅샷) ... 헤더 원장 # = 5 H(이전 hdr) SCP 출력 H(결과) H(스냅샷) ... 헤더 . . . 그림 3. 원장 내용. H는 SHA-256이고, H *는 H의 계층적 또는 재귀적 적용을 나타냅니다. SCP 출력 또한 이전 헤더 hash에 따라 달라집니다. 계정 만들기 새 계정 원장 항목 생성 및 자금 조달 계정병합 계정 원장 항목 삭제 옵션 설정 계정 플래그 및 서명자 변경 결제 대상에게 특정 수량의 자산을 지불합니다. 계정 경로지불 결제와 비슷하지만 다른 자산으로 결제(최대 제한하다); 최대 5개의 중개 자산을 지정하세요. 제안 관리 제안 원장 항목 생성/삭제/변경, -패시브 제안 확산을 허용하지 않는 수동적 변형 포함 데이터 관리 계정 생성/삭제/변경 데이터 원장 항목 변화신뢰 신뢰라인 생성/삭제/변경 허용신뢰 트러스트 라인에서 승인된 플래그 설정 또는 지우기 범프 시퀀스 시퀀스를 늘립니다. 계좌번호 그림 4. 원장 운영 노드 연결이 끊어질 때마다 해당 크기 네트워크가 너무 오래 연결되었습니다. 따라서 스냅샷 hash은(는) hashing 및 상태 조정을 모두 최적화하도록 설계되었습니다. 특히 스냅샷은 원장 항목을 시간별로 계층화합니다. 기하급수적으로 크기가 커지는 컨테이너 세트의 마지막 수정 버킷이라고 부릅니다. 버킷 모음을 버킷이라고 합니다. 목록을 작성하며 로그 구조 병합 트리와 일부 유사합니다. (LSM-트리) [77]. 버킷리스트는 트랜잭션 처리 중에는 읽히지 않습니다(섹션 5.4 참조). 그러므로 특정 디자인 LSM 트리의 측면을 완화할 수 있습니다. 특히, 무작위 키로 액세스할 필요가 없으며 버킷은 읽기만 가능합니다. 병합 수준의 일부로 순차적으로. 버킷 해싱 목록은 병합될 때 각 버킷을 hashing하고 버킷 hashes의 새로운 누적 hash을 계산하여 수행됩니다(작은, 각 원장 마감 시 고정 참조 인덱스 hashes). 연결 해제 후 버킷리스트를 조정하려면 다운로드가 필요합니다. 버킷만 다릅니다. 5.2 거래 모델 거래는 원본 계정, 유효성 기준, 메모 및 하나 이상의 작업 목록. 그림 4에는 사용 가능한 작업이 나열되어 있습니다. 각 작업에는 원본 계정이 있습니다. 기본값은 전체 거래의 기본값입니다. 거래는 반드시 모든 소스 계정에 해당하는 키로 서명되어야 합니다. 작업. 다중서명 계정에는 더 높은 서명이 필요할 수 있습니다. 일부 작업(예: SetOptions)의 가중치 이하 다른 경우(예: AllowTrust). 트랜잭션은 원자적입니다. 작업이 실패하면 아무 작업도 수행되지 않습니다. 그들은 실행합니다. 이는 다자간 거래를 단순화합니다. 가정하자 발행자는 토지 증서를 나타내는 자산을 생성하고 사용자 A는 작은 토지 구획과 $10,000를 교환하고 싶습니다. B가 소유한 더 큰 토지 구획. 두 사용자는 모두 서명할 수 있습니다. 세 가지 작업을 포함하는 단일 거래: 두 개의 토지 지불 및 1달러 지불. 트랜잭션의 주요 유효성 기준은 시퀀스 번호이며, 이 시퀀스 번호는 트랜잭션의 시퀀스 번호보다 1 커야 합니다. 원본 계정 원장 항목입니다. 유효한 트랜잭션 실행 (성공 여부에 관계없이) 시퀀스 번호를 증가시켜 재생을 방지합니다. 초기 시퀀스 번호에는 원장이 포함됩니다. 삭제 후에도 재생을 방지하기 위해 상위 비트에 숫자를 넣습니다. 그리고 계정을 다시 만드세요. 다른 타당성 기준은 선택적인 제한입니다. 트랜잭션이 실행될 수 있습니다. 땅과 달러로 돌아가다 위의 스왑에서 A가 B보다 먼저 거래에 서명하면 A는 서명하지 않을 수 있습니다. B가 제출하기 전에 1년 동안 거래를 보류하기를 원합니다. 따라서 거래를 무효화하는 시간 제한을 둘 수 있습니다. 며칠 후. 다중서명 계정도 구성할 수 있습니다 hash 사전 이미지의 공개에 서명 가중치를 부여하기 위해, 이는 시간 제한과 결합되어 원자 크로스체인 거래를 허용합니다 [1]. 거래의 원본 계정은 XLM으로 소소한 수수료를 지불합니다. 정체가 없는 한 10−5 XLM. 혼잡 상황에서는 운영 비용은 네덜란드 경매에 의해 결정됩니다. 검증인은 validators가 유사하기 때문에 수수료로 보상되지 않습니다. 채굴자가 아닌 Bitcoin 전체 노드로. XLM을 파괴하는 대신, 수수료는 투표에 의해 비례적으로 재활용되고 분배됩니다. 기존 XLM 보유자(회고하면 그럴 수도 있고 그럴 수도 있음) 복잡성을 감당할 가치가 없었습니다. 5.3 합의 가치 각 원장에 대해 Stellar은 SCP를 사용하여 데이터 구조에 동의합니다. 세 개의 필드 포함: 트랜잭션 세트 hash(hash 포함) 이전 원장 헤더의), 마감 시간,d 업그레이드. 여러 값이 지명된 것으로 확인되면 Stellar이 가장 많은 작업이 포함된 트랜잭션 세트(연결 끊기) 총 수수료를 기준으로 거래 세트 hash), 모든 항목의 합집합 업그레이드 및 가장 높은 마감 시간. 마감시간은 오직 마지막 원장의 마감 시간과 마감 시간 사이이면 유효합니다. 존재하므로 노드는 잘못된 시간을 지정하지 않습니다. 업그레이드는 준비금 잔액, 최소 운영 비용 및 프로토콜 버전과 같은 글로벌 매개변수를 조정합니다. 언제 지명 중에 결합되면 높은 수수료와 프로토콜 버전 번호가 낮은 번호를 대체합니다. 업그레이드는 연합 투표 난투 공간을 통해 거버넌스에 영향을 미칩니다 [34], 둘 다 평등주의적이지도 중앙집권적이지도 않습니다. 각 validator은(는) 다음과 같이 구성됩니다. 관리 또는 비관리(기본값)에 따라 운영자가 거버넌스에 참여하기를 원하는지 여부. validator을 관리하려면 세 가지 종류의 업그레이드를 고려하세요. 원하는 것, 유효한 것, 유효하지 않은 것(validator이 하지 않는 모든 것)

SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 Lokhavaet al. validator 핵심 지평선 FS DB DB 제출하다 클라이언트 클라이언트 다른 validators 그림 5. Stellar validator 아키텍처 구현 방법을 알고 있습니다). 원하는 업그레이드가 다음과 같이 구성되었습니다. 특정 시간에 트리거되고 서로 조정되도록 의도되었습니다. 연산자. 관리 노드는 항상 원하는 후보를 지명하기 위해 투표합니다. 업그레이드, 수락하지만 유효한 업그레이드를 지명하기 위해 투표하지는 않음 (즉, 차단 정족수를 따르며) 절대로 투표하지 마십시오. 또는 잘못된 업그레이드를 수락합니다. 비정부 validators 에코 유효한 업그레이드에 대해 보는 모든 투표(기본적으로 위임) 선택한 사람들이 원하는 업그레이드에 대한 결정 거버넌스 역할을 위해. 5.4 구현 그림 5는 Stellar의 validator 아키텍처를 보여줍니다. 데몬 stellar-core(~92k 라인의 C++, 타사 라이브러리 제외)라고 불리는 SCP 프로토콜과 복제된 상태 머신을 구현합니다. SCP의 가치를 생성하려면 많은 수의 원장 항목을 작은 암호화로 줄여야 합니다. hashes. 대조적으로, 거래 검증 및 실행 계정 상태 및 주문 일치를 조회해야 합니다. 최고의 가격. 두 기능을 모두 효율적으로 제공하기 위해 stellar-core 원장의 두 가지 표현, 즉 버킷 목록을 포함하는 외부 표현을 유지하며 바이너리 파일로 저장됩니다. 효율적으로 업데이트하고 점진적으로 rehashed할 수 있습니다. SQL 데이터베이스의 내부 표현(PostgreSQL 생산 노드의 경우). Stellar-core는 다음을 포함하는 쓰기 전용 기록 아카이브를 생성합니다. 확인된 각 트랜잭션 세트와 스냅샷 버킷. 아카이브를 통해 새 노드가 스스로 부트스트랩할 수 있습니다. 네트워크에 가입할 때. 장부에 대한 기록도 제공합니다. 역사 - 자료를 찾아볼 수 있는 곳이 있어야 합니다. 2년 전 거래. 기록은 추가 전용이므로 자주 접근하지 않는 정보이므로 저렴한 곳에 보관할 수 있습니다. Amazon Glacier 또는 저장을 허용하는 모든 서비스 등 플랫 파일을 검색합니다. 검증인 호스트는 일반적으로 호스트하지 않습니다. 검증에 영향을 미치지 않도록 자체 아카이브 제공 기록의 실적입니다. 스텔라 코어를 단순하게 유지하기 위해 사용되지 않습니다. 애플리케이션에 의해 직접 제공되며 새로운 트랜잭션 제출을 위해 매우 좁은 인터페이스만 노출합니다. 지원하다 클라이언트, 대부분의 validators는 horizon(~18k)이라는 데몬을 실행합니다. Go 라인) 제출을 위한 HTTP 인터페이스를 제공합니다. 그리고 거래를 학습합니다. horizon에는 읽기 전용 액세스 권한이 있습니다. stellar-core의 SQL 데이터베이스, 지평선의 위험을 최소화 불안정한 항성핵. 지불 경로 찾기와 같은 기능은 완전히 수평으로 구현되며 업그레이드 가능 다른 validator들과 협력하지 않고 일방적으로. 여러 선택적 상위 계층 데몬이 클라이언트가 되어 생태계를 완성합니다. 브릿지 서버는 다음을 용이하게 합니다. Stellar을 기존 시스템과 통합합니다(예: 특정 계정에서 받은 모든 결제에 대한 알림 게시). 에이 규정 준수 서버는 금융 기관에 후크를 제공합니다. 발송인 및 수취인 정보 교환 및 승인 제재 목록 준수를 위해 결제 시. 마지막으로, 페더레이션 서버는 사람이 읽을 수 있는 이름 지정을 구현합니다. 계정 시스템. 6 배포 경험 Stellar은 몇 년 동안 적당한 수준의 상태로 성장했습니다. 합리적으로 신뢰할 수 있는 전체 노드 운영자의 수. 그러나, 노드의 구성은 활성 상태였습니다(물론 그렇지는 않았지만 안전)은 우리 Stellar 개발 재단에 달려 있습니다. (SDF); SDF가 갑자기 사라졌다면, 다른 노드 운영자들은 개입하여 수동으로 우리를 제거해야 했을 것입니다. 네트워크를 계속하려면 쿼럼 슬라이스에서 가져옵니다. 우리와 다른 많은 사람들은 SDF의 시스템적 중요성을 줄이고 싶어하지만 이 목표는 이후에 점점 더 높은 우선순위를 받았습니다. 연구원 [58] 안전 및 위험에 대한 위험을 구분하지 않고 네트워크의 중앙 집중화를 정량화하고 공개했습니다. 활력. 많은 운영자가 적극적인 구성 조정에 반응하여 주로 규모를 늘렸습니다. SDF의 중요성을 희석하기 위한 노력의 일환으로 정족수 분할; 아이러니하게도 이는 생존에 대한 위험만 증가시켰습니다. 두 가지 문제가 상황을 악화시켰습니다. 먼저, 인기 있는 타사 Stellar 모니터링 도구 [5]가 체계적으로 실제로 확인하지 않음으로써 validator 가동 시간을 과대평가함 그 스텔라 코어가 실행 중이었습니다. 이는 사람들이 다음을 포함하도록 유도합니다. 쿼럼 슬라이스에 신뢰할 수 없는 노드가 있습니다. 둘째, 버그 stellar-core는 validator이 다음 원장으로 이동한 것을 의미합니다. 나머지 노드가 사전 준비를 완료하는 데 적절하게 도움이 되지 않았습니다.메시지 분실에 대비한 장부. 그 결과, 네트워크에서 67분의 다운타임이 발생하여 필요 validator 관리자가 수동으로 조정하여 다시 시작합니다. 더 나쁜 것은 네트워크를 다시 시작하려고 시도하는 동안 여러 노드에서 동시에 긴급한 재구성이 발생했다는 것입니다. 일부 노드에서 분기되어 해당 노드를 수동으로 종료해야 하며 분기 동안 승인된 거래를 다시 제출합니다. 다행히도 이러한 차이가 포착되어 수정되었습니다. 신속하고 충돌하는 거래가 포함되지 않았지만 네트워크가 쿼럼 교차를 활용하지 못할 위험 - 잠재적인 충돌을 계속 수용하면서 분열 단순히 구성 오류로 인해 트랜잭션이 발생했습니다. 이번 사건으로 매우 구체적이군요. 이러한 경험을 검토한 결과 두 가지 주요 결론이 도출되었습니다. 그리고 그에 상응하는 시정 조치.Stellar를 통한 빠르고 안전한 글로벌 결제 SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 심각, 100% 51% 51% 높음, 67% 51% 중간, 67% 51% 낮음, 67% 51% 51% ... ... ... 51% ... 51% 그림 6. 유효성 검사기 품질 계층 구조. 최고 품질의 노드 가장 높은 임계값인 100%가 필요한 반면, 낮은 품질은 67% 임계값으로 구성됩니다. 단일 내의 노드 조직은 51%의 과반수를 요구합니다. 6.1 구성의 복잡성과 취약성 Stellar은 쿼럼 슬라이스를 n 항목과 k 항목 집합이 있는 임계값 k로 구성된 중첩된 쿼럼 집합으로 표현합니다. 쿼럼 슬라이스를 구성합니다. n개의 항목 각각은 다음 중 하나입니다. validator 공개 키 또는 재귀적으로 다른 쿼럼 세트. 유연하고 컴팩트하면서도 중첩된 쿼럼을 실현했습니다. 노드 운영자에게 너무 많은 유연성과 너무 적은 지침을 동시에 제공하는 세트: 안전하지 않은 작성이 쉬웠습니다(또는 말도 안되는) 구성. 그룹화 기준 하위 집합을 계층 구조로 구성하기 위해 노드를 집합으로 구성 임계값 선택에 대한 모든 사항이 명확하지 않아 운영 실패의 원인이 되었습니다. 할지 여부가 명확하지 않았습니다. 중첩 집합 계층 구조의 "수준"을 신뢰 수준으로 처리합니다. 또는 조직, 또는 둘 다; 현장의 다양한 구성 위험을 지정하는 것 외에도 이러한 개념을 혼합 또는 의미 없는 임계값. 따라서 우리는 더 간단한 구성 메커니즘을 추가했습니다. 중첩된 쿼럼 집합의 두 가지 측면을 구분하는 것: 그룹화 조직별로 노드를 함께 연결하고 각 조직에 간단한 신뢰 분류(낮음, 중간, 높음 또는 중요). 높은 수준 이상의 조직은 다음을 수행해야 합니다. 역사 기록 보관소를 출판합니다. 새로운 시스템은 각 조직이 다음과 같이 표현되는 중첩된 쿼럼 집합을 통합합니다. 51% 임계값이 설정되고 조직이 세트로 그룹화됩니다. 67% 또는 100% 임계값(그룹 품질에 따라 다름) 각 그룹은 다음(더 높은 품질) 그룹의 단일 항목입니다. 그림 6에 나와 있습니다. 이 단순화된 모델은 구조 측면에서 잘못된 구성 가능성 합성된 중첩 세트와 선택한 임계값 각 세트. 6.2 잘못된 구성을 사전에 감지 둘째, 우리는 부정적인 영향을 관찰하기 위해 기다려서 집합적인 구성 오류를 탐지하는 것은 너무 늦었다는 것을 깨달았습니다. 특히 분기될 수 있는 잘못된 구성과 관련하여 정지보다 더 심각한 장애 모드 - 네트워크 요구 사항 잘못된 구성을 즉시 감지하여 운영자가 실제로 차이가 발생하기 전에 되돌릴 수 있도록 하는 것입니다. 이러한 요구를 해결하기 위해 우리는 노드의 전이적 폐쇄에 있는 모든 피어의 집합적 구성 상태를 지속적으로 수집하고 발산 가능성(예: 분리)을 감지하는 메커니즘을 validator 소프트웨어에 구축했습니다. 쿼럼 - 해당 집단 구성 내에서. 6.2.1 쿼럼 교차 확인 중 쿼럼 조각을 수집하는 것은 쉽지만, 그들 사이에서 연결되지 않은 쿼럼을 찾는 것은 공동 NP가 어렵습니다([62]). 그러나 우리는 채택했습니다. 일련의 알고리즘 휴리스틱 및 사례 제거 규칙 일반적인 사례를 확인하는 Lachowski [62]이 제안한 것 문제보다 몇 배 더 빠르게 문제를 해결합니다. 최악의 비용. 실제로 현재 네트워크의 쿼럼 슬라이스 전이적 폐쇄는 20~30개 정도입니다. 노드를 사용하고 Lachowski의 최적화를 통해 일반적으로 확인합니다. 단일 CPU에서 몇 초 만에 가능합니다. 필요한 경우 성능을 향상시키기 위해 검색을 병렬화할 수 있습니다. 6.2.2 위험한 구성 확인 네트워크가 분리된 쿼럼을 허용하는지 감지하는 것이 한 단계입니다. 올바른 방향으로 가고 있지만 불편할 정도로 늦게 위험을 알립니다. 그런 중요한 문제에 대해. 이상적으로는 네트워크의 집합적 구성이 발생할 때 노드 운영자가 경고를 받기를 원합니다. 위험한 상태에 가까워지고 있을 뿐입니다. 따라서 우리는 쿼럼 교차 검사기를 확장했습니다. 임계성(Criticality)이라고 부르는 조건을 감지하려면: 현재 집합적 구성은 하나의 잘못된 구성입니다. 분리된 정족수를 인정하는 주. 중요도를 탐지하려면, 검사기는 각 조직의 구성을 시뮬레이션된 최악의 구성 오류로 반복적으로 대체합니다. 결과에 대해 내부 쿼럼 교차 검사기를 다시 실행합니다. 그러한 중대한 구성 오류가 한 단계 더 진행된 경우 현재 상태에서 소프트웨어는 경고를 발행하고 잘못된 구성 위험이 있는 조직을 보고합니다. 이러한 변화는 운영자 커뮤니티에 두 가지 계층을 제공합니다. 최악의 형태로부터 보호하기 위한 통지 및 지침 집단적 구성 오류.

Evaluation

Evaluation

To understand Stellar’s suitablity as a global payment and trading network, we evaluated the state of the public network and ran controlled experiments on a private experimental network. We focused on the following questions: • What does the production network topology look like? How many messages are broadcast on average, and how does SCP experience timeouts? • Do consensus and ledger update latencies remain independent of the number of accounts?

Stellar network quorum slice map showing validator nodes and their bidirectional dependencies

SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Lokhava et al. • How are latencies affected by increasing (a) transactions per second (and, consequently, transactions per ledger), and (b) the number of validator nodes? • What is the cost of running a node in terms of CPU, memory, and network bandwidth? Payment networks have low transaction rates compared to other types of distributed system. The leading blockchains, Bitcoin and Ethereum, confirm up to 15 transactions/second, less than Stellar. Moreover, these systems take minutes to an hour to confirm a transaction securely, because proof-ofwork requires waiting for several blocks to be mined. The non-blockchain SWIFT network averaged only 420 transactions per second on its peak day [14]. We therefore chose to compare our measurements against the 5-second target ledger interval, a more aggressive target. Our results show that latencies are comfortably below this limit even with several unimplemented optimizations still in the pipeline. 7.1 Anchors The top traded assets by volume include currency (e.g., 3 USD anchors, 2 CNY), a Bitcoin anchor, a real-estate-backed security token [92], and an in-app currency [8]. Different anchors have different policies. For instance, one USD anchor, Stronghold, sets auth_reqired and requires a know-yourcustomer (KYC) process for every account that holds their assets. Another, AnchorUSD, let’s anyone receive and trade their USD (making it literally possible to send $0.50 to Mexico in 5 seconds with a fee of $0.000001). However, AnchorUSD does require KYC and fees to purchase or redeem their USD with conventional wire transfers. In the Philippines, where bank regulations are laxer for incoming payments, coins.ph supports cashing out PHP at any ATM machine [36]. In addition to the aforementioned security token and in-app currency, there’s a range of non-currency tokens ranging from commercial bonds [22] and carbon credits [85, 96] to more esoteric assets such as a token incentivizing collaborative car repossession [35]. 7.2 Public network As of this writing, there are 126 active full nodes, 66 of which participate in consensus by signing vote messages. Figure 7 (generated by [5]) visualizes the network, with a line between two nodes if one appears in the other’s quorum slices and a darker blue line to show bi-directional dependence. At the center is a cluster of 17 de facto “tier-one validators” run by SDF, SatoshiPay, LOBSTR, COINQVEST, and Keybase. Four months ago, before the events of Section 6, there were 15 systemically important nodes: 3 from seemingly tier-one organizations and several random singletons. The graph also looked much less regular. Hence, the new configuration mechanism and/or better operator decisions seem to be contributing to a healthier network topology. Without great financial resources (and corresponding shareholder Figure 7. Quorum slice map obligations), it would have been difficult to recruit 5 tier one organizations from the start, however. This suggests quorum slices play a useful role in network bootstraping: anyone can join with the goal of becoming an important player because there are no gatekeepers to pairwise agreement. There are currently over 3.3M accounts in the ledger. Over a recent 24-hour period, Stellar averaged 4.5 transactions and 15.7 operations per second. Reviewing recent ledgers, most transactions seem to have a single operation, while every few ledgers we see transactions containing many operations that appear to come from market makers managing offers. The mean times to achieve consensus and update the ledger were 1061 ms and 46 ms, respectively. The 99th percentiles were 2252 ms and 142 ms (the former reflecting a 1-second timeout in nomination leader selection). Note SCP’s performance is mostly independent of transactions per second, since SCP agrees on a hash of arbitrarily many transactions. Bottlenecks are more likely to arise from propagating candidate transactions during nomination, executing and validating transactions, and merging buckets. We have not yet needed to parallelize stellar-core’s transaction processing over multiple CPU cores or disk drives. We also evaluated the number of SCP messages broadcast on the production network. In the normal case with a single leader elected to nominate a value, we expect seven logical messages to be broadcast: two messages to vote and accept a nominate statement, two messages to accept and confirm a prepare statement, two message to accept and confirm a commit statement, and finally, an externalize message (sent after committing a new ledger to disk to help stragglers catch up). The implementation combines confirm commit and externalize messages as an optimization, since it is safe to externalize a value after it is committed. We then analyze metrics gathered on a production Stellar validator. Over the course of 68 hours, 1.3 messages/second were emitted, averaging to 6-7 messages per ledger. We note that the total

Fast and secure global payments with Stellar SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Percentile Number of Timeouts Nomination Balloting 75% 0 0 99% 1 0 Max 4 1 Figure 8. Timeouts per ledger over 68 hours count of messages broadcast by validators is larger, since in addition to federated voting messages, nodes also broadcast any transactions they learn about. Figure 8 shows the timeouts experienced by a production validator over a period of 68 hours. Nomination timeouts are a measure of the (in)effectiveness of the leader election function, while ballot timeouts depend heavily on the network and potential message delays. The timeouts are consistent with the number of messages emitted: six messages in the best case scenario, and at least seven messages if an additional nomination round is needed. 7.3 Controlled experiments We ran controlled experiments in containers packed onto Amazon EC2 c5d.9xlarge instances with 72 GiB of RAM, 900 GB of NVMe SSD, and 36 vCPUs. Each instance was in the same EC2 region and had a fixed bandwidth of 10 Gbps. We used SQLite as a store. (Stellar also supports PostgreSQL, but that has asynchronous tasks that inject noise into measurements.) Stellar provides a built-in runtime query, generateload, that allows generating synthetic load at a specific target transaction/second rate. Although Stellar supports various trading features, such as order book and cross-asset path payments, we focused on simple payments. Confirming transactions consists of multiple steps, so we recorded the measurements for each of the following: • Nomination: time from nomination to first prepare • Balloting: time from first prepare to confirming a ballot committed • Ledger update: time to apply consensus value • Transaction count: confirmed transactions per ledger Each of our experiments was defined by three parameters: the number of account entries in the ledger, the amount of load (in the form of XLM payments) submitted per second, and the number of validators. We configured every validator to know about every other validator (a worst-case scenario for SCP), with quorum slices set to any simple majority of nodes (so as to maximize the number of different quorums). Baseline Our baseline experiment measured Stellar with 100,000 accounts, four validators, and the load generation rate of 100 transactions/second. We observed 507 transactions per ledger on average, with standard deviation of 49 (9.7%). Note that no transactions were dropped; the slight 105 106 107 0 500 1,000 1,500 2,000 Accounts Latency [ms] Ledger update Balloting Nomination Figure 9. Latency as number of accounts increases variance is due to scheduling limitations of the load generator. We observed that the number of transactions per ledger was consistent with our load generation rate, given ledger closing every 5 seconds. Nomination, balloting, and ledger update showed mean latencies of 82.53 ms, 95.96 ms, and 174.08 ms, respectively. We observed that nomination latency 99th percentile is consistently under 61ms, with occasional spikes of roughly 1 second, corresponding to the first step in the timeout function of leader selection. Given the baseline performance, we looked at the effects of varying each of the test setup parameters. Accounts The data in Figure 9 suggests that Stellar scales well as the number of accounts increases. Generation of test accounts became a lengthy process, as bucket creation and merging prevented us from simply populating the database with accounts directly via SQL. Therefore, we conducted our experiments for up to 50,000,000 accounts. While there is minimal impact on consensus and ledger update latencies, we note that increasing accounts creates an overhead of merging buckets, which get larger. Transaction rate Transaction rate impacts the amount of traffic multicast among validators, the number of transactions included in each ledger, and the size of the top level buckets. To understand the effects of increasing transaction load, we ran an experiment with 100,000 accounts and 4 validators. Figure 10 shows slow growth in the consensus latency, while the majority of time was spent updating the ledger. Not surprisingly, as the transaction set increases in size, it takes longer to commit it to the database. We also note that ledger update latency is heavily implementation-dependent, and is affected by the choice of the database. Validator nodes To see how increasing the number of tierone validators impacts performance, we ran experiments with 100,000 accounts, 100 transactions/second, and a varying number of validators from 4 to 43. All validators appeared in all validators’ quorum slices; smaller quorum slices would have a lesser impact on performance.

SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada Lokhava et al. 100 150 200 250 300 350 0 500 1,000 1,500 2,000 Load [transactions/second] Latency [ms] Ledger update Balloting Nomination Figure 10. Latency as transaction load increases 10 20 30 40 0 500 1,000 1,500 2,000 Validators Latency [ms] Ledger update Balloting Nomination Figure 11. Latency as number of nodes increases Changing the number of validating nodes on the network impacts the number of SCP messages exchanged as well as the number of potential values during nomination. Figure 11 shows nomination time growing at a relatively small rate. While the data suggests that balloting is the bottleneck, we believe many scaling issues can be addressed by improving Stellar’s overlay network to optimize network traffic. As expected, ledger update latency remained independent of the number of nodes. Close rate Lastly, we wanted to measure Stellar’s end-toend performance by measuring how often ledgers are confirmed and whether Stellar meets its 5-second target without dropping any transactions. We observed average ledger close times of 5.03 s, 5.10 s, and 5.15 s as we increased account entries, transaction rate, and number of nodes, respectively. The results suggest that Stellar can consistently close ledgers under high load. 7.4 Running a validator One of the important features of Stellar is the low cost of running a validator, as anchors should run (or contract with) validators to enforce finality. SDF runs 3 production validators, all on c5.large AWS instances, which have two cores, 4 GiB of RAM and Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz processors. Inspecting resource usage on one of these machines, we observed the Stellar process using around 7% of CPU and 300 MiB of memory. In terms of network traffic, with 28 connections to peers and a quorum size of 34, the incoming and outgoing rates were 2.78 Mbit/s and 2.56 Mbit/s, respectively. Hardware required to run such a process is inexpensive. In our case, the cost is $0.054/hour or about $40/month. 7.5 Future work These experiments suggest Stellar can easily scale 1–2 orders of magnitude beyond today’s network usage. Because the performance demands have been so modest to date, Stellar leaves room for many straight-forward optimizations using well-known techniques. For example, transactions and SCP messages are broadcast by validators using a naïve flooding protocol, but should ideally use more efficient, structured peer-to-peer multicast [30]. Additionally, database-heavy ledger update time can be improved through standard batching and prefetching techniques.

평가

Stellar network quorum slice map showing validator nodes and their bidirectional dependencies

Stellar의 글로벌 결제로서의 적합성을 이해하고 거래 네트워크, 우리는 공용 네트워크의 상태를 평가했습니다. 개인 실험에 대해 통제된 실험을 실행했습니다. 네트워크. 우리는 다음 질문에 중점을 두었습니다. • 프로덕션 네트워크 토폴로지는 어떤 모습입니까? 평균적으로 얼마나 많은 메시지가 방송되는지, 그리고 SCP는 어떻게 시간 초과를 경험합니까? • 합의 및 원장 업데이트 지연 시간이 계정 수와 독립적으로 유지됩니까?SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 Lokhavaet al. • (a) 초당 트랜잭션 증가(결과적으로 초당 트랜잭션 증가)가 지연 시간에 어떤 영향을 미칩니까? 원장) 및 (b) validator 노드 수는 무엇입니까? • CPU 측면에서 노드를 실행하는 데 드는 비용은 얼마입니까? 메모리 및 네트워크 대역폭? 결제 네트워크에 비해 거래율이 낮습니다. 다른 유형의 분산 시스템에 적용됩니다. 주요 blockchain, Bitcoin 및 Ethereum, 초당 최대 15개의 트랜잭션을 확인합니다. Stellar 미만. 게다가 이러한 시스템은 작업 증명을 위해서는 여러 블록이 채굴될 때까지 기다려야 하기 때문에 거래를 안전하게 확인하는 데 한 시간이 걸립니다. 는 non-blockchain SWIFT 네트워크는 최대 피크일인 [14]에 초당 평균 420건의 트랜잭션만 처리했습니다. 그러므로 우리는 선택했습니다 측정값을 5초 목표와 비교하기 위해 원장 간격, 더 공격적인 목표입니다. 우리의 결과는 다음과 같습니다 대기 시간은 다음과 같은 경우에도 이 한도보다 훨씬 낮습니다. 아직 구현되지 않은 몇 가지 최적화가 파이프라인에 있습니다. 7.1 앵커 거래량 기준으로 가장 많이 거래되는 자산에는 통화가 포함됩니다(예: 3 USD 앵커, 2 CNY), Bitcoin 앵커, 부동산 담보 증권 token [92] 및 인앱 통화 [8]. 앵커마다 정책이 다릅니다. 예를 들어 USD 앵커 하나는 Stronghold는 auth_reqired를 설정하고 보유하고 있는 모든 계정에 대해 고객 파악(KYC) 프로세스를 요구합니다. 자산. 또 다른 AnchorUSD, 누구나 받고 거래하자 USD(문자 그대로 $0.50를 멕시코로 보내는 것이 가능함) $0.000001의 수수료로 5초 안에 완료됩니다. 그러나 AnchorUSD는 USD를 구매하거나 상환하려면 KYC 및 수수료가 필요합니다. 기존 송금 방식으로. 필리핀에서는 입금에 대한 은행 규정이 완화되었습니다, coin.ph 모든 ATM 기계 [36]에서 PHP 현금화를 지원합니다. 앞서 언급한 보안 token 및 인앱 통화 외에도 다음과 같은 다양한 비통화 token이 있습니다. 상업 채권 [22] 및 탄소 배출권 [85, 96] 더보기 token 협업을 장려하는 난해한 자산 자동차 압수 [35]. 7.2 공용 네트워크 이 글을 쓰는 시점에서 126개의 활성 풀 노드가 있으며 그 중 66개는 투표 메시지에 서명하여 합의에 참여합니다. 그림 7 ([5]에 의해 생성됨)은 사이에 선을 사용하여 네트워크를 시각화합니다. 하나가 다른 노드의 쿼럼 조각에 나타나는 경우 두 개의 노드 진한 파란색 선은 양방향 의존성을 나타냅니다. 에서 센터는 17개의 사실상 "계층 1 validators"로 구성된 클러스터입니다. SDF, SatoshiPay, LOBSTR, COINQVEST 및 Keybase. 4개월 전, 섹션 6의 사건이 일어나기 전, 시스템적으로 중요한 노드는 15개였습니다. 겉보기에는 3개였습니다. Tier 1 조직과 여러 개의 무작위 싱글톤. 는 그래프도 훨씬 덜 규칙적으로 보였습니다. 따라서 새로운 구성 메커니즘 및/또는 더 나은 운영자 결정이 필요한 것 같습니다. 더 건강한 네트워크 토폴로지에 기여합니다. 없이 훌륭한 재정 자원(및 해당 주주) 그림 7. 쿼럼 슬라이스 맵 의무), 5급 1인 채용은 어려웠을 것 그러나 처음부터 조직. 이는 정족수를 제안합니다. 슬라이스는 네트워크 부트스트래핑에서 유용한 역할을 합니다. 누구나 할 수 있습니다. 중요한 플레이어가 되겠다는 목표를 가지고 참여하세요. 쌍으로 합의할 수 있는 문지기가 없습니다. 현재 원장에는 330만 개 이상의 계정이 있습니다. 오버 최근 24시간 동안 Stellar은 평균 4.5건의 거래를 기록했으며 초당 15.7 작업. 최근 원장을 검토하면 대부분 트랜잭션은 단일 작업을 수행하는 것처럼 보이지만 몇 번의 작업마다 원장에는 다음과 같은 많은 작업이 포함된 트랜잭션이 표시됩니다. 제안을 관리하는 시장 조성자로부터 오는 것으로 보입니다. 는 합의를 달성하고 원장을 업데이트하는 데 걸리는 시간은 다음과 같습니다. 각각 1061ms와 46ms입니다. 99번째 백분위수는 2252ms 및 142ms(전자는 1초 시간 초과를 반영함) 지명 지도자 선정에서). 참고 SCP의 성능은 SCP 이후 대부분 초당 트랜잭션과 독립적입니다. 임의의 많은 거래 중 hash에 동의합니다. 병목 현상은 후보 전파로 인해 발생할 가능성이 더 높습니다. 지명, 실행 및 검증 중 거래 트랜잭션 및 버킷 병합. 우리는 아직 필요하지 않았습니다 여러 CPU 코어 또는 디스크 드라이브를 통해 stellar-core의 트랜잭션 처리를 병렬화합니다. 우리는 또한 방송된 SCP 메시지의 수를 평가했습니다. 생산 네트워크에서. 일반적인 경우에는 단일 리더가 가치를 지명하기 위해 선출되면 우리는 7가지 논리적인 가치를 기대합니다. 브로드캐스트할 메시지: 투표하고 수락할 메시지 2개 노미nate 성명, 수락 및 확인을 위한 두 개의 메시지 준비문, 승인 및 확인을 위한 두 개의 메시지 커밋 문, 마지막으로 외부화 메시지 (낙오자를 돕기 위해 새 원장을 디스크에 커밋한 후 전송됨) 따라잡으세요). 구현은 커밋 확인을 결합합니다. 메시지를 최적화로 외부화합니다. 커밋된 후에 값을 외부화하는 것이 안전합니다. 그런 다음 프로덕션 Stellar validator에서 수집된 측정항목을 분석합니다. 오버 68시간 동안 초당 1.3개의 메시지가 방출되었습니다. 원장당 평균 6-7개의 메시지. 우리는 총

Stellar을 통한 빠르고 안전한 글로벌 결제 SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 백분위수 시간 초과 횟수 지명 투표 75% 0 0 99% 1 0 맥스 4 1 그림 8. 68시간이 넘는 원장당 시간 초과 validators가 브로드캐스트한 메시지 수가 더 많습니다. 연합 투표 메시지 외에도 노드도 브로드캐스트합니다. 그들이 배우는 모든 거래. 그림 8은 프로덕션에서 발생한 시간 초과를 보여줍니다. validator 68시간 동안. 추천 시간 제한은 다음과 같습니다. 리더 선출 기능의 효율성(비)을 측정하는 반면, 투표 시간 초과는 네트워크에 크게 의존합니다. 잠재적인 메시지 지연. 시간 초과가 일관되게 발생합니다. 방출된 메시지 수: 최선의 시나리오, 추가 지명 라운드가 필요한 경우 최소 7개의 메시지. 7.3 통제된 실험 우리는 포장된 용기에서 통제된 실험을 실시했습니다. 72GiB RAM을 갖춘 Amazon EC2 c5d.9xlarge 인스턴스, 900GB의 NVMe SSD 및 36개의 vCPU. 각 인스턴스는 동일한 EC2 지역이고 고정 대역폭이 10Gbps였습니다. 우리는 SQLite를 저장소로 사용했습니다. (Stellar은 PostgreSQL도 지원합니다. 하지만 측정에 노이즈를 주입하는 비동기 작업이 있습니다.) Stellar은 내장된 런타임 쿼리, 생성 로드, 특정 대상에서 합성 부하를 생성할 수 있는 기능 거래/두 번째 요율. Stellar은 다양한 기능을 지원하지만 주문장 및 자산 간 경로와 같은 거래 기능 결제 방식으로는 간편결제에 중점을 두었습니다. 거래 확인은 여러 단계로 구성되어 있으므로 다음 각각에 대한 측정값을 기록했습니다. • 추천: 추천부터 첫 준비까지의 시간 • 투표: 처음 준비부터 확인까지의 시간 투표용지가 확정됨 • 원장 업데이트: 합의 가치를 적용하는 시간 • 거래수: 원장별 확인된 거래 각 실험은 세 가지 매개변수로 정의되었습니다. 원장의 계정 항목 수, 금액 초당 제출된 로드(XLM 결제 형식), 그리고 validator의 수. 우리는 validator마다 구성했습니다. 다른 모든 validator에 대해 알고 싶습니다(최악의 시나리오) SCP의 경우) 쿼럼 슬라이스는 단순 과반수로 설정됩니다. 노드(다양한 쿼럼 수를 최대화하기 위해). 기준선 기본 실험에서는 Stellar을(를) 측정했습니다. 100,000개의 계정, 4개의 validator 및 로드 생성 초당 100건의 트랜잭션 속도. 우리는 원장당 평균 507건의 거래를 관찰했으며 표준편차는 49입니다. (9.7%). 삭제된 트랜잭션은 없습니다. 경미한 105 106 107 0 500 1,000 1,500 2,000 계정 지연 시간 [ms] 원장 업데이트 투표 지명 그림 9. 계정 수 증가에 따른 지연 시간 변동은 부하 생성기의 일정 제한으로 인해 발생합니다. 우리는 원장당 거래 수를 관찰했습니다. 원장을 고려하면 로드 생성 속도와 일치했습니다. 5초마다 닫힙니다. 지명, 투표 및 장부 업데이트에서는 평균 대기 시간이 82.53ms, 95.96ms로 나타났습니다. 각각 174.08ms입니다. 우리는 지명 지연 시간을 관찰했습니다. 99번째 백분위수는 지속적으로 61ms 미만입니다. 첫 번째 단계에 해당하는 약 1초의 스파이크 리더 선택의 타임아웃 기능. 기본 성능을 고려하여 효과를 살펴보았습니다. 각 테스트 설정 매개변수를 변경하는 것입니다. 계정 그림 9의 데이터는 Stellar이 확장됨을 시사합니다. 그리고 계정수도 늘어납니다. 테스트 생성 버킷 생성 및 병합으로 인해 단순히 데이터베이스를 채우는 것이 불가능해졌습니다. SQL을 통해 직접 계정을 사용합니다. 따라서 우리는 최대 50,000,000개의 계정에 대한 실험을 수행할 수 있습니다. 있는 동안 합의 및 원장 업데이트 지연 시간에 미치는 영향을 최소화합니다. 계정을 늘리면 다음과 같은 오버헤드가 발생합니다. 버킷을 병합하면 더 커집니다. 거래율 거래율은 금액에 영향을 미칩니다. validator 간의 트래픽 멀티캐스트, 각 원장에 포함된 트랜잭션 수, 최상위 수준의 크기 버킷. 거래 증가의 효과를 이해하려면 로드 후 100,000개의 계정과 4개의 validator을 사용하여 실험을 실행했습니다. 그림 10은 합의 지연 시간의 느린 증가를 보여줍니다. 대부분의 시간은 원장을 업데이트하는 데 소비되었습니다. 당연히 트랜잭션 세트의 크기가 증가함에 따라 데이터베이스에 커밋하는 데 시간이 더 걸립니다. 우리는 또한 원장 업데이트 지연 시간은 구현에 따라 크게 달라집니다. 데이터베이스 선택에 영향을 받습니다. 검증인 노드 Tierone validators의 수가 어떻게 증가하는지 확인하려면성능에 영향을 미치므로 실험을 진행했습니다. 100,000개의 계정, 100개의 트랜잭션/초 및 4에서 43까지 다양한 수의 validator이 있습니다. 모든 validator이 나타났습니다. 모든 validators의 쿼럼 슬라이스에서; 더 작은 쿼럼 슬라이스는 성능에 미치는 영향이 적습니다.SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌 Lokhavaet al. 100 150 200 250 300 350 0 500 1,000 1,500 2,000 로드 [트랜잭션/초] 지연 시간 [ms] 원장 업데이트 투표 지명 그림 10. 트랜잭션 로드 증가에 따른 지연 시간 10 20 30 40 0 500 1,000 1,500 2,000 검증인 지연 시간 [ms] 원장 업데이트 투표 지명 그림 11. 노드 수가 증가함에 따른 지연 시간 네트워크의 검증 노드 수 변경 교환된 SCP 메시지 수에도 영향을 미칩니다. 지명 중 잠재적 가치의 수. 그림 11 지명 시간이 상대적으로 작은 비율로 증가하는 것을 보여줍니다. 데이터에 따르면 투표가 병목 현상을 일으키는 것으로 나타났습니다. 개선을 통해 많은 확장 문제를 해결할 수 있다고 믿습니다. Stellar의 오버레이 네트워크는 네트워크 트래픽을 최적화합니다. 다음과 같이 예상대로 원장 업데이트 지연 시간은 노드 수. 마감율 마지막으로 원장이 확인되는 빈도와 Stellar이 5초 목표를 달성하는지 여부를 측정하여 Stellar의 엔드투엔드 성능을 측정하고 싶었습니다. 모든 거래를 삭제합니다. 우리는 평균 원장 마감을 관찰했습니다. 계정을 늘리면 5.03초, 5.10초, 5.15초가 됩니다. 각각 항목, 트랜잭션 속도 및 노드 수입니다. 결과는 Stellar이 지속적으로 원장을 마감할 수 있음을 시사합니다. 높은 부하에서. 7.4 validator 실행 Stellar의 중요한 특징 중 하나는 저렴한 비용입니다. 앵커가 실행(또는 계약)되어야 하므로 validator을 실행합니다. validators를 사용하여 최종성을 강화합니다. SDF는 2개의 코어가 있는 c5.large AWS 인스턴스에서 3개의 프로덕션 validator을 실행합니다. 4GiB RAM 및 Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz 프로세서. 하나의 리소스 사용량 검사 이 기계 중 우리는 다음을 사용하여 Stellar 프로세스를 관찰했습니다. CPU는 약 7%, 메모리는 300MiB입니다. 네트워크 트래픽 측면에서 피어에 대한 연결이 28개이고 쿼럼 크기가 있습니다. 34개 중 수신 및 발신 속도는 2.78Mbit/s였으며 각각 2.56Mbit/s입니다. 이러한 실행에 필요한 하드웨어 프로세스가 저렴합니다. 우리의 경우 비용은 $0.054/시간입니다. 또는 월 $40 정도입니다. 7.5 미래의 일 이러한 실험은 Stellar이 쉽게 1~2개 주문을 확장할 수 있음을 시사합니다. 오늘날의 네트워크 사용량을 넘어서는 규모입니다. 왜냐하면 현재까지 성능 요구 사항은 너무 적었습니다. Stellar 다음을 사용하여 많은 간단한 최적화를 위한 여지를 남겨둡니다. 잘 알려진 기술. 예를 들어 트랜잭션과 SCP 메시지는 순진한 플러딩을 사용하여 validators에 의해 방송됩니다. 하지만 이상적으로는 보다 효율적이고 구조화된 프로토콜을 사용해야 합니다. 피어 투 피어 멀티캐스트 [30]. 또한, 데이터베이스가 많이 사용되는 원장 업데이트 시간은 표준 일괄 처리 및 프리페치 기술을 통해 향상될 수 있습니다.

Conclusion

Conclusion

International payments are expensive and take days. Fund custody passes through multiple financial institutions including correspondent banks and money transfer services. Because each hop must be fully trusted, it is difficult for new entrants to gain market share and compete. Stellar shows how to send money around the world cheaply in seconds. The key innovation is a new open-membership Byzantine agreement protocol, SCP, that leverages the peer-to-peer structure of the financial network to achieve global consensus under a novel Internet hypothesis. SCP lets Stellar atomically commit irreversible transactions across arbitrary participants who don’t know about or trust each other. That in turn guarantees new entrants access to the same markets as established players, makes it secure to get the best available exchange rates even from untrusted market makers, and dramatically reduces payment latency. Acknowledgments Stellar would not be where it is today without the early leadership of Joyce Kim or the tremendous contributions of Scott Fleckenstein and Bartek Nowotarski in building and maintaining horizon, the Stellar SDK, and other key pieces of the Stellar ecosystem. We also thank Kolten Bergeron, Henry Corrigan-Gibbs, Candace Kelly, Kapil K. Jain, Boris Reznikov, Jeremy Rubin, Christian Rudder, Eric Saunders, Torsten Stüber, Tomer Weller, the anonymous reviewers, and our shepherd Justine Sherry for their helpful comments on earlier drafts. Disclaimer Professor Mazières’s contribution to this publication was as a paid consultant, and was not part of his Stanford University duties or responsibilities.

Fast and secure global payments with Stellar SOSP ’19, October 27–30, 2019, Huntsville, ON, Canada

결론

국제 결제는 비용이 많이 들고 며칠이 걸립니다. 기금 보관은 환은행 및 송금 서비스를 포함한 여러 금융 기관을 통해 이루어집니다. 각 홉은 완전히 신뢰되어야 하기 때문에 새로운 홉은 어렵습니다. 시장점유율을 확보하고 경쟁하기 위한 진입자. Stellar 쇼 단 몇 초 만에 전 세계로 저렴하게 송금하는 방법. 는 핵심 혁신은 P2P 구조를 활용하는 새로운 개방형 멤버십 비잔틴 계약 프로토콜인 SCP입니다. 금융 네트워크의 글로벌 합의를 달성하기 위해 새로운 인터넷 가설. SCP는 Stellar을 원자적으로 커밋하도록 허용합니다. 임의 참가자 간의 되돌릴 수 없는 거래 서로에 대해 모르거나 신뢰하지 않습니다. 이는 결과적으로 신규 진입자가 기존 시장과 동일한 시장에 접근할 수 있도록 보장합니다. 플레이어는 최상의 교환을 안전하게 받을 수 있습니다. 신뢰할 수 없는 시장 조성자로부터도 가격이 하락하고 극적으로 결제 지연 시간을 줄입니다. 감사의 말 Stellar는 이른 시간이 없었다면 지금의 모습은 없었을 것입니다. 조이스 김의 리더십이나 Scott Fleckenstein과 Bartek Nowotarski가 건물을 짓고 지평선 유지, Stellar SDK 및 기타 핵심 부분 Stellar 생태계의. Kolten Bergeron에게도 감사드립니다. 헨리 코리건-깁스, 캔디스 켈리, 카필 K. 제인, 보리스 레즈니코프, 제레미 루빈, 크리스티안 러더, 에릭 손더스, Torsten Stüber, Tomer Weller, 익명의 심사위원, 그리고 우리 목자 저스틴 셰리(Justine Sherry)가 도움이 되는 의견을 주었습니다. 이전 초안. 면책조항 이 출판물에 대한 Mazières 교수의 기여는 유급 컨설턴트로서 이루어졌으며 그의 일부는 아닙니다. 스탠포드 대학의 의무 또는 책임.

Stellar를 통한 빠르고 안전한 글로벌 결제 SOSP ’19, 2019년 10월 27~30일, 캐나다 온타리오주 헌츠빌