Stellar コンセンサスプロトコル

The Stellar Consensus Protocol

Oleh David Mazières · 2015

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

概要

国際決済は遅くて高価ですが、その理由の 1 つは、異種混合を介したマルチホップ決済ルーティングです。 銀行システム。 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ドルを送金することが非現実的であることを考えてみましょう。 ※株式会社ガロア †カリフォルニア大学ロサンゼルス校 この作品の全部または一部のデジタルコピーまたはハードコピーを作成する許可 個人または教室での使用は、コピーが行われない限り、無料で許可されます。 営利または商業的利益を目的として作成または配布され、そのコピーには この通知と最初のページの引用全文。コンポーネントの著作権 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 メキシコ、隣り合う2つの国。エンドユーザーは 9 ドル近くを支払います 平均的な転送[32]と二国間協定の場合 各国の中央銀行が仲介するのは、削減することしかできない 基本的な銀行コストはアイテム [2] あたり 0.67 ドルになります。手数料に加えて、 通常、国際決済の遅延は考慮されます 数日かかるため、すぐに海外でお金を得ることができなくなります 緊急事態。銀行システムが整備されていない国では 仕事をしていないか、すべての国民にサービスを提供していない場合、または手数料が耐えられない場合、人々はバス [38] による支払いに頼ることになります。 ボート [19]、そして時々 Bitcoin [55] によって、すべて リスク、遅延、または不便が生じる可能性があります。 コンプライアンスコストは常に発生しますが、競争の欠如により多額の損失が発生することを示す証拠 [21]、 これは非効率なテクノロジーによってさらに悪化します。人がいる場所 イノベーションが可能になり、価格とレイテンシが下がります。たとえば、2019 年第 2 四半期の銀行口座からの送金には平均で次の費用がかかりました。 6.99% であるのに対し、モバイル マネーの数字は 4.88% [13] にすぎませんでした。 イノベーションを呼び込むオープンでグローバルな決済ネットワーク 銀行以外の組織との競争が激化する可能性がある コンプライアンス [83] を含む、すべてのレイヤーでのコストとレイテンシ。 このペーパーでは、Stellar、blockchain ベースの支払いについて説明します。 イノベーションを促進するために特別に設計されたネットワーク 国際決済における競争。 Stellar が最初です 以下の 3 つの目標をすべて満たすシステム ( 新規だが経験的に有効な「インターネット仮説」): 1. オープンメンバーシップ – 誰でも通貨を裏付けとした発行が可能 ユーザー間で交換できるデジタル token。 2. 発行者による強制的なファイナリティ – token の発行者は、これを防ぐことができます token のトランザクションが取り消されたり取り消されたりすることを防ぎます。 3. 発行者間のアトミック性 – ユーザーはアトミックに交換できる 複数の発行者からの token を取引します。 最初の 2 つを達成するのは簡単です。 Paypal、Venmo、WeChat などの製品をどの企業も一方的に提供できる Pay または Alipay を使用して、支払いの最終性を確保します。 彼らが作った仮想通貨。残念ながら、これらの通貨間でアトミックに取引することは不可能です。実際、 PaypalがVenmoの親会社を買収したにもかかわらず 2013 年になっても、エンドユーザーが Venmo を送信することはまだ不可能です Paypal ユーザー [78] にドル。販売者ができるようになったのは最近になってからです 単一の統合で両方を受け入れることもできます。 目標 2 と 3 はクローズド システムで達成できます。特に、多くの国では効率的な国内決済が行われています。 ネットワークは、通常、広く信頼されている規制当局によって監督されています。ただし会員資格は非公開に限ります 一連のチャータード銀行とネットワークは以下に限定されます。 国の規制当局の管轄範囲。SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル ロカバら。 目標 1 と 3 はマイニングされた blockchain で達成されました。 最も顕著なのは、Ethereum [3] 上の ERC20 token の形式です。 これらのblockchainの重要なアイデアは、定住した人々に報酬を与える新しい暗号通貨を作成することです。 トランザクションを元に戻すのは困難です。残念ながら、これは、token 発行者がトランザクションのファイナリティを制御していないことを意味します。ソフトウェアの場合 エラーによりトランザクション履歴が再編成される [26、73]、 あるいは、人をだまして得た戦利品がその費用を超えたとき。 歴史の再編成 [74、97]、発行者はtokens について責任を負う可能性がある 彼らはすでに現実世界のお金と引き換えています。 Stellar blockchain には 2 つの特徴的なプロパティがあります。 まず、token 間の効率的な市場をネイティブにサポートします。 さまざまな発行者からのもの。具体的には、誰でもtokenを発行できます。 blockchain は、token の任意のペア間の取引用の組み込みオーダーブックを提供し、ユーザーはパス支払いを発行できます 複数の通貨ペアにわたってアトミックに取引されますが、 エンドツーエンドの制限価格を保証します。 第二に、Stellar は新しいビザンチン協定を導入します プロトコル、SCP (Stellar コンセンサス プロトコル)、これを介して token 発行者は、強制する特定の validator サーバーを指定します トランザクションのファイナリティ。誰も発行者のvalidator(および基礎となるデジタル署名と 暗号 hashes は安全なままです)、発行者はどのトランザクションが発生したかを正確に把握し、リスクを回避します blockchain 履歴の再編成による損失の増加。 SCP の重要な考え方は、ほとんどの資産発行者が次のような恩恵を受けるということです。 流動性の高い市場であり、アトミックな取引を促進したいと考えています 他の資産と一緒に。したがって、validator 管理者は次のように設定します。 サーバーが他の validator と正確に一致するようにします。 すべての資産に対するすべてのトランザクションの履歴。 validator v1 は次のようになります。 v2 と一致するように構成されているか、v2 が一致するように構成できます v1 と、または両方が相互に一致するように構成できます。 どのような場合でも、どちらもトランザクション履歴にコミットすることはありません。 それは、相手が異なる歴史にコミットできないことを知っています。 推移性により、v1 が v2 に同意できず、v2 が v3 に同意できない場合 (またはその逆)、v1 は v3 に同意できません。 v3、v3 が v1 が聞いたアセットを表すかどうか の。これらの合意関係が仮定されると、 ネットワーク全体を推移的に接続することを SCP が保証します 世界的な協定となり、世界的なビザンチン協定となる オープンなメンバーシップを持つプロトコル。私たちはこの新しい接続性の仮定をインターネット仮説と呼びます。 「インターネット」(誰もがそう理解している)の両方が保持されます。 推移的に接続された単一最大の IP ネットワークを意味します) 従来の国際決済(ホップバイホップ) 非アトミックですが、推移的に接続されたグローバルなネットワークを活用します。 金融機関のネットワーク)。 Stellar は、2015 年 9 月から本番環境で使用されています。 blockchain の長さを管理しやすい状態に保つために、システムは 5 秒間隔の SCP - blockchain 標準では高速ですが、 ビザンチン協定の典型的な適用よりもはるかに遅い。 主な用途は支払いですが、Stellar はまた、 利益をもたらす非金銭代替可能tokenにとって魅力的であることが証明されている 即時流通市場からの取引(セクション 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) はクォーラムベースの オープンメンバーシップを備えたビザンチン協定プロトコル。クォーラムは、個々のノードのローカル構成の決定を組み合わせて生成されます。ただし、ノードは認識するだけです 自分自身が所属する定員会に参加した後のみ、 他のすべての定足数メンバーのローカル構成を学習します。このアプローチの利点の 1 つは、SCP が本質的に どのようなノードが存在するかについての異種のビューを許容します。したがって、 ノードは一方的に参加したり離脱したりできます。 メンバーシップを調整するための「ビュー変更」プロトコル。 3.1 ビザンチン連邦協定 伝統的なビザンチン協定の問題は次のようなもので構成されています。 N 個のノードからなるクローズド システム。そのうちのいくつかには障害があり、 恣意的に行動する。ノードは入力値を受け取り、交換します。 入力の中から出力値を決定するためのメッセージ。 ビザンチン協定プロトコルは、行儀の良い 2 つのノードが異なる決定を出力せず、一意の決定を出力しない場合には安全です。 決定は有効な入力でした(有効な合意の定義にとって)SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル ロカバら。 事前に)。プロトコルが有効であることは、それが保証する場合に有効です。 すべての正直なノードは最終的に決定を出力します。 通常、プロトコルは整数に対して N = 3f + 1 を想定します。 f > 0 の場合、安全性と何らかの形の生存性が保証されるため、 最大でも f 個のノードに障害がある限り。これらのある段階で、 プロトコル、ノードは提案された値と提案に投票します 投票の定足数と呼ばれる 2f + 1 票を受け取ると、 決定。 N = 3f + 1 ノードの場合、任意の 2 つのクォーラム サイズ 2f + 1 は少なくとも f + 1 ノードでオーバーラップします。たとえこれらのうちの 重複するノードに障害がある場合、2 つのクォーラムは少なくとも共有します 障害のない 1 つのノードにより、矛盾した決定が防止されます。 ただし、このアプローチは、すべてのノードが同意する場合にのみ機能します。 定足数を構成するものは何ですか。SCP では不可能です。 2 つのノードは互いの存在を知らない場合もあります。 SCP では、各ノード v が一方的にノードのセットを宣言します。 (a) v は、すべての場合に次のように信じます。 スライスのメンバーがシステムの状態について同意すると、 彼らは正しく、(b) v はそのスライスの少なくとも 1 つが、 に関するタイムリーな情報を提供できるようになります。 システムの状態。結果として得られるシステムを次のように呼びます。 ノードとそのスライスの統合ビザンチン協定 (FBA)システム。次に見るように、定足数システムが登場します ノードのスライスから。 非公式には、FBA ノードのスライスは誰との関係を表します。 ノードには同意が必要です。たとえば、ノードには、それぞれ 3 つのノードを実行する 4 つの特定の組織との合意が必要な場合があります。に ダウンタイムに対応するため、スライスをすべてのセットに設定する場合があります 各組織の 2 つのノードで構成されます。これが「必要な場合」 「一致」関係は任意の 2 つのノードを推移的に関連付けます。 世界的な合意が得られます。そうしないと、発散が発生する可能性があります。 ただし組織間のみであり、どちらの組織も必要ありません 相手との合意。今日のトポロジーを考えると、 金融システムでは、広範な収束が人々が呼ぶ単一の元帳履歴を生み出し続けると仮説を立てています。 私たちがインターネットについて話すのと同じように、「Stellar ネットワーク」です。 クォーラムは次のようにスライスから生成されます。すべてのノードが指定します 送信するすべてのメッセージのクォーラム スライスが発生します。 S を 一連のメッセージの発信元となるノードのセット。あ ノードは一連のメッセージがクォーラムに達したとみなします。 S のすべてのメンバーが S に含まれるスライスを持つ場合のしきい値。 構造上、そのような集合 S は、全員一致であれば、次の条件を満たします。 各メンバーの同意要件。 障害のあるピアは、内容を変更するために作成されたスライスをアドバタイズする可能性があります。 正常に動作するノードはクォーラムを考慮します。プロトコル分析のために、FBA のクォーラムは空ではないものとして定義されます。 少なくとも 1 つのクォーラム スライスを含むノードのセット S 欠陥のない各メンバー。他のセットと同様に、この抽象化は健全です 全会一致の定足数を表すと称するメッセージの数 実際には (障害のあるノードからのメッセージが含まれている場合でも)、 そして、S に行儀の良いノードのみが含まれている場合は正確です。で このセクションでは、ノードのスライスは変更されないと仮定します。 それにもかかわらず、私たちの結果はスライス変更の場合に当てはまります。 なぜなら、スライスが変化するシステムは安全であることに劣らないからです。 ノードのスライスがすべての要素で構成される固定スライス システム。 スライス変更の場合に使用するスライス (定理を参照) [68] の 13)。セクション 4 で説明したように、活性度は以下に依存します。 行儀の良いノードは最終的に信頼性の低いノードを削除します 彼らのスライスから。 異なるノードには異なる合意要件があるため、FBA では安全性のグローバルな定義が妨げられます。私たちは言います 障害のないノード v1 と v2 が絡み合っているのは、 v1 のクォーラムが少なくとも 1 つで v2 のすべてのクォーラムと交差します。 障害のないノード。 FBAプロトコルにより合意を保証できる 絡み合ったノード間のみ。 SCP がそうするのですから、SCP のせいです 安全性に対する許容度は最適です。インターネット仮説、 Stellar の設計の根底にあるのは、人々が気にかけているノードであると述べています について絡みます。 I の外側のすべてのノードに障害がある場合でも、I のすべての 2 つのメンバーが絡み合っているような、一様に障害のないクォーラムである場合、ノードのセット I は無傷であると言います。直感的には、 それなら、私は無傷でない者の行為に影響されないようにする必要があります ノード。 SCP は、ノンブロッキングな生存性 [93] と ノード自体は必要ありませんが、無傷のセットに対する安全性 どのセットが無傷であるかを知るためです (また、知ることができない場合もあります)。 さらに、交差する 2 つのそのままのセットの和集合は次のようになります。 無傷のセット。したがって、そのままのセットは、 各パーティションが安全で稼働している、正常に動作するノード (条件によっては)ただし、異なるパーティションが出力する場合があります 異なる決定。 3.1.1 FBA における安全性と生存性の考慮事項 限られた例外 [64] を除いて、ほとんどの終了したビザンチン協定プロトコルは、均衡点に調整されています。 安全性と活性性は同じ耐障害性を持っています。 FBAでは、 つまり、障害に関係なく、すべての 絡み合ったセットもそのままです。 FBAが判断した場合、 分散型のクォーラムでは、個々のスライスの選択がこの均衡につながる可能性は低いです。さらに、 少なくともStellarでは、均衡は望ましくない: その結果 安全上の欠陥(デジタルマネーの二重使用)は、 liveness 障害 (つまり、遅延) よりもはるかに悪いです。 いずれにしても Stellar までに数日かかった支払いの場合)。人々 したがって、次のような大きなクォーラム スライスを選択する必要がありますし、実際に選択する必要があります。 それらのノードは無傷よりも絡み合ったままになる可能性が高くなります。 さらに状況が悪化すると、回復が容易になります。 FBA システムでは、従来のクローズドシステムよりも一般的な liveness 障害が発生します。閉じたシステムでは、すべてのメッセージは次のとおりである必要があります。 同じクォーラムのセットに関して解釈されます。したがって、 障害から回復するためにノードを追加および削除するには、次のことが必要です 再構成イベントについて合意に達することですが、合意が得られなくなると困難になります。それに対してFBAの場合は、 どのノードもクォーラム スライスをいつでも一方的に調整できます。 時間。システム上重要なシステムの停止に対応して 組織では、ノード管理者はスライスを次のように調整できます。 対応を調整するような感じで問題を回避する BGP の大惨事 [63] まで (ただし、次のような制約はありません) 物理ネットワークリンクを介したルーティング)。

Stellar による高速かつ安全なグローバル支払い SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル 3.1.2 カスケード定理 SCP は、基本的なラウンド モデル [42] のテンプレートに従います。 ノードは一連の番号付き投票を進めていきます。 3 つのタスクを試みます:(1)以前の投票の決定と矛盾しない「安全な」値を特定します(よくこのように呼ばれます) (2) 安全値に同意し、(3) 同意が成功したことを検出します。ただし、FBAは開いています メンバーシップはいくつかの一般的な手法を妨げ、 従来のクローズドプロトコルをFBAに「移植」することは不可能 クォーラムの定義を変更するだけでモデルを構築できます。 多くのプロトコルで採用されている手法の 1 つがローテーションです。 タイムアウト後にラウンドロビン方式でリーダー ノードを経由します。クローズド システムでは、ラウンドロビンのリーダー選択により確実に 最終的には、唯一無二の誠実なリーダーが、単一の価値観についての合意を調整することになるのです。残念ながらラウンドロビン メンバーシップが不明な FBA システムでは機能できません。 FBA で失敗するもう 1 つの一般的なテクニックは、特定のクォーラムがすべてのノードを説得できると想定することです。たとえば、 全員が 2f + 1 ノードをクォーラムとして認識すると、 2f + 1 署名は、すべてのノードに対してプロトコル状態を証明するのに十分です。 同様に、ノードが同一のメッセージのクォーラムを受信した場合、 信頼性の高いブロードキャスト [24] を通じて、ノードは障害のないすべてのノードにもクォーラムがあると想定できます。対照的に、FBA では、 クォーラムは、クォーラム外のノードにとっては何の意味も持ちません。 最後に、非連合システムは「逆方向」を使用することがよくあります。 安全性に関する推論: f + 1 ノードに障害がある場合、すべてが安全である 保証は失われます。したがって、ノード v が f + 1 ノードすべてを聞くと、 何らかの事実を述べる F、v は、少なくとも 1 人が、 安全性を損なうことなく、真実(したがって F は真実)になります。そんな 安全性はペアの特性であるため、FBA では推論が失敗します ノードの数が多いため、一部のピアに対して安全性を失ったノードは、 悪い事実を仮定することにより、常により多くのノードの安全性が失われます。 ただし、FBA はライブ性について逆に推論することができます。 v ブロッキング セットを、すべてのノードと交差するノードのセットとして定義します。 v のスライス。v ブロッキング セット B が満場一致で欠陥がある場合、B ノードとクォーラムを拒否し、活性を損なう可能性があります。したがって、もし B が満場一致で事実 F を述べた場合、v はいずれかの F が true または v はそのままではありません。ただし、v はまだ完全なものを確認する必要があります。 絡み合ったノードが F と矛盾しないことを知るための定足数、 これはSCPでのコミュニケーションの最終ラウンドにつながり、 類似のプロトコルでは必要のない他の FBA プロトコル [47] 非公開メンバーシッププロトコル。その結果、 潜在的な事実に対する信頼度の 3 つの可能なレベル: 不確定、無傷のノード間で想定しても安全 (これについては後で説明します) 用語は受け入れられた事実)、絡み合っていると想定するのが安全です ノード(これを確認された事実と呼びます)。 ノード v は、セット B がそのすべてのスライスと交差するかどうかをチェックすることで、セット B が vblocking かどうかを効率的に判断できます。興味深いことに、ノードが常にステートメントをアナウンスする場合、 accept し、フルクォーラムがステートメントを受け入れると、ステートメントが全体に伝播するカスケード プロセスが開始されます。 無傷のセット。この伝播の根底にある重要な事実を カスケード定理は次のことを述べています。 そのままのセット、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] であり、コンセンサスに達するための一連の試みで構成されます。 投票用紙。投票では、継続時間が長くなるタイムアウトが採用されます。あ 投票同期プロトコルにより、ノードが確実に稼働状態に維持されます。 投票用紙が届くまでの期間が長くなり、同じ投票用紙が使用される 事実上同期しています。終了は保証されません 投票が同期されるまで、ただし 2 つの同期投票 正常に動作するノードのスライスの欠陥のあるメンバーがそうなる SCP が終了するには、干渉しないだけで十分です。 投票プロトコルは、投票ごとに実行されるアクションを指定します。 投票用紙。投票は準備フェーズから始まります。 矛盾しない提案する値を決定してください 以前の決定。次に、コミットフェーズで、ノードは次のことを試みます。 準備された値に基づいて決定を行います。 投票には、連合投票と呼ばれる合意サブプロトコルが使用されます。n どのノードが抽象ステートメントに投票するか それは最終的に確認されるか、行き詰まる可能性があります。一部の記述は矛盾しているとみなされる可能性があり、安全性は 連合投票の保証は、2 人のメンバーが連合投票を行わないことです。 絡み合ったセットは矛盾したステートメントを裏付けます。ステートメントが無傷である場合を除き、ステートメントの確認は保証されません メンバー全員が同じように投票するセット。ただし、 完全なセットのメンバーがステートメントを確認します。フェデレーテッド 投票により、無傷のセットのすべてのメンバーが最終的にそのステートメントを確認することが保証されます。そこで、取り返しのつかない措置を講じる 確認ステートメントに応じて、生存期間を維持します 無傷のノード。 ノードは最初に、候補から取得した値を提案します。 メンバー全員が無傷である可能性を高めるプロトコル 同じ値を提案する集合、そして最終的には収束する (ただし、収束が完了したかどうかを判断する方法はありません)。 指名は、連合による投票とリーダーの選択を組み合わせたものです。 FBAでは総当たりが不可能なため、指名は 確率的なリーダー選択スキーム。 カスケード定理は投票においても重要な役割を果たします。 同期を確立し、ブロック状態を回避します。 終了はもう不可能です。 3.2.1 投票 SCP ノードは一連の番号付き投票を進め、連合投票を利用して以下の声明に同意します。 値はどの投票用紙で決定されるか決定されません。非同期の場合 または、誤った行動により投票番号 n での決定に達することができません。 ノードがタイムアウトになり、投票 n + 1 で再試行します。

SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル ロカバら。 連合投票が終了しない可能性があることを思い出してください。したがって、いくつかの 投票用紙に関する発言は永久に固定化される可能性があります ノードがその状態にあるかどうかを決して判断できない不定状態。 まだ進行中か停止中です。ノードは除外できないため 不確定な発言が後で真実であることが判明する可能性、 新しい声明に対する連合投票を決して試みてはなりません 矛盾する不定なもの。 各投票 n では、ノードは 2 つのタイプの連合投票を使用します。 ステートメントの: • prepare ⟨n,x⟩ – x 以外の値がないことを示します n 以内の投票で決定された、または今後決定されることになります。 • commit ⟨n,x⟩ – x が投票 n で決定されると述べます。 重要なのは、prepare ⟨n,x⟩ は commit に矛盾することに注意してください。 ⟨n′,x ′⟩ n ≧ n′かつ x , x ′のとき。 ノードは、投票 n に対して連合投票を試みることによって開始します。 ステートメントは ⟨n,x⟩ を準備します。以前の準備ステートメントがある場合 連合投票により無事確認されました。 ノードは、確認された最高の投票用紙から x を選択します。それ以外の場合、ノードは x を 指名プロトコルについては次のサブセクションで説明します。 ノードが ⟨n,x⟩ の準備を正常に確認した場合にのみ 投票 n では、コミット ⟨n,x⟩ で統合投票を試みます。もし それが成功した場合、SCP が決定したことを意味するため、ノードは次のように出力します。 確認されたコミットステートメントの値。 絡み合った集合 S を考えてみましょう。値は 1 つだけなので、 特定の投票用紙で S のメンバーが作成したものであることを確認できますが、2 つの異なる値がコミットされたことを確認することはできません。 特定の投票用紙に含まれる S のメンバー。さらに、 commit ⟨n,x⟩ の場合 が確認されたら、⟨n,x⟩ を準備することも確認されました。それ以来 prepare ⟨n,x⟩ は、フェデレーション投票の合意保証により、異なる値に対する以前のコミットと矛盾します。 異なる値が以前に決定されることはないことがわかります。 S のメンバーによる投票。投票番号の誘導により、 したがって、SCP は安全であることがわかります。 生存性については、無傷のセット I と十分に長いものを考慮してください。 同期投票 n.スライスに障害のあるノードが現れた場合 行儀の良いノードのうち、n に干渉しないノードは投票によって決定されます n + 1 I のすべてのメンバーは、prepare ステートメントの同じ集合 P を確認しました。 P = ∅で投票用紙 n が十分に長い場合、 指名プロトコルは、ある値 x に収束します。 それ以外の場合、x を P で最も高い投票数を持つ準備からの値とします。いずれにしても、私は一律にフェデレーションを試みます。 次の投票で⟨n + 1,x⟩を準備することに投票します。したがって、もし n + 1 も同期しているため、必然的に x の決定が続きます。 3.2.2 指名 指名には、以下の声明に対する連合投票が必要となります。 • nominate x – x が有効な決定候補であると述べます。 ノードは、複数の値 (異なる値) を指名するために投票することができます。 指名発言は矛盾していない。ただし、一度、 ノードは任意の指名ステートメントを確認すると、投票を停止します。 新しい価値観を提案します。フェデレーション投票により、ノードは引き続き次のことを行うことができます。 投票しなかった新たな指名声明を確認する。 投票または承認 定足数から 受け入れる 定足数から は有効です からのを受け入れる ブロッキングセット コミットされていない に投票した を受け入れました を確認した に投票しました 図 1. 連合投票の段階 完全なセットのメンバーがお互いのことを確認できるようになります。 新たな投票を保留しながら、ノミネートされた値を変更します。 指名の (進化する) 結果は、確認された指名ステートメント内のすべての値の決定論的な組み合わせです。もし x はトランザクションのセットを表し、ノードは和集合を取ることができます セットの中で、最大のセット、または最も高い hash を持つセット、つまり すべてのノードが同じことを行う限り。ノードが新規を保留しているため 1 つの指名発言を確認した後に投票します。 確認されたステートメントには、有限個の値のみを含めることができます。 確認された声明が確実に拡散したという事実 無傷のセットとは、無傷のノードが最終的に 候補値のセットが同じであるため、候補結果が得られます。 ただし、プロトコルの後半の未知の時点で任意に行われました。 ノードはフェデレーテッド リーダー選択を採用して、 nominate ステートメント内の異なる値の数。のみ 指名声明にまだ投票していない指導者は、新しい × を導入することができます。他のノードはメッセージの受信を待機します リーダーの(有効な)指名投票をコピーするだけです。 失敗に対応するために、リーダーのセットは成長し続けます。 タイムアウトが発生しますが、実際には 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 を確認します。 全会一致で承認する定足数。図 2 は、 v ブロック集合とカスケード定理の効果 連合投票。 2 つの必要なクォーラムが共有する必要があるため、絡み合った 2 つのノードは矛盾するステートメントを確認できません。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に投票 (a) 3 4 2 1 5 7 6 投票する × 投票する × 投票する × 投票する Y 投票する × 投票する Y 投票する Y (b) 3 4 2 1 5 7 6 受け入れる × 投票する × 受け入れる × 投票する Y 受け入れる × 投票する Y 投票する Y (c) 3 4 2 1 5 7 6 受け入れる × 受け入れる × 受け入れる × 投票する Y 受け入れる × 受け入れる × 投票する Y (d) 3 4 2 1 5 7 6 受け入れる × 投票する × 受け入れる × 受け入れる × 受け入れる × 受け入れる × 受け入れる × (e) 図 2. 連合投票におけるカスケード効果。各ノードには、スライスのメンバーへの矢印で示される 1 つのクォーラム スライスがあります。 (a) 矛盾したステートメント X と Y が導入されます。 (b) ノードは有効なステートメントに投票します。 (c) ノード 1 はクォーラムの後に X を受け入れます {1, 2, 3, 4} は全会一致で X に投票します。(d) ノード 1、2、3、および 4 はすべて X を受け入れます。セット {1} は 5 ブロッキングであるため、ノード 5 は X を受け入れ、これを無効にします。 (e) セット {5} は 6 および 7 ブロックであるため、6 と 7 は両方とも X を受け入れます。 矛盾していないステートメントを受け入れることができない障害のないノード。ステートメントの確認は保証されていません: 投票が分かれた場合、両方の声明が永久に残る可能性がある 投票フェーズで定足数に達するのを待っている状態です。ただし、 無傷のセット内のノード 私はステートメント、カスケードを確認します 定理とケース 2 を受け入れると、最終的にはすべてが確実に その発言を確認します。 3.2.4 投票用紙の同期 ノードがコミットステートメントを確認できない場合、 現在の投票では、タイムアウト後にギブアップします。タイムアウトが発生する 任意の範囲に調整するために投票ごとに長くする ネットワーク遅延について。 ただし、タイムアウトだけでは、同時に開始されなかったノードの投票を同期するには十分ではありません。 他の理由で非同期になりました。同期を実現するために、ノードはノードの一部になったときにのみタイマーを開始します。 現在 (または今後) の投票ですべての定足数 n.これ 早期に起動したノードの速度を低下させ、 無傷のセットのメンバーがグループよりもはるかに先にいる。 さらに、ノード v が後で v-blocking セットに気づいた場合 投票の場合、すぐに最下位の投票にスキップします。 タイマーに関係なく、これはもう当てはまりません。カスケード 定理により、すべての落伍者が確実に追いつきます。結果 投票用紙は無傷の組織全体でほぼ同期されているということです。 システムが同期状態になると設定されます。 3.2.5 連合リーダーの選択 リーダーの選択により、各ノードがそのようなリーダーを選択できるようになります。 ノードが通常 1 つまたは少数の数だけを選択する方法 リーダーたちの。リーダーの失敗に対応するためのリーダーの選択 ラウンドを経て進みます。現在のラウンドのリーダーの場合 責任を果たしていないように見え、その後、 特定のタイムアウト期間のノードは次のラウンドに進みます。 彼らが従うリーダーの集団を拡大します。 各ラウンドでは、[0,hmax) の範囲の整数を出力する 2 つの固有の暗号化関数 hash 関数 H0 と H1 が使用されます。 たとえば、Stellar は Hi(m) = SHA256(i∥b∥r ∥m) を使用します。 b は SCP インスタンス全体 (ブロックまたは台帳番号)、r は リーダー選択ラウンド番号、および hmax = 2256。 ラウンドでは、ノード v の優先順位を次のように定義します。 優先度(v) = H1(v) 各ノードで 1 人のストローマンがリーダーとして選択されます 最も高い優先順位を持つノード (v)。このアプローチは機能します ほぼ同一のクォーラム スライスでは問題ありませんが、正しく動作しません 不均衡な構成におけるノードの重要性を把握します。たとえば、ヨーロッパと中国がそれぞれ 3 を貢献した場合、 すべてのクォーラムにノードを追加しますが、中国が 1,000 ノード、ヨーロッパが 4 ノードを実行すると、中国が 99.6% の優先順位の最も高いノードを持つことになります。 当時の。 したがって、スライス重みの概念を導入します。 Weight(u,v) ∈[0, 1] はノード u のクォーラム スライスの割合です ノード v を含む。ノード u が新しいリーダーを選択するとき、 次のように定義される近傍のみを考慮します。 隣人(u) = { v | H0(v) < hmax · 重み(u,v) } 次に、ノードは空のリーダーのセットから開始され、それぞれのリーダーで ラウンドは、最も高い値を持つneighbors(u)のノードvをそれに追加します。 優先度(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 の安全性を正式に検証しました および liveness プロパティ ([65] を参照)。具体的に検証したところ、 絡み合ったノードは決して意見が一致せず、以下で説明する条件下では、無傷のセットのすべてのメンバーが最終的に決定するということです。興味深いことに、検証の結果、 SCPが生存を保証する条件は微妙ですが、 そして当初考えられていたよりも強力です [68]: 以下で説明するように、 意図せずにタイミングを操作する悪意のあるノード プロトコルから逸脱すると、手動で削除する必要がある場合があります クォーラムスライスから。

SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル ロカバら。 証明された特性がすべての可能な状況に当てはまることを確認するため FBA の構成と実行については、任意のものを考慮します。 任意のローカル構成を持つノードの数。これ これには、結合されていないそのままのセットを含むシナリオや、無限に長い実行が発生する可能性のあるシナリオが含まれます。欠点は、私たちが パラメータ化されたパラメータを検証するという困難な問題に直面しています 無限状態システム。 検証を扱いやすくするために、Ivy [69] と [82] の方法論を使用して、一次ロジック (FOL) で SCP をモデル化しました。 検証プロセスは、帰納的推測を手動で提供することで構成され、その後、それが自動的にチェックされます。 アイビー。 SCP の FOL モデルは、SCP のいくつかの側面を要約しています。 FOL での取り扱いが難しい FBA システム(例: カスケード定理を公理として採用します)ので、次を検証します。 Isabelle/HOL [75] を使用した抽象化の健全性。 FOLで検証問題を表現した後、帰納的不変量を与えることで安全性を検証します。帰納的 不変式は、約 10 個の 1 行の推測で構成されます 150 行のプロトコル仕様。次に、Ivy の線形時間論理で SCP の活性プロパティを指定し、 生存性を安全性まで減らす [80, 81] の生存性を減らす 検証問題から帰納法を見つける問題へ 不変。 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 の台帳は、アカウントの抽象化を中心に設計されています ( よりコイン中心の未使用トランザクション出力とは対照的です または Bitcoin の UTXO モデル)。台帳の内容は次のもので構成されます。 アカウント、トラストライン、 オファー、およびアカウントデータ。 アカウントは、資産を所有および発行する主体です。それぞれ アカウントは公開キーによって名前が付けられます。デフォルトでは、対応する秘密キーでアカウントのトランザクションに署名できます。 ただし、アカウントを再構成して、他の署名者を追加し、アカウントに名前を付けるキーの認証を解除することはできます。 複数の署名者を必要とする「multisig」オプション。各アカウント シーケンス番号 (トランザクションに含まれる) も含まれます。 リプレイを防ぐため)、いくつかのフラグ、および「ネイティブ」のバランス XLM と呼ばれる、事前に採掘された仮想通貨で、被害を軽減することを目的としています。 一部のサービス拒否攻撃を防止し、市場形成を促進します 中立通貨として。 トラストラインは、発行された資産の所有権を追跡します。 発行アカウントと短いアカウントからなるペアで名前が付けられます。 資産コード (例: 「USD」または「EUR」)。各トラストラインは次のように指定します 口座、資産、その資産の口座残高、 それを超えると残高が上昇できない制限と、いくつかのフラグ。 アカウントは、次の方法で資産の保有に明示的に同意する必要があります。 トラストラインを作成し、スパマーのサドルを防止します 不要な資産を含むアカウント。 顧客確認 (KYC) 規制により、多くの金融機関は誰の預金を保有しているかを把握する必要があります。 たとえば写真付き身分証明書を確認することによって。準拠するために、発行者は設定できます アカウントにオプションの auth_reqired フラグを設定し、発行するアセットの所有権を承認されたアカウントに制限します。 このような認可を与えるために、発行者は認可された権限を設定します。 顧客のトラストラインにフラグを立てます。 オファーはアカウントの取引意欲に対応します 特定の資産の一定量を、特定の時点で別の資産に割り当てる 注文簿上の価格。それらは自動的に照合され、 買値と売値がクロスすると約定します。最後に、アカウント データはアカウント、キー、値の 3 つの組み合わせで構成され、アカウント所有者が許可します。 小さなメタデータ値を公開します。 台帳スパムを防ぐために、最小 XLM 残高があり、 予備と呼ばれます。アカウントの準備金は毎回増加します 関連する元帳エントリと元帳エントリが減少すると減少します 消える(注文が約定またはキャンセルされたとき、または注文が完了したときなど) トラストラインは削除されます)。現在、リザーブは 0.5 XLM 増加します 台帳エントリごとに (〜$0.03)。予備力とは関係なく、 アカウントを削除することで、アカウントの価値全体を取り戻すことが可能 AccountMerge オペレーションを使用してこれを実行します。 図 3 に示すレジャー ヘッダーには、グローバル属性が保存されます。 元帳番号、毎の準備金残高などのパラメータ 元帳エントリ、前の元帳ヘッダーの hash (実際には スキップリストを形成するいくつかの hashes)、SCP 出力には以下が含まれます この台帳に適用された新しいトランザクションの hash、 の hash それらのトランザクションの結果 (例: トランザクションの成功または失敗) それぞれ)、およびすべての台帳エントリのスナップショット hash。 スナップショット hash には元帳のすべての内容が含まれているため、 validator は、トランザクションを検証するために履歴を保持する必要はありません。 ただし、予想される数億件にスケールするには アカウントの場合、すべての台帳エントリ テーブルを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 にも依存します。 アカウントの作成 新しい口座元帳エントリを作成して資金を投入する アカウントマージ 勘定科目元帳エントリの削除 オプションの設定 アカウントフラグと署名者を変更する お支払い 特定の量の資産を宛先に支払います。アカウント。 パス支払い Payment と同様ですが、別の資産で支払います (上 制限する);最大 5 つの中間資産を指定します オファーの管理 オファー台帳エントリの作成/削除/変更、 -パッシブオファー ゼロスプレッドを可能にするパッシブバリアントを使用 データの管理 アカウントの作成/削除/変更。データ台帳の入力 チェンジトラスト トラストラインの作成/削除/変更 信頼を許可する トラストラインで承認済みフラグを設定またはクリアする バンプシーケンス シーケンスを増加します。アカウントの番号 図 4. 主な台帳操作 ノードが切断されるたびにそのサイズの ネットワークが長すぎます。したがって、スナップショット hash は次のようになります。 hashing と状態調整の両方を最適化するように設計されています。 具体的には、スナップショットは台帳エントリを時間ごとに階層化します。 指数関数的にサイズが大きいコンテナのセットにおける最後の変更の内容 バケットと呼ばれます。バケットの集合はバケットと呼ばれます リストであり、ログ構造のマージツリーとある程度の類似点があります。 (LSM ツリー) [77]。バケット リストはトランザクション処理中に読み取られません (セクション 5.4 を参照)。したがって、特定のデザイン LSM ツリーの側面を緩和することができます。特にランダム キーによるアクセスは必要なく、バケットは読み取られるだけです レベルの結合の一部として順次。バケットのハッシュ化 リストは、マージされる各バケットを hash し、バケット hashes (小さい、 元帳が閉じるたびに参照の固定インデックス hashes)。切断後にバケット リストを調整するにはダウンロードが必要です バケットのみが異なります。 5.2 トランザクションモデル トランザクションは、ソースアカウント、有効性基準、 メモ、および 1 つ以上の操作のリスト。図 4 に、利用可能な操作を示します。各操作にはソース アカウントがあり、 デフォルトはトランザクション全体のデフォルトです。トランザクションは次のことを行う必要があります すべてのソースアカウントに対応するキーで署名されること 手術。マルチシグアカウントではより高度な署名が必要になる場合があります 一部の操作 (SetOptions など) の重み以下 他のもの (AllowTrust など)。 トランザクションはアトミックです。いずれかの操作が失敗した場合、いずれの操作も失敗しません。 彼らは実行します。これにより、多方向の取引が簡素化されます。仮に 発行者は土地権利書を表す資産を作成し、ユーザー A 小さな土地区画と10,000ドルを交換したい B が所有するより大きな土地区画。2 人のユーザーは両方とも署名できます。 3 つの操作を含む 1 つのトランザクション: 2 つのランド 支払いと1ドルの支払い。 トランザクションの主な有効性基準はシーケンス番号であり、これはトランザクションのシーケンス番号より 1 大きい必要があります。 ソースアカウント元帳エントリ。有効なトランザクションの実行 (成功したかどうかに関係なく) シーケンス番号がインクリメントされ、再生が防止されます。初期シーケンス番号には元帳が含まれます 削除した後でも再生を防ぐための上位ビットの数値 そしてアカウントを再作成します。 もう 1 つの有効性基準は、次の場合に関するオプションの制限です。 トランザクションを実行できます。土地とドルへの回帰 上記のスワップでは、A が B より先にトランザクションに署名した場合、A は署名できない可能性があります B が提出する前に 1 年間取引を続けてほしい そのため、トランザクションを無効にする時間制限が設けられる可能性があります 数日後。マルチシグアカウントも設定可能 hash プレイメージの暴露に署名の重要性を与えるため、 これと時間制限を組み合わせることで、アトミックなクロスチェーン取引 [1] が可能になります。 トランザクションのソースアカウントは、XLM でわずかな手数料を支払います。 輻輳がない場合は 10−5 XLM。混雑時には、 運営コストはオランダのオークションによって設定されます。バリデーターは validator は類似しているため、料金による補償はありません マイナーではなく、Bitcoin フルノードに。 XLMを破壊するのではなく、 料金は再利用され、投票によって比例配分されます。 既存の XLM ホルダー、振り返ってみると、 複雑さの価値はありませんでした。 5.3 コンセンサス値 各台帳について、Stellar は SCP を使用してデータ構造に同意します 3 つのフィールド: トランザクション セット hash (hash を含む) 前の元帳ヘッダーの)、終了時間、d アップグレード。 複数の値がノミネートされていることが確認された場合、Stellar はかかります 最も多くの操作を含むトランザクション セット (関係を破る) 合計手数料、次にトランザクション セット hash)、すべての和集合 アップグレード、および最高の終了時間。閉店時間はあくまで 最後の元帳の終了時刻と次の時刻の間の場合に有効です。 存在するため、ノードは無効な時間を指定しません。 アップグレードでは、リザーブ残高、最低運用料金、プロトコル バージョンなどのグローバル パラメーターが調整されます。いつ 指名中に組み合わせた場合、高い料金とプロトコルのバージョン番号が低い料金とプロトコルのバージョン番号に優先します。アップグレードは、連合投票による争奪スペース [34] を通じてガバナンスに影響を与えますが、どちらでもありません 平等主義でも中央集権主義でもありません。各 validator は次のように構成されます 応じて、統治または非統治(デフォルト)のいずれか 運営者がガバナンスに参加したいかどうか。 validator を管理する場合は、次の 3 種類のアップグレードを検討します。 望ましい、有効、および無効 (validator に含まれないもの)

SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル ロカバら。 validator コア 地平線 FS DB DB 提出する クライアント クライアント その他のvalidator 図 5. Stellar validator アーキテクチャ 実装方法を知っています)。必要なアップグレードは次のように構成されています 特定の時間にトリガーし、相互に調整することを目的としています。 オペレーター。統治ノードは常に投票して希望するノードを指名します アップグレード、受け入れますが、有効なアップグレードを推薦するために投票はしません (つまり、ブロッキング定足数に従う)、決して投票しないでください。 または無効なアップグレードを受け入れます。非政府validatorのエコー 有効なアップグレードに対する投票、つまり本質的に委任 アップグレードを選択する人がどのようなアップグレードを希望するかについての決定 ガバナンスの役割のために。 5.4 実装 図 5 は、Stellar の validator アーキテクチャを示しています。デーモン stellar-core (約 92k 行の C++、サードパーティ ライブラリを除く) と呼ばれる SCP プロトコルと複製されたステート マシンを実装します。 SCP の値を生成するには、多数の台帳エントリを小さな暗号化に削減する必要があります。 hashes。対照的に、トランザクションの検証と実行 アカウントの状態と注文の照合を検索する必要があります。 最高の価格。両方の機能を効率的に提供するには、ステラコア 台帳の 2 つの表現を保持します。1 つはバケット リストを含む外部表現で、バイナリ ファイルとして保存されます。 効率的に更新し、段階的に再hashすることができます。 SQL データベースの内部表現 (PostgreSQL) 実稼働ノードの場合)。 Stellar-core は、次の内容を含む書き込み専用の履歴アーカイブを作成します。 確認された各トランザクションセットとそのスナップショット バケツ。アーカイブにより、新しいノードが自らブートストラップできるようになります ネットワークに参加するとき。台帳の記録も提供します 歴史 - 歴史を調べることができる場所が必要です 2年前の取引です。履歴は追加専用なので アクセス頻度が低いため、安価な場所に保管できます Amazon Glacier または保存できるサービスなど フラット ファイルを取得します。バリデーターホストは通常、ホストをホストしません。 検証への影響を避けるために独自のアーカイブを作成する 配信履歴からのパフォーマンス。 Stellar-Core をシンプルに保つため、使用することは意図されていません。 アプリケーションによって直接実行され、新しいトランザクションを送信するための非常に狭いインターフェイスのみが公開されます。サポートする クライアントでは、ほとんどの validator が Horizon と呼ばれるデーモンを実行します (〜18k Go の行) を送信するための HTTP インターフェイスを提供します そして取引の学習。 Horizon には読み取り専用アクセス権があります stellar-core の SQL データベース、ホライズンのリスクを最小限に抑える 不安定化する恒星の核。支払い経路検索などの機能はすべて Horizon 内に実装されており、アップグレード可能です 他のvalidatorと調整せずに一方的に。 いくつかのオプションの上位層デーモンがクライアントとなり、エコシステムを完成させます。ブリッジサーバーにより、 Stellar と既存のシステムの統合 (例: 特定のアカウントで受け取ったすべての支払いの通知を投稿する)。あ コンプライアンス サーバーは金融機関にフックを提供します。 送金者と受取人の情報を交換し、承認する 支払いに関して、制裁リストの順守のために。最後に、 フェデレーション サーバーは人間が判読できる名前を実装します。 アカウントのシステム。 6 導入経験 Stellar は数年間で中程度の状態に成長しました 適度に信頼できるフルノードオペレーターの数。ただし、 ノードの構成は、活性を維持するようなものでした(ただし、 安全性) 私たち、Stellar 開発財団に依存していました (自衛隊); SDF が突然失踪した場合、他のノード運営者は 介入して手動で私たちを削除する必要があったでしょう ネットワークを継続するにはクォーラム スライスから削除します。 私たちや他の多くの人々は、SDF の組織的重要性を軽減したいと考えていますが、この目標はその後、ますます優先されるようになりました。 研究者 [58] は、安全性とリスクを区別することなく、ネットワークの集中化を定量化し、公表しました。 活気。多くの通信事業者は積極的な設定調整に対応し、主に通信事業者のサイズを拡大しました。 SDF の重要性を薄めるために定足数を削減する。皮肉なことに、これは生命へのリスクを増大させるだけでした。 2 つの問題が状況を悪化させました。まずは人気の サードパーティの Stellar 監視ツール [5] が体系的に 実際に検証していないため、validator 稼働時間を過大評価しています その恒星コアが稼働していました。これにより、人々は次のことを含めるようになります クォーラム スライス内の信頼性の低いノード。 2番目に、バグです。 ステラコアとは、validator が次の台帳に移動すると、 残りのノードが previ を完了するのに十分に役立ちませんでしたメッセージが失われた場合の台帳。その結果、 ネットワークで 67 分間のダウンタイムが発生し、必要なダウンタイムが発生しました validator 管理者による手動調整で再起動してください。 さらに悪いことに、ネットワークを再起動しようとしているときに、複数のノードで同時に急いで再構成が行われてしまいました。 集団的な構成ミスにより、一部のノードが 分岐すると、それらのノードを手動でシャットダウンする必要があり、 乖離中に受け入れられたトランザクションの再送信。幸いなことに、この相違は発見され、修正されました 迅速に処理され、競合するトランザクションは含まれていませんでしたが、 ネットワークがクォーラム交差を享受できないリスク - 潜在的に矛盾するものを受け入れ続けながら分割する 単に設定ミスによりトランザクションが実行されました この出来事によって、非常に具体的なことが分かりました。 これらの経験を検討すると、2 つの主要な結論が得られました。 および対応する是正措置。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 公開キー、または再帰的に別のクォーラム セット。 柔軟かつコンパクトでありながら、ネストされたクォーラムを実現 セットは同時にノード演算子に柔軟性を与えすぎ、ガイダンスが少なすぎるため、安全でない (または たとえ無意味な構成であっても。グループ化の基準 ノードをセットに分割し、サブセットを階層に編成します。 しきい値の選択についてはすべて明確さが不十分であり、運用上の失敗の一因となっていました。するかどうかは不明 ネストされたセット階層内の「レベル」を信頼のレベルとして扱います。 または組織、またはその両方。現場での多くの構成 危険性を特定することに加えて、これらの概念を混合しました。 または無意味なしきい値。 したがって、より単純な構成メカニズムを追加しました。 これは、ネストされたクォーラム セットの 2 つの側面を分離します: グループ化 ノードを組織ごとにまとめ、各組織に単純な信頼分類 (低、中、高、または クリティカル)。高位以上の組織には、次のことが求められます。 歴史アーカイブを公開します。新しいシステムは、各組織が 51% のしきい値が設定され、組織はセットにグループ化されます 67% または 100% のしきい値 (グループの品質に応じて)。 各グループは、次の (高品質) グループの 1 つのエントリです。 図 6 に示すように、この単純化されたモデルにより、 構造の両方の点で構成ミスが発生する可能性 合成されたネストされたセットと選択されたしきい値の 各セット。 6.2 構成ミスのプロアクティブな検出 第 2 に、悪影響を観察するのを待って集団的な設定ミスを検出するのでは遅すぎることに気づきました。特に、分岐する可能性のある構成ミスに関しては、 停止よりも深刻な障害モード - ネットワークが必要とする 構成ミスを即座に検出できるため、オペレーターは実際に相違が発生する前に構成を元に戻すことができます。 このニーズに対処するために、ノードの推移閉包内のすべてのピアの集合的な構成状態を継続的に収集し、発散の可能性、つまり素性を検出するメカニズムを validator ソフトウェアに組み込みました。 クォーラム - その集合的な構成内。 6.2.1 クォーラム交差のチェック クォーラム スライスを収集するのは簡単ですが、それらの間で互いに素なクォーラムを見つけるのは、NP にとって非常に困難です [62]。ただし、私たちが採用したのは、 一連のアルゴリズムヒューリスティックと大文字小文字の区別ルール Lachowski [62] によって提案された、典型的なインスタンスをチェックする 問題の解決は、 最悪の場合のコスト。実際的に言えば、現在のネットワークは クォーラム スライスの推移的クロージャは 20 ~ 30 程度です ノードを作成し、Lachowski の最適化を使用して、通常は次のチェックを行います。 単一の CPU 上で数秒で完了します。必要が生じた場合 パフォーマンスを向上させるために、検索を並列化する場合があります。 6.2.2 危険な構成のチェック ネットワークが素のクォーラムを許可していることを検出することがステップです 正しい方向に進んでいるが、危険を知らせるのが不快なほど遅い このような重大な問題に対して。理想的には、ネットワークの集合的な設定が行われたときにノード オペレータが警告を受け取るようにしたいと考えています。 単に危険な状態に近づいているだけです。 したがって、クォーラム交差チェッカーを拡張しました。 臨界と呼ばれる状態を検出するには、現在の状態が 集合的な設定は、設定ミスが 1 つあるだけです バラバラな定足数を認める州。重大度を検出するには、 チェッカーは、各組織の構成を、シミュレートされた最悪の構成ミスに繰り返し置き換えます。 結果に対して内部クォーラム交差チェッカーを再実行します。 このような重大な構成ミスが一歩手前に存在する場合 現在の状態から、ソフトウェアは警告を発行し、 組織が構成ミスのリスクを引き起こしていると報告しています。 これらの変更により、オペレーターのコミュニティに 2 つの層が与えられます。 最悪の事態を防ぐための通知と指導 集団的な設定ミス。

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 日、カナダ、オンタリオ州ハンツビル ロカバら。 • (a) 1 秒あたりのトランザクション (したがって、1 あたりのトランザクション数) の増加によってレイテンシはどのような影響を受けるか 台帳)、および (b) validator ノードの数? • CPU の観点から見たノードの実行コストはいくらですか。 メモリとネットワーク帯域幅は? 決済ネットワークは他のものと比べて取引率が低い 他のタイプの分散システムへ。先頭のblockchain、 Bitcoin および Ethereum、最大 15 トランザクション/秒を確認します。 Stellar 未満。さらに、これらのシステムは、 プルーフ・オブ・ワークではいくつかのブロックがマイニングされるのを待つ必要があるため、トランザクションを安全に確認するには 1 時間かかります。の blockchain 以外の SWIFT ネットワークでは、ピーク日 [14] には 1 秒あたり平均 420 トランザクションしかありませんでした。そこで私たちが選んだのは、 測定値を 5 秒の目標と比較するため 元帳間隔、より積極的な目標。私たちの結果は次のことを示しています レイテンシはこの制限を快適に下回っています。 いくつかの未実装の最適化がまだパイプラインにあります。 7.1 アンカー 取引量で上位の資産には通貨が含まれます (例: 3 USD アンカー、2 CNY)、Bitcoin アンカー、不動産担保証券 token [92]、およびアプリ内通貨 [8]。アンカーが異なれば、ポリシーも異なります。たとえば、1 つの USD アンカー、 Stronghold、auth_reqired を設定し、顧客を保持するすべてのアカウントに対して顧客確認 (KYC) プロセスを要求します。 資産。もう 1 つの AnchorUSD は、誰でも受け取って取引できます 彼らの米ドル(文字通り0.50ドルをメキシコに送金することが可能になります) 5 秒で 0.000001 ドルの手数料がかかります)。ただし、アンカーUSD USDの購入または引き換えにはKYCと手数料が必要です 従来の電信送金を使用します。フィリピンでは、 Coins.ph の入金に対する銀行の規制は緩い 任意の ATM マシン [36] での PHP のキャッシュアウトをサポートします。前述のセキュリティ token とアプリ内通貨に加えて、次のようなさまざまな非通貨 token があります。 商業債券 [22] および炭素クレジット [85、96] からその他 協力を促す token などの難解な資産 車の差し押さえ [35]。 7.2 パブリックネットワーク この記事の執筆時点では、126 個のアクティブなフル ノードがあり、そのうち 66 個は 投票メッセージに署名してコンセンサスに参加します。図7 ([5] によって生成) は、ネットワークを視覚化します。 一方が他方のクォーラム スライスに存在する場合は 2 つのノード、もう一方のクォーラム スライスに存在する場合は 2 つのノード 濃い青の線は双方向の依存性を示します。で センターは、17 の事実上の「ティア 1 validators」からなるクラスターであり、以下によって運営されています。 SDF、SatoshiPay、LOBSTR、COINQVEST、および Keybase。 4 か月前、第 6 節の出来事が起こる前に、 システム的に重要なノードは 15 個あり、そのうち 3 個は一見したところからのノードでした 第一層の組織といくつかのランダムなシングルトン。の グラフもかなり規則性が欠けているように見えました。したがって、新しい構成メカニズムおよび/またはより適切なオペレーターの決定が必要と思われます。 より健全なネットワーク トポロジに貢献します。なし 莫大な資金力(そしてそれに対応する株主) 図 7. クォーラム スライス マップ 義務)、ティア1を5人採用するのは困難だったでしょう ただし、組織は最初からそうなっています。これは定足数を示唆しています スライスはネットワーク ブートストラップで便利な役割を果たします。誰でも実行できます。 重要なプレーヤーになるという目標を持って参加するため、 ペアごとの合意の門番は存在しません。 現在、台帳には 330 万を超えるアカウントがあります。終わった 最近 24 時間で、Stellar のトランザクションは平均 4.5 件で、 1 秒あたり 15.7 回の操作。最近の台帳を確認すると、ほとんどの場合、 トランザクションには単一の操作があるように見えますが、数回ごとに 台帳では、多くの操作を含むトランザクションが見られます。 オファーを管理するマーケットメーカーから来ているようです。の 合意形成と台帳の更新にかかる平均時間は それぞれ1061ミリ秒と46ミリ秒。 99 パーセンタイルは次のとおりです。 2252 ミリ秒と 142 ミリ秒 (前者は 1 秒のタイムアウトを反映) 指名リーダーの選択において)。 SCP のパフォーマンスは次のとおりです。 SCP 以来、1 秒あたりのトランザクションにほとんど依存しません。 任意の多数のトランザクションの hash に同意します。ボトルネックは候補の伝播によって発生する可能性が高くなります 指名、実行、検証中のトランザクション トランザクションとバケットのマージ。まだ必要ありません 複数の CPU コアまたはディスク ドライブ上で Stellar-core のトランザクション処理を並列化します。 また、ブロードキャストされた SCP メッセージの数も評価しました。 本番ネットワーク上で。通常のシングルの場合 リーダーが価値を指名するために選出された場合、私たちは 7 つの論理的価値を期待します ブロードキャストされるメッセージ: 投票して承認する 2 つのメッセージ のみnate ステートメント、受け入れて確認する 2 つのメッセージ 準備ステートメント、受け入れと確認のための 2 つのメッセージ commit ステートメント、そして最後に externalize メッセージ (敗者を支援するために新しい台帳をディスクにコミットした後に送信されます) 追いつきます)。実装はコミット確認を組み合わせます そしてメッセージを最適化として外部化します。 コミット後に値を安全に外部化できます。次に、本番環境 Stellar validator で収集されたメトリクスを分析します。終わった 68 時間にわたって、1 秒あたり 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 時間にわたって。指名タイムアウトは、 リーダー選出機能の(非)有効性の尺度。投票タイムアウトはネットワークに大きく依存します。 メッセージの遅延の可能性もあります。タイムアウトは一貫しています 発行されるメッセージの数: 6 つのメッセージ 最良のシナリオ、および追加の指名ラウンドが必要な場合は少なくとも 7 つのメッセージ。 7.3 管理された実験 に詰められたコンテナ内で制御された実験を実行しました。 72 GiB の RAM を備えた Amazon EC2 c5d.9xlarge インスタンス、 900 GB の NVMe SSD、および 36 個の vCPU。各インスタンスは 同じ EC2 リージョンにあり、10 Gbps の固定帯域幅がありました。 ストアとして SQLite を使用しました。 (Stellar は PostgreSQL もサポートしています。 ただし、測定にノイズを注入する非同期タスクが含まれます)。 Stellar は、組み込みのランタイム クエリ、generateload、 特定のターゲットで合成負荷を生成できるようにします トランザクション/秒レート。 Stellar はさまざまな機能をサポートしていますが、 オーダーブックやクロスアセットパスなどの取引機能 決済においては、シンプルな決済に注力しました。 トランザクションの確認は複数のステップで構成されているため、 次のそれぞれの測定値を記録しました。 • 指名: 指名から最初の準備までの時間 • 投票: 最初の準備から投票の確認までの時間 投票用紙がコミットされました • 台帳の更新: コンセンサス値を適用する時期 • トランザクション数: 台帳ごとに確認されたトランザクション 私たちの各実験は 3 つのパラメーターによって定義されました。 台帳の口座エントリの数、金額 1 秒あたりに送信される負荷 (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 アカウント レイテンシ[ミリ秒] 台帳の更新 投票 指名 図 9. アカウント数の増加に伴う待ち時間 差異は、ロード ジェネレーターのスケジュール制限によるものです。台帳ごとのトランザクション数が観察されました。 台帳を考慮すると、負荷生成率と一致していました 5秒ごとに閉まります。指名、投票、台帳 アップデートでは、平均レイテンシが 82.53 ミリ秒、95.96 ミリ秒、 それぞれ174.08ミリ秒。指名のレイテンシーが観察されました 99 パーセンタイルは常に 61 ミリ秒未満ですが、場合によっては 最初のステップに相当する約 1 秒のスパイク リーダー選択のタイムアウト機能で。 ベースラインのパフォーマンスを考慮して、その影響を調べました。 各テスト設定パラメータを変更します。 アカウント 図 9 のデータは、Stellar がスケールすることを示唆しています。 アカウントの数も増えます。テストの生成 バケットの作成と、アカウントの作成に時間がかかるプロセスになりました。 マージにより、単にデータベースにデータを追加することができなくなりました SQL 経由でアカウントを直接使用します。そこで私たちは、 最大 50,000,000 アカウントを対象とした実験。あるうちに コンセンサスと台帳更新の遅延への影響を最小限に抑え、 アカウントを増やすと、次のようなオーバーヘッドが発生することに注意してください。 バケットを結合すると、サイズが大きくなります。 トランザクションレート 取引レートは金額に影響を与えます validator 間のトラフィック マルチキャスト、各台帳に含まれるトランザクションの数、および最上位のサイズ バケツ。トランザクションの増加による影響を理解するため 負荷に応じて、100,000 のアカウントと 4 つの validator を使用して実験を実行しました。 図 10 は、コンセンサス レイテンシーの緩やかな増加を示しています。 一方、大部分の時間は台帳の更新に費やされました。 当然のことですが、トランザクション セットのサイズが大きくなるにつれて、 データベースにコミットするのに時間がかかります。また、 台帳更新の遅延は実装に大きく依存します。 データベースの選択によって影響を受けます。 バリデータノード tierone validators の数がどのように増加するかを確認するにはパフォーマンスに影響を与えるため、実験を実行しました 100,000 のアカウント、100 トランザクション/秒、validator の数は 4 ~ 43 で、すべての validator が表示されました。 すべての validator のクォーラム スライス内。より小さいクォーラム スライスは、 パフォーマンスへの影響が少なくなります。SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル ロカバら。 100 150 200 250 300 350 0 500 1,000 1,500 2,000 ロード [トランザクション/秒] レイテンシ[ミリ秒] 台帳の更新 投票 指名 図 10. トランザクション負荷の増加に伴うレイテンシ 10 20 30 40 0 500 1,000 1,500 2,000 バリデーター レイテンシ[ミリ秒] 台帳の更新 投票 指名 図 11. ノード数の増加に伴うレイテンシ ネットワーク上の検証ノードの数の変更 交換される SCP メッセージの数に影響を与えるだけでなく、 推薦中の潜在的な値の数。図11 は、指名時間の増加率が比較的小さいことを示しています。 データは投票がボトルネックであることを示唆していますが、 スケーリングに関する多くの問題は、改善することで解決できると考えています。 Stellar のオーバーレイ ネットワークを使用してネットワーク トラフィックを最適化します。として 予想通り、台帳更新の遅延は独立したままでした ノードの数。 成約率 最後に、台帳が確認される頻度と、Stellar が 5 秒の目標を達成するかどうかを測定することで、Stellar のエンドツーエンドのパフォーマンスを測定したいと考えました。 トランザクションを削除します。平均的な元帳のクローズが観察されました アカウントの増加に伴い、5.03 秒、5.10 秒、5.15 秒の時間になりました それぞれ、エントリ、トランザクション レート、ノード数です。 結果は、Stellar が元帳を一貫してクローズできることを示唆しています 高負荷時。 7.4 validator を実行しています Stellar の重要な特徴の 1 つは、コストが低いことです。 validator を実行します。アンカーは実行 (または契約) する必要があります。 validators でファイナリティを強制します。 SDF は 3 つの本番 validator を実行し、すべて 2 つのコアを持つ c5.large AWS インスタンス上で実行します。 4 GiB の RAM および Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz プロセッサ。 1 台でのリソース使用状況の検査 これらのマシンのうち、Stellar プロセスを観察しました。 CPU の約 7% とメモリ 300 MiB。ネットワーク トラフィックに関しては、ピアへの接続数が 28、クォーラム サイズが 1 つあります。 34 の場合、受信速度と送信速度は 2.78 Mbit/s でした。 それぞれ2.56Mビット/秒。このようなものを実行するにはハードウェアが必要です プロセスが安価です。この場合、コストは 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 の番組 数秒で世界中に安く送金する方法。の 主要な革新は、ピアツーピア構造を活用した新しいオープンメンバーシップのビザンチン協定プロトコルである SCP です。 世界的なコンセンサスを達成するための金融ネットワークの構築 新しいインターネット仮説。 SCP は Stellar をアトミックにコミットさせます 任意の参加者間の不可逆的なトランザクション。 お互いのことを知らないし信頼もしていない。これにより、新規参入者が既存の市場と同じ市場にアクセスできることが保証されます。 プレーヤーは、利用可能な最高の交換を安全に入手できます 信頼できないマーケットメーカーからのレートであっても、劇的に上昇します。 支払いの待ち時間を短縮します。 謝辞 Stellar は、初期の ジョイス・キムのリーダーシップまたは多大な貢献 スコット・フレッケンシュタインとバルテック・ノヴォタルスキーが建築と Horizon、Stellar SDK、およびその他の重要な要素の維持 Stellar エコシステムの。コルテン・ベルジェロンにも感謝します。 ヘンリー・コリガン=ギブス、キャンディス・ケリー、カピル・K・ジェイン、ボリス レズニコフ、ジェレミー・ルービン、クリスチャン・ラダー、エリック・サンダース、 Torsten Stüber、Tomer Weller、匿名の査読者、 私たちの羊飼いのジャスティン・シェリーさんに有益なコメントをいただきました 以前の草案。 免責事項 マジエール教授のこの出版物への貢献は有償コンサルタントとしてのものであり、教授の活動の一部ではありませんでした。 スタンフォード大学の義務または責任。

Stellar による高速かつ安全なグローバル支払い SOSP ’19、2019 年 10 月 27 ~ 30 日、カナダ、オンタリオ州ハンツビル