Cosmos:分布式账本网络

Cosmos: A Network of Distributed Ledgers

Par Jae Kwon and Ethan Buchman · 2016

Introduction

Introduction

The combined success of the open-source ecosystem, decentralized yle-sharing, and public cryptocurrencies has inspired an understanding that decentralized internet protocols can be used to radically improve socio-economic infrastructure. We have seen specialized blockchain applications like Bitcoin [1] (a cryptocurrency), Zerocash [2] (a cryptocurrency for privacy), and generalized smart contract platforms such as Ethereum [3], with countless distributed applications for the Etherium Virtual Machine (EVM) such as Augur (a prediction market) and TheDAO [4] (an investment club). To date, however, these blockchains have suffered from a number of drawbacks, including their gross energy inefyciency, poor or limited performance, and immature governance mechanisms. Proposals to scale Bitcoin’s transaction throughput, such as Segregated-Witness [5] and BitcoinNG [6], are vertical scaling solutions that remain limited by the capacity of a single physical machine, in order to ensure the property of complete auditability. The Lightning Network [7] can help scale Bitcoin transaction

volume by leaving some transactions off the ledger completely, and is well suited for micropayments and privacy-preserving payment rails, but may not be suitable for more generalized scaling needs. An ideal solution is one that allows multiple parallel blockchains to interoperate while retaining their security properties. This has proven difycult, if not impossible, with proof-of-work. Merged mining, for instance, allows the work done to secure a parent chain to be reused on a child chain, but transactions must still be validated, in order, by each node, and a merge-mined blockchain is vulnerable to attack if a majority of the hashing power on the parent is not actively merge-mining the child. An academic review of alternative blockchain network architectures is provided for additional context, and we provide summaries of other proposals and their drawbacks in Related Work. Here we present Cosmos, a novel blockchain network architecture that addresses all of these problems. Cosmos is a network of many independent blockchains, called zones. The zones are powered by Tendermint Core [8], which provides a high-performance, consistent, secure PBFT-like consensus engine, where strict forkaccountability guarantees hold over the behaviour of malicious actors. Tendermint Core’s BFT consensus algorithm is well suited for scaling public proof-of-stake blockchains. The yrst zone on Cosmos is called the Cosmos Hub. The Cosmos Hub is a multi-asset proof-of-stake cryptocurrency with a simple governance mechanism which enables the network to adapt and upgrade. In addition, the Cosmos Hub can be extended by connecting other zones. The hub and zones of the Cosmos network communicate with each other via an inter-blockchain communication (IBC) protocol, a kind of virtual UDP or TCP for blockchains. Tokens can be transferred from one zone to another securely and quickly

without the need for exchange liquidity between zones. Instead, all inter-zone token transfers go through the Cosmos Hub, which keeps track of the total amount of tokens held by each zone. The hub isolates each zone from the failure of other zones. Because anyone can connect a new zone to the Cosmos Hub, zones allow for future-compatibility with new blockchain innovations. In this section we describe the Tendermint consensus protocol and the interface used to build applications with it. For more details, see the appendix. In classical Byzantine fault-tolerant (BFT) algorithms, each node has the same weight. In Tendermint, nodes have a non-negative amount of voting power, and nodes that have positive voting power are called validators. Validators participate in the consensus protocol by broadcasting cryptographic signatures, or votes, to agree upon the next block. Validators’ voting powers are determined at genesis, or are changed deterministically by the blockchain, depending on the application. For example, in a proof-of-stake application such as the Cosmos Hub, the voting power may be determined by the amount of staking tokens bonded as collateral. NOTE: Fractions like ⅔ and ⅓ refer to fractions of the total voting power, never the total number of validators, unless all the validators have equal weight. \(> 2/3\) means “more than ⅔”, \(\geq 1/3\) means “at least ⅓”. Tendermint is a partially synchronous BFT consensus protocol derived from the DLS consensus algorithm [20]. Tendermint is

notable for its simplicity, performance, and fork-accountability. The protocol requires a yxed known set of validators, where each validator is identiyed by their public key. Validators attempt to come to consensus on one block at a time, where a block is a list of transactions. Voting for consensus on a block proceeds in rounds. Each round has a round-leader, or proposer, who proposes a block. The validators then vote, in stages, on whether to accept the proposed block or move on to the next round. The proposer for a round is chosen deterministically from the ordered list of validators, in proportion to their voting power. The full details of the protocol are described here. Tendermint’s security derives from its use of optimal Byzantine fault-tolerance via super-majority (\(> 2/3\)) voting and a locking mechanism. Together, they ensure that: \(\geq 1/3\) voting power must be Byzantine to cause a violation of safety, where more than two values are committed. if any set of validators ever succeeds in violating safety, or even attempts to do so, they can be identiyed by the protocol. This includes both voting for conzicting blocks and broadcasting unjustiyed votes. Despite its strong guarantees, Tendermint provides exceptional performance. In benchmarks of 64 nodes distributed across 7 datacenters on 5 continents, on commodity cloud instances, Tendermint consensus can process thousands of transactions per second, with commit latencies on the order of one to two seconds. Notably, performance of well over a thousand transactions per second is maintained even in harsh adversarial conditions, with validators crashing or broadcasting maliciously crafted votes. See the ygure below for details.

Tendermint throughput vs block size benchmarked across 64 nodes in 7 datacenters on 5 continents

A major beneyt of Tendermint’s consensus algorithm is simpliyed light client security, making it an ideal candidate for mobile and internet-of-things use cases. While a Bitcoin light client must sync chains of block headers and ynd the one with the most proof of work, Tendermint light clients need only to keep up with changes to the validator set, and then verify the \(> 2/3\) PreCommits in the latest block to determine the latest state. Succinct light client proofs also enable inter-blockchain communication. Tendermint has protective measures for preventing certain notable attacks, like long-range-nothing-at-stake double spends and censorship. These are discussed more fully in the appendix.

The Tendermint consensus algorithm is implemented in a program called Tendermint Core. Tendermint Core is an application-agnostic “consensus engine” that can turn any deterministic blackbox application into a distributedly replicated blockchain. Tendermint Core connects to blockchain applications via the Application Blockchain Interface (ABCI) [17]. Thus, ABCI allows for blockchain applications to be programmed in any language, not just the programming language that the consensus engine is written in. Additionally, ABCI makes it possible to easily swap out the consensus layer of any existing blockchain stack. We draw an analogy with the well-known cryptocurrency Bitcoin. Bitcoin is a cryptocurrency blockchain where each node maintains a fully audited Unspent Transaction Output (UTXO) database. If one wanted to create a Bitcoin-like system on top of ABCI, Tendermint Core would be responsible for Sharing blocks and transactions between nodes Establishing a canonical/immutable order of transactions (the blockchain) Meanwhile, the ABCI application would be responsible for Maintaining the UTXO database Validating cryptographic signatures of transactions Preventing transactions from spending non-existent funds Allowing clients to query the UTXO database Tendermint is able to decompose the blockchain design by offering a very simple API between the application process and consensus process.

介绍

开源生态系统的共同成功, 去中心化的yle共享,公共加密货币已经 激发了人们对去中心化互联网协议的理解 可用于从根本上改善社会经济基础设施。 我们已经看到了专门的 blockchain 应用程序,例如 Bitcoin [1] ( 加密货币)、Zerocash [2](一种保护隐私的加密货币)以及 通用 smart contract 平台,例如 Ethereum [3], 以太坊虚拟的无数分布式应用程序 机器(EVM),例如 Augur(预测市场)和 TheDAO [4](投资俱乐部)。 然而,迄今为止,这些 blockchain 已经遭受了许多问题的困扰。 的缺点,包括其总体能源效率低下、贫穷或 绩效有限,治理机制不成熟。 扩大 Bitcoin 交易吞吐量的建议,例如 隔离见证 [5] 和 BitcoinNG [6],是垂直缩放 解决方案仍然受到单个物理容量的限制 机,以保证性能的完全可审核性。 闪电网络 [7] 可以帮助扩展 Bitcoin 交易

通过将一些交易完全从分类账中删除来增加交易量, 非常适合小额支付和隐私保护 支付轨道,但可能不适合更普遍的情况 扩展需求。 理想的解决方案是允许多个并行 blockchain 互操作,同时保留其安全属性。这有 事实证明,对于 proof-of-work 来说,即使不是不可能,也是很困难的。合并 例如,采矿可以确保父母的安全 链可以在子链上重用,但交易仍然必须 按顺序由每个节点进行验证,并合并挖掘 blockchain 如果 hashing 上的大部分功率都容易受到攻击 父级没有积极地对子级进行合并挖掘。学术评论 提供了替代的 blockchain 网络架构 其他背景,我们提供其他提案的摘要 以及它们在相关工作中的缺点。 在这里,我们介绍 Cosmos,一种新颖的 blockchain 网络架构 解决所有这些问题。 Cosmos 是一个由许多人组成的网络 独立的 blockchain,称为区域。这些区域的动力来自 Tendermint Core [8],提供高性能、 一致、安全的类似 PBFT 的共识引擎,其中严格的责任保证可以抑制恶意行为 演员。 Tendermint Core 的 BFT 共识算法非常适合 用于缩放 public proof-of-stake blockchains。 Cosmos 上的第一个区域称为 Cosmos 中心。 Cosmos Hub 是一种多资产 proof-of-stake 加密货币,具有简单的 使网络能够适应和适应的治理机制 升级。此外,Cosmos 集线器可以通过以下方式扩展: 连接其他区域。 Cosmos 网络的集线器和区域与 彼此通过 blockchain 间通信 (IBC) 协议, blockchains 的一种虚拟 UDP 或 TCP。代币可以是 安全、快速地从一个区域转移到另一个区域无需在区域之间交换流动性。相反, 所有区域间 token 传输均通过 Cosmos 中心,该中心 跟踪每个区域持有的 token 总量。的 集线器将每个区域与其他区域的故障隔离开来。因为 任何人都可以将新区域连接到 Cosmos 集线器,区域允许 为了与新的 blockchain 创新未来兼容。 在本节中,我们将描述 Tendermint 共识协议 以及用于构建应用程序的接口。了解更多 详情见附录。 在经典拜占庭容错 (BFT) 算法中,每个节点 具有相同的重量。在 Tendermint 中,节点具有非负数 投票权的大小以及投票赞成的节点 电源称为 validators。验证者参与 通过广播加密签名达成共识协议,或者 投票,就下一个区块达成一致。 验证者的投票权是在创世时决定的,或者是 由 blockchain 确定性地更改,具体取决于 应用程序。例如,在 proof-of-stake 应用程序中,例如 Cosmos Hub,投票权可以由 作为抵押品的 staking token 数量。 注:像 ⅔ 和 ⅓ 这样的分数是指总投票数的分数 功率,绝不是 validator 的总数,除非所有 validator 都 具有相同的权重。 >⅔表示“超过⅔”,≥⅓表示“至少 ⅓”。 Tendermint 是一个部分同步的 BFT 共识协议 源自 DLS 共识算法 [20]。嫩薄荷是

以其简单性、性能和分叉责任而闻名。 该协议需要一组已知的 validator,其中每个 validator 由其公钥识别。验证者试图 一次就一个区块达成共识,其中一个区块就是一个列表 的交易。对区块进行投票以达成共识 回合。每轮都有一位轮次领导者或提议者,他们 提出一个区块。然后 validator 分阶段投票决定是否 接受提议的区块或进入下一轮。的 一轮的提议者是从有序的中确定性地选择的 validator 列表,按其投票权比例。 此处描述了该协议的完整细节。 Tendermint 的安全性源自其对最佳拜占庭式的使用 通过绝对多数 (>⅔) 投票和锁定实现容错 机制。他们共同确保: ≥⅓ 投票权必须是拜占庭式的才会导致违反 安全,承诺两个以上的价值观。 如果任何一组 validator 曾经成功违反安全性,甚至 尝试这样做时,它们可以被协议识别。这个 包括对冲突区块的投票和广播 不公正的选票。 尽管有强有力的保证,Tendermint 仍提供卓越的服务 性能。在分布在 7 个节点的 64 个节点的基准测试中 数据中心遍布五大洲,位于商品云实例上, Tendermint 共识可以处理数千笔交易 其次,提交延迟约为一到两秒。 值得注意的是,每笔交易的性能远远超过一千笔 即使在恶劣的对抗条件下,第二个也能保持, validators 崩溃或广播恶意制作的投票。参见 详情请参见下图。

Tendermint throughput vs block size benchmarked across 64 nodes in 7 datacenters on 5 continents

Tendermint 共识算法的一个主要好处是简化 轻客户端安全性,使其成为移动和 物联网用例。虽然 Bitcoin 轻客户端必须同步 区块头链,并找到拥有最多证明的区块头链 工作,Tendermint 轻客户端只需要跟上变化 到 validator 集,然后验证 >⅔ PreCommits 最新块来确定最新状态。 简洁的轻客户端证明还可以实现blockchain之间的交互 沟通。 Tendermint 有保护措施来防止某些 值得注意的攻击,例如远程无利害关系双花 和审查制度。这些在附录中进行了更全面的讨论。Tendermint 共识算法是在 名为 Tendermint Core 的程序。 Tendermint 核心是 与应用程序无关的“共识引擎”,可以改变任何 将确定性黑盒应用程序转化为分布式复制 blockchain。 Tendermint Core 连接到 blockchain 应用程序 通过应用程序区块链接口 (ABCI) [17]。因此,ABCI 允许 blockchain 应用程序在任何 语言,而不仅仅是达成共识的编程语言 引擎被写入。此外,ABCI 可以轻松地 交换任何现有 blockchain 堆栈的共识层。 我们用著名的加密货币Bitcoin进行类比。 Bitcoin 是每个节点维护的加密货币 blockchain 经过全面审核的未花费交易输出 (UTXO) 数据库。如果 有人想在 ABCI 之上创建一个类似 Bitcoin 的系统, Tendermint Core 将负责 节点之间共享区块和交易 建立规范/不可变的交易顺序( blockchain) 同时,ABCI 应用程序将负责 维护 UTXO 数据库 验证交易的加密签名 防止交易花费不存在的资金 允许客户端查询 UTXO 数据库 Tendermint 能够通过以下方式分解 blockchain 设计: 在应用程序进程和 共识过程。

Cosmos Architecture

Cosmos Architecture

Cosmos is a network of independent parallel blockchains that are each powered by classical BFT consensus algorithms like Tendermint 1. The yrst blockchain in this network will be the Cosmos Hub. The Cosmos Hub connects to many other blockchains (or zones) via a novel inter-blockchain communication protocol. The Cosmos Hub tracks numerous token types and keeps record of the total number of tokens in each connected zone. Tokens can be transferred from one zone to another securely and quickly without the need for a liquid exchange between zones, because all inter-zone coin transfers go through the Cosmos Hub. This architecture solves many problems that the blockchain space faces today, such as application interoperability, scalability, and seamless upgradability. For example, zones derived from Bitcoind, Go-Ethereum, CryptoNote, ZCash, or any blockchain system can be plugged into the Cosmos Hub. These zones allow Cosmos to scale inynitely to meet global transaction demand. Zones are also a great yt for a distributed exchange, which will be supported as well. Cosmos is not just a single distributed ledger, and the Cosmos Hub isn’t a walled garden or the center of its universe. We are designing a protocol for an open network of distributed ledgers that can serve as a new foundation for future ynancial systems, based on principles of cryptography, sound economics, consensus theory, transparency, and accountability. The Cosmos Hub is the yrst public blockchain in the Cosmos Network, powered by Tendermint’s BFT consensus algorithm. The Tendermint open-source project was born in 2014 to address the speed, scalability, and environmental issues of Bitcoin’s proof-ofwork consensus algorithm. By using and improving upon proven

BFT algorithms developed at MIT in 1988 [20], the Tendermint team was the yrst to conceptually demonstrate a proof-of-stake cryptocurrency that addresses the nothing-at-stake problem suffered by yrst-generation proof-of-stake cryptocurrencies such as NXT and BitShares1.0. Today, practically all Bitcoin mobile wallets use trusted servers to provide them with transaction veriycation. This is because proofof-work requires waiting for many conyrmations before a transaction can be considered irreversibly committed. Doublespend attacks have already been demonstrated on services like CoinBase. Unlike other blockchain consensus systems, Tendermint offers instant and provably secure mobile-client payment veriycation. Since the Tendermint is designed to never fork at all, mobile wallets can receive instant transaction conyrmation, which makes trustless and practical payments a reality on smartphones. This has signiycant ramiycations for Internet of Things applications as well. Validators in Cosmos have a similar role to Bitcoin miners, but instead use cryptographic signatures to vote. Validators are secure, dedicated machines that are responsible for committing blocks. Non-validators can delegate their staking tokens (called “atoms”) to any validator to earn a portion of block fees and atom rewards, but they incur the risk of getting punished (slashed) if the delegate validator gets hacked or violates the protocol. The proven safety guarantees of Tendermint BFT consensus, and the collateral deposit of stakeholders–validators and delegators–provide provable, quantiyable security for nodes and light clients. Distributed public ledgers should have a constitution and a governance system. Bitcoin relies on the Bitcoin Foundation and

mining to coordinate upgrades, but this is a slow process. Ethereum split into ETH and ETC after hard-forking to address TheDAO hack, largely because there was no prior social contract nor mechanism for making such decisions. Validators and delegators on the Cosmos Hub can vote on proposals that can change preset parameters of the system automatically (such as the block gas limit), coordinate upgrades, as well as vote on amendments to the human-readable constitution that govern the policies of the Cosmos Hub. The constitution allows for cohesion among the stakeholders on issues such as theft and bugs (such as TheDAO incident), allowing for quicker and cleaner resolution. Each zone can also have their own constitution and governance mechanism as well. For example, the Cosmos Hub could have a constitution that enforces immutability at the Hub (no roll-backs, save for bugs of the Cosmos Hub node implementation), while each zone can set their own policies regarding roll-backs. By enabling interoperability among differing policy zones, the Cosmos network gives its users ultimate freedom and potential for permissionless experimentation. Here we describe a novel model of decentralization and scalability. Cosmos is a network of many blockchains powered by Tendermint. While existing proposals aim to create a “single blockchain” with total global transaction ordering, Cosmos permits many blockchains to run concurrently with one another while retaining interoperability. At the basis, the Cosmos Hub manages many independent blockchains called “zones” (sometimes referred to as “shards”, in reference to the database scaling technique known as “sharding”).

A constant stream of recent block commits from zones posted on the Hub allows the Hub to keep up with the state of each zone. Likewise, each zone keeps up with the state of the Hub (but zones do not keep up with each other except indirectly through the Hub). Packets of information are then communicated from one zone to another by posting Merkle-proofs as evidence that the information was sent and received. This mechanism is called inter-blockchain communication, or IBC for short. Any of the zones can themselves be hubs to form an acyclic graph, but for the sake of clarity we will only describe the simple conyguration where there is only one hub, and many non-hub zones. The Cosmos Hub is a blockchain that hosts a multi-asset distributed ledger, where tokens can be held by individual users or by zones themselves. These tokens can be moved from one zone to another in a special IBC packet called a "coin packet". The hub is responsible for preserving the global invariance of the total amount of each token across the zones. IBC coin packet transactions must be committed by the sender, hub, and receiver blockchains.

Cosmos hub and zones architecture showing the Cosmos Hub connecting multiple independent zones via IBC

Since the Cosmos Hub acts as the central ledger for the whole system, the security of the Hub is of paramount importance. While each zone may be a Tendermint blockchain that is secured by as few as 4 (or even less if BFT consensus is not needed), the Hub must be secured by a globally decentralized set of validators that can withstand the most severe attack scenarios, such as a continental network partition or a nation-state sponsored attack. A Cosmos zone is an independent blockchain that exchanges IBC messages with the Hub. From the Hub’s perspective, a zone is a multi-asset dynamic-membership multi-signature account that can send and receive tokens using IBC packets. Like a cryptocurrency account, a zone cannot transfer more tokens than it has, but can receive tokens from others who have them. A zone may be designated as an "source" of one or more token types, granting it the power to inzate that token supply. Atoms of the Cosmos Hub may be staked by validators of a zone connected to the Hub. While double-spend attacks on these zones would result in the slashing of atoms with Tendermint’s forkaccountability, a zone where \(> 2/3\) of the voting power are Byzantine can commit invalid state. The Cosmos Hub does not verify or execute transactions committed on other zones, so it is the responsibility of users to send tokens to zones that they trust. In the future, the Cosmos Hub’s governance system may pass Hub improvement proposals that account for zone failures. For example, outbound token transfers from some (or all) zones may be throttled to allow for the emergency circuit-breaking of zones (a temporary halt of token transfers) when an attack is detected. Now we look at how the Hub and zones communicate with each other. For example, if there are three blockchains, “Zone1”, “Zone2”,

and “Hub”, and we wish for "Zone1" to produce a packet destined for “Zone2” going through “Hub”. To move a packet from one blockchain to another, a proof is posted on the receiving chain. The proof states that the sending chain published a packet for the alleged destination. For the receiving chain to check this proof, it must be able keep up with the sender’s block headers. This mechanism is similar to that used by sidechains, which requires two interacting chains to be aware of one another via a bidirectional stream of proof-of-existence datagrams (transactions). The IBC protocol can naturally be deyned using two types of transactions: an  IBCBlockCommitTx  transaction, which allows a blockchain to prove to any observer of its most recent block-hash, and an  IBCPacketTx  transaction, which allows a blockchain to prove to any observer that the given packet was indeed published by the sender’s application, via a Merkle-proof to the recent block-hash. By splitting the IBC mechanics into two separate transactions, we allow the native fee market-mechanism of the receiving chain to determine which packets get committed (i.e. acknowledged), while allowing for complete freedom on the sending chain as to how many outbound packets are allowed. In the example above, in order to update the block-hash of "Zone1" on “Hub” (or of “Hub” on “Zone2”), an  IBCBlockCommitTx

transaction must be posted on “Hub” with the block-hash of “Zone1” (or on "Zone2" with the block-hash of “Hub”). See IBCBlockCommitTx and IBCPacketTx for for more information on the two IBC transaction types. In the same way that Bitcoin is more secure by being a distributed, mass-replicated ledger, we can make exchanges less vulnerable to external and internal hacks by running it on the blockchain. We call this a distributed exchange. What the cryptocurrency community calls a decentralized exchange today are based on something called “atomic crosschain” (AXC) transactions. With an AXC transaction, two users on two different chains can make two transfer transactions that are committed together on both ledgers, or none at all (i.e. atomically). For example, two users can trade bitcoins for ether (or any two tokens on two different ledgers) using AXC transactions, even though Bitcoin and Ethereum are not connected to each other. The beneyt of running an exchange on AXC transactions is that neither users need to trust each other or the trade-matching service. The downside is that both parties need to be online for the trade to occur. Another type of decentralized exchange is a mass-replicated distributed exchange that runs on its own blockchain. Users on this kind of exchange can submit a limit order and turn their computer off, and the trade can execute without the user being online. The blockchain matches and completes the trade on behalf of the trader.

Cosmos 架构

Cosmos 是一个独立并行 blockchain 的网络,它们是 每个都由经典的 BFT 共识算法提供支持,例如 嫩薄荷 1. 该网络中的第一个 blockchain 将是 Cosmos 中心。的 Cosmos 集线器通过一个连接到许多其他 blockchain(或区域) 新颖的blockchain间通信协议。 Cosmos 中心 跟踪众多 token 类型并记录总数 每个连接区域中的 token 数量。代币可以是 安全、快速地从一个区域转移到另一个区域 无需在区域之间进行液体交换,因为所有 区域间硬币转账通过 Cosmos 中心。 该架构解决了 blockchain 空间的许多问题 今天面临的问题,例如应用程序互操作性、可扩展性和 无缝升级能力。例如,从 Bitcoind 派生的区域, Go-Ethereum、CryptoNote、ZCash 或任何 blockchain 系统都可以 插入 Cosmos 集线器。这些区域允许 Cosmos 无限扩展以满足全球交易需求。区域还有 对于分布式交换来说,这是一个很棒的 yt,它将得到以下支持: 好吧。 Cosmos 不仅仅是一个分布式账本,而且 Cosmos Hub 不是一个有围墙的花园,也不是宇宙的中心。我们是 为分布式账本的开放网络设计协议 可以作为未来金融系统的新基础, 基于密码学原理、健全的经济学、共识 理论、透明度和问责制。 Cosmos 中心是 Cosmos 中的第一个公共 blockchain 网络,由 Tendermint 的 BFT 共识算法提供支持。的 Tendermint 开源项目诞生于 2014 年,旨在解决 Bitcoin 的工作量证明共识算法的速度、可扩展性和环境问题。通过使用和改进经过验证的

BFT 于 1988 年在 MIT 开发的算法 [20],Tendermint 团队是第一个概念性地演示 proof-of-stake 解决无利害关系问题的加密货币 遭受第一代 proof-of-stake 加密货币的困扰,例如 如 NXT 和 BitShares1.0。 如今,几乎所有 Bitcoin 移动钱包都使用可信服务器来 为他们提供交易验证。这是因为工作量证明需要在执行之前等待许多确认。 事务可以被视为不可逆转地提交。双花攻击已经在诸如 币库。 与其他 blockchain 共识系统不同,Tendermint 提供 即时且可证明安全的移动客户端支付验证。 由于 Tendermint 被设计为根本不会分叉,因此移动 钱包可以接收即时交易确认,这使得 无需信任且实用的支付在智能手机上成为现实。这个 对物联网应用具有重大影响,如 好吧。 Cosmos 中的验证者与 Bitcoin 矿工具有类似的角色,但是 而是使用加密签名进行投票。验证器是 负责提交的安全、专用机器 块。非 validator 可以委托其 staking token(称为 “atoms”)到任何 validator 以赚取部分区块费用和atom 奖励,但如果 委托 validator 被黑客攻击或违反协议。经证实的 Tendermint BFT 共识的安全保证以及抵押品 利益相关者的押金 –validators 和委托人 – 提供 节点和轻客户端的可证明、可量化的安全性。 分布式公共账本应该有一个章程和一个 治理体系。 Bitcoin 依赖于 Bitcoin 基金会并且挖矿来协调升级,但这是一个缓慢的过程。 Ethereum 硬分叉后分裂为 ETH 和 ETC 以解决 DAO 黑客攻击,很大程度上是因为没有事先的社会契约 也没有做出此类决定的机制。 Cosmos Hub 上的验证者和委托者可以投票 可以更改系统预设参数的建议 自动(例如区块gas limit),坐标升级,如 并对人类可读的宪法修正案进行投票 管理 Cosmos 中心的政策。宪法 允许利益相关者在以下问题上保持凝聚力: 盗窃和错误(例如TheDAO事件),允许更快和 更清晰的分辨率。 每个区域也可以有自己的宪法和治理 机制也是如此。例如,Cosmos 集线器可能有一个 强制中心不变性的宪法(无回滚, 保存 Cosmos Hub 节点实现的错误),同时 每个区域都可以设置自己的回滚策略。 通过实现不同政策区域之间的互操作性, Cosmos 网络为其用户提供最终的自由和潜力 未经许可的实验。 在这里,我们描述了一种去中心化和可扩展性的新颖模型。 Cosmos 是一个由许多 blockchain 组成的网络,由 嫩薄荷。虽然现有提案旨在创建“单一 blockchain”,全局交易排序总额为 Cosmos 允许许多 blockchain 彼此同时运行 同时保留互操作性。 在此基础上,Cosmos Hub 管理着许多独立的 blockchain 称为“区域”(有时称为“分片”,在 参考称为“分片”的数据库扩展技术)。

来自发布的区域的最近块提交的持续流 Hub 允许 Hub 跟上每个区域的状态。 同样,每个区域都与集线器的状态保持同步(但区域 除非间接通过 枢纽)。然后,信息包从一个 通过发布默克尔证明作为证据,将区域转移到另一个区域 信息已发送和接收。这种机制被称为 blockchain 间通信,简称 IBC。 任何区域本身都可以成为形成非循环图的中心, 但为了清楚起见,我们只描述简单的 只有一个集线器和许多非集线器的配置 区。 Cosmos 中心是托管多资产的 blockchain 分布式账本,其中 token 可以由个人用户持有或 由区域本身。这些 token 可以从一个区域移动 到另一个特殊的 IBC 数据包中,称为“硬币数据包”。枢纽是 负责保持总的全局不变性 跨区域的每个 token 的数量。 IBC 硬币包 交易必须由发送者、集线器和接收者提交 blockchains。由于 Cosmos Hub 充当整个系统的中央分类账 系统中,Hub 的安全至关重要。同时 每个区域都可以是 Tendermint blockchain,由 as 保护 少至 4 个(如果不需要 BFT 共识,甚至更少),Hub 必须由一组全球分散的 validator 来保证安全 可以承受最严重的攻击场景,例如 大陆网络分区或民族国家发起的攻击。 Cosmos 区域是一个独立的 blockchain,可交换 IBC 与 Hub 的消息。从 Hub 的角度来看,一个区域就是一个 多资产动态会员多重签名账户 可以使用 IBC 数据包发送和接收 tokens。就像一个 加密货币账户,一个区域不能传输超过 tokens 它有,但可以从拥有它们的其他人那里接收 token。 A区 可以被指定为一种或多种 token 类型的“源”, 授予其启动 token 电源的权力。 Cosmos 中心的原子可以由区域的 validator 质押 连接到集线器。虽然对这些区域进行双花攻击 将导致 Tendermint 的 forkaccountability 中的原子被削减,在该区域中,>⅔ 的投票权是 拜占庭可以提交无效状态。 Cosmos 集线器不 验证或执行在其他区域提交的交易,因此 用户有责任将 token 发送到他们信任的区域。 未来Cosmos Hub的治理体系可能会通过Hub 解决区域故障的改进建议。对于 例如,从某些(或所有)区域出站 token 传输可能会 被限制以允许区域紧急断路 (暂时停止 token 传输)当检测到攻击时。 现在我们看看中心和区域如何相互通信 其他。例如,如果有三个blockchain,“Zone1”,“Zone2”,

Cosmos hub and zones architecture showing the Cosmos Hub connecting multiple independent zones via IBC

和“Hub”,我们希望“Zone1”生成一个数据包 “Zone2”穿过“Hub”。从一个数据包中移动一个数据包 blockchain 到另一个,一个证明被发布在接收链上。 该证明表明发送链发布了一个数据包 所谓的目的地。为了让接收链检查这个证明,它 必须能够跟上发送者的块头。这个 机制与侧链使用的机制类似,需要 两个相互作用的链通过 存在性数据报的双向流 (交易)。 IBC 协议自然可以使用两种类型来定义 交易:一个 IBCBlockCommitTx 交易,它允许 blockchain 向任何观察者证明其最新区块-hash, 和一个 IBCPacketTx 交易,它允许 blockchain 向任何观察者证明给定的数据包确实已发布 通过发送者的应用程序,通过对最近的 Merkle 证明 块-hash。 通过将 IBC 机制拆分为两个单独的事务,我们 允许接收链的原生费用市场机制 确定哪些数据包被提交(即确认),同时 允许发送链上完全自由地决定如何 允许许多出站数据包。 上例中,为了更新“Zone1”的块-hash 在“Hub”(或“Zone2”上的“Hub”)上,一个 IBCBlockCommitTx交易必须发布在“Hub”上,区块为hash “Zone1”(或在“Zone2”上,具有“Hub”的块hash)。 有关更多信息,请参阅 IBCBlockCommitTx 和 IBCPacketTx 关于两种 IBC 交易类型。 同样,Bitcoin 通过分布式更安全, 大规模复制的账本,我们可以使交易所不易受到 通过在 blockchain 上运行它来进行外部和内部黑客攻击。我们 称之为分布式交换。 加密货币社区所谓的去中心化 今天的交易所基于所谓的“原子跨链”(AXC)交易。通过 AXC 交易,两个用户 两条不同的链可以进行两笔转账交易 在两个分类账上一起承诺,或者根本没有承诺(即 原子地)。例如,两个用户可以用比特币交换以太币(或 两个不同分类账上的任意两个 token)使用 AXC 交易, 即使 Bitcoin 和 Ethereum 没有连接到每个 其他。在 AXC 交易上运行交易所的好处是 用户不需要互相信任或交易匹配 服务。缺点是双方都需要在线 交易发生。 另一种类型的去中心化交易所是大规模复制的 自行运行的分布式交换 blockchain。用户在 这种交易所可以提交限价订单并将其转为 计算机关闭,无需用户操作即可执行交易 在线。 blockchain 代表匹配并完成交易 交易者的。

Applications

Applications

A centralized exchange can create a deep orderbook of limit orders and thereby attract more traders. Liquidity begets more liquidity in the exchange world, and so there is a strong network effect (or at least a winner-take-most effect) in the exchange business. The current leader for cryptocurrency exchanges today is Poloniex with a 24-hour volume of $20M, and in second place is Bitynex with a 24-hour volume of $5M. Given such strong network effects, it is unlikely for AXC-based decentralized exchanges to win volume over the centralized exchanges. For a decentralized exchange to compete with a centralized exchange, it would need to support deep orderbooks with limit orders. Only a distributed exchange on a blockchain can provide that. Tendermint provides additional beneyts of faster transaction commits. By prioritizing fast ynality without sacriycing consistency, zones in Cosmos can ynalize transactions fast – for both exchange order transactions as well as IBC token transfers to and from other zones. Given the state of cryptocurrency exchanges today, a great application for Cosmos is the distributed exchange (aka the Cosmos DEX). The transaction throughput capacity as well as commit latency can be comparable to those of centralized exchanges. Traders can submit limit orders that can be executed without both parties having to be online. And with Tendermint, the Cosmos hub, and IBC, traders can move funds in and out of the exchange to and from other zones with speed. A privileged zone can act as the source of a bridged token of another cryptocurrency. A bridge is similar to the relationship between a Cosmos hub and zone; both must keep up with the latest blocks of the other in order to verify proofs that tokens have moved from one to the other. A "bridge-zone" on the Cosmos network keeps up with the Hub as well as the other

cryptocurrency. The indirection through the bridge-zone allows the logic of the Hub to remain simple and agnostic to other blockchain consensus strategies such as Bitcoin’s proof-of-work mining. Each bridge-zone validator would run a Tendermint-powered blockchain with a special ABCI bridge-app, but also a full-node of the “origin” blockchain. When new blocks are mined on the origin, the bridge-zone validators will come to agreement on committed blocks by signing and sharing their respective local view of the origin’s blockchain tip. When a bridge-zone receives payment on the origin (and sufycient conyrmations were agreed to have been seen in the case of a PoW chain such as Ethereum or Bitcoin), a corresponding account is created on the bridge-zone with that balance. In the case of Ethereum, the bridge-zone can share the same validator-set as the Cosmos Hub. On the Ethereum side (the origin), a bridge-contract would allow ether holders to send ether to the bridge-zone by sending it to the bridge-contract on Ethereum. Once ether is received by the bridge-contract, the ether cannot be withdrawn unless an appropriate IBC packet is received by the bridge-contract from the bridge-zone. The bridge-contract tracks the validator-set of the bridge-zone, which may be identical to the Cosmos Hub’s validator-set. In the case of Bitcoin, the concept is similar except that instead of a single bridge-contract, each UTXO would be controlled by a threshold multisignature P2SH pubscript. Due to the limitations of the P2SH system, the signers cannot be identical to the Cosmos Hub validator-set.

Ether on the bridge-zone (“bridged-ether”) can be transferred to and from the Hub, and later be destroyed with a transaction that sends it to a particular withdrawal address on Ethereum. An IBC packet proving that the transaction occurred on the bridge-zone can be posted to the Ethereum bridge-contract to allow the ether to be withdrawn. In the case of Bitcoin, the restricted scripting system makes it difycult to mirror the IBC coin-transfer mechanism. Each UTXO has its own independent pubscript, so every UTXO must be migrated to a new UTXO when there is a change in the set of Bitcoin escrow signers. One solution is to compress and decompress the UTXO-set as necessary to keep the total number of UTXOs down. The risk of such a bridgeging contract is a rogue validator set. \(\geq 1/3\) Byzantine voting power could cause a fork, withdrawing ether from the bridge-contract on Ethereum while keeping the bridgedether on the bridge-zone. Worse, \(> 2/3\) Byzantine voting power can steal ether outright from those who sent it to the bridge-contract by deviating from the original bridgeging logic of the bridge-zone. It is possible to address these issues by designing the bridge to be totally accountable. For example, all IBC packets, from the hub and the origin, might require acknowledgement by the bridge-zone in such a way that all state transitions of the bridge-zone can be efyciently challenged and veriyed by either the hub or the origin’s bridge-contract. The Hub and the origin should allow the bridgezone validators to post collateral, and token transfers out of the bridge-contract should be delayed (and collateral unbonding period sufyciently long) to allow for any challenges to be made by independent auditors. We leave the design of the speciycation and implementation of this system open as a future Cosmos

improvement proposal, to be passed by the Cosmos Hub’s governance system. Solving the scaling problem is an open issue for Ethereum. Currently, Ethereum nodes process every single transaction and also store all the states. link. Since Tendermint can commit blocks much faster than Ethereum’s proof-of-work, EVM zones powered by Tendermint consensus and operating on bridged-ether can provide higher performance to Ethereum blockchains. Additionally, though the Cosmos Hub and IBC packet mechanics does not allow for arbitrary contract logic execution per se, it can be used to coordinate token movements between Ethereum contracts running on different zones, providing a foundation for token-centric Ethereum scaling via sharding. Cosmos zones run arbitrary application logic, which is deyned at the beginning of the zone’s life and can potentially be updated over time by governance. Such zexibility allows Cosmos zones to act as bridges to other cryptocurrencies such as Ethereum or Bitcoin, and it also permits derivatives of those blockchains, utilizing the same codebase but with a different validator set and initial distribution. This allows many existing cryptocurrency frameworks, such as those of Ethereum, Zerocash, Bitcoin, CryptoNote and so on, to be used with Tendermint Core, which is a higher performance consensus engine, on a common network, opening tremendous opportunity for interoperability across platforms. Furthermore, as a multi-asset blockchain, a single transaction may contain multiple inputs and outputs, where each input can be any token type, enabling Cosmos to serve directly as a platform for decentralized exchange, though orders are assumed

to be matched via other platforms. Alternatively, a zone can serve as a distributed fault-tolerant exchange (with orderbooks), which can be a strict improvement over existing centralized cryptocurrency exchanges which tend to get hacked over time. Zones can also serve as blockchain-backed versions of enterprise and government systems, where pieces of a particular service that are traditionally run by an organization or group of organizations are instead run as a ABCI application on a certain zone, which allows it to inherit the security and interoperability of the public Cosmos network without sacriycing control over the underlying service. Thus, Cosmos may offer the best of both worlds for organizations looking to utilize blockchain technology but who are wary of relinquishing control completely to a distributed third party. Some claim that a major problem with consistency-favouring consensus algorithms like Tendermint is that any network partition which causes there to be no single partition with \(> 2/3\) voting power (e.g. \(\geq 1/3\) going ofzine) will halt consensus altogether. The Cosmos architecture can help mitigate this problem by using a global hub with regional autonomous zones, where voting power for each zone are distributed based on a common geographic region. For instance, a common paradigm may be for individual cities, or regions, to operate their own zones while sharing a common hub (e.g. the Cosmos Hub), enabling municipal activity to persist in the event that the hub halts due to a temporary network partition. Note that this allows real geological, political, and network-topological features to be considered in designing robust federated fault-tolerant systems.

NameCoin was one of the yrst blockchains to attempt to solve the name-resolution problem by adapting the Bitcoin blockchain. Unfortunately there have been several issues with this approach. With Namecoin, we can verify that, for example, @satoshi was registered with a particular public key at some point in the past, but we wouldn’t know whether the public key had since been updated recently unless we download all the blocks since the last update of that name. This is due to the limitation of Bitcoin’s UTXO transaction Merkle-ization model, where only the transactions (but not mutable application state) are Merkle-ized into the block-hash. This lets us prove existence, but not the nonexistence of later updates to a name. Thus, we can’t know for certain the most recent value of a name without trusting a full node, or incurring signiycant costs in bandwidth by downloading the whole blockchain. Even if a Merkle-ized search tree were implemented in NameCoin, its dependency on proof-of-work makes light client veriycation problematic. Light clients must download a complete copy of the headers for all blocks in the entire blockchain (or at least all the headers since the last update to a name). This means that the bandwidth requirements scale linearly with the amount of time [21]. In addition, name-changes on a proof-of-work blockchain requires waiting for additional proof-of-work conyrmation blocks, which can take up to an hour on Bitcoin. With Tendermint, all we need is the most recent block-hash signed by a quorum of validators (by voting power), and a Merkle proof to the current value associated with the name. This makes it possible to have a succinct, quick, and secure light-client veriycation of name values. In Cosmos, we can take this concept and extend it further. Each name-registration zone in Cosmos can have an associated toplevel-domain (TLD) name such as “.com” or “.org”, and each name-

registration zone can have its own governance and registration rules.

应用领域

中心化交易所可以创建深度限价订单簿 订单,从而吸引更多的交易者。流动性产生更多 交易所世界的流动性,因此有强大的网络 交换中的效应(或至少是赢家通吃的效应) 业务。当今加密货币交易所的当前领导者 Poloniex 的 24 小时交易量为 2000 万美元,位居第二的是 Bitynex 24 小时交易量为 500 万美元。鉴于如此强大的网络 影响,基于 AXC 的去中心化交易所不太可能 赢得中心化交易所的交易量。对于去中心化的 交易所要与中心化交易所竞争,需要 支持带有限价订单的深度订单簿。只有一个分布式 blockchain 上的交换可以提供这一点。 Tendermint 提供更快交易的额外好处 承诺。通过优先考虑快速性而不牺牲 一致性,Cosmos 中的区域可以快速分析事务 – 用于 交换订单交易以及 IBC token 转账至 以及来自其他区域的。 鉴于当今加密货币交易所的状况,一个伟大的 Cosmos 的应用程序是分布式交换(又名 Cosmos DEX)。交易吞吐能力以及 提交延迟可以与集中式的延迟相媲美 交流。交易者可以提交可以执行的限价订单 无需双方都在线。和 Tendermint 一起, Cosmos 中心和 IBC,交易者可以将资金转入和转出 与其他区域的快速交换。 特权区域可以充当桥接 token 的源 另一种加密货币。桥梁类似于关系 Cosmos 中心和区域之间;两者都必须跟上 另一个的最新区块,以验证 tokens 拥有的证据 从一个移动到另一个。 Cosmos 上的“桥接区” 网络与集线器以及其他设备保持同步

加密货币。通过桥接区的间接允许 中心的逻辑保持简单并且与其他人无关 blockchain 共识策略,例如 Bitcoin 的 proof-of-work 采矿。 每个桥区 validator 将运行由 Tendermint 驱动的 blockchain 具有特殊的 ABCI 桥接应用程序,而且也是一个全节点 “起源”blockchain。 当在原点开采新区块时,桥接区 validators 将通过签名就承诺区块达成一致 并分享他们各自对原产地 blockchain 的本地看法 小费。当桥接区域在来源处收到付款时(以及 已同意在本案中看到足够的确认 PoW 链(例如 Ethereum 或 Bitcoin),相应的 帐户是在桥接区域上用该余额创建的。 在 Ethereum 的情况下,桥接区域可以共享相同的 validator-设置为 Cosmos 集线器。在 Ethereum 一侧( 起源),桥接合约将允许以太币持有者发送以太币 通过将其发送到桥接合约来发送到桥接区 Ethereum。一旦桥接合约收到以太币, 除非有适当的 IBC 数据包,否则无法提取以太币 由桥接合同从桥接区接收。的 桥接合约跟踪桥接区域的 validator 集,其中 可能与 Cosmos 集线器的 validator 集相同。 在 Bitcoin 的情况下,概念类似,只不过不是 一个桥梁合约,每个 UTXO 将由 阈值多重签名 P2SH pubscript。由于限制 P2SH 系统中,签名者不能与 Cosmos 相同 轮毂 validator-套。桥接区域上的以太币(“桥接以太币”)可以转移到 并从中心,然后通过交易销毁 将其发送到 Ethereum 上的特定提款地址。 IBC 证明事务发生在桥接区域的数据包 可以发布到 Ethereum 桥接合约以允许以太币 被撤回。 在 Bitcoin 的情况下,受限脚本系统使其 很难反映 IBC 硬币转移机制。每个 UTXO 有自己独立的pubscript,因此每个 UTXO 必须是 当集合发生变化时迁移到新的 UTXO Bitcoin 托管签名者。一种解决方案是压缩并 根据需要解压 UTXO-set 以保留总数 UTXO 秒下降。 这种桥接合约的风险是流氓 validator 集。 ≥⅓ 拜占庭投票权可能会导致分叉,提取以太币 来自 Ethereum 的桥接合约,同时将桥接以太币保持在桥接区域。更糟糕的是,>⅔ 拜占庭投票权可以 从发送到桥接合约的人那里直接窃取以太币 偏离了桥接区的原始桥接逻辑。 可以通过设计桥梁来解决这些问题 完全负责。例如,来自集线器的所有 IBC 数据包和 起源,可能需要桥接区的确认 这样桥区的所有状态转换都可以 受到枢纽或始发地的有效挑战和验证 过桥合同。中心和来源应允许桥区 validators 发布抵押品,并且 token 转出 过渡合同应该被推迟(并且抵押品解绑 足够长的时间)以允许提出任何挑战 独立审计师。我们留下规格的设计和 该系统的实施作为未来开放 Cosmos

改进提案,由 Cosmos 中心通过 治理体系。 解决缩放问题是 Ethereum 的一个悬而未决的问题。 目前,Ethereum 节点处理每笔交易并 还存储所有状态。关联。 由于 Tendermint 提交区块的速度比 Ethereum 快得多 proof-of-work、EVM 由 Tendermint 共识支持的区域和 在桥接以太网上运行可以提供更高的性能 Ethereum blockchains。此外,虽然 Cosmos 集线器和 IBC 数据包机制不允许任意合约逻辑 执行本身,它可用于协调 token 运动 在不同区域运行的 Ethereum 合约之间, 为以 token 为中心的 Ethereum 扩展提供基础 分片。 Cosmos 区域运行任意应用程序逻辑,其定义为 该区域生命的开始,并且有可能更新 随着时间的推移,通过治理。这种灵活性允许 Cosmos 区域 充当其他加密货币的桥梁,例如 Ethereum 或 Bitcoin,并且它还允许这些 blockchain 的衍生物, 使用相同的代码库但具有不同的 validator 集并且 初始分布。这使得许多现有的加密货币 框架,例如 Ethereum、Zerocash、Bitcoin 的框架, CryptoNote 等,与 Tendermint Core 一起使用, 在公共网络上更高性能的共识引擎, 为跨领域的互操作性提供了巨大的机会 平台。此外,作为多资产 blockchain,单一资产 交易可能包含多个输入和输出,其中每个 输入可以是任何 token 类型,使 Cosmos 能够直接用作 去中心化交易平台,但假设有订单通过其他平台进行匹配。或者,区域可以服务 作为分布式容错交易所(带有订单簿), 可以是对现有集中式的严格改进 随着时间的推移,加密货币交易所往往会遭到黑客攻击。 区域还可以用作 blockchain 支持的企业版本 和政府系统,其中特定服务的各个部分 传统上由一个组织或一组组织运营 相反,它们作为 ABCI 应用程序在某个区域上运行, 让它继承大众的安全性和互操作性 Cosmos 网络而不牺牲对底层的控制 服务。因此,Cosmos 可能会提供两全其美的方案: 希望利用 blockchain 技术但谁是的组织 警惕将控制权完全交给分布式第三方 聚会。 一些人声称,有利于一致性的一个主要问题是 像 Tendermint 这样的共识算法是任何网络 分区导致不存在 >⅔ 的单个分区 投票权(例如≥⅓)将完全停止共识。 Cosmos 架构可以通过使用来帮助缓解这个问题 拥有区域自治区的全球中心,拥有投票权 每个区域都根据共同的地理分布 地区。例如,一个共同的范式可能适用于个人 城市或地区在共享资源的同时运营自己的区域 公共中心(例如 Cosmos 中心),使市政活动能够 在集线器由于临时网络而停止的情况下继续存在 分区。请注意,这允许真实的地质、政治和 设计鲁棒性时要考虑的网络拓扑特征 联合容错系统。

NameCoin 是第一个尝试解决这个问题的 blockchain 之一 通过调整 Bitcoin blockchain 来解决名称解析问题。 不幸的是,这种方法存在几个问题。 通过 Namecoin,我们可以验证,例如,@satoshi 是 在过去的某个时刻使用特定的公钥注册, 但我们不知道公钥是否已经被 最近更新,除非我们下载自上次以来的所有块 该名称的更新。这是由于 Bitcoin 的限制 UTXO 交易默克尔化模型,其中只有 交易(但不是可变的应用程序状态)是 Merkle 化的 进入块-hash。这让我们可以证明名称的存在,但不能证明名称的后续更新不存在。因此,我们无法得知 确定名称的最新值而不信任完整的 节点,或者通过下载产生大量带宽成本 整个blockchain。 即使在 NameCoin 中实现了 Merkle 化的搜索树, 它对 proof-of-work 的依赖使得轻客户端验证 有问题的。轻客户端必须下载完整的副本 整个 blockchain 中所有块的标头(或者至少是所有 自上次更新名称以来的标题)。这意味着 带宽需求随时间量线性变化 [21]。此外,proof-of-work blockchain 上的名称更改 需要等待额外的 proof-of-work 确认块, Bitcoin 上最多可能需要一个小时。 对于 Tendermint,我们只需要最新的区块 -hash 由 validator 的法定人数(通过投票权)和 Merkle 签署 证明与该名称关联的当前值。这使得 可以拥有一个简洁、快速、安全的轻客户端 名称值的验证。 在Cosmos中,我们可以采用这个概念并进一步扩展它。每个 Cosmos 中的名称注册区域可以有一个关联的顶级域 (TLD) 名称,例如“.com”或“.org”,并且每个名称-

注册区可以有自己的治理和注册 规则。

Governance and Economics

Governance and Economics

While the Cosmos Hub is a multi-asset distributed ledger, there is a special native token called the atom. Atoms are the only staking token of the Cosmos Hub. Atoms are a license for the holder to vote, validate, or delegate to other validators. Like Ethereum’s ether, atoms can also be used to pay for transaction fees to mitigate spam. Additional inzationary atoms and block transaction fees are rewarded to validators and delegators who delegate to validators. The  BurnAtomTx  transaction can be used to recover any proportionate amount of tokens from the reserve pool. The initial distribution of atom tokens and validators on Genesis will go to the donors of the Cosmos Fundraiser (75%), lead donors (5%), Cosmos Network Foundation (10%), and ALL IN BITS, Inc (10%). From genesis onward, 1/3 of the total amount of atoms will be rewarded to bonded validators and delegators every year. See the Cosmos Plan for additional details. Unlike Bitcoin or other proof-of-work blockchains, a Tendermint blockchain gets slower with more validators due to the increased communication complexity. Fortunately, we can support enough validators to make for a robust globally distributed blockchain with very fast transaction conyrmation times, and, as bandwidth,

storage, and parallel compute capacity increases, we will be able to support more validators in the future. On genesis day, the maximum number of validators will be set to 100, and this number will increase at a rate of 13% for 10 years, and settle at 300 validators. Atom holders who are not already can become validators by signing and submitting a  BondTx  transaction. The amount of atoms provided as collateral must be nonzero. Anyone can become a validator at any time, except when the size of the current validator set is greater than the maximum number of validators allowed. In that case, the transaction is only valid if the amount of atoms is greater than the amount of effective atoms held by the smallest validator, where effective atoms include delegated atoms. When a new validator replaces an existing validator in such a way, the existing validator becomes inactive and all the atoms and delegated atoms enter the unbonding state. There must be some penalty imposed on the validators for any intentional or unintentional deviation from the sanctioned protocol. Some evidence is immediately admissible, such as a double-sign at the same height and round, or a violation of Year 0: 100  Year 1: 113  Year 2: 127  Year 3: 144  Year 4: 163  Year 5: 184  Year 6: 208  Year 7: 235  Year 8: 265  Year 9: 300  Year 10: 300  ...

“prevote-the-lock” (a rule of the Tendermint consensus protocol). Such evidence will result in the validator losing its good standing and its bonded atoms as well its proportionate share of tokens in the reserve pool – collectively called its “stake” – will get slashed. Sometimes, validators will not be available, either due to regional network disruptions, power failure, or other reasons. If, at any point in the past  ValidatorTimeoutWindow  blocks, a validator’s commit vote is not included in the blockchain more than  ValidatorTimeoutMaxAbsent  times, that validator will become inactive, and lose  ValidatorTimeoutPenalty  (DEFAULT 1%) of its stake. Some “malicious” behavior does not produce obviously discernable evidence on the blockchain. In these cases, the validators can coordinate out of band to force the timeout of these malicious validators, if there is a supermajority consensus. In situations where the Cosmos Hub halts due to a \(\geq 1/3\) coalition of voting power going ofzine, or in situations where a \(\geq 1/3\) coalition of voting power censor evidence of malicious behavior from entering the blockchain, the hub must recover with a hard-fork reorg-proposal. (Link to “Forks and Censorship Attacks”). Cosmos Hub validators can accept any token type or combination of types as fees for processing a transaction. Each validator can subjectively set whatever exchange rate it wants, and choose whatever transactions it wants, as long as the  BlockGasLimit  is not exceeded. The collected fees, minus any taxes speciyed below, are redistributed to the bonded stakeholders in proportion to their bonded atoms, every  ValidatorPayoutPeriod  (DEFAULT 1 hour).

Of the collected transaction fees,  ReserveTax  (DEFAULT 2%) will go toward the reserve pool to increase the reserve pool and increase the security and value of the Cosmos network. These funds can also be distributed in accordance with the decisions made by the governance system. Atom holders who delegate their voting power to other validators pay a commission to the delegated validator. The commission can be set by each validator. The security of the Cosmos Hub is a function of the security of the underlying validators and the choice of delegation by delegators. In order to encourage the discovery and early reporting of found vulnerabilities, the Cosmos Hub encourages hackers to publish successful exploits via a  ReportHackTx  transaction that says, “This validator got hacked. Please send bounty to this address”. Upon such an exploit, the validator and delegators will become inactive,  HackPunishmentRatio  (default 5%) of everyone’s atoms will get slashed, and  HackRewardRatio  (default 5%) of everyone’s atoms will get rewarded to the hacker’s bounty address. The validator must recover the remaining atoms by using their backup key. In order to prevent this feature from being abused to transfer unvested atoms, the portion of vested vs unvested atoms of validators and delegators before and after the  ReportHackTx  will remain the same, and the hacker bounty will include some unvested atoms, if any. The Cosmos Hub is operated by a distributed organization that requires a well-deyned governance mechanism in order to coordinate various changes to the blockchain, such as the variable

parameters of the system, as well as software upgrades and constitutional amendments. All validators are responsible for voting on all proposals. Failing to vote on a proposal in a timely manner will result in the validator being deactivated automatically for a period of time called the  AbsenteeismPenaltyPeriod  (DEFAULT 1 week). Delegators automatically inherit the vote of the delegated validator. This vote may be overridden manually. Unbonded atoms get no vote. Each proposal requires a deposit of  MinimumProposalDeposit  tokens, which may be a combination of one or more tokens including atoms. For each proposal, the voters may vote to take the deposit. If more than half of the voters choose to take the deposit (e.g. because the proposal was spam), the deposit goes to the reserve pool, except any atoms which are burned. For each proposal, voters may vote with the following options: Yea YeaWithForce Nay NayWithForce Abstain A strict majority of Yea or YeaWithForce votes (or Nay or NayWithForce votes) is required for the proposal to be decided as passed (or decided as failed), but 1/3+ can veto the majority decision by voting “with force”. When a strict majority is vetoed, everyone gets punished by losing  VetoPenaltyFeeBlocks  (DEFAULT 1 day’s worth of blocks) worth of fees (except taxes which will not be affected), and the party that vetoed the majority

decision will be additionally punished by losing  VetoPenaltyAtoms  (DEFAULT 0.1%) of its atoms. Any of the parameters deyned here can be changed with the passing of a  ParameterChangeProposal . Atoms can be inzated and reserve pool funds spent with the passing of a  BountyProposal . All other proposals, such as a proposal to upgrade the protocol, will be coordinated via the generic  TextProposal . See the Plan. There have been many innovations in blockchain consensus and scalability in the past couple of years. This section provides a brief survey of a select number of important ones. Consensus in the presence of malicious participants is a problem dating back to the early 1980s, when Leslie Lamport coined the phrase “Byzantine fault” to refer to arbitrary process behavior that deviates from the intended behavior, in contrast to a “crash fault”, wherein a process simply crashes. Early solutions were discovered for synchronous networks where there is an upper bound on

message latency, though practical use was limited to highly controlled environments such as airplane controllers and datacenters synchronized via atomic clocks. It was not until the late 90s that Practical Byzantine Fault Tolerance (PBFT) [11] was introduced as an efycient partially synchronous consensus algorithm able to tolerate up to ⅓ of processes behaving arbitrarily. PBFT became the standard algorithm, spawning many variations, including most recently one created by IBM as part of their contribution to Hyperledger. The main beneyt of Tendermint consensus over PBFT is that Tendermint has an improved and simpliyed underlying structure, some of which is a result of embracing the blockchain paradigm. Tendermint blocks must commit in order, which obviates the complexity and communication overhead associated with PBFT’s view-changes. In Cosmos and many cryptocurrencies, there is no need to allow for block N+i where i >= 1 to commit, when block N itself hasn’t yet committed. If bandwidth is the reason why block N hasn’t committed in a Cosmos zone, then it doesn’t help to use bandwidth sharing votes for blocks N+i. If a network partition or ofzine nodes is the reason why block N hasn’t committed, then N+i won’t commit anyway. In addition, the batching of transactions into blocks allows for regular Merkle-hashing of the application state, rather than periodic digests as with PBFT’s checkpointing scheme. This allows for faster provable transaction commits for light-clients and faster inter-blockchain communication. Tendermint Core also includes many optimizations and features that go above and beyond what is speciyed in PBFT. For example, the blocks proposed by validators are split into parts, Merkle-ized, and gossipped in such a way that improves broadcasting performance (see LibSwift [19] for inspiration). Also, Tendermint Core doesn’t make any assumption about point-to-point

connectivity, and functions for as long as the P2P network is weakly connected. While not the yrst to deploy proof-of-stake (PoS), BitShares1.0 [12] contributed considerably to research and adoption of PoS blockchains, particularly those known as “delegated” PoS. In BitShares, stake holders elect "witnesses", responsible for ordering and committing transactions, and "delegates", responsible for coordinating software updates and parameter changes. BitShares2.0 aims to achieve high performance (100k tx/s, 1s latency) in ideal conditions, with each block signed by a single signer, and transaction ynality taking quite a bit longer than the block interval. A canonical speciycation is still in development. Stakeholders can remove or replace misbehaving witnesses on a daily basis, but there is no signiycant collateral of witnesses or delegators in the likeness of Tendermint PoS that get slashed in the case of a successful double-spend attack. Building on an approach pioneered by Ripple, Stellar [13] reyned a model of Federated Byzantine Agreement wherein the processes participating in consensus do not constitute a yxed and globally known set. Rather, each process node curates one or more “quorum slices”, each constituting a set of trusted processes. A “quorum” in Stellar is deyned to be a set of nodes that contain at least one quorum slice for each node in the set, such that agreement can be reached. The security of the Stellar mechanism relies on the assumption that the intersection of any two quorums is non-empty, while the availability of a node requires at least one of its quorum slices to consist entirely of correct nodes, creating a trade-off between using large or small quorum-slices that may be difycult to balance without imposing signiycant assumptions about trust. Ultimately,

nodes must somehow choose adequate quorum slices for there to be sufycient fault-tolerance (or any “intact nodes” at all, of which much of the results of the paper depend on), and the only provided strategy for ensuring such a conyguration is hierarchical and similar to the Border Gateway Protocol (BGP), used by toptier ISPs on the internet to establish global routing tables, and by that used by browsers to manage TLS certiycates; both notorious for their insecurity. The criticism in the Stellar paper of the Tendermint-based proofof-stake systems is mitigated by the token strategy described here, wherein a new type of token called the atom is issued that represent claims to future portions of fees and rewards. The advantage of Tendermint-based proof-of-stake, then, is its relative simplicity, while still providing sufycient and provable security guarantees. BitcoinNG is a proposed improvement to Bitcoin that would allow for forms of vertical scalability, such as increasing the block size, without the negative economic consequences typically associated with such a change, such as the disproportionately large impact on small miners. This improvement is achieved by separating leader election from transaction broadcast: leaders are yrst elected by proof-of-work in “micro-blocks”, and then able to broadcast transactions to be committed until a new micro-block is found. This reduces the bandwidth requirements necessary to win the PoW race, allowing small miners to more fairly compete, and allowing transactions to be committed more regularly by the last miner to ynd a micro-block. Casper [16] is a proposed proof-of-stake consensus algorithm for Ethereum. Its prime mode of operation is “consensus-by-bet”. By letting validators iteratively bet on which block they believe will

become committed into the blockchain based on the other bets that they have seen so far, ynality can be achieved eventually. link. This is an active area of research by the Casper team. The challenge is in constructing a betting mechanism that can be proven to be an evolutionarily stable strategy. The main beneyt of Casper as compared to Tendermint may be in offering “availability over consistency” – consensus does not require a \(> 2/3\) quorum of voting power – perhaps at the cost of commit speed or implementation complexity. The Interledger Protocol [14] is not strictly a scalability solution. It provides an ad hoc interoperation between different ledger systems through a loosely coupled bilateral relationship network. Like the Lightning Network, the purpose of ILP is to facilitate payments, but it speciycally focuses on payments across disparate ledger types, and extends the atomic transaction mechanism to include not only hash-locks, but also a quorum of notaries (called the Atomic Transport Protocol). The latter mechanism for enforcing atomicity in inter-ledger transactions is similar to Tendermint’s light-client SPV mechanism, so an illustration of the distinction between ILP and Cosmos/IBC is warranted, and provided below. 1. The notaries of a connector in ILP do not support membership changes, and do not allow for zexible weighting between notaries. On the other hand, IBC is designed speciycally for blockchains, where validators can have different weights, and where membership can change over the course of the blockchain. 2. As in the Lightning Network, the receiver of payment in ILP must be online to send a conyrmation back to the sender. In a

token transfer over IBC, the validator-set of the receiver’s blockchain is responsible for providing conyrmation, not the receiving user. 3. The most striking difference is that ILP’s connectors are not responsible or keeping authoritative state about payments, whereas in Cosmos, the validators of a hub are the authority of the state of IBC token transfers as well as the authority of the amount of tokens held by each zone (but not the amount of tokens held by each account within a zone). This is the fundamental innovation that allows for secure asymmetric transfer of tokens from zone to zone; the analog to ILP’s connector in Cosmos is a persistent and maximally secure blockchain ledger, the Cosmos Hub. 4. The inter-ledger payments in ILP need to be backed by an exchange orderbook, as there is no asymmetric transfer of coins from one ledger to another, only the transfer of value or market equivalents. Sidechains [15] are a proposed mechanism for scaling the Bitcoin network via alternative blockchains that are “two-way pegged” to the Bitcoin blockchain. (Two-way pegging is equivalent to bridging. In Cosmos we say "bridging" to distinguish from marketpegging). Sidechains allow bitcoins to effectively move from the Bitcoin blockchain to the sidechain and back, and allow for experimentation in new features on the sidechain. As in the Cosmos Hub, the sidechain and Bitcoin serve as light-clients of each other, using SPV proofs to determine when coins should be transferred to the sidechain and back. Of course, since Bitcoin uses proof-of-work, sidechains centered around Bitcoin suffer from the many problems and risks of proof-of-work as a consensus mechanism. Furthermore, this is a Bitcoin-maximalist solution that doesn’t natively support a variety of tokens and

inter-zone network topology as Cosmos does. That said, the core mechanism of the two-way peg is in principle the same as that employed by the Cosmos network. Ethereum is currently researching a number of different strategies to shard the state of the Ethereum blockchain to address scalability needs. These efforts have the goal of maintaining the abstraction layer offered by the current Ethereum Virtual Machine across the shared state space. Multiple research efforts are underway at this time. [18][22] Cosmos and Ethereum 2.0 Mauve [22] have different design goals. Cosmos is speciycally about tokens. Mauve is about scaling general computation. Cosmos is not bound to the EVM, so even different VMs can interoperate. Cosmos lets the zone creator determine who validates the zone. Anyone can start a new zone in Cosmos (unless governance decides otherwise). The hub isolates zone failures so global token invariants are preserved. The Lightning Network is a proposed token transfer network operating at a layer above the Bitcoin blockchain (and other public blockchains), enabling improvement of many orders of magnitude in transaction throughput by moving the majority of transactions outside of the consensus ledger into so-called “payment channels”.

This is made possible by on-chain cryptocurrency scripts, which enable parties to enter into bilateral stateful contracts where the state can be updated by sharing digital signatures, and contracts can be closed by ynally publishing evidence onto the blockchain, a mechanism yrst popularized by cross-chain atomic swaps. By opening payment channels with many parties, participants in the Lightning Network can become focal points for routing the payments of others, leading to a fully connected payment channel network, at the cost of capital being tied up on payment channels. While the Lightning Network can also easily extend across multiple independent blockchains to allow for the transfer of value via an exchange market, it cannot be used to asymmetrically transfer tokens from one blockchain to another. The main beneyt of the Cosmos network described here is to enable such direct token transfers. That said, we expect payment channels and the Lightning Network to become widely adopted along with our token transfer mechanism, for cost-saving and privacy reasons. Segregated Witness is a Bitcoin improvement proposal link that aims to increase the per-block transaction throughput 2X or 3X, while simultaneously making block syncing faster for new nodes. The brilliance of this solution is in how it works within the limitations of Bitcoin’s current protocol and allows for a soft-fork upgrade (i.e. clients with older versions of the software will continue to function after the upgrade). Tendermint, being a new protocol, has no design restrictions, so it has a different scaling priorities. Primarily, Tendermint uses a BFT round-robin algorithm based on cryptographic signatures instead of mining, which trivially allows horizontal scaling through multiple parallel blockchains, while regular, more frequent block commits allow for vertical scaling as well.

治理与经济

虽然 Cosmos Hub 是一个多资产分布式账本,但 一个特殊的原生 token 称为原子。原子是唯一的 staking Cosmos 中心的 token。原子是持有者的许可证 投票、验证或委托给其他 validator。就像 Ethereum 的 以太,原子也可以用来支付交易费用 减少垃圾邮件。额外的信息原子和区块交易 费用奖励给 validator 和委托给的委托人 validators。 BurnAtomTx 交易可用于恢复任何 从储备池中按比例分配 token。 Genesis 上原子 tokens 和 validators 的初始分布 将捐给 Cosmos 筹款活动的捐助者 (75%),主要捐助者 (5%)、Cosmos 网络基金会 (10%) 和 ALL IN BITS, Inc (10%)。从创世开始,原子总数的 1/3 将 每年都会奖励给绑定的 validator 和委托人。 有关更多详细信息,请参阅 Cosmos 计划。 与 Bitcoin 或其他 proof-of-work blockchain 不同,Tendermint 由于 validator 的数量增加,blockchain 会变慢 通信复杂性。幸运的是,我们可以支持足够多的人 validators 打造强大的全球分布式 blockchain 具有非常快的交易确认时间和带宽,

存储和并行计算能力的增加,我们将能够 将来支持更多 validator。 在创世日,validator 的最大数量将设置为 100,并且这个数字将在10年内以13%的速度增长,并且 稳定在 300 validators。 尚未成为 validators 的 Atom 持有者可以通过以下方式成为 validators: 签署并提交 BondTx 交易。金额 作为抵押品提供的原子必须非零。任何人都可以成为 a validator 在任何时候,除非当前的大小 validator 设置大于 validator 的最大数量 允许。在这种情况下,交易仅在金额达到 原子数大于所持有的有效原子数 最小的 validator,其中有效原子包括委托原子。 当新的 validator 以这种方式替换现有的 validator 时, 现有的 validator 变得不活跃,所有原子和 委托原子进入脱键状态。 必须对 validator 处以任何处罚 有意或无意偏离制裁规定 协议。有些证据可以立即采纳,例如 在相同的高度和轮次处进行双重签名,或者违反 第 0 年:100  第一年:113  第二年:127  第三年:144  第四年:163  5 年:184  第六年:208  7 年:235  8 年:265  9 年:300  10 年:300  ...

“prevote-the-lock”(Tendermint 共识协议的规则)。 此类证据将导致 validator 失去良好信誉 及其键合原子以及 tokens 的比例份额 储备池——统称为“股份”——将被削减。 有时,由于区域原因,validators 将不可用 网络中断、电源故障或其他原因。如果,在任何 在过去的 ValidatorTimeoutWindow 块中,validator 的点 提交投票未包含在 blockchain 中超过  ValidatorTimeoutMaxAbsent 次,validator 将变为 不活动,并失去其 ValidatorTimeoutPenalty(默认 1%) 股份。 一些“恶意”行为不会产生明显可辨别的结果 blockchain 上的证据。在这些情况下,validator 可以 带外协调以强制这些恶意软件超时 validators,如果达成绝大多数共识。 在 Cosmos 集线器因 ≥⅓ 联盟而停止的情况下 投票权消失,或者在 ≥⅓ 联盟的情况下 投票权审查的恶意行为证据 进入blockchain,集线器必须通过硬分叉恢复 重组提案。 (链接至“分叉和审查攻击”)。 Cosmos 集线器 validators 可接受任何 token 类型或组合 作为处理交易的费用的类型。每个 validator 可以 主观设定想要的汇率,然后选择 无论它想要什么交易,只要 BlockGasLimit 是 没有超过。收取的费用减去下面指定的任何税费, 按比例重新分配给担保利益相关者 他们的键合原子,每个 ValidatorPayoutPeriod (默认 1 小时)。在收取的交易费用中,保留税(默认 2%)将 前往储备池增加储备池并 提高 Cosmos 网络的安全性和价值。这些 资金也可以根据决定进行分配 由治理体系制定。 将投票权委托给其他 validator 的 Atom 持有者 向受委托人 validator 支付佣金。委员会可以 由每个 validator 设置。 Cosmos 集线器的安全性取决于 底层 validator 以及委托人的委托选择。 为了鼓励发现并及早报告所发现的 漏洞,Cosmos 中心鼓励黑客发布 通过 ReportHackTx 交易成功利用该交易,该交易表示:“这 validator 被黑了。请将赏金发送至此地址”。之上 这样的漏洞,validator 和委托人将变得不活跃,  每个人的原子都会受到 HackPunishmentRatio(默认 5%) 削减,以及每个人原子的 HackRewardRatio(默认 5%) 将获得奖励至黑客的赏金地址。 validator 必须使用其备份密钥恢复剩余的原子。 为了防止该功能被滥用进行转账 未归属原子,已归属原子与未归属原子的部分 ReportHackTx 之前和之后的 validators 和委托人将 保持不变,黑客赏金将包括一些 未归属的原子,如果有的话。 Cosmos 中心由一个分布式组织运营,该组织 需要一个明确的治理机制 协调对 blockchain 的各种更改,例如变量

系统参数,以及软件升级和 宪法修正案。 所有 validator 负责对所有提案进行投票。未能 及时对提案进行投票将产生 validator 自动停用一段时间,称为  缺勤处罚期(默认 1 周)。 委托人自动继承被委托人的投票权 validator。该投票可能会被手动覆盖。未键合的原子 没有投票权。 每个提案都需要缴纳最低提案存款 (MinimumProposalDeposit)  tokens,可以是一个或多个tokens的组合 包括原子。对于每项提案,选民可以投票通过 押金。如果超过半数选民选择投票 存款(例如,因为该提案是垃圾邮件),存款将转到 储备池,除了被燃烧的任何原子。 对于每项提案,选民可以对以下选项进行投票: 是啊 力挺 不 强行反对 弃权 绝对多数赞成票或 YeaWithForce 票(或反对票或反对票) NayWithForce 投票)需要提案被决定为 通过(或判定失败),但 1/3+ 可以否决多数 通过“强力”投票做出决定。当绝对多数被否决时, 每个人都会因失去 VetoPenaltyFeeBlocks 而受到惩罚  (默认 1 天的区块)价值的费用(税费除外) 不会受到影响),以及否决多数票的一方

决定将受到失去 VetoPenaltyAtoms 的额外惩罚  (默认 0.1%)其原子。 此处定义的任何参数都可以通过以下命令更改 传递 ParameterChangeProposal。 原子可以被注入,储备池资金可以用在 通过赏金提案。 所有其他提案,例如升级协议的提案, 将通过通用的 TextProposal 进行协调。 参见计划。 blockchain 共识有很多创新, 过去几年的可扩展性。本节提供了一个简短的 对选定的一些重要问题进行的调查。 存在恶意参与者的共识是一个问题 可以追溯到 20 世纪 80 年代初,当时 Leslie Lamport 创造了 短语“拜占庭错误”指的是任意进程行为 与“崩溃故障”相比,偏离了预期的行为, 其中一个进程简单地崩溃了。发现了早期的解决方案 对于有上限的同步网络消息延迟,尽管实际使用仅限于高度 受控环境,例如飞机控制器和 通过原子钟同步的数据中心。直到 90 年代末,实用拜占庭容错 (PBFT) [11] 作为有效的部分同步共识引入 算法能够容忍多达 ⅓ 的进程行为 任意地。 PBFT 成为标准算法,催生了许多 变体,包括 IBM 最近创建的一个变体,作为 他们对超级账本的贡献。 Tendermint 共识对 PBFT 的主要好处是 Tendermint 具有改进和简化的底层结构, 其中一些是采用 blockchain 范式的结果。 Tendermint 区块必须按顺序提交,这可以避免 与 PBFT 相关的复杂性和通信开销 视图更改。在 Cosmos 和许多加密货币中,没有 需要允许块 N+i(其中 i >= 1)提交,当块 N 本身还没有承诺。如果带宽是阻止 N 的原因 尚未在 Cosmos 区域中提交,那么使用它无济于事 N+i 块的带宽共享投票。如果网络分区或 ofzine节点是区块N没有提交的原因,那么 无论如何,N+i 都不会承诺。 此外,将交易分批放入区块允许 应用程序状态的常规 Merkle-hashing,而不是 与 PBFT 的检查点方案一样的定期摘要。这允许 为轻客户端提供更快的可证明事务提交,并且速度更快 blockchain 之间的通信。 Tendermint Core 还包括许多优化和功能 超出 PBFT 中指定的范围。例如, validators 提出的区块被分成几个部分,默克尔化, 并以改善广播的方式传播八卦 性能(请参阅 LibSwift [19] 以获取灵感)。还有,嫩薄荷 Core 不做任何关于点对点的假设

只要 P2P 网络存在,连接性和功能就一直存在 弱连接。 虽然不是第一次部署 proof-of-stake (PoS),但 BitShares1.0 [12] 为 PoS 的研究和采用做出了巨大贡献 blockchains,特别是那些被称为“委托”PoS 的。在 比特股,利益相关者选举“见证人”,负责排序 并提交交易,以及“代表”,负责 协调软件更新和参数更改。 BitShares2.0旨在实现高性能(100k tx/s,1s 延迟)在理想条件下,每个块由单个签名 签名者和交易 ynality 花费的时间比 块间隔。规范规范仍在开发中。 利益相关者可以删除或更换行为不端的证人 每日进行,但没有重要的证人或证据 Tendermint PoS 中的委托人被削减 成功的双花攻击的情况。 基于 Ripple 首创的方法,Stellar [13] 雷尼德 联邦拜占庭协议模型,其中的过程 参与共识并不构成yxed和全球性的 已知集。相反,每个流程节点都会策划一个或多个 “仲裁切片”,每个切片构成一组可信进程。一个 Stellar 中的“quorum”被定义为包含以下内容的一组节点: 集合中的每个节点至少有一个仲裁片,这样 可以达成协议。 Stellar 机制的安全性依赖于以下假设 任意两个法定人数的交集非空,而 节点的可用性至少需要其仲裁片之一 完全由正确的节点组成,在之间创建一个权衡 使用可能难以平衡的大或小的仲裁片 无需对信任强加重大假设。最终,节点必须以某种方式选择足够的仲裁片 具有足够的容错能力(或任何“完整节点”,其中 论文的大部分结果取决于),并且唯一的 提供了确保这种配置是分层的策略 类似于边界网关协议 (BGP),互联网上的顶级 ISP 使用它来建立全球路由表,并且 浏览器用来管理 TLS 证书;都臭名昭著 因为他们的不安全感。 Stellar 论文中对基于 Tendermint 的权益证明系统的批评通过所描述的 token 策略得到了缓解 这里,发出了一种称为原子的新类型 token 代表对未来部分费用和奖励的要求。的 那么,基于 Tendermint 的 proof-of-stake 的优势是它的相对优势 简单性,同时仍然提供充分且可证明的安全性 保证。 BitcoinNG 是对 Bitcoin 的拟议改进,允许 对于垂直可扩展性的形式,例如增加块大小, 不会产生通常相关的负面经济后果 有了这样的变化,比如不成比例的巨大影响 关于小矿工。这种改进是通过分离来实现的 交易广播中的领导者选举:领导者是第一名 由 proof-of-work 在“微块”中选出,然后能够 广播要提交的交易,直到出现新的微块 被发现。这降低了所需的带宽要求 赢得 PoW 竞赛,让小矿工更公平地竞争, 并允许交易更定期地由 最后一个矿工创建一个微块。 Casper [16] 是一种提议的 proof-of-stake 共识算法 Ethereum。其主要运作模式是“投注共识”。由 让 validators 迭代地押注他们认为会出现的区块

根据其他赌注投入 blockchain 到目前为止,他们已经看到,最终可以实现 ynality。关联。 这是 Casper 团队的一个活跃研究领域。的 挑战在于构建一个可以 被证明是一种进化稳定的策略。主要好处是 Casper 与 Tendermint 相比可能在于提供“可用性” 过度一致性”——共识不需要>⅔法定人数 投票权 – 可能以牺牲提交速度或 实施复杂度。 Interledger 协议 [14] 严格来说并不是一个可扩展性解决方案。它 提供不同账本之间的临时互操作 系统通过松散耦合的双边关系网络。 与闪电网络一样,ILP 的目的是促进 支付,但它特别关注不同领域的支付 账本类型,并将原子交易机制扩展到 不仅包括 hash-锁,还包括法定人数的公证人(称为 原子传输协议)。后一种机制用于 在账本间交易中强制执行原子性类似于 Tendermint 的轻客户端 SPV 机制,因此说明 ILP 和 Cosmos/IBC 之间的区别是有保证的,并且 下面提供。 1. ILP中连接器的公证人不支持会员资格 变化,并且不允许在之间进行灵活的权重 公证人。另一方面,IBC 是专门为 blockchains,其中 validators 可以有不同的权重,并且 成员资格可以在整个过程中发生变化 blockchain。 2. 与闪电网络一样,ILP中的付款接收方 必须在线才能将确认信息发送回发件人。在一个token 通过 IBC 传输,即接收器的 validator 集 blockchain 负责提供确认,而不是 接收用户。 3. 最显着的区别是 ILP 的连接器不是 对付款负责或保持权威状态, 而在 Cosmos 中,集线器的 validator 是 IBC token 的状态转移以及权限 每个区域持有的 token 数量(但不是 区域内每个账户持有的 tokens)。这是 允许安全不对称的根本性创新 将 tokens 从一个区域转移到另一个区域; ILP 的类似物 Cosmos 中的连接器是持久且高度安全的 blockchain 分类账,Cosmos 中心。 4. ILP 中的账本间支付需要有一个 交换订单簿,因为不存在非对称转移 硬币从一个分类账到另一个分类账,仅转移价值或 市场等价物。 侧链 [15] 是一种提议的用于扩展 Bitcoin 的机制 通过“双向挂钩”的替代 blockchain 网络 Bitcoin blockchain。 (双向挂钩相当于 桥接。在 Cosmos 中,我们说“桥接”以区别于市场挂钩)。侧链允许比特币有效地从 Bitcoin blockchain 到侧链和后面,并允许 侧链新功能的实验。正如在 Cosmos Hub、侧链和 Bitcoin 作为轻客户端 彼此之间,使用 SPV 证明来确定硬币何时应该被 转移到侧链并返回。当然,从 Bitcoin 开始 使用 proof-of-work,以 Bitcoin 为中心的侧链受到影响 从 proof-of-work 作为一个 共识机制。此外,这是一个 Bitcoin-最大化主义 本身不支持各种 token 的解决方案和

区域间网络拓扑如 Cosmos 那样。也就是说,核心 双向挂钩的机制原理上是一样的 受雇于 Cosmos 网络。 Ethereum 目前正在研究多种不同的策略 将 Ethereum blockchain 的状态分片以寻址 可扩展性需求。这些努力的目标是维持 当前 Ethereum 虚拟机提供的抽象层 跨越共享状态空间。多项研究工作正在 此时正在进行。 [18][22] Cosmos 和 Ethereum 2.0 Mauve [22] 具有不同的设计目标。 Cosmos 特别是关于 tokens。紫红色是关于缩放 一般计算。 Cosmos 未绑定到 EVM,因此即使不同的虚拟机也可以 互操作。 Cosmos 让区域创建者确定谁验证该区域 区。 任何人都可以在 Cosmos 中启动一个新区域(除非治理 另有决定)。 集线器隔离区域故障,因此全局 token 不变量是 保存下来。 闪电网络是提议的 token 传输网络 在 Bitcoin blockchain (以及其他公共 blockchains),实现多个数量级的改进 通过移动大部分交易来提高交易吞吐量 在共识账本之外进入所谓的“支付渠道”。这是通过链上加密货币脚本实现的,该脚本 使各方能够签订双边国家合同,其中 状态可以通过共享数字签名和合约来更新 可以通过将证据发布到 blockchain 来关闭,a 这种机制最早是通过跨链原子交换而普及的。由 与多方、参与者开放支付渠道 闪电网络可以成为路由的焦点 他人支付,形成全连接的支付通道 网络,代价是资金被束缚在支付渠道上。 虽然闪电网络也可以轻松地跨 多个独立的 blockchain 允许价值转移 通过交易市场,它不能被用来不对称地 将 token 从一个 blockchain 转移到另一个。主要收益 这里描述的 Cosmos 网络的目的是启用这种直接 token 转账。也就是说,我们期望支付渠道和 闪电网络将与我们一起被广泛采用 token 传输机制,出于节省成本和隐私的原因。 隔离见证是一个 Bitcoin 改进提案链接, 旨在将每块交易吞吐量提高 2 倍或 3 倍, 同时使新节点的块同步速度更快。 该解决方案的出色之处在于它如何在 Bitcoin 当前协议的限制并允许软分叉 升级(即使用旧版本软件的客户端将 升级后继续使用)。 Tendermint,成为新的 协议,没有设计限制,所以它有不同的缩放比例 优先事项。 Tendermint 主要使用 BFT 循环算法 基于加密签名而不是挖掘,这 简单地允许通过多个并行进行水平缩放 blockchains,而定期、更频繁的块提交允许 垂直缩放也是如此。

Consensus and Technical Details

Consensus and Technical Details

A well designed consensus protocol should provide some guarantees in the event that the tolerance capacity is exceeded and the consensus fails. This is especially necessary in economic systems, where Byzantine behaviour can have substantial ynancial reward. The most important such guarantee is a form of forkaccountability, where the processes that caused the consensus to fail (ie. caused clients of the protocol to accept different values - a fork) can be identiyed and punished according to the rules of the protocol, or, possibly, the legal system. When the legal system is unreliable or excessively expensive to invoke, validators can be forced to make security deposits in order to participate, and those deposits can be revoked, or slashed, when malicious behaviour is detected [10]. Note this is unlike Bitcoin, where forking is a regular occurence due to network asynchrony and the probabilistic nature of ynding partial hash collisions. Since in many cases a malicious fork is indistinguishable from a fork due to asynchrony, Bitcoin cannot reliably implement fork-accountability, other than the implicit opportunity cost paid by miners for mining an orphaned block. We call the voting stages PreVote and PreCommit. A vote can be for a particular block or for Nil. We call a collection of \(> 2/3\) PreVotes for a single block in the same round a Polka, and a collection of \(> 2/3\) PreCommits for a single block in the same round a Commit. If \(> 2/3\) PreCommit for Nil in the same round, they move to the next round. Note that strict determinism in the protocol incurs a weak synchrony assumption as faulty leaders must be detected and

skipped. Thus, validators wait some amount of time, TimeoutPropose, before they Prevote Nil, and the value of TimeoutPropose increases with each round. Progression through the rest of a round is fully asynchronous, in that progress is only made once a validator hears from \(> 2/3\) of the network. In practice, it would take an extremely strong adversary to indeynitely thwart the weak synchrony assumption (causing the consensus to fail to ever commit a block), and doing so can be made even more difycult by using randomized values of TimeoutPropose on each validator. An additional set of constraints, or Locking Rules, ensure that the network will eventually commit just one block at each height. Any malicious attempt to cause more than one block to be committed at a given height can be identiyed. First, a PreCommit for a block must come with justiycation, in the form of a Polka for that block. If the validator has already PreCommit a block at round R_1, we say they are locked on that block, and the Polka used to justify the new PreCommit at round R_2 must come in a round R_polka where R_1 < R_polka <= R_2. Second, validators must Propose and/or PreVote the block they are locked on. Together, these conditions ensure that a validator does not PreCommit without sufycient evidence as justiycation, and that validators which have already PreCommit cannot contribute to evidence to PreCommit something else. This ensures both safety and liveness of the consensus algorithm. The full details of the protocol are described here. The need to sync all block headers is eliminated in TendermintPoS as the existence of an alternative chain (a fork) means \(\geq 1/3\) of bonded stake can be slashed. Of course, since slashing requires that someone share evidence of a fork, light clients should store any block-hash commits that it sees. Additionally, light clients

could periodically stay synced with changes to the validator set, in order to avoid long range attacks (but other solutions are possible). In spirit similar to Ethereum, Tendermint enables applications to embed a global Merkle root hash in each block, allowing easily veriyable state queries for things like account balances, the value stored in a contract, or the existence of an unspent transaction output, depending on the nature of the application. Assuming a sufyciently resilient collection of broadcast networks and a static validator set, any fork in the blockchain can be detected and the deposits of the offending validators slashed. This innovation, yrst suggested by Vitalik Buterin in early 2014, solves the nothing-at-stake problem of other proof-of-stake cryptocurrencies (see Related Work). However, since validator sets must be able to change, over a long range of time the original validators may all become unbonded, and hence would be free to create a new chain from the genesis block, incurring no cost as they no longer have deposits locked up. This attack came to be known as the Long Range Attack (LRA), in contrast to a Short Range Attack, where validators who are currently bonded cause a fork and are hence punishable (assuming a fork-accountable BFT algorithm like Tendermint consensus). Long Range Attacks are often thought to be a critical blow to proof-of-stake. Fortunately, the LRA can be mitigated as follows. First, for a validator to unbond (thereby recovering their collateral deposit and no longer earning fees to participate in the consensus), the deposit must be made untransferable for an amount of time known as the “unbonding period”, which may be on the order of weeks or months. Second, for a light client to be secure, the yrst time it connects to the network it must verify a recent block-hash against a trusted source, or preferably multiple sources. This

condition is sometimes referred to as “weak subjectivity”. Finally, to remain secure, it must sync up with the latest validator set at least as frequently as the length of the unbonding period. This ensures that the light client knows about changes to the validator set before a validator has its capital unbonded and thus no longer at stake, which would allow it to deceive the client by carrying out a long range attack by creating new blocks beginning back at a height where it was bonded (assuming it has control of sufyciently many of the early private keys). Note that overcoming the LRA in this way requires an overhaul of the original security model of proof-of-work. In PoW, it is assumed that a light client can sync to the current height from the trusted genesis block at any time simply by processing the proofof-work in every block header. To overcome the LRA, however, we require that a light client come online with some regularity to track changes in the validator set, and that the yrst time they come online they must be particularly careful to authenticate what they hear from the network against trusted sources. Of course, this latter requirement is similar to that of Bitcoin, where the protocol and software must also be obtained from a trusted source. The above method for preventing LRA is well suited for validators and full nodes of a Tendermint-powered blockchain because these nodes are meant to remain connected to the network. The method is also suitable for light clients that can be expected to sync with the network frequently. However, for light clients that are not expected to have frequent access to the internet or the blockchain network, yet another solution can be used to overcome the LRA. Non-validator token holders can post their tokens as collateral with a very long unbonding period (e.g. much longer than the unbonding period for validators) and serve light clients with a secondary method of attesting to the validity of current and past block-hashes. While these tokens do not count toward the security of the blockchain’s consensus, they nevertheless can

provide strong guarantees for light clients. If historical block-hash querying were supported in Ethereum, anyone could bond their tokens in a specially designed smart contract and provide attestation services for pay, effectively creating a market for lightclient LRA security. Due to the deynition of a block commit, any \(\geq 1/3\) coalition of voting power can halt the blockchain by going ofzine or not broadcasting their votes. Such a coalition can also censor particular transactions by rejecting blocks that include these transactions, though this would result in a signiycant proportion of block proposals to be rejected, which would slow down the rate of block commits of the blockchain, reducing its utility and value. The malicious coalition might also broadcast votes in a trickle so as to grind blockchain block commits to a near halt, or engage in any combination of these attacks. Finally, it can cause the blockchain to fork, by double-signing or violating the locking rules. If a globally active adversary were also involved, it could partition the network in such a way that it may appear that the wrong subset of validators were responsible for the slowdown. This is not just a limitation of Tendermint, but rather a limitation of all consensus protocols whose network is potentially controlled by an active adversary. For these types of attacks, a subset of the validators should coordinate through external means to sign a reorg-proposal that chooses a fork (and any evidence thereof) and the initial subset of validators with their signatures. Validators who sign such a reorgproposal forego their collateral on all other forks. Clients should verify the signatures on the reorg-proposal, verify any evidence, and make a judgement or prompt the end-user for a decision. For example, a phone wallet app may prompt the user with a security

warning, while a refrigerator may accept any reorg-proposal signed by +½ of the original validators by voting power. No non-synchronous Byzantine fault-tolerant algorithm can come to consensus when \(\geq 1/3\) of voting power are dishonest, yet a fork assumes that \(\geq 1/3\) of voting power have already been dishonest by double-signing or lock-changing without justiycation. So, signing the reorg-proposal is a coordination problem that cannot be solved by any non-synchronous protocol (i.e. automatically, and without making assumptions about the reliability of the underlying network). For now, we leave the problem of reorgproposal coordination to human coordination via social consensus on internet media. Validators must take care to ensure that there are no remaining network partitions prior to signing a reorgproposal, to avoid situations where two conzicting reorgproposals are signed. Assuming that the external coordination medium and protocol is robust, it follows that forks are less of a concern than censorship attacks. In addition to forks and censorship, which require \(\geq 1/3\) Byzantine voting power, a coalition of \(> 2/3\) voting power may commit arbitrary, invalid state. This is characteristic of any (BFT) consensus system. Unlike double-signing, which creates forks with easily veriyable evidence, detecting committment of an invalid state requires non-validating peers to verify whole blocks, which implies that they keep a local copy of the state and execute each transaction, computing the state root independently for themselves. Once detected, the only way to handle such a failure is via social consensus. For instance, in situations where Bitcoin has failed, whether forking due to software bugs (as in March 2013), or committing invalid state due to Byzantine behavior of miners (as in July 2015), the well connected community of businesses, developers, miners, and other organizations established a social consensus as to what manual actions were

required by participants to heal the network. Furthermore, since validators of a Tendermint blockchain may be expected to be identiyable, commitment of an invalid state may even be punishable by law or some external jurisprudence, if desired. ABCI consists of 3 primary message types that get delivered from the core to the application. The application replies with corresponding response messages. The  AppendTx  message is the work horse of the application. Each transaction in the blockchain is delivered with this message. The application needs to validate each transactions received with the AppendTx message against the current state, application protocol, and the cryptographic credentials of the transaction. A validated transaction then needs to update the application state — by binding a value into a key values store, or by updating the UTXO database. The  CheckTx  message is similar to AppendTx, but it’s only for validating transactions. Tendermint Core’s mempool yrst checks the validity of a transaction with CheckTx, and only relays valid transactions to its peers. Applications may check an incrementing nonce in the transaction and return an error upon CheckTx if the nonce is old. The  Commit  message is used to compute a cryptographic commitment to the current application state, to be placed into the next block header. This has some handy properties. Inconsistencies in updating that state will now appear as blockchain forks which catches a whole class of programming errors. This also simpliyes the development of secure lightweight clients, as Merkle-hash proofs can be veriyed by checking against the block-hash, and the block-hash is signed by a quorum of validators (by voting power).

Additional ABCI messages allow the application to keep track of and change the validator set, and for the application to receive the block information, such as the height and the commit votes. ABCI requests/responses are simple Protobuf messages. Check out the schema yle. Arguments: Data ([]byte) : The request transaction bytes Returns: Code (uint32) : Response code Data ([]byte) : Result bytes, if any Log (string) : Debug or error message Usage:

Append and run a transaction. If the transaction is valid, returns CodeType.OK Arguments: Data ([]byte) : The request transaction bytes Returns: Code (uint32) : Response code Data ([]byte) : Result bytes, if any Log (string) : Debug or error message Usage:

Validate a transaction. This message should not mutate the state. Transactions are yrst run through CheckTx before broadcast to peers in the mempool layer. You can make CheckTx semi-stateful and clear the state upon Commit or BeginBlock , to allow for dependent sequences of transactions in the same block.

Returns: Data ([]byte) : The Merkle root hash Log (string) : Debug or error message Usage:

Return a Merkle root hash of the application state. Arguments: Data ([]byte) : The query request bytes Returns: Code (uint32) : Response code Data ([]byte) : The query response bytes Log (string) : Debug or error message Usage:

Flush the response queue. Applications that implement types.Application need not implement this message – it’s handled by the project. Returns: Data ([]byte) : The info bytes Usage:

Return information about the application state. Application speciyc. Arguments: Key (string) : Key to set

Value (string) : Value to set for key Returns: Log (string) : Debug or error message Usage:

Set application options. E.g. Key=“mode”, Value=“mempool” for a mempool connection, or Key=“mode”, Value=“consensus” for a consensus connection. Other options are application speciyc. Arguments: Validators ([]Validator) : Initial genesis-validators Usage:

Called once upon genesis Arguments: Height (uint64) : The block height that is starting Usage:

Signals the beginning of a new block. Called prior to any AppendTxs. Arguments: Height (uint64) : The block height that ended Returns: Validators ([]Validator) : Changed validators with new voting powers (0 to remove) Usage:

Signals the end of a block. Called prior to each Commit after all transactions See the ABCI repository for more details.

There are several reasons why a sender may want the acknowledgement of delivery of a packet by the receiving chain. For example, the sender may not know the status of the destination chain, if it is expected to be faulty. Or, the sender may want to impose a timeout on the packet (with the  MaxHeight  packet yeld), while any destination chain may suffer from a denialof-service attack with a sudden spike in the number of incoming packets. In these cases, the sender can require delivery acknowledgement by setting the initial packet status to  AckPending . Then, it is the receiving chain’s responsibility to conyrm delivery by including an abbreviated  IBCPacket  in the app Merkle hash. First, an  IBCBlockCommit  and  IBCPacketTx  are posted on “Hub” that proves the existence of an  IBCPacket  on “Zone1”. Say that  IBCPacketTx  has the following value: FromChainID : “Zone1” FromBlockHeight : 100 (say) Packet : an IBCPacket :

Header : an IBCPacketHeader : SrcChainID : “Zone1” DstChainID : “Zone2” Number : 200 (say) Status : AckPending Type : “coin” MaxHeight : 350 (say “Hub” is currently at height 300) Payload : Next, an  IBCBlockCommit  and  IBCPacketTx  are posted on “Zone2” that proves the existence of an  IBCPacket  on “Hub”. Say that  IBCPacketTx  has the following value: FromChainID : “Hub” FromBlockHeight : 300 Packet : an IBCPacket : Header : an IBCPacketHeader : SrcChainID : “Zone1” DstChainID : “Zone2” Number : 200 Status : AckPending Type : “coin” MaxHeight : 350 Payload : Next, “Zone2” must include in its app-hash an abbreviated packet that shows the new status of  AckSent . An  IBCBlockCommit  and  IBCPacketTx  are posted back on “Hub” that proves the existence of an abbreviated  IBCPacket  on "Zone2". Say that  IBCPacketTx  has the following value: FromChainID : “Zone2”

FromBlockHeight : 400 (say) Packet : an IBCPacket : Header : an IBCPacketHeader : SrcChainID : “Zone1” DstChainID : “Zone2” Number : 200 Status : AckSent Type : “coin” MaxHeight : 350 PayloadHash : Finally, “Hub” must update the status of the packet from  AckPending  to  AckReceived . Evidence of this new ynalized status should go back to "Zone2". Say that  IBCPacketTx  has the following value: FromChainID : “Hub” FromBlockHeight : 301 Packet : an IBCPacket : Header : an IBCPacketHeader : SrcChainID : “Zone1” DstChainID : “Zone2” Number : 200 Status : AckReceived Type : “coin” MaxHeight : 350 PayloadHash : Meanwhile, “Zone1” may optimistically assume successful delivery of a "coin" packet unless evidence to the contrary is proven on “Hub”. In the example above, if “Hub” had not received an  AckSent

status from “Zone2” by block 350, it would have set the status automatically to  Timeout . This evidence of a timeout can get posted back on “Zone1”, and any tokens can be returned. There are two types of Merkle trees supported in the Tendermint/Cosmos ecosystem: The Simple Tree, and the IAVL+ Tree. The Simple Tree is a Merkle tree for a static list of elements. If the number of items is not a power of two, some leaves will be at different levels. Simple Tree tries to keep both sides of the tree the same height, but the left may be one greater. This Merkle tree is used to Merkle-ize the transactions of a block, and the top level elements of the application state root.

The purpose of the IAVL+ data structure is to provide persistent storage for key-value pairs in the application state such that a deterministic Merkle root hash can be computed efyciently. The tree is balanced using a variant of the AVL algorithm, and all operations are \(O(\log n)\). In an AVL tree, the heights of the two child subtrees of any node differ by at most one. Whenever this condition is violated upon an update, the tree is rebalanced by creating \(O(\log n)\) new nodes that point to unmodiyed nodes of the old tree. In the original AVL algorithm, inner nodes can also hold key-value pairs. The AVL+ algorithm (note the plus) modiyes the AVL algorithm to keep all values on leaf nodes, while only using branch-nodes to store keys. This simpliyes the algorithm while keeping the merkle hash trail short. The AVL+ Tree is analogous to Ethereum’s Patricia tries. There are tradeoffs. Keys do not need to be hashed prior to insertion in IAVL+ trees, so this provides faster ordered iteration in the key space which may beneyt some applications. The logic is simpler to implement, requiring only two types of nodes – inner nodes and leaf nodes. The Merkle proof is on average shorter, being a                 *                 / \               /     \             /         \           /             \          *               *         / \             / \        /   \           /   \       /     \         /     \      *       *       *       h6     / \     / \     / \    h0  h1  h2  h3  h4  h5    A SimpleTree with 7 elements

balanced binary tree. On the other hand, the Merkle root of an IAVL+ tree depends on the order of updates. We will support additional efycient Merkle trees, such as Ethereum’s Patricia Trie when the binary variant becomes available. In the canonical implementation, transactions are streamed to the Cosmos hub application via the ABCI interface. The Cosmos Hub will accept a number of primary transaction types, including  SendTx ,  BondTx ,  UnbondTx ,  ReportHackTx ,  SlashTx ,  BurnAtomTx ,  ProposalCreateTx , and  ProposalVoteTx , which are fairly self-explanatory and will be documented in a future revision of this paper. Here we document the two primary transaction types for IBC:  IBCBlockCommitTx  and  IBCPacketTx . An  IBCBlockCommitTx  transaction is composed of: ChainID (string) : The ID of the blockchain BlockHash ([]byte) : The block-hash bytes, the Merkle root which includes the app-hash BlockPartsHeader (PartSetHeader) : The block part-set header bytes, only needed to verify vote signatures BlockHeight (int) : The height of the commit BlockRound (int) : The round of the commit Commit ([]Vote) : The \(> 2/3\) Tendermint Precommit votes that comprise a block commit ValidatorsHash ([]byte) : A Merkle-tree root hash of the new validator set

ValidatorsHashProof (SimpleProof) : A SimpleTree Merkleproof for proving the ValidatorsHash against the BlockHash AppHash ([]byte) : A IAVLTree Merkle-tree root hash of the application state AppHashProof (SimpleProof) : A SimpleTree Merkle-proof for proving the AppHash against the BlockHash An  IBCPacket  is composed of: Header (IBCPacketHeader) : The packet header Payload ([]byte) : The bytes of the packet payload. Optional PayloadHash ([]byte) : The hash for the bytes of the packet. Optional Either one of  Payload  or  PayloadHash  must be present. The hash of an  IBCPacket  is a simple Merkle root of the two items,  Header  and  Payload . An  IBCPacket  without the full payload is called an abbreviated packet. An  IBCPacketHeader  is composed of: SrcChainID (string) : The source blockchain ID DstChainID (string) : The destination blockchain ID Number (int) : A unique number for all packets Status (enum) : Can be one of AckPending , AckSent , AckReceived , NoAck , or Timeout Type (string) : The types are application-dependent. Cosmos reserves the "coin" packet type MaxHeight (int) : If status is not NoAckWanted or AckReceived by this height, status becomes Timeout . Optional An  IBCPacketTx  transaction is composed of:

FromChainID (string) : The ID of the blockchain which is providing this packet; not necessarily the source FromBlockHeight (int) : The blockchain height in which the following packet is included (Merkle-ized) in the block-hash of the source chain Packet (IBCPacket) : A packet of data, whose status may be one of AckPending , AckSent , AckReceived , NoAck , or Timeout PacketProof (IAVLProof) : A IAVLTree Merkle-proof for proving the packet’s hash against the AppHash of the source chain at given height The sequence for sending a packet from “Zone1” to “Zone2” through the "Hub" is depicted in {Figure X}. First, an  IBCPacketTx  proves to "Hub" that the packet is included in the app-state of “Zone1”. Then, another  IBCPacketTx  proves to “Zone2” that the packet is included in the app-state of “Hub”. During this procedure, the  IBCPacket  yelds are identical: the  SrcChainID  is always “Zone1”, and the  DstChainID  is always "Zone2". The  PacketProof  must have the correct Merkle-proof path, as follows: When “Zone1” wants to send a packet to “Zone2” through “Hub”, the  IBCPacket  data are identical whether the packet is Merkleized on “Zone1”, the “Hub”, or “Zone2”. The only mutable yeld is  Status  for tracking delivery. We thank our friends and peers for assistance in conceptualizing, reviewing, and providing support for our work with Tendermint and Cosmos. IBC///

Zaki Manian of SkuChain provided much help in formatting and wording, especially under the ABCI section Jehan Tremback of Althea and Dustin Byington for helping with initial iterations Andrew Miller of Honey Badger for feedback on consensus Greg Slepak for feedback on consensus and wording Also thanks to Bill Gleim and Seunghwan Han for various contributions. Your name and organization here for your contribution 1 Bitcoin: https://bitcoin.org/bitcoin.pdf 2 ZeroCash: http://zerocash-project.org/paper 3 Ethereum: https://github.com/ethereum/wiki/wiki/WhitePaper 4 TheDAO: https://download.slock.it/public/DAO/WhitePaper.pdf 5 Segregated Witness: https://github.com/bitcoin/bips/blob/master/bip0141.mediawiki 6 BitcoinNG: https://arxiv.org/pdf/1510.02037v2.pdf 7 Lightning Network: https://lightning.network/lightningnetwork-paper-DRAFT-0.5.pdf 8 Tendermint: https://github.com/tendermint/tendermint/wiki 9 FLP Impossibility: https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf 10 Slasher: https://blog.ethereum.org/2014/01/15/slasher-apunitive-proof-of-stake-algorithm/ 11 PBFT: http://pmg.csail.mit.edu/papers/osdi99.pdf 12 BitShares: https://bitshares.org/technology/delegatedproof-of-stake-consensus/

13 Stellar: https://www.stellar.org/papers/stellar-consensusprotocol.pdf 14 Interledger: https://interledger.org/rfcs/0001-interledgerarchitecture/ 15 Sidechains: https://blockstream.com/sidechains.pdf 16 Casper: https://blog.ethereum.org/2015/08/01/introducing-casperfriendly-ghost/ 17 ABCI: https://github.com/tendermint/abci 18 Ethereum Sharding: https://github.com/ethereum/EIPs/issues/53 19 LibSwift: http://www.ds.ewi.tudelft.nl/yleadmin/pds/papers/Performa nceAnalysisOfLibswift.pdf 20 DLS: http://groups.csail.mit.edu/tds/papers/Lynch/jacm88.pdf 21 Thin Client Security: https://en.bitcoin.it/wiki/Thin_Client_Security 22 Ethereum 2.0 Mauve Paper: http://vitalik.ca/yles/mauve_paper.html https://www.docdroid.net/ec7xGzs/314477721-ethereumplatform-review-opportunities-and-challenges-for-privateand-consortium-blockchains.pdf.html

“ è 

共识和技术细节

一个设计良好的共识协议应该提供一些 超出耐受能力时的保证 并且共识失败。这在经济上尤其必要 系统中,拜占庭行为可能会产生大量的经济影响 奖励。最重要的此类保证是一种责任形式,其中导致共识的过程 失败(即导致协议的客户端接受不同的值 - a fork)可以根据规则进行识别和惩罚 协议,或者可能是法律体系。当法律制度 不可靠或调用成本过高, validators 可能是 被迫缴纳保证金才能参加,以及那些 当恶意行为发生时,存款可以被撤销或削减 检测到 [10]。 请注意,这与 Bitcoin 不同,其中分叉是经常发生的 由于网络异步性和 ynding 的概率性质 部分 hash 碰撞。因为在很多情况下,恶意分叉是 由于异步,与分叉无法区分,Bitcoin 不能 可靠地实施分叉责任,而不是隐式的 矿工为开采孤立区块而支付的机会成本。 我们将投票阶段称为 PreVote 和 PreCommit。投票可以是 特定块或 Nil。我们称之为>⅔预投票的集合 对于同一轮 Polka 中的单个块,以及 >⅔ 的集合 在同一轮提交中预提交单个块。如果>⅔ 在同一轮中预提交为零,他们进入下一轮 圆形。 请注意,协议中的严格决定论会导致较弱的 同步假设,因为必须检测到错误的领导者并

跳过了。因此,validators 等待一段时间, TimeoutPropose,在 Prevote Nil 之前,以及值 TimeoutPropose 随着每一轮的增加而增加。进展通过 一轮的其余部分是完全异步的,因为进度只是 一旦 validator 收到来自 >⅔ 的网络消息。在实践中, 需要一个极其强大的对手才能无限期地挫败 弱同步假设(导致共识无法达成) 曾经提交过一个区块),这样做可以使更多 通过在每个上使用 TimeoutPropose 的随机值来实现困难 validator。 一组附加的约束或锁定规则,确保 网络最终将在每个高度只提交一个区块。任意 恶意尝试导致多个区块被提交 可以识别给定高度。首先,对块进行 PreCommit 必须以 Polka 的形式为该块提供合理性。 如果 validator 已经在 R_1 轮预提交了一个区块,我们 说他们被锁定在那个街区,波尔卡用来证明 R_2 轮的新 PreCommit 必须出现在 R_polka 轮中 其中 R_1 < R_polka <= R_2。其次,validators 必须提出 和/或对他们锁定的区块进行预投票。在一起,这些 条件确保 validator 不会在没有预提交的情况下进行预提交 有足够的证据作为正当理由,并且 validators PreCommit 已经无法为 PreCommit 提供证据 其他的东西。这既保证了安全性又保证了活跃性 共识算法。 此处描述了该协议的完整细节。 TendermintPoS 消除了同步所有区块头的需要,因为替代链(分叉)的存在意味着 ≥⅓ 担保权益可以被削减。当然,由于削减需要 有人分享分叉的证据,轻客户端应该存储 任何 block-hash 提交它看到的。此外,轻客户端可以定期与 validator 集的更改保持同步, 为了避免远程攻击(但其他解决方案是 可能)。 本着与 Ethereum 类似的精神,Tendermint 使应用程序能够 在每个块中嵌入一个全局 Merkle 根 hash ,从而轻松地允许 可验证的状态查询,例如帐户余额、价值 存储在合约中,或存在未花费的交易 输出,取决于应用程序的性质。 假设广播网络具有足够的弹性集合 和静态 validator 集,blockchain 中的任何分叉都可以 被发现并削减了违规 validator 的存款。这个 Vitalik Buterin 在 2014 年初提出的创新解决了 其他 proof-of-stake 的无利害关系问题 加密货币(参见相关工作)。但是,由于 validator 设置 必须能够在很长一段时间内改变原来的 validators 可能全部变为非绑定状态,因此可以自由 从创世块创建一条新链,不产生任何成本 他们不再锁定存款。这次攻击发生了 与短程攻击相比,称为远程攻击 (LRA) 范围攻击,当前绑定的 validator 会造成 分叉,因此会受到惩罚(假设分叉负责 BFT 像 Tendermint 共识这样的算法)。远程攻击是 通常被认为是对 proof-of-stake 的致命打击。 幸运的是,LRA 可以通过以下方式缓解。首先,对于一个 validator 解绑(从而收回其抵押存款 并且不再赚取参与共识的费用), 存款必须在一段时间内不可转让 称为“解绑期”,可能约为 几周或几个月。其次,为了保证轻客户端的安全,第一 当它连接到网络时,它必须验证最近的块-hash 针对可信来源,或者最好是多个来源。这个

这种情况有时被称为“弱主观性”。最后, 为了保持安全,它必须与最新的 validator 设置同步 最少与解绑期的长度一样频繁。这个 确保轻客户端知道 validator 的更改 在 validator 的资本解除绑定之前设置,因此不再 处于危险之中,这将使其能够通过执行来欺骗客户 通过从某个位置开始创建新块来进行远程攻击 它粘合的高度(假设它有足够的控制 许多早期的私钥)。 请注意,以这种方式克服 LRA 需要彻底修改 proof-of-work 的原始安全模型。在 PoW 中,是 假设轻客户端可以从 只需处理每个块头中的工作量证明即可随时获得可信创世块。然而,为了战胜上帝抵抗军,我们 要求轻客户端定期上线 跟踪 validator 集中的变化,并且第一时间他们 上网时他们必须特别小心地进行身份验证 他们从网络上听到的来自可信来源的信息。的 当然,后一个要求类似于 Bitcoin 的要求,其中 协议和软件还必须从受信任的机构获得 来源。 上述预防 LRA 的方法非常适合 validators 以及 Tendermint 支持的 blockchain 的完整节点,因为这些 节点旨在保持与网络的连接。的 该方法也适用于可以预期的轻客户端 经常与网络同步。然而,对于轻量级客户来说 预计不会经常访问互联网或 blockchain 网络,可以使用另一种解决方案来克服 圣主抵抗军。非 validator token 持有者可以将其 token 发布为 具有很长解绑期限的抵押品(例如更长的 超过 validators 的解绑期)并为轻客户端提供服务 使用第二种方法来证明当前和的有效性 过去的区块-hashes。虽然这些 token 不计入 blockchain 共识的安全性,但他们仍然可以为轻客户提供有力保障。如果历史区块-hash Ethereum 支持查询,任何人都可以绑定他们的 tokens 在专门设计的 smart contract 中并提供 付费认证服务,有效地为轻客户端 LRA 安全创造了市场。 由于块提交的定义,任何 ≥⅓ 的联盟 投票权可以通过是否关闭 blockchain 来阻止 blockchain 广播他们的选票。这样的联盟也可以审查 通过拒绝包含这些的块来特定交易 交易,尽管这会导致相当大的比例 的区块提案被拒绝,这将减慢速度 blockchain 的块提交,降低了其实用性和价值。 恶意联盟也可能会少量广播投票,以便 为了磨炼 blockchain 块,承诺几乎停止,或从事 这些攻击的任意组合。最后,它可能会导致 blockchain 通过双重签名或违反锁定来分叉 规则。 如果全球活跃的对手也参与其中,它可能会分裂 网络的方式可能会出现错误 validator 的子集导致了速度下降。这不是 只是 Tendermint 的限制,而是所有的限制 其网络可能由某个人控制的共识协议 积极的对手。 对于这些类型的攻击,validator 的子集应该 通过外部手段协调签署重组提案 选择一个分叉(及其任何证据)和初始子集 validator 及其签名。签署此类重组提案的验证者将放弃所有其他分叉上的抵押品。客户应该 验证重组提案上的签名,验证任何证据, 并做出判断或提示最终用户做出决定。对于 例如,手机钱包应用程序可能会提示用户安全

警告,而冰箱可以接受任何重组建议 由原始 validator 的 +1/2 投票权签署。 没有非同步的拜占庭容错算法可以来 当 ≥⅓ 的投票权不诚实时达成共识,但仍存在分叉 假设 ≥⅓ 的投票权已经被不诚实 没有正当理由的双重签名或锁更改。所以,签 重组提案是一个协调问题,无法解决 通过任何非同步协议解决(即自动,并且 不对可靠性做出假设 底层网络)。目前,我们将重组提案的协调问题留给人类通过社会共识进行协调 在网络媒体上。验证者必须注意确保 在签署重组提案之前没有剩余的网络分区,以避免签署两个相互冲突的重组提案的情况。 假设外部协调介质和协议是 稳健,因此与审查相比,分叉更受关注 攻击。 除了分叉和审查,需要≥⅓拜占庭 投票权,超过⅔投票权的联盟可以承诺 任意的、无效的状态。这是任何 (BFT) 的特征 共识系统。与创建分叉的双重签名不同 通过易于验证的证据,检测某人的承诺 无效状态需要非验证节点来验证整个块, 这意味着他们保留状态的本地副本并执行 每笔交易,独立计算状态根 他们自己。一旦检测到,处理此类故障的唯一方法 是通过社会共识。例如,在 Bitcoin 的情况下 失败了,是否由于软件 bug 导致分叉(如 3 月份 2013),或者由于拜占庭行为而提交无效状态 矿工(截至 2015 年 7 月),紧密联系的社区 企业、开发商、矿工和其他组织 关于什么是手动操作建立了社会共识参与者需要治愈网络。此外,由于 Tendermint blockchain 的 validator 可能预计为 无效国家的承诺甚至可能是可识别的 如果需要的话,可以受到法律或某些外部判例的惩罚。 ABCI 由 3 种主要消息类型组成,这些消息类型从 应用程序的核心。应用程序回复 相应的响应消息。 AppendTx 消息是应用程序的主力。每个 blockchain 中的事务随此消息一起传递。的 应用程序需要验证收到的每笔交易 针对当前状态、应用程序协议的 AppendTx 消息, 以及交易的加密凭证。经过验证的 然后事务需要更新应用程序状态 - 通过 将值绑定到键值存储中,或者通过更新 UTXO 数据库。 CheckTx 消息与 AppendTx 类似,但仅适用于 验证交易。 Tendermint Core 的内存池首次检查 与 CheckTx 交易的有效性,并且仅中继有效 与其同行的交易。应用程序可以检查递增 nonce 在交易中,并在 CheckTx 上返回错误,如果 nonce 已旧。 “提交”消息用于计算密码 对当前应用程序状态的承诺,将被放入 下一个块头。这有一些方便的属性。 更新该状态时的不一致现在将显示为 blockchain fork 捕获整个类的编程 错误。这也简化了安全轻量化的开发 客户,因为 Merkle-hash 证明可以通过检查来验证 区块-hash,区块-hash由法定人数签名 validators(按投票权)。

额外的 ABCI 消息允许应用程序跟踪 并更改 validator 设置,并让应用程序接收 区块信息,例如高度和提交投票。 ABCI 请求/响应是简单的 Protobuf 消息。检查 出架构yle。 论据: 数据([]byte):请求交易字节 返回: 代码 (uint32):响应代码 数据([]byte):结果字节(如果有) 日志(字符串):调试或错误消息 用途:

追加并运行事务。如果交易有效, 返回 CodeType.OK 论据: 数据([]byte):请求交易字节 返回: 代码 (uint32):响应代码 数据([]byte):结果字节(如果有) 日志(字符串):调试或错误消息 用途:

验证交易。此消息不应改变 状态。交易首先通过 CheckTx 运行 广播到内存池层中的对等点。你可以使 CheckTx 半状态并在提交时清除状态或 BeginBlock ,允许依赖的交易序列 在同一个街区。

返回: 数据([]byte):Merkle 根 hash 日志(字符串):调试或错误消息 用途:

返回应用程序状态的 Merkle 根 hash。 论据: Data ([]byte) :查询请求字节 返回: 代码 (uint32):响应代码 数据([]byte):查询响应字节 日志(字符串):调试或错误消息 用途:

刷新响应队列。实施的应用程序 types.Application 不需要实现此消息 - 它是 由项目处理。 返回: 数据([]byte):信息字节 用途:

返回有关应用程序状态的信息。应用 具体。 论据: Key(字符串):要设置的键

值(字符串):为键设置的值 返回: 日志(字符串):调试或错误消息 用途:

设置应用程序选项。例如。键=“模式”,值=“mempool” 内存池连接,或 Key=“mode”,Value=“consensus” 共识连接。其他选项是特定于应用程序的。 论据: 验证器([]Validator):初始起源-validators 用途:

创世时被召唤一次 论据: 高度 (uint64):起始区块高度 用途:

表示新块的开始。在任何之前调用 追加 Txs。 论据: 高度 (uint64):结束的区块高度 返回: 验证器([]Validator):将 validators 更改为新的 投票权(0表示删除) 用途:

发出块结束的信号。毕竟在每次提交之前调用 交易 有关更多详细信息,请参阅 ABCI 存储库。发件人可能想要的原因有多种 接收链对数据包传送的确认。 例如,发送者可能不知道消息的状态 目标链(如果预计会出现故障)。或者,发件人可以 想要对数据包施加超时(使用 MaxHeight  数据包产量),而任何目标链都可能遭受拒绝服务攻击,传入数量突然激增 数据包。 在这些情况下,发件人可以要求送达确认 将初始数据包状态设置为 AckPending。那么,就是 接收链有责任通过包括 Merkle 应用程序中缩写为 IBCPacket hash。 首先,在“Hub”上发布 IBCBlockCommit 和 IBCPacketTx 这证明了“Zone1”上存在 IBCPacket。这么说  IBCPacketTx 具有以下值: FromChainID:“Zone1” FromBlockHeight : 100 (比如说) 数据包:IBC数据包:

标头:IBCPacketHeader: 源链ID:“Zone1” 目标链 ID:“Zone2” 数量:200(比如说) 状态:确认待处理 类型:“硬币” MaxHeight:350(假设“Hub”当前高度为 300) Payload : <“硬币”有效负载的字节> 接下来,在“Zone2”上发布 IBCBlockCommit 和 IBCPacketTx 这证明了“Hub”上存在IBCPacket。这么说  IBCPacketTx 具有以下值: FromChainID : “Hub” 从块高度:300 数据包: IBC 数据包: 标头:IBCPacketHeader: 源链ID:“Zone1” 目标链 ID:“Zone2” 数量:200 状态:确认待处理 类型:“硬币” 最大高度:350 有效负载:<“硬币”有效负载的相同字节> 接下来,“Zone2”必须在其应用程序-hash中包含一个缩写数据包 显示 AckSent 的新状态。 IBCBlockCommit 和  IBCPacketTx 被发布回“Hub”,证明存在 “Zone2”上的缩写IBCPacket。说 IBCPacketTx  具有以下值: FromChainID:“Zone2”

FromBlockHeight : 400 (比如说) 数据包: IBC 数据包: 标头:IBCPacketHeader: 源链ID:“Zone1” 目标链 ID:“Zone2” 数量:200 状态:已发送 类型:“硬币” 最大高度:350 PayloadHash : <同一“硬币”有效负载的 hash 字节> 最后,“集线器”必须更新数据包的状态  AckPending 到 AckReceived。这种新的分析状态的证据 应该回到“Zone2”。假设 IBCPacketTx 具有以下内容 值: FromChainID : “Hub” 从块高度:301 数据包: IBC 数据包: 标头:IBCPacketHeader: 源链ID:“Zone1” 目标链 ID:“Zone2” 数量:200 状态:已收到 类型:“硬币” 最大高度:350 PayloadHash : <同一“硬币”有效负载的 hash 字节> 同时,“Zone1”可能乐观地认为交付成功 除非有相反的证据证明是“硬币”包 “枢纽”。在上面的示例中,如果“Hub”未收到 AckSent

块 350 来自“Zone2”的状态,它会设置状态 自动超时。这个超时的证据可以得到 发回“Zone1”,并且可以返回任何 token。 支持两种类型的 Merkle tree Tendermint/Cosmos 生态系统:简单树和 IAVL+ 树。 简单树是一个静态元素列表的 Merkle tree 。如果 项目数不是 2 的幂,有些叶子将位于 不同的级别。简单树试图保持树的两侧 高度相同,但左侧可能更大。这个 Merkle tree 是 用于对区块的交易进行 Merkle 化,顶层 应用程序状态根的元素。IAVL+数据结构的目的是提供持久性 应用程序状态中键值对的存储,以便 可以有效地计算确定性 Merkle 根 hash。的 使用 AVL 算法的变体来平衡树,并且所有 操作是 O(log(n))。 在AVL树中,任意节点的两个子子树的高度 最多相差一。每当违反此条件时 更新时,通过创建 O(log(n)) 个新节点来重新平衡树 指向旧树中未修改的节点。在原来的AVL中 算法中,内部节点也可以保存键值对。 AVL+ 算法(注意加号)修改AVL算法以保留所有 叶节点上的值,而仅使用分支节点来存储键。 这简化了算法,同时保留了 Merkle hash 踪迹 短。 AVL+ 树类似于 Ethereum 的 Patricia 尝试。有 权衡。键在插入之前不需要 hashed IAVL+ 树,因此这可以在键中提供更快的有序迭代 空间可能有利于某些应用程序。逻辑更简单 实现,只需要两种类型的节点——内部节点和 叶节点。 Merkle 证明平均较短,是                 *                 / \               /     \             /         \           /             \          *               *         / \             / \        /   \           /   \       /     \         /     \      *       *       *       h6     / \     / \     / \    h0 h1 h2 h3 h4 h5    具有 7 个元素的 SimpleTree

平衡二叉树。另一方面,默克尔根 IAVL+树取决于更新的顺序。 我们将支持额外的高效 Merkle tree,例如 当二进制变体变为 Ethereum 的 Patricia Trie 时 可用。 在规范的实现中,交易被流式传输到 Cosmos 集线器应用程序通过 ABCI 接口。 Cosmos Hub将接受一些主要交易 类型,包括 SendTx、BondTx、UnbondTx、ReportHackTx、  SlashTx、BurnAtomTx、ProposalCreateTx 和 ProposalVoteTx、 这是相当不言自明的,并将记录在 本文的未来修订。在这里我们记录了两个主要的 IBC 的交易类型:IBCBlockCommitTx 和 IBCPacketTx。 IBCBlockCommitTx 交易由以下部分组成: ChainID(字符串):blockchain 的 ID BlockHash ([]byte) :块 hash 字节,Merkle 根 其中包括应用程序-hash BlockPartsHeader (PartSetHeader) :块部件集标头 字节,仅需要验证投票签名 BlockHeight (int) :提交的高度 BlockRound (int) :提交的轮次 提交([]投票):>⅔ Tendermint 预提交投票表明 包含一个块提交 ValidatorsHash ([]byte) :新的 Merkle 树根 hash validator 设置

ValidatorsHashProof (SimpleProof):一个 SimpleTree Merkleproof,用于根据 BlockHash 证明 ValidatorsHash AppHash ([]byte) :IAVLTree Merkle 树根 hash 应用状态 AppHashProof (SimpleProof):SimpleTree Merkle 证明 对照 BlockHash 证明 AppHash IBC数据包由以下部分组成: 标头 (IBCPacketHeader) :数据包标头 Payload ([]byte) :数据包有效负载的字节。可选 PayloadHash ([]byte) :数据包字节的 hash 。 可选 Payload 或 PayloadHash 之一必须存在。 hash IBCPacket 的 是两个项目的简单 Merkle 根,即 Header  和有效负载。没有完整负载的 IBC 数据包称为 缩写数据包。 IBCPacketHeader 由以下部分组成: SrcChainID(字符串):源 blockchain ID DstChainID(字符串):目的地 blockchain ID Number(int):所有数据包的唯一编号 状态(枚举):可以是 AckPending 、 AckSent 之一, AckReceived 、 NoAck 或超时 类型(字符串):类型取决于应用程序。 Cosmos 保留“coin”数据包类型 MaxHeight (int) :如果状态不是 NoAckWanted 或 AckReceived 到了这个高度,状态就变成 Timeout 。可选 IBCPacketTx 交易由以下部分组成:FromChainID(字符串):blockchain 的 ID,即 提供此数据包;不一定是来源 FromBlockHeight (int) : blockchain 高度,其中 以下数据包包含(Merkle 化)在块 hash 中 源链 Packet (IBCPacket) :数据包,其状态可能是一个 AckPending 、 AckSent 、 AckReceived 、 NoAck 或 Timeout PacketProof (IAVLProof):用于证明的 IAVLTree Merkle-proof 数据包的 hash 与源链的 AppHash 相对应 给定高度 从“Zone1”到“Zone2”发送数据包的顺序 通过“集线器”的情况如{图X}所示。首先,一个 IBCPacketTx  向“Hub”证明该数据包包含在应用程序状态中 “1区”。然后,另一个 IBCPacketTx 向“Zone2”证明 数据包包含在“Hub”的应用程序状态中。在此期间 过程中,IBCPacket 的结果是相同的:SrcChainID 是 始终为“Zone1”,DstChainID 始终为“Zone2”。 PacketProof 必须具有正确的 Merkle-proof 路径,如下所示 如下: 当“Zone1”想要通过“Hub”向“Zone2”发送数据包时, 无论数据包在“Zone1”、“Hub”还是“Zone2”上进行 Merkleized,IBCPacket 数据都是相同的。唯一可变的yield是  跟踪递送的状态。 我们感谢我们的朋友和同行在概念化方面提供的帮助, 审查并为我们与 Tendermint 的合作提供支持 和 Cosmos。 IBC/<源链ID>/<目标链ID>/<编号>

SkuChain 的 Zaki Manian 在格式化和 措辞,特别是在 ABCI 部分下 Althea 的 Jehan Tremback 和达斯汀·拜因顿 (Dustin Byington) 提供的帮助 初始迭代 Honey Badger 的 Andrew Miller 对共识的反馈 Greg Slepak 对共识和措辞的反馈 还要感谢 Bill Gleim 和 Seunghwan Han 所做的各种努力 贡献。 此处提供您的姓名和组织以供您贡献 1 Bitcoin:https://bitcoin.org/bitcoin.pdf 2 零现金:http://zerocash-project.org/paper 3Ethereum:https://github.com/ethereum/wiki/wiki/WhitePaper 4DAO: https://download.slock.it/public/DAO/WhitePaper.pdf 5 隔离证人: https://github.com/bitcoin/bips/blob/master/bip0141.mediawiki 6 BitcoinNG:https://arxiv.org/pdf/1510.02037v2.pdf 7 闪电网络:https://lightning.network/lightningnetwork-paper-DRAFT-0.5.pdf 8 嫩薄荷: https://github.com/tendermint/tendermint/wiki 9 FLP 不可能: https://groups.csail.mit.edu/tds/papers/Lynch/jacm85.pdf 10 杀手:https://blog.ethereum.org/2014/01/15/slasher-apunitive-proof-of-stake-algorithm/ 11 PBFT:http://pmg.csail.mit.edu/papers/osdi99.pdf 12 种比特股:https://bitshares.org/technology/delegatedproof-of-stake-consensus/

13Stellar:https://www.stellar.org/papers/stellar-consensusprotocol.pdf 14 跨账本:https://interledger.org/rfcs/0001-interledgerarchitecture/ 15 条侧链:https://blockstream.com/sidechains.pdf 16卡斯帕: https://blog.ethereum.org/2015/08/01/introducing-casperfriendly-ghost/ 17ABCI:https://github.com/tendermint/abci 18 Ethereum 分片: https://github.com/ethereum/EIPs/issues/53 19 LibSwift: http://www.ds.ewi.tudelft.nl/yleadmin/pds/papers/Performa nceAnalysisOfLibswift.pdf 20 个 DLS: http://groups.csail.mit.edu/tds/papers/Lynch/jacm88.pdf 21 瘦客户端安全: https://en.bitcoin.it/wiki/Thin_Client_Security 22 Ethereum 2.0 紫红色纸: http://vitalik.ca/yles/mauve_paper.html https://www.docdroid.net/ec7xGzs/314477721-ethereumplatform-review-opportunities-and-challenges-for-privateand-consortium-blockchains.pdf.html

Ø è