Cosmos: شبكة من دفاتر الأستاذ الموزعة

Cosmos: A Network of Distributed Ledgers

द्वारा Jae Kwon and Ethan Buchman · 2016

सिंगल मोड v1.cosmos.network

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.

مقدمة

النجاح المشترك للنظام البيئي مفتوح المصدر، المشاركة اللامركزية، والعملات المشفرة العامة ألهمت فهم بروتوكولات الإنترنت اللامركزية يمكن استخدامها لتحسين البنية التحتية الاجتماعية والاقتصادية بشكل جذري. لقد رأينا تطبيقات blockchain متخصصة مثل Bitcoin [1] (أ العملة المشفرة)، Zerocash [2] (عملة مشفرة للخصوصية)، و منصات smart contract المعممة مثل Ethereum [3]، مع عدد لا يحصى من التطبيقات الموزعة لـ Etherium Virtual الآلة (EVM) مثل Augur (سوق التنبؤ) وTheDAO [4] (نادي استثماري). ومع ذلك، حتى الآن، عانى هؤلاء blockchain من عدد من المشاكل من العيوب، بما في ذلك عدم كفاءة الطاقة الإجمالية، أو الفقراء أو الأداء المحدود، وآليات الحوكمة غير الناضجة. مقترحات لتوسيع نطاق معاملات Bitcoin، مثل الشاهد المنفصل [5] و BitcoinNG [6]، عبارة عن مقياس رأسي الحلول التي تظل محدودة بقدرة جسدية واحدة الآلة، وذلك لضمان خاصية المراجعة الكاملة. يمكن أن تساعد الشبكة المسرّعة [7] في توسيع نطاق المعاملات Bitcoin

الحجم عن طريق ترك بعض المعاملات خارج دفتر الأستاذ تمامًا، وهو مناسب تمامًا للمدفوعات الصغيرة والحفاظ على الخصوصية قضبان الدفع، ولكنها قد لا تكون مناسبة لمزيد من التعميم احتياجات التحجيم. الحل المثالي هو الذي يسمح بتعدد blockchains المتوازية التفاعل مع الاحتفاظ بخصائصها الأمنية. هذا قد ثبت أنه صعب، إن لم يكن مستحيلاً، مع proof-of-work. تم الدمج التعدين، على سبيل المثال، يسمح بالعمل المنجز لتأمين أحد الوالدين السلسلة ليتم إعادة استخدامها في سلسلة فرعية، ولكن يجب أن تظل المعاملات كذلك تم التحقق من صحتها، بالترتيب، بواسطة كل عقدة، وتم الدمج blockchain يكون عرضة للهجوم إذا كانت أغلبية hashing السلطة على لا يقوم الوالد بدمج تعدين الطفل بشكل نشط. مراجعة أكاديمية يتم توفير بنيات الشبكة البديلة blockchain سياق إضافي، ونقدم ملخصات للمقترحات الأخرى وعيوبها في الأعمال ذات الصلة. نقدم هنا Cosmos، بنية شبكة جديدة blockchain الذي يعالج كل هذه المشاكل. Cosmos عبارة عن شبكة تضم الكثيرين blockchains مستقلة، تسمى المناطق. يتم تشغيل المناطق بواسطة Tendermint Core [8]، والذي يوفر أداءً عاليًا، محرك إجماع متسق وآمن يشبه PBFT، حيث تضمن المساءلة الصارمة للفرعية التحكم في سلوك البرامج الضارة الجهات الفاعلة. تعتبر خوارزمية الإجماع BFT الخاصة بـ Tendermint Core مناسبة تمامًا لتوسيع النطاق العام proof-of-stake blockchains. المنطقة الأولى في Cosmos تسمى Cosmos Hub. Cosmos Hub عبارة عن عملة مشفرة متعددة الأصول proof-of-stake ذات قيمة بسيطة آلية الحوكمة التي تمكن الشبكة من التكيف و ترقية. بالإضافة إلى ذلك، يمكن تمديد المحور Cosmos بواسطة ربط مناطق أخرى. يتواصل مركز ومناطق شبكة Cosmos معها بعضهما البعض عبر بروتوكول اتصال inter-blockchain (IBC)، نوع UDP أو TCP افتراضي لـ blockchains. يمكن أن تكون الرموز يتم نقلها من منطقة إلى أخرى بشكل آمن وسريعدون الحاجة إلى سيولة التبادل بين المناطق. بدلا من ذلك، جميع عمليات النقل بين المناطق token تمر عبر مركز Cosmos، والذي يتتبع المبلغ الإجمالي لـ tokens الذي تحتفظ به كل منطقة. ال يعزل المحور كل منطقة عن فشل المناطق الأخرى. لان يمكن لأي شخص توصيل منطقة جديدة بمركز Cosmos، كما تسمح المناطق بذلك من أجل التوافق المستقبلي مع ابتكارات blockchain الجديدة. في هذا القسم نصف بروتوكول توافق Tendermint والواجهة المستخدمة لبناء التطبيقات بها. للمزيد التفاصيل، انظر الملحق. في الخوارزميات البيزنطية الكلاسيكية المتسامحة مع الأخطاء (BFT)، كل عقدة له نفس الوزن. في Tendermint، العقد لها قيمة غير سلبية مقدار قوة التصويت، والعقد التي لها تصويت إيجابي تسمى الطاقة validators. يشارك المصادقون في بروتوكول الإجماع عن طريق بث التوقيعات المشفرة، أو الأصوات، للاتفاق على الكتلة التالية. يتم تحديد صلاحيات التصويت للمصادقين عند النشأة، أو يتم تحديدها تم تغييره بشكل حتمي بواسطة blockchain، اعتمادًا على application. على سبيل المثال، في تطبيق proof-of-stake مثل مركز Cosmos، قد يتم تحديد قوة التصويت بواسطة مبلغ staking tokens مرهون كضمان. ملاحظة: تشير الكسور مثل ⅔ و⅓ إلى أجزاء من إجمالي التصويت الطاقة، لا العدد الإجمالي لـ validators أبدًا، ما لم يكن كل validators لها وزن متساوي. >⅔ تعني "أكثر من ⅔"، ≥⅓ تعني "على الأقل". ⅓". Tendermint هو بروتوكول إجماع BFT متزامن جزئيًا مشتقة من خوارزمية إجماع DLS [20]. النعناع هو

يتميز ببساطته وأدائه ومسؤوليته. يتطلب البروتوكول مجموعة yxed المعروفة من validators، حيث يكون كل منها يتم التعرف على validator بواسطة مفتاحهم العام. يحاول المدققون القيام بذلك التوصل إلى توافق في الآراء بشأن كتلة واحدة في كل مرة، حيث تكون الكتلة عبارة عن قائمة من المعاملات. يستمر التصويت للتوافق على الكتلة جولات. كل جولة لها قائد مستدير أو مقترح يقترح كتلة. ثم يصوت validators، على مراحل، على ما إذا كان ذلك أم لا لقبول الكتلة المقترحة أو الانتقال إلى الجولة التالية. ال يتم اختيار مقدم العرض للجولة بشكل حتمي من الأمر قائمة validators، بما يتناسب مع قوة التصويت الخاصة بهم. يتم وصف التفاصيل الكاملة للبروتوكول هنا. أمان Tendermint مستمد من استخدامه للبيزنطية المثالية التسامح مع الخطأ من خلال التصويت بالأغلبية العظمى (>⅔) والقفل آلية. ويضمنون معًا ما يلي: ≥⅓ قوة التصويت يجب أن تكون بيزنطية للتسبب في انتهاك السلامة، حيث يتم الالتزام بأكثر من قيمتين. إذا نجحت أي مجموعة من validators في انتهاك السلامة، أو حتى محاولات القيام بذلك، يمكن التعرف عليهم من خلال البروتوكول. هذا يشمل كلا من التصويت للكتل conzicting والبث أصوات غير مبررة على الرغم من ضماناته القوية، يقدم Tendermint منتجات استثنائية الأداء. في معايير 64 عقدة موزعة على 7 مراكز البيانات في 5 قارات، في المثيلات السحابية للسلع الأساسية، يمكن لتوافق Tendermint معالجة آلاف المعاملات لكل ثانيًا، مع فترات استجابة للالتزام تتراوح من ثانية إلى ثانيتين. والجدير بالذكر أن أداء ما يزيد عن ألف معاملة لكل يتم الحفاظ على الثانية حتى في ظروف الخصومة القاسية validators يعطل أو يبث أصواتًا ضارة. انظر ygur أدناه للحصول على التفاصيل.

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

تم تبسيط إحدى المزايا الرئيسية لخوارزمية الإجماع الخاصة بـ Tendermint أمان العميل الخفيف، مما يجعله مرشحًا مثاليًا للهواتف المحمولة و حالات استخدام إنترنت الأشياء. بينما يجب على العميل الخفيف Bitcoin المزامنة سلاسل رؤوس الكتل والسلسلة التي تحتوي على أكبر دليل على ذلك في العمل، يحتاج عملاء Tendermint Light فقط إلى مواكبة التغييرات إلى مجموعة validator، ثم تحقق من >⅔ PreCommits في أحدث كتلة لتحديد أحدث حالة. تعمل أيضًا أدلة العميل الخفيفة المقتضبة على تمكين inter-blockchain الاتصالات. لدى Tendermint إجراءات وقائية لمنع حدوث بعض الأمراض الهجمات الملحوظة، مثل عمليات الإنفاق المزدوجة بعيدة المدى التي لا تنطوي على أي شيء على المحك والرقابة. وتناقش هذه بشكل كامل في الملحق.يتم تنفيذ خوارزمية إجماع Tendermint في ملف برنامج يسمى Tendermint الأساسية. Tendermint Core هو "محرك الإجماع" الحيادي للتطبيق والذي يمكنه تشغيل أي تطبيق تطبيق الصندوق الأسود الحتمي في نسخة متماثلة موزعة blockchain. يتصل Tendermint Core بتطبيقات blockchain عبر واجهة Blockchain للتطبيق (ABCI) [17]. وبالتالي، ABCI يسمح ببرمجة تطبيقات blockchain في أي اللغة، وليس فقط لغة البرمجة التي تم الإجماع عليها تمت كتابة المحرك. بالإضافة إلى ذلك، ABCI يجعل من الممكن بسهولة قم بتبديل طبقة الإجماع لأي مكدس blockchain موجود. نرسم تشبيهًا بالعملة المشفرة المعروفة Bitcoin. Bitcoin هي عملة مشفرة blockchain حيث تحتفظ كل عقدة قاعدة بيانات لمخرجات المعاملات غير المنفقة (UTXO) المدققة بالكامل. إذا أراد أحدهم إنشاء نظام يشبه Bitcoin أعلى ABCI، سيكون 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 عبارة عن شبكة متوازية مستقلة blockchains كل منها مدعوم بخوارزميات الإجماع الكلاسيكية BFT مثل النعناع 1. سيكون blockchain الأول في هذه الشبكة هو Cosmos Hub. ال Cosmos يتصل المحور بالعديد من blockchains (أو المناطق) عبر بروتوكول اتصال جديد بين blockchain. المركز Cosmos يتتبع العديد من أنواع token ويحتفظ بسجل للمجموع عدد tokens في كل منطقة متصلة. يمكن أن تكون الرموز يتم نقلها من منطقة إلى أخرى بشكل آمن وسريع دون الحاجة إلى تبادل السوائل بين المناطق، لأن جميعها تتم عمليات تحويل العملات بين المناطق عبر مركز Cosmos. تعمل هذه البنية على حل العديد من المشكلات المتعلقة بمساحة blockchain يواجه اليوم، مثل قابلية التشغيل البيني للتطبيقات، وقابلية التوسع، و إمكانية الترقية السلسة. على سبيل المثال، المناطق المشتقة من Bitcoind، يمكنك الانتقال إلى Ethereum أو CryptoNote أو ZCash أو أي نظام blockchain يتم توصيله بمركز Cosmos. تسمح هذه المناطق لـ Cosmos بذلك التوسع بشكل لا نهائي لتلبية الطلب على المعاملات العالمية. المناطق هي أيضا يعد خيارًا رائعًا للتبادل الموزع، والذي سيتم دعمه كـ حسنا. Cosmos ليس مجرد دفتر أستاذ موزع، وCosmos Hub ليس حديقة مسورة أو مركز الكون. نحن كذلك تصميم بروتوكول لشبكة مفتوحة من دفاتر الأستاذ الموزعة والتي يمكن أن تكون بمثابة أساس جديد للأنظمة المالية المستقبلية، على أساس مبادئ التشفير والاقتصاد السليم والإجماع النظرية والشفافية والمساءلة. يعد مركز Cosmos هو المركز العام الأول blockchain في Cosmos الشبكة، مدعومة بخوارزمية الإجماع BFT الخاصة بـ Tendermint. ال تم إنشاء مشروع Tendermint مفتوح المصدر في عام 2014 لمعالجة المشكلة السرعة وقابلية التوسع والمشكلات البيئية المتعلقة بخوارزمية إجماع إثبات العمل الخاصة بـ Bitcoin. باستخدام وتحسين ما ثبت

BFT خوارزميات تم تطويرها في معهد ماساتشوستس للتكنولوجيا في عام 1988 [20]، Tendermint كان الفريق أول من قدم عرضًا مفاهيميًا لـ proof-of-stake عملة مشفرة تعالج مشكلة عدم وجود شيء على المحك عانى الجيل الأول من العملات المشفرة proof-of-stake مثل مثل NXT وBitShares1.0. اليوم، تستخدم جميع محافظ الهاتف المحمول Bitcoin تقريبًا خوادم موثوقة تزويدهم بالتحقق من المعاملة. وذلك لأن إثبات العمل يتطلب انتظار العديد من التأكيدات قبل يمكن اعتبار المعاملة ملتزمة بشكل لا رجعة فيه. لقد تم بالفعل عرض هجمات Doublespend على خدمات مثل CoinBase. على عكس أنظمة الإجماع blockchain الأخرى، تقدم Tendermint التحقق من الدفع عبر الهاتف المحمول بشكل فوري وآمن. نظرًا لأن Tendermint مصمم بحيث لا يتشعب أبدًا على الإطلاق، فهو متنقل يمكن أن تتلقى المحافظ تأكيدًا فوريًا للمعاملات، مما يجعل المدفوعات غير الموثوقة والعملية حقيقة واقعة على الهواتف الذكية. هذا له تأثيرات كبيرة على تطبيقات إنترنت الأشياء مثل حسنا. يتمتع المدققون في Cosmos بدور مماثل لعمال المناجم Bitcoin، ولكن بدلاً من ذلك استخدم التوقيعات المشفرة للتصويت. المصادقون هم آلات آمنة ومخصصة مسؤولة عن الالتزام كتل. يمكن لغير validators تفويض staking tokens (يُسمى "الذرات") إلى أي validator لكسب جزء من رسوم الكتلة والذرة المكافآت، لكنهم يتعرضون لخطر العقاب (القطع) إذا تم اختراق المندوب validator أو انتهاك البروتوكول. ثبت ضمانات سلامة Tendermint BFT الإجماع والضمانات إيداع أصحاب المصلحة – validator والمفوضين – تقديم أمان يمكن إثباته وقابل للقياس للعقد والعملاء الخفيفين. يجب أن تحتوي الدفاتر العامة الموزعة على دستور و نظام الحكم. Bitcoin يعتمد على Bitcoin الأساس والتعدين لتنسيق الترقيات، ولكن هذه عملية بطيئة. تم تقسيم Ethereum إلى ETH وETC بعد التفرع الصعب للمعالجة يعود سبب الاختراق DAO إلى حد كبير إلى عدم وجود عقد اجتماعي مسبق ولا آلية لاتخاذ مثل هذه القرارات. يمكن للمصادقين والمفوضين في Cosmos التصويت عليهم المقترحات التي يمكن أن تغير المعلمات المحددة مسبقًا للنظام تلقائيا (مثل حد الغاز كتلة)، وتنسيق الترقيات، كما وكذلك التصويت على تعديلات الدستور الذي يمكن قراءته بواسطة الإنسان التي تحكم سياسات Cosmos Hub. الدستور يسمح بالتماسك بين أصحاب المصلحة بشأن قضايا مثل السرقة والأخطاء (مثل حادثة DAO)، مما يسمح بإجراء أسرع وأسرع دقة أنظف. يمكن أن يكون لكل منطقة أيضًا دستورها ونظام حكمها الخاص آلية كذلك. على سبيل المثال، يمكن أن يحتوي المركز Cosmos على الدستور الذي يفرض الثبات في المركز (لا يوجد تراجع، حفظ الأخطاء في تنفيذ العقدة المركزية Cosmos)، بينما يمكن لكل منطقة وضع سياساتها الخاصة فيما يتعلق بالتراجع. ومن خلال تمكين إمكانية التشغيل البيني بين مناطق السياسة المختلفة، فإن تمنح شبكة Cosmos مستخدميها الحرية المطلقة والإمكانات تجريب غير مسموح به. نحن هنا نصف نموذجًا جديدًا للامركزية وقابلية التوسع. Cosmos عبارة عن شبكة تضم العديد من blockchains التي يتم تشغيلها بواسطة النعناع. بينما تهدف المقترحات الحالية إلى إنشاء "فردية". blockchain" مع إجمالي طلب المعاملات العالمية، Cosmos يسمح للعديد من blockchains بالعمل بشكل متزامن مع بعضها البعض مع الاحتفاظ بإمكانية التشغيل البيني. في الأساس، يدير Cosmos Hub العديد من المستقلين blockchains تسمى "المناطق" (يشار إليها أحيانًا باسم "الأجزاء"، في إشارة إلى تقنية قياس قاعدة البيانات المعروفة باسم "التقسيم").

دفق مستمر من عمليات الحظر الأخيرة من المناطق المنشورة عليها يسمح Hub للمركز بمواكبة حالة كل منطقة. وبالمثل، فإن كل منطقة تواكب حالة المحور (لكن المناطق لا يواكبون بعضهم البعض إلا بشكل غير مباشر من خلال المحور). ثم يتم إرسال حزم المعلومات من واحدة منطقة إلى أخرى عن طريق نشر أدلة Merkle كدليل على أن تم إرسال المعلومات واستلامها. وتسمى هذه الآلية التواصل بين blockchain، أو IBC للاختصار. يمكن لأي من المناطق أن تكون في حد ذاتها محاورًا لتكوين رسم بياني غير دوري، ولكن من أجل الوضوح سنصف فقط ما هو بسيط conyguration حيث لا يوجد سوى محور واحد، والعديد من غير المحور المناطق. مركز Cosmos هو blockchain الذي يستضيف أصولًا متعددة دفتر الأستاذ الموزع، حيث يمكن الاحتفاظ بـ tokens بواسطة مستخدمين فرديين أو حسب المناطق نفسها. يمكن نقل هذه tokens من منطقة واحدة إلى أخرى في حزمة خاصة IBC تسمى "حزمة العملات المعدنية". المحور هو مسؤولة عن الحفاظ على الثبات العالمي للمجموع مقدار كل token عبر المناطق. IBC حزمة العملات المعدنية يجب أن يتم تنفيذ المعاملات من قبل المرسل والمركز والمتلقي blockchains.نظرًا لأن Cosmos Hub يعمل بمثابة دفتر الأستاذ المركزي للكل النظام، فإن أمن المركز له أهمية قصوى. بينما قد تكون كل منطقة عبارة عن Tendermint blockchain مؤمنة بواسطة as عدد قليل يصل إلى 4 (أو حتى أقل إذا لم يكن هناك حاجة إلى إجماع BFT)، المحور يجب تأمينها من خلال مجموعة لامركزية عالميًا من validators يمكن أن تصمد أمام سيناريوهات الهجوم الأكثر خطورة، مثل تقسيم الشبكة القارية أو هجوم ترعاه الدولة القومية. منطقة Cosmos هي منطقة blockchain مستقلة تتبادل IBC الرسائل مع المحور. من وجهة نظر المحور، المنطقة هي أ حساب متعدد التوقيع للعضوية الديناميكية المتعددة الأصول يمكن إرسال واستقبال tokens باستخدام IBC الحزم. مثل أ حساب العملة المشفرة، لا يمكن للمنطقة نقل أكثر من tokens من إنه موجود بالفعل، ولكن يمكنه تلقي tokens من الآخرين الذين لديهم تلك الرسائل. منطقة قد يتم تعيينه كـ "مصدر" لواحد أو أكثر من أنواع token، ومنحها القدرة على تعزيز هذا العرض token. قد يتم تثبيت ذرات المركز Cosmos بواسطة validators في المنطقة متصل بالمحور. بينما تشن الهجمات المزدوجة الإنفاق على هذه المناطق من شأنه أن يؤدي إلى خفض الذرات مع المسؤولية الجزئية لـ Tendermint، وهي منطقة حيث يكون >⅔ من قوة التصويت يمكن للبيزنطيين ارتكاب حالة باطلة. مركز Cosmos لا يفعل ذلك التحقق من أو تنفيذ المعاملات المرتكبة في مناطق أخرى، لذلك هو عليه مسؤولية المستخدمين عن إرسال tokens إلى المناطق التي يثقون بها. في المستقبل، قد يجتاز نظام إدارة Cosmos Hub Hub مقترحات التحسين التي تفسر فشل المنطقة. ل على سبيل المثال، قد تكون عمليات النقل الصادرة token من بعض (أو جميع) المناطق يتم خنقها للسماح بقطع دائرة الطوارئ للمناطق (وقف مؤقت لعمليات نقل token) عند اكتشاف هجوم. الآن ننظر إلى كيفية تواصل المركز والمناطق مع كل منهما أخرى. على سبيل المثال، إذا كان هناك ثلاثة blockchains، "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-proof للأحدث كتلة-hash. من خلال تقسيم آليات IBC إلى معاملتين منفصلتين، فإننا السماح لآلية سوق الرسوم المحلية لسلسلة الاستقبال بذلك تحديد الحزم التي سيتم الالتزام بها (أي تم الاعتراف بها)، بينما السماح بالحرية الكاملة لسلسلة الإرسال فيما يتعلق بكيفية ذلك يُسمح بالعديد من الحزم الصادرة. في المثال أعلاه، من أجل تحديث الكتلة-hash الخاصة بـ "Zone1" على "Hub" (أو "Hub" في "Zone2")، IBCBlockCommitTxيجب نشر المعاملة على "المركز" مع الكتلة-hash من "Zone1" (أو على "Zone2" مع الكتلة-hash من "Hub"). راجع IBCBlockCommitTx وIBCPacketTx لمزيد من المعلومات على نوعي المعاملات IBC. بنفس الطريقة التي يكون بها Bitcoin أكثر أمانًا من خلال كونه موزعًا، يمكننا أن نجعل التبادلات أقل عرضة للخطر اختراقات خارجية وداخلية عن طريق تشغيله على blockchain. نحن نسمي هذا التبادل الموزع. ما يسميه مجتمع العملات المشفرة اللامركزية تعتمد البورصة اليوم على ما يسمى معاملات "السلسلة الذرية" (AXC). مع معاملة AXC، هناك مستخدمان قيد التشغيل يمكن لسلسلتين مختلفتين إجراء معاملتي تحويل ملتزمة معًا في كلا الدفترين، أو لا شيء على الإطلاق (أي: ذرياً). على سبيل المثال، يمكن لاثنين من المستخدمين تداول عملات البيتكوين مقابل الأثير (أو أي اثنين من tokens في دفتري أستاذ مختلفين) باستخدام معاملات 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 ساعة بقيمة 20 مليون دولار، وفي المركز الثاني Bitynex بحجم تداول على مدار 24 ساعة بقيمة 5 ملايين دولار. ونظرا لهذه الشبكة القوية من غير المرجح أن تقوم البورصات اللامركزية القائمة على AXC بذلك الفوز بالحجم عبر البورصات المركزية. من أجل اللامركزية تبادل للتنافس مع تبادل مركزي، فإنه سوف تحتاج لدعم دفاتر الطلبات العميقة مع أوامر الحد. فقط موزعة التبادل على blockchain يمكن أن يوفر ذلك. يوفر Tendermint فوائد إضافية للمعاملات الأسرع يرتكب. من خلال إعطاء الأولوية للسرعة دون التضحية الاتساق، يمكن للمناطق الموجودة في Cosmos إجراء المعاملات بسرعة - من أجل كلاً من معاملات أوامر الصرف وكذلك IBC token التحويلات إلى ومن مناطق أخرى. بالنظر إلى حالة بورصات العملات المشفرة اليوم، يعد هذا أمرًا رائعًا تطبيق Cosmos هو التبادل الموزع (المعروف أيضًا باسم Cosmos ديكس). القدرة الإنتاجية للمعاملة كذلك يمكن أن يكون وقت استجابة الالتزام مشابهًا لتلك المركزية التبادلات. يمكن للمتداولين تقديم أوامر محددة يمكن تنفيذها دون أن يكون كلا الطرفين متصلين بالإنترنت. ومع تندرمينت، مركز 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 ( Origin)، سيسمح عقد الجسر لحاملي الأثير بإرسال الأثير إلى منطقة الجسر عن طريق إرسالها إلى عقد الجسر Ethereum. بمجرد استلام الأثير من خلال عقد الجسر، فإن لا يمكن سحب الأثير إلا إذا كانت هناك حزمة IBC مناسبة تم استلامها بموجب عقد الجسر من منطقة الجسر. ال يتتبع عقد الجسر مجموعة validator لمنطقة الجسر، والتي قد تكون مطابقة لمجموعة Cosmos Hub validator. في حالة Bitcoin، المفهوم مشابه باستثناء أنه بدلاً من ذلك عقد جسر واحد، سيتم التحكم في كل UTXO بواسطة أ عتبة متعددة التوقيعات P2SH. بسبب القيود في نظام P2SH، لا يمكن أن يكون الموقعون متطابقين مع Cosmos المحور validator-مجموعة.يمكن نقل الأثير الموجود في منطقة الجسر ("الأثير الجسري") إلى ومن المحور، ويتم تدميرها لاحقًا بمعاملة ذلك يرسلها إلى عنوان سحب معين على Ethereum. IBC حزمة تثبت أن المعاملة حدثت في منطقة الجسر يمكن نشرها على عقد الجسر Ethereum للسماح بالأثير ليتم سحبها. في حالة Bitcoin، يقوم نظام البرمجة النصية المقيدة بذلك من الصعب عكس آلية نقل العملة IBC. كل UTXO لديه منشور مستقل خاص به، لذلك يجب أن يكون كل UTXO تم الترحيل إلى UTXO الجديد عندما يكون هناك تغيير في مجموعة Bitcoin موقعي الضمان. أحد الحلول هو الضغط و قم بفك ضغط مجموعة UTXO حسب الضرورة للحفاظ على العدد الإجمالي من UTXOs لأسفل. إن خطر مثل هذا العقد التجسيري هو مجموعة validator المارقة. ≥⅓ يمكن أن تتسبب قوة التصويت البيزنطية في حدوث شوكة وسحب الأثير من عقد الجسر على Ethereum مع الحفاظ على جسر الجسر في منطقة الجسر. والأسوأ من ذلك أن قوة التصويت البيزنطية يمكنها ذلك سرقة الأثير مباشرة من أولئك الذين أرسلوه إلى عقد الجسر بالانحراف عن منطق التجسير الأصلي لمنطقة الجسر. من الممكن معالجة هذه المشكلات من خلال تصميم الجسر مسؤولة تماما. على سبيل المثال، كافة الحزم IBC من المركز و الأصل، قد يتطلب الاعتراف من قبل منطقة الجسر في بهذه الطريقة يمكن أن تكون جميع التحولات الحكومية في منطقة الجسر يتم تحديها والتحقق منها بكفاءة سواء من خلال المركز أو الأصل عقد الجسر. يجب أن يسمح المركز والأصل لمنطقة الجسر validators بنشر الضمانات، وtoken عمليات النقل خارج يجب تأخير عقد الجسر (وفك الضمانات فترة طويلة بما فيه الكفاية) للسماح بأية تحديات مدققين مستقلين. نترك تصميم المواصفات و تنفيذ هذا النظام مفتوح كمستقبل Cosmos

مقترح التحسين، ليتم تمريره من خلال مركز Cosmos نظام الحكم. يعد حل مشكلة القياس مشكلة مفتوحة لـ Ethereum. حاليًا، تقوم عقد Ethereum بمعالجة كل معاملة و أيضا تخزين جميع الدول. وصلة. نظرًا لأن Tendermint يمكنها تنفيذ الكتل بشكل أسرع بكثير من Ethereum proof-of-work، EVM المناطق المدعومة بإجماع Tendermint و يمكن أن يوفر التشغيل على الأثير الجسري أداءً أعلى Ethereum blockchains. بالإضافة إلى ذلك، على الرغم من أن Cosmos Hub و IBC لا تسمح آليات الحزم بمنطق العقد التعسفي التنفيذ في حد ذاته، يمكن استخدامه لتنسيق حركات token بين Ethereum العقود الجاري تنفيذها في مناطق مختلفة، توفير أساس للتوسع token المتمركز حول Ethereum عبر مشاركة. تعمل مناطق Cosmos على تشغيل منطق التطبيق التعسفي، والذي تم تحديده عند بداية حياة المنطقة ويمكن تحديثها مع مرور الوقت من قبل الحكم. تسمح هذه القابلية للمناطق بـ Cosmos بمثابة جسور إلى العملات المشفرة الأخرى مثل Ethereum أو Bitcoin، كما أنه يسمح بمشتقات تلك blockchains، باستخدام نفس قاعدة التعليمات البرمجية ولكن مع مجموعة validator مختلفة و التوزيع الأولي. وهذا يسمح للعديد من العملات المشفرة الموجودة أطر العمل، مثل تلك الخاصة بـ Ethereum، وZerocash، وBitcoin، CryptoNote وما إلى ذلك، لاستخدامها مع Tendermint Core، وهو محرك توافقي عالي الأداء، على شبكة مشتركة، فتح فرصة هائلة للتشغيل البيني عبر المنصات. علاوة على ذلك، باعتباره أصلًا متعددًا blockchain، واحدًا قد تحتوي المعاملة على مدخلات ومخرجات متعددة، حيث يكون كل منها يمكن أن يكون الإدخال من أي نوع token، مما يتيح لـ Cosmos العمل مباشرةً كـ منصة للتبادل اللامركزي، على الرغم من افتراض الأوامرلتتم مطابقتها عبر منصات أخرى. بدلا من ذلك، يمكن للمنطقة أن تخدم كتبادل موزع متسامح مع الأخطاء (مع دفاتر الطلبات)، والذي يمكن أن يكون هناك تحسن صارم على المركزية الموجودة بورصات العملات المشفرة التي تميل إلى الاختراق مع مرور الوقت. يمكن أن تعمل المناطق أيضًا كإصدارات مدعومة من المؤسسة blockchain والأنظمة الحكومية، حيث أجزاء من خدمة معينة تدار تقليديا من قبل منظمة أو مجموعة من المنظمات يتم تشغيلها بدلاً من ذلك كتطبيق ABCI في منطقة معينة، والتي يسمح لها بوراثة الأمن وقابلية التشغيل البيني للجمهور Cosmos الشبكة دون التضحية بالتحكم في الشبكة الأساسية الخدمة. وبالتالي، قد يقدم Cosmos أفضل ما في العالمين المنظمات التي تتطلع إلى الاستفادة من تقنية blockchain ولكن من هي؟ الحذر من التخلي عن السيطرة بالكامل للثلث الموزع حزب. يدعي البعض أن هناك مشكلة كبيرة في تفضيل الاتساق خوارزميات الإجماع مثل Tendermint هي أن أي شبكة القسم الذي يتسبب في عدم وجود قسم واحد به >⅔ قوة التصويت (على سبيل المثال ≥⅓ الذهاب للخارج) ستوقف الإجماع تمامًا. يمكن أن تساعد بنية Cosmos في تخفيف هذه المشكلة باستخدام مركز عالمي مع مناطق الحكم الذاتي الإقليمية، حيث قوة التصويت لكل منطقة يتم توزيعها على أساس جغرافي مشترك المنطقة. على سبيل المثال، قد يكون النموذج المشترك للفرد المدن أو المناطق لتشغيل مناطقها الخاصة أثناء مشاركة أ المركز المشترك (على سبيل المثال، المركز Cosmos)، مما يتيح للنشاط البلدي تستمر في حالة توقف المحور بسبب شبكة مؤقتة التقسيم. لاحظ أن هذا يسمح بالجيولوجية والسياسية الحقيقية الميزات الطوبولوجية للشبكة التي يجب مراعاتها عند التصميم القوي الأنظمة الموحدة المتسامحة مع الأخطاء.

كانت NameCoin واحدة من أوائل blockchains التي حاولت حل مشكلة مشكلة تحليل الاسم عن طريق تكييف Bitcoin blockchain. لسوء الحظ كانت هناك العديد من المشاكل مع هذا النهج. باستخدام Namecoin، يمكننا التحقق من أن @satoshi، على سبيل المثال، كان كذلك مسجلة بمفتاح عام معين في وقت ما في الماضي، لكننا لا نعرف ما إذا كان المفتاح العام موجودًا منذ ذلك الحين تم تحديثه مؤخرًا ما لم نقم بتنزيل جميع الكتل منذ آخر مرة تحديث لهذا الاسم. ويرجع ذلك إلى القيود المفروضة على Bitcoin UTXO نموذج تحويل المعاملة Merkle، حيث فقط المعاملات (ولكن ليست حالة التطبيق القابلة للتغيير) هي من نوع Merkle في الكتلة-hash. وهذا يتيح لنا إثبات الوجود، ولكن ليس عدم وجود تحديثات لاحقة للاسم. وبالتالي، لا يمكننا أن نعرف تأكد من أحدث قيمة للاسم دون الثقة الكاملة العقدة، أو تكبد تكاليف كبيرة في النطاق الترددي عن طريق التنزيل كله blockchain. حتى لو تم تنفيذ شجرة بحث بحجم Merkle في NameCoin، اعتماده على proof-of-work يجعل عملية التحقق من العميل سهلة إشكالية. يجب على عملاء Light تنزيل نسخة كاملة من رؤوس جميع الكتل في blockchain بالكامل (أو على الأقل كل الرؤوس منذ آخر تحديث للاسم). وهذا يعني أن تتغير متطلبات عرض النطاق الترددي بشكل خطي مع مقدار الوقت [21]. بالإضافة إلى ذلك، يتغير الاسم على proof-of-work blockchain يتطلب انتظار كتل تأكيد إضافية proof-of-work، والذي يمكن أن يستغرق ما يصل إلى ساعة على Bitcoin. مع Tendermint، كل ما نحتاجه هو أحدث كتلة-hash موقعة من قبل نصاب قانوني قدره validators (بواسطة قوة التصويت)، وميركل دليل على القيمة الحالية المرتبطة بالاسم. هذا يجعلها من الممكن أن يكون لديك عميل خفيف مقتضب وسريع وآمن التحقق من قيم الاسم. في 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 الوحيدة token للمركز Cosmos. الذرات هي رخصة لحاملها التصويت أو التحقق من الصحة أو التفويض إلى validators أخرى. مثل Ethereum الأثير، يمكن أيضًا استخدام الذرات لدفع رسوم المعاملات تخفيف البريد العشوائي. ذرات إنزاتيوناري إضافية ومعاملة كتلة تتم مكافأة الرسوم إلى validator والمفوضين الذين يفوضون ذلك validators. ويمكن استخدام معاملة  BurnAtomTx  لاسترداد أي منها مبلغ متناسب من tokens من المجمع الاحتياطي. التوزيع الأولي للذرة tokens و validators في سفر التكوين سيذهب إلى الجهات المانحة لجمع التبرعات Cosmos (75%)، الجهات المانحة الرئيسية (5%)، Cosmos مؤسسة الشبكة (10%)، وALL IN BITS, Inc (10%). ومن لحظة التكوين فصاعدًا، سوف يصبح ثلث إجمالي كمية الذرات سيتم مكافأتك للمستعبدين validator والمفوضين كل عام. راجع خطة Cosmos للحصول على تفاصيل إضافية. على عكس Bitcoin أو غيره من proof-of-work blockchains، فإن Tendermint blockchain يصبح أبطأ مع المزيد من validators بسبب الزيادة تعقيد الاتصالات. ولحسن الحظ، يمكننا دعم ما يكفي validators لإنشاء blockchain قوي وموزع عالميًا مع أوقات تأكيد المعاملات السريعة جدًا، وعرض النطاق الترددي،

التخزين، وزيادة سعة الحوسبة الموازية، سنكون قادرين لدعم المزيد من validators في المستقبل. في يوم التكوين، سيتم تعيين الحد الأقصى لعدد validators إلى 100، وسيزداد هذا العدد بمعدل 13% لمدة 10 سنوات، و استقر عند 300 validators. يمكن لحاملي الذرة الذين ليسوا بالفعل أن يصبحوا validators بحلول التوقيع على معاملة  BondTx وإرسالها. كمية الذرات المقدمة كضمان يجب أن تكون غير صفرية. يمكن لأي شخص أن يصبح validator في أي وقت، إلا عندما يكون حجم التيار مجموعة validator أكبر من الحد الأقصى لعدد validators مسموح به. في هذه الحالة، تكون المعاملة صالحة فقط إذا كان المبلغ الذرات أكبر من كمية الذرات الفعالة التي يحتفظ بها الأصغر validator، حيث تشمل الذرات الفعالة الذرات المفوضة. عندما يحل validator الجديد محل validator الحالي بهذه الطريقة، validator الموجود يصبح غير نشط وجميع الذرات و تدخل الذرات المفوضة إلى حالة فك الارتباط. يجب أن يتم فرض بعض العقوبات على validators لأي منها الانحراف المقصود أو غير المقصود عن العقوبة البروتوكول. يتم قبول بعض الأدلة على الفور، مثل أ علامة مزدوجة على نفس الارتفاع والدائرية، أو انتهاكا السنة 0: 100  السنة الأولى: 113  السنة الثانية: 127  السنة 3: 144  السنة الرابعة: 163  السنة 5: 184  السنة 6: 208  السنة 7: 235  السنة 8: 265  السنة 9: 300  السنة 10: 300  ...

"prevote-the-lock" (قاعدة من بروتوكول إجماع Tendermint). سيؤدي مثل هذا الدليل إلى فقدان validator لوضعه الجيد وذراتها المرتبطة بالإضافة إلى حصتها التناسبية البالغة tokens في سيتم تخفيض مجموع الاحتياطي - الذي يطلق عليه مجتمعًا "حصته" -. في بعض الأحيان، لن يكون validators متاحًا، إما بسبب المنطقة انقطاع الشبكة أو انقطاع التيار الكهربائي أو لأسباب أخرى. إذا، في أي نقطة في كتل  ValidatorTimeoutWindow  السابقة، validator لم يتم تضمين التصويت الالتزام في blockchain أكثر من  مرات ValidatorTimeoutMaxAbsent، سيصبح validator غير نشط، وتفقد  ValidatorTimeoutPenalty  (الافتراضي 1%) من قيمته حصة. بعض السلوكيات "الخبيثة" لا يمكن تمييزها بشكل واضح الأدلة على blockchain. في هذه الحالات، يمكن لـ validators التنسيق خارج النطاق لفرض انتهاء مهلة هذه البرامج الضارة validators، إذا كان هناك إجماع بأغلبية ساحقة. في المواقف التي يتوقف فيها Cosmos Hub بسبب تحالف ≥⅓ من تختفي قوة التصويت، أو في الحالات التي يكون فيها ائتلاف ≥⅓ دليل رقابي على قوة التصويت على السلوك الخبيث من عند إدخال blockchain، يجب أن يتعافى المحور باستخدام شوكة صلبة اقتراح إعادة التنظيم. (رابط إلى "هجمات الشوكات والرقابة"). Cosmos يمكن للمحور validators قبول أي نوع أو مجموعة token أنواعها كرسوم معالجة معاملة. كل validator يمكن قم بتعيين سعر الصرف الذي تريده بشكل شخصي، ثم اختر مهما كانت المعاملات التي تريدها، طالما أن  BlockGasLimit  هو كذلك لم يتم تجاوزها. الرسوم المحصلة، ناقص أي ضرائب محددة أدناه، يتم إعادة توزيعها على أصحاب المصلحة المستعبدين بما يتناسب مع ذراتها المرتبطة، كل  ValidatorPayoutPeriod  (الافتراضي 1 ساعة).من بين رسوم المعاملات المحصلة، سيتم تطبيق  ReserveTax (الافتراضي 2%) اذهب نحو تجمع الاحتياطي لزيادة تجمع الاحتياطي و زيادة أمان وقيمة شبكة Cosmos. هذه ويمكن أيضًا توزيع الأموال وفقًا للقرارات صنعها نظام الحكم. أصحاب الذرة الذين يفوضون سلطة التصويت الخاصة بهم إلى validators آخرين دفع عمولة للمفوض validator. يمكن للجنة يتم تعيينها بواسطة كل validator. يعد أمان Cosmos Hub إحدى وظائف أمان validators واختيار التفويض من قبل المفوضين. من أجل تشجيع الاكتشاف والإبلاغ المبكر عما تم العثور عليه الثغرات الأمنية، يشجع مركز Cosmos المتسللين على النشر عمليات استغلال ناجحة عبر معاملة  ReportHackTx  التي تنص على أن "هذا تم اختراق validator. من فضلك أرسل المكافأة إلى هذا العنوان". على مثل هذا الاستغلال، سيصبح validator والمفوضون غير نشطين،  HackPunishmentRatio (الافتراضي 5%) من ذرات الجميع سيحصلون عليها مقطوعة، و  HackRewardRatio  (افتراضي 5%) من ذرات الجميع سوف تحصل على مكافأة على عنوان مكافأة المتسلل. validator يجب استعادة الذرات المتبقية باستخدام مفتاح النسخ الاحتياطي الخاص بهم. من أجل منع إساءة استخدام هذه الميزة للنقل الذرات غير المكتسبة، جزء من الذرات المكتسبة مقابل الذرات غير المكتسبة validators والمفوضون قبل وبعد  ReportHackTx  سوف تظل كما هي، وستتضمن مكافأة الهاكر بعضًا منها الذرات غير المستثمرة، إن وجدت. يتم تشغيل مركز Cosmos بواسطة مؤسسة موزعة يتطلب آلية حوكمة جيدة التصميم من أجل تنسيق التغييرات المختلفة على blockchain، مثل المتغير

معلمات النظام، بالإضافة إلى ترقيات البرامج و التعديلات الدستورية. جميع validator مسؤولون عن التصويت على جميع المقترحات. الفشل في سيؤدي التصويت على الاقتراح في الوقت المناسب إلى validator يتم إلغاء التنشيط تلقائيًا لفترة من الوقت تسمى  عقوبة الغياب  (أسبوع واحد افتراضيًا). يرث المفوضون صوت المفوض تلقائيًا validator. قد يتم تجاوز هذا التصويت يدويًا. الذرات غير المرتبطة لا تحصل على أي تصويت. يتطلب كل اقتراح إيداع مبلغ MinimumProposalDeposit  tokens، والتي قد تكون مزيجًا من واحد أو أكثر من tokens بما في ذلك الذرات. بالنسبة لكل اقتراح، يجوز للناخبين التصويت لاتخاذه الوديعة. إذا اختار أكثر من نصف الناخبين التصويت الإيداع (على سبيل المثال، لأن الاقتراح كان غير مرغوب فيه)، يذهب الإيداع إلى المجمع الاحتياطي، باستثناء أي ذرات يتم حرقها. لكل مقترح، يمكن للناخبين التصويت بالخيارات التالية: نعم نعم مع القوة كلا NayWithForce امتنع عن التصويت أغلبية صارمة من أصوات نعم أو YeaWithForce (أو لا أو أصوات NayWithForce) مطلوبة حتى يتم تحديد الاقتراح تم إقراره (أو تقرر فشله)، ولكن يمكن لـ 1/3+ استخدام حق النقض ضد الأغلبية القرار بالتصويت "بالقوة". عندما يتم نقض الأغلبية الصارمة، تتم معاقبة الجميع بخسارة  VetoPenaltyFeeBlocks  (قيمة افتراضية للكتل ليوم واحد) بقيمة الرسوم (باستثناء الضرائب والتي لن تتأثر)، والحزب الذي اعترض على الأغلبية

ستتم معاقبة القرار أيضًا بخسارة  VetoPenaltyAtoms  (الافتراضي 0.1%) من ذراته. يمكن تغيير أي من المعلمات المحددة هنا باستخدام تمرير  ParameterChangeProposal. يمكن تجميد الذرات واحتجاز أموال المجمع التي يتم إنفاقها باستخدام تمرير  اقتراح المكافأة. جميع المقترحات الأخرى، مثل اقتراح ترقية البروتوكول، سيتم تنسيقه عبر  TextProposal  العام. انظر الخطة. لقد كان هناك العديد من الابتكارات في إجماع blockchain و قابلية التوسع في العامين الماضيين. يقدم هذا القسم نبذة مختصرة مسح لعدد مختار من المهم. الإجماع في وجود مشاركين خبيثين يمثل مشكلة يعود تاريخها إلى أوائل الثمانينيات، عندما صاغ ليزلي لامبورت عبارة "خطأ بيزنطي" للإشارة إلى سلوك العملية التعسفية ينحرف عن السلوك المقصود، على عكس "خطأ التصادم"، حيث تتعطل العملية ببساطة. تم اكتشاف الحلول المبكرة للشبكات المتزامنة حيث يوجد حد أعلىزمن وصول الرسالة، على الرغم من أن الاستخدام العملي كان يقتصر على درجة عالية البيئات الخاضعة للرقابة مثل وحدات التحكم في الطائرات و مراكز البيانات متزامنة عبر الساعات الذرية. ولم يكن حتى أواخر التسعينيات أن التسامح مع الخطأ البيزنطي العملي (PBFT) [11] كان تم تقديمه كإجماع متزامن فعال جزئيًا خوارزمية قادرة على تحمل ما يصل إلى ثلث العمليات التي تتصرف تعسفا. أصبحت PBFT هي الخوارزمية القياسية، مما أدى إلى ظهور العديد منها الاختلافات، بما في ذلك أحدثها التي تم إنشاؤها بواسطة IBM كجزء من مساهمتهم في Hyperledger. الميزة الرئيسية لإجماع Tendermint على PBFT هي ذلك يحتوي Tendermint على بنية أساسية محسنة ومبسطة، بعضها نتيجة لتبني نموذج blockchain. يجب أن تلتزم كتل Tendermint بالترتيب، مما يتجنب التعقيد وحمل الاتصالات المرتبط بـ PBFT تغييرات العرض. في Cosmos والعديد من العملات المشفرة، لا يوجد بحاجة إلى السماح للكتلة N+i حيث i >= 1 بالالتزام، عند الكتلة N نفسها لم تلتزم بعد. إذا كان عرض النطاق الترددي هو السبب وراء حظر N لم يتم الالتزام به في منطقة Cosmos، فلا يساعد في الاستخدام أصوات مشاركة النطاق الترددي للكتل N+i. إذا كان قسم الشبكة أو عقد ofzine هي السبب وراء عدم التزام الكتلة N N + لن ألتزم على أي حال. بالإضافة إلى ذلك، فإن تجميع المعاملات في كتل يسمح بذلك Merkle-hashing العادي لحالة التطبيق، بدلاً من الملخصات الدورية كما هو الحال مع مخطط نقاط التفتيش PBFT. هذا يسمح من أجل تنفيذ معاملات أسرع يمكن إثباتها للعملاء الخفيفين وبشكل أسرع التواصل بين blockchain. يتضمن Tendermint Core أيضًا العديد من التحسينات والميزات التي تتجاوز ما هو محدد في PBFT. على سبيل المثال، يتم تقسيم الكتل المقترحة بواسطة validators إلى أجزاء، بحجم Merkle، والنميمة بطريقة تعمل على تحسين البث الأداء (راجع LibSwift [19] للإلهام). أيضا، تندرمينت لا يقدم Core أي افتراضات حول نقطة إلى نقطة

الاتصال والوظائف طالما أن شبكة P2P موجودة متصلة بشكل ضعيف. على الرغم من أنها ليست أول من نشر proof-of-stake (PoS)، إلا أن BitShares1.0 [12] ساهم بشكل كبير في البحث واعتماد إثبات الحصة (PoS). blockchains، وخاصة تلك المعروفة باسم نقاط البيع "المفوضة". في BitShares، أصحاب المصلحة ينتخبون "الشهود"، المسؤولين عن الطلب وارتكاب المعاملات و"المندوبين" المسؤولين عنها تنسيق تحديثات البرامج وتغييرات المعلمات. يهدف BitShares2.0 إلى تحقيق أداء عالي (100k tx/s, 1s الكمون) في ظروف مثالية، مع كل كتلة موقعة من قبل واحد المُوقع، وتستغرق عملية المعاملة وقتًا أطول قليلاً من الفاصل الزمني للكتلة. لا تزال المواصفات الأساسية قيد التطوير. يمكن لأصحاب المصلحة إزالة أو استبدال الشهود الذين يسيئون التصرف على بشكل يومي، ولكن لا يوجد ضمانات هامة من الشهود أو المندوبون على غرار Tendermint PoS الذين تم اقتطاعهم حالة نجاح هجوم الإنفاق المزدوج. بناءً على النهج الذي ابتكرته شركة Ripple، Stellar [13] رينيد أ نموذج للاتفاقية البيزنطية الموحدة حيث تتم العمليات المشاركة في الإجماع لا تشكل yxed وعالميا مجموعة معروفة. بدلاً من ذلك، تقوم كل عقدة عملية برعاية واحدة أو أكثر "شرائح النصاب"، يشكل كل منها مجموعة من العمليات الموثوقة. أ "النصاب القانوني" في Stellar مصمم ليكون مجموعة من العقد التي تحتوي على شريحة نصاب واحدة على الأقل لكل عقدة في المجموعة، بحيث يمكن التوصل إلى اتفاق. يعتمد أمان آلية Stellar على الافتراض أن تقاطع أي نصابين غير فارغ، في حين أن يتطلب توفر العقدة شريحة واحدة على الأقل من شرائح النصاب القانوني الخاصة بها تتكون بالكامل من العقد الصحيحة، مما يخلق مفاضلة بين استخدام شرائح النصاب الكبيرة أو الصغيرة التي قد يكون من الصعب تحقيق التوازن فيها دون فرض افتراضات هامة حول الثقة. أخيرًا،يجب أن تختار العقد بطريقة أو بأخرى شرائح النصاب القانوني المناسبة لذلك أن يكون كافيًا للتسامح مع الأخطاء (أو أي "عقد سليمة" على الإطلاق، منها الكثير من نتائج الورقة تعتمد على)، والوحيد الإستراتيجية المقدمة لضمان مثل هذا التكوين هي تسلسل هرمي وهو مشابه لبروتوكول بوابة الحدود (BGP)، الذي يستخدمه مزودو خدمة الإنترنت من الدرجة الأولى على الإنترنت لإنشاء جداول التوجيه العالمية، ومن خلال التي تستخدمها المتصفحات لإدارة شهادات TLS؛ كلاهما سيئ السمعة لانعدام الأمن لديهم. تم تخفيف الانتقادات الواردة في ورقة Stellar الخاصة بأنظمة إثبات الملكية القائمة على Tendermint من خلال استراتيجية token الموضحة هنا، حيث يتم إصدار نوع جديد من token يسمى الذرة تمثل المطالبات بالأجزاء المستقبلية من الرسوم والمكافآت. ال إن ميزة proof-of-stake المستندة إلى Tendermint هي قريبها البساطة، مع الاستمرار في توفير الأمان الكافي والقابل للإثبات الضمانات. BitcoinNG هو تحسين مقترح لـ Bitcoin من شأنه أن يسمح لأشكال قابلية التوسع الرأسي، مثل زيادة حجم الكتلة، دون العواقب الاقتصادية السلبية المرتبطة عادة مع مثل هذا التغيير، مثل التأثير الكبير بشكل غير متناسب على عمال المناجم الصغيرة. ويتحقق هذا التحسن عن طريق الانفصال انتخاب القائد من بث المعاملات: القادة هم الأولون تم انتخابه بواسطة proof-of-work في "الكتل الصغيرة"، ثم أصبح قادرًا على ذلك يجب الالتزام بمعاملات البث حتى يتم إنشاء كتلة صغيرة جديدة تم العثور عليه. وهذا يقلل من متطلبات عرض النطاق الترددي اللازمة ل الفوز بسباق إثبات العمل (PoW)، مما يسمح لصغار عمال المناجم بالمنافسة بشكل أكثر عدالة، والسماح بإجراء المعاملات بشكل أكثر انتظامًا بواسطة آخر عامل منجم يعثر على كتلة صغيرة. Casper [16] عبارة عن خوارزمية إجماع proof-of-stake مقترحة لـ Ethereum. أسلوب عملها الأساسي هو "الإجماع على الرهان". بواسطة السماح لـ validators بالمراهنة بشكل متكرر على الكتلة التي يعتقدون أنها ستفعل

تصبح ملتزمًا بـ blockchain بناءً على الرهانات الأخرى كما رأوه حتى الآن، يمكن تحقيق النزعة الجنسية في نهاية المطاف. وصلة. يعد هذا مجال بحث نشط بواسطة فريق Casper. ال التحدي يكمن في بناء آلية الرهان التي يمكن أن تكون ثبت أنها استراتيجية مستقرة تطوريا. الفائدة الرئيسية من قد يكون Casper مقارنةً بـ Tendermint في تقديم "التوافر". "على الاتساق" - لا يتطلب الإجماع أكثر من ⅔ النصاب القانوني قوة التصويت - ربما على حساب سرعة الالتزام أو تعقيد التنفيذ. لا يعد بروتوكول Interledger [14] حلاً قابلاً للتوسع بشكل صارم. ذلك يوفر التشغيل البيني المخصص بين دفاتر الأستاذ المختلفة الأنظمة من خلال شبكة علاقات ثنائية مترابطة بشكل فضفاض. مثل شبكة Lightning Network، فإن الغرض من ILP هو التسهيل المدفوعات، لكنه يركز بشكل خاص على المدفوعات عبر متباينة أنواع دفتر الأستاذ، وتمتد آلية المعاملات الذرية إلى لا تتضمن فقط hash-الأقفال، ولكن أيضًا النصاب القانوني لكتاب العدل (يسمى بروتوكول النقل الذري). الآلية الأخيرة ل إن فرض الذرية في المعاملات بين دفاتر الأستاذ يشبه آلية SPV العميلة الخفيفة الخاصة بـ Tendermint، مثال توضيحي لـ التمييز بين ILP و Cosmos/IBC أمر مضمون، و المنصوص عليها أدناه. 1. لا يدعم كتاب العدل للموصل في ILP العضوية التغييرات، ولا تسمح بالترجيح بين كتاب العدل. من ناحية أخرى، تم تصميم IBC خصيصًا لـ blockchains، حيث يمكن أن يكون لـ validators أوزان مختلفة، و حيث يمكن أن تتغير العضوية على مدار blockchain. 2. كما هو الحال في Lightning Network، متلقي الدفع في ILP يجب أن يكون متصلاً بالإنترنت لإرسال رسالة تأكيد إلى المرسل. في أtoken نقل عبر IBC، مجموعة validator لجهاز الاستقبال blockchain هو المسؤول عن توفير التأكيد، وليس استقبال المستخدم. 3. الفرق الأكثر لفتًا للانتباه هو أن موصلات ILP ليست كذلك مسؤولاً أو يحتفظ بحالة موثوقة بشأن المدفوعات، بينما في Cosmos، validators للمحور هي سلطة حالة IBC token عمليات النقل بالإضافة إلى سلطة كمية tokens التي تحتفظ بها كل منطقة (ولكن ليس مقدار tokens التي يحتفظ بها كل حساب داخل المنطقة). هذا هو الابتكار الأساسي الذي يسمح بأمان غير متماثل نقل tokens من منطقة إلى أخرى؛ التناظرية لـ ILP الموصل في Cosmos هو موصل ثابت وآمن إلى أقصى حد blockchain دفتر الأستاذ، مركز Cosmos. 4. يجب أن تكون المدفوعات بين دفاتر الأستاذ في ILP مدعومة بـ دفتر أوامر الصرف، حيث لا يوجد نقل غير متماثل لـ عملات معدنية من دفتر أستاذ إلى آخر، فقط نقل القيمة أو معادلات السوق. السلاسل الجانبية [15] هي آلية مقترحة لتوسيع نطاق Bitcoin الشبكة عبر blockchains البديلة "المرتبطة في اتجاهين". Bitcoin blockchain. (الربط في اتجاهين يعادل التجسير. في Cosmos نقول "جسر" للتمييز عن ربط السوق). تسمح السلاسل الجانبية لعملات البيتكوين بالانتقال بشكل فعال من Bitcoin blockchain إلى السلسلة الجانبية والظهر، والسماح بـ تجربة الميزات الجديدة على السلسلة الجانبية. كما في Cosmos Hub والسلسلة الجانبية وBitcoin بمثابة عملاء خفيفين لـ بعضها البعض، باستخدام أدلة SPV لتحديد متى يجب أن تكون العملات المعدنية نقل إلى Sidechain والعودة. بالطبع منذ Bitcoin الاستخدامات proof-of-work، تعاني السلاسل الجانبية المتمركزة حول Bitcoin من مشاكل ومخاطر proof-of-work العديدة كما أ آلية الإجماع. علاوة على ذلك، هذا هو الحد الأقصى Bitcoin الحل الذي لا يدعم أصلاً مجموعة متنوعة من tokens و

طوبولوجيا الشبكة بين المناطق كما يفعل Cosmos. وقيل: جوهر آلية الربط في الاتجاهين هي من حيث المبدأ نفس تلك الآلية يعمل لدى شبكة Cosmos. يقوم Ethereum حاليًا بالبحث في عدد من الاستراتيجيات المختلفة لتقسيم حالة Ethereum blockchain لمعالجة احتياجات قابلية التوسع. وتهدف هذه الجهود إلى الحفاظ على طبقة التجريد التي تقدمها الآلة الافتراضية Ethereum الحالية عبر مساحة الدولة المشتركة. الجهود البحثية المتعددة هي الجارية في هذا الوقت. [18][22] Cosmos وEthereum 2.0 بنفسجي [22] لهما أهداف تصميمية مختلفة. Cosmos يتعلق بشكل خاص بـ tokens. البنفسجي يدور حول القياس الحساب العام. Cosmos غير مرتبط بـ EVM، لذلك يمكن حتى للأجهزة الافتراضية المختلفة التفاعل. Cosmos يتيح لمنشئ المنطقة تحديد من يقوم بالتحقق من صحة المنطقة. يمكن لأي شخص أن يبدأ منطقة جديدة في Cosmos (ما لم تكن الإدارة يقرر خلاف ذلك). يقوم المحور بعزل حالات فشل المنطقة بحيث تكون الثوابت العالمية token كذلك محفوظ. الشبكة المسرّعة هي شبكة نقل مقترحة token تعمل في طبقة أعلى Bitcoin blockchain (وغيرها من الطبقات العامة blockchains)، مما يتيح تحسين العديد من أوامر الحجم في إنتاجية المعاملات عن طريق نقل غالبية المعاملات خارج دفتر الأستاذ الإجماعي إلى ما يسمى "قنوات الدفع".أصبح هذا ممكنًا بفضل البرامج النصية للعملات المشفرة الموجودة على السلسلة، والتي تمكين الأطراف من الدخول في عقود ثنائية الحالة حيث يمكن تحديث الحالة من خلال مشاركة التوقيعات الرقمية والعقود يمكن إغلاقه عن طريق نشر الأدلة بشكل صريح على blockchain، أ الآلية التي تم نشرها لأول مرة عن طريق المقايضة الذرية عبر السلسلة. بواسطة فتح قنوات الدفع مع العديد من الأطراف والمشاركين في يمكن أن تصبح الشبكة المسرّعة نقاطًا محورية لتوجيه الشبكة مدفوعات الآخرين، مما يؤدي إلى قناة دفع متصلة بالكامل الشبكة، على حساب رأس المال الذي يتم ربطه بقنوات الدفع. بينما يمكن للشبكة المسرّعة أيضًا أن تمتد بسهولة عبرها عدة blockchains مستقلة للسماح بنقل القيمة عبر سوق الصرف، لا يمكن استخدامه بشكل غير متماثل نقل tokens من blockchain إلى آخر. الفائدة الرئيسية الغرض من شبكة Cosmos الموصوفة هنا هو تمكين هذا التوجيه المباشر token التحويلات. ومع ذلك، فإننا نتوقع قنوات الدفع و سيتم اعتماد شبكة Lightning Network على نطاق واسع جنبًا إلى جنب مع شبكتنا token آلية النقل، لتوفير التكاليف ولأسباب تتعلق بالخصوصية. الشاهد المنفصل هو رابط مقترح تحسين Bitcoin يهدف إلى زيادة إنتاجية المعاملات لكل كتلة 2X أو 3X، مع جعل مزامنة الكتلة أسرع للعقد الجديدة في نفس الوقت. يكمن تألق هذا الحل في كيفية عمله داخل قيود بروتوكول Bitcoin الحالي وتسمح بالشوكة الناعمة الترقية (أي أن العملاء الذين لديهم إصدارات أقدم من البرنامج سوف يقومون بذلك الاستمرار في العمل بعد الترقية). تندرمينت، كونها جديدة البروتوكول ليس له قيود على التصميم، لذلك له مقياس مختلف الأولويات. في المقام الأول، يستخدم 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

“ è 

الإجماع والتفاصيل الفنية

ينبغي لبروتوكول الإجماع المصمم جيدًا أن يوفر بعضًا من ذلك الضمانات في حالة تجاوز قدرة التسامح ويفشل الإجماع. وهذا ضروري بشكل خاص في المجال الاقتصادي الأنظمة، حيث يمكن أن يكون للسلوك البيزنطي قدر كبير من المال مكافأة. وأهم هذه الضمانات هو شكل من أشكال المساءلة، حيث تتم العمليات التي تسببت في الإجماع الفشل (أي جعل عملاء البروتوكول يقبلون قيمًا مختلفة - أ fork) يمكن تحديد هويته ومعاقبته وفقًا لقواعد البروتوكول، أو ربما النظام القانوني. عندما يكون النظام القانوني يمكن أن يكون استدعاء validators غير موثوق به أو باهظ التكلفة اضطروا إلى تقديم ودائع ضمان من أجل المشاركة، وهؤلاء يمكن إلغاء الودائع أو تخفيضها عند حدوث سلوك ضار تم اكتشاف [10]. لاحظ أن هذا يختلف عن Bitcoin، حيث يكون التفرع حدثًا منتظمًا بسبب عدم تزامن الشبكة والطبيعة الاحتمالية للنهاية الاصطدامات الجزئية hash. نظرًا لأنه في كثير من الحالات يكون هناك شوكة ضارة لا يمكن تمييزه عن الشوكة بسبب عدم التزامن، Bitcoin لا يمكن تنفيذ مسؤولية الشوكة بشكل موثوق، بخلاف الضمنية تكلفة الفرصة البديلة التي يدفعها عمال المناجم لتعدين كتلة معزولة. نحن نطلق على مرحلتي التصويت PreVote وPreCommit. يمكن التصويت ل كتلة معينة أو لا شيء. نحن نطلق على مجموعة من >⅔ الأصوات المسبقة لكتلة واحدة في نفس الجولة رقصة البولكا، ومجموعة من >⅔ الالتزام المسبق لكتلة واحدة في نفس جولة الالتزام. إذا> ⅔ الالتزام المسبق لـ Nil في نفس الجولة، ينتقلون إلى الجولة التالية جولة. لاحظ أن الحتمية الصارمة في البروتوكول تنطوي على ضعف يجب اكتشاف افتراض التزامن كقادة خاطئين

تم تخطيه. ومن ثم، ينتظر validators بعض الوقت، TimeoutPropose، قبل أن يصوتوا على Nil، وقيمة TimeoutPropose يزيد مع كل جولة. التقدم من خلال بقية الجولة غير متزامنة تمامًا، في هذا التقدم فقط يتم إجراؤه بمجرد سماع validator من >⅔ الشبكة. في الممارسة العملية، سوف يتطلب الأمر وجود خصم قوي للغاية لإحباطه إلى أجل غير مسمى افتراض التزامن الضعيف (مما يتسبب في فشل الإجماع من أي وقت مضى ارتكاب كتلة)، والقيام بذلك يمكن أن يتم أكثر من ذلك من الصعب استخدام القيم العشوائية لـ TimeoutPropose في كل منها validator. هناك مجموعة إضافية من القيود، أو قواعد القفل، تضمن أن ستلتزم الشبكة في النهاية بكتلة واحدة فقط عند كل ارتفاع. أي محاولة خبيثة للتسبب في ارتكاب أكثر من كتلة واحدة على ارتفاع معين يمكن تحديدها. أولاً، الالتزام المسبق للكتلة يجب أن يأتي مع مبرر، في شكل رقصة البولكا لتلك الكتلة. إذا كان validator قد قام بالفعل بتنفيذ كتلة في الجولة R_1، فإننا ويقول أنهم مقفلون على تلك الكتلة، ويستخدم رقصة البولكا لتبرير يجب أن يأتي الالتزام المسبق الجديد في الجولة R_2 في جولة R_polka حيث R_1 < R_polka <= R_2. ثانيًا، يجب أن يقترح validators و/أو قم بالتصويت المسبق على الكتلة التي تم قفلها عليها. معا، هؤلاء تضمن الشروط أن validator لا يتم الالتزام المسبق بدونه أدلة كافية لتبرير ذلك، وأن validators التي لديها بالفعل لا يمكن لـ PreCommit المساهمة في الأدلة المقدمة إلى PreCommit شيء آخر. وهذا يضمن سلامة وحيوية الجسم خوارزمية الإجماع. يتم وصف التفاصيل الكاملة للبروتوكول هنا. يتم التخلص من الحاجة إلى مزامنة جميع رؤوس الكتل في TendermintPoS حيث أن وجود سلسلة بديلة (شوكة) يعني ≥⅓ من يمكن خفض الحصة المستعبدة. بالطبع، لأن القطع يتطلب أن يشارك شخص ما دليلاً على الشوكة، يجب على العملاء الخفيفين تخزينها أي كتلة-hash ترتكب ما تراه. بالإضافة إلى العملاء الخفيفينيمكن أن تظل متزامنة بشكل دوري مع التغييرات التي يتم إجراؤها على مجموعة validator، في لتجنب الهجمات بعيدة المدى (ولكن الحلول الأخرى هي ممكن). بروح مشابهة لـ Ethereum، يتيح Tendermint للتطبيقات القيام بذلك قم بتضمين جذر Merkle العالمي hash في كل كتلة، مما يسمح بذلك بسهولة استعلامات حالة يمكن التحقق منها لأشياء مثل أرصدة الحسابات، والقيمة المخزنة في العقد، أو وجود معاملة غير منفقة الإخراج، اعتمادا على طبيعة التطبيق. بافتراض وجود مجموعة مرنة بما فيه الكفاية من شبكات البث ومجموعة validator ثابتة، أي شوكة في blockchain يمكن أن تكون تم اكتشافها وخفض رواسب validators المخالفة. هذا الابتكار، الذي اقترحه فيتاليك بوتيرين لأول مرة في أوائل عام 2014، يحل المشكلة مشكلة عدم وجود شيء على المحك للآخرين proof-of-stake العملات المشفرة (انظر الأعمال ذات الصلة). ومع ذلك، منذ validator مجموعات يجب أن تكون قادرة على تغيير الأصل، على مدى فترة طويلة من الزمن قد يصبح جميع validators غير مقيدين، وبالتالي سيكونون أحرارًا في ذلك إنشاء سلسلة جديدة من كتلة التكوين، دون تحمل أي تكلفة لم يعد لديهم ودائع مقفلة. وجاء هذا الهجوم ليكون المعروف باسم الهجوم بعيد المدى (LRA)، على عكس الهجوم القصير هجوم النطاق، حيث يتسبب validators المرتبطين حاليًا في حدوث أ شوكة ومن ثم يعاقب عليها (بافتراض وجود شوكة مسؤولة BFT خوارزمية مثل إجماع Tendermint). الهجمات بعيدة المدى هي غالبًا ما يُعتقد أنها بمثابة ضربة حاسمة لـ proof-of-stake. ولحسن الحظ، يمكن التخفيف من حدة جيش الرب للمقاومة على النحو التالي. أولا بالنسبة ل validator لإلغاء الارتباط (وبالتالي استرداد وديعة الضمان الخاصة بهم ولم يعد يكسب رسوم المشاركة في الإجماع). يجب أن تكون الوديعة غير قابلة للتحويل لفترة من الوقت المعروفة باسم "فترة التفكيك"، والتي قد تكون في حدود أسابيع أو أشهر. ثانيًا، لكي يكون العميل الخفيف آمنًا، الأول عند اتصاله بالشبكة، يجب عليه التحقق من الحظر الأخير-hash ضد مصدر موثوق به، أو يفضل عدة مصادر. هذا

يُشار إلى الحالة أحيانًا باسم "الذاتية الضعيفة". وأخيرا، لكي يظل آمنًا، يجب أن تتم مزامنته مع أحدث validator المعين في على الأقل بشكل متكرر مثل طول فترة فك الارتباط. هذا يضمن أن العميل الخفيف يعرف التغييرات التي تم إجراؤها على validator تم تعيينه قبل validator وقد تم إلغاء رأس ماله وبالتالي لم يعد كذلك على المحك، مما يسمح لها بخداع العميل بتنفيذها هجوم بعيد المدى عن طريق إنشاء كتل جديدة تبدأ من مرة أخرى الارتفاع حيث تم ربطه (بافتراض أنه يتحكم بشكل كافٍ العديد من المفاتيح الخاصة المبكرة). لاحظ أن التغلب على جيش الرب للمقاومة بهذه الطريقة يتطلب إصلاحًا شاملاً نموذج الأمان الأصلي لـ proof-of-work. في إثبات العمل، هو كذلك من المفترض أن العميل الخفيف يمكنه المزامنة مع الارتفاع الحالي من كتلة التكوين الموثوق بها في أي وقت ببساطة عن طريق معالجة إثبات العمل في كل رأس كتلة. ولكن للتغلب على جيش الرب للمقاومة، علينا تتطلب أن يأتي العميل الخفيف عبر الإنترنت مع بعض الانتظام تتبع التغييرات في مجموعة validator، وذلك في المرة الأولى التي يتم فيها ذلك متصلين بالإنترنت ويجب عليهم أن يكونوا حريصين بشكل خاص على المصادقة ما يسمعونه من الشبكة ضد مصادر موثوقة. من بالطبع، هذا المتطلب الأخير مشابه لمتطلب Bitcoin، حيث ويجب أيضًا الحصول على البروتوكول والبرمجيات من جهة موثوقة المصدر. الطريقة المذكورة أعلاه لمنع جيش الرب للمقاومة مناسبة تمامًا لـ validators والعقد الكاملة لـ blockchain التي تعمل بنظام Tendermint لأن هذه من المفترض أن تظل العقد متصلة بالشبكة. ال الطريقة مناسبة أيضًا للعملاء الخفيفين الذين يمكن توقعهم المزامنة مع الشبكة بشكل متكرر. ومع ذلك، بالنسبة للعملاء الخفيفين ليس من المتوقع أن يكون لديك إمكانية الوصول المتكرر إلى الإنترنت أو blockchain الشبكة، ولكن يمكن استخدام حل آخر للتغلب عليها جيش الرب للمقاومة. يمكن لحاملي غير validator token نشر tokens باسمهم الضمانات ذات فترة فك الارتباط طويلة جدًا (على سبيل المثال، أطول بكثير من فترة إلغاء الارتباط لـ validators) وخدمة العملاء الخفيفين مع طريقة ثانوية لإثبات صحة التيار و الكتلة الماضية-hashes. في حين أن هذه tokens لا يتم احتسابها ضمن أمان إجماع blockchain، ومع ذلك يمكنهم ذلكتقديم ضمانات قوية للعملاء الخفيفين. إذا كانت الكتلة التاريخية-hash تم دعم الاستعلام في Ethereum، ويمكن لأي شخص ربطه tokens في smart contract المصممة خصيصًا وتقديمها خدمات التصديق مقابل الأجر، مما يؤدي بشكل فعال إلى إنشاء سوق لأمن LRA من عملاء Lightclient. نظرًا لتعريف التزام الكتلة، فإن أي ≥⅓ تحالف من يمكن لقوة التصويت أن توقف blockchain بالذهاب إلى الخارج أم لا بث أصواتهم يمكن لمثل هذا التحالف أيضًا فرض الرقابة معاملات معينة عن طريق رفض الكتل التي تتضمن هذه المعاملات المعاملات، على الرغم من أن هذا من شأنه أن يؤدي إلى نسبة كبيرة من مقترحات الكتلة التي سيتم رفضها، الأمر الذي من شأنه أن يبطئ المعدل من عمليات تنفيذ الحظر لـ blockchain، مما يقلل من فائدته وقيمته. قد يقوم التحالف الخبيث أيضًا ببث الأصوات بشكل متقطع كما أن طحن كتلة blockchain تلتزم بالتوقف القريب أو الانخراط أي مزيج من هذه الهجمات. وأخيرا، يمكن أن يسبب blockchain إلى الشوكة، بالتوقيع المزدوج أو انتهاك القفل القواعد. وإذا شارك أيضًا خصم نشط عالميًا، فيمكنه التقسيم الشبكة بطريقة قد تبدو خاطئة كانت مجموعة فرعية من validators مسؤولة عن التباطؤ. هذا ليس كذلك مجرد قيود على Tendermint، بل هي قيود على الجميع بروتوكولات الإجماع التي من المحتمل أن يتم التحكم في شبكتها بواسطة الخصم النشط. بالنسبة لهذه الأنواع من الهجمات، ينبغي لمجموعة فرعية من validators التنسيق من خلال وسائل خارجية للتوقيع على مقترح إعادة التنظيم يختار شوكة (وأي دليل على ذلك) والمجموعة الفرعية الأولية من validators مع توقيعاتهم. يتخلى المصادقون الذين يوقعون على مقترح إعادة التنظيم هذا عن ضماناتهم على جميع الشوكات الأخرى. يجب على العملاء التحقق من التوقيعات على مقترح إعادة التنظيم، والتحقق من أي دليل، وإصدار حكم أو مطالبة المستخدم النهائي باتخاذ قرار. ل على سبيل المثال، قد يطلب تطبيق محفظة الهاتف من المستخدم توفير الأمان

تحذير، في حين أن الثلاجة قد تقبل أي اقتراح لإعادة التنظيم موقعة من +½ من أصل validators بقوة التصويت. لا يمكن أن تأتي خوارزمية بيزنطية غير متزامنة متسامحة مع الأخطاء إلى الإجماع عندما يكون ≥⅓ من قوة التصويت غير شريفة، ومع ذلك فهو شوكة يفترض أن ≥⅓ من قوة التصويت كانت غير شريفة بالفعل التوقيع المزدوج أو تغيير القفل دون مبرر. لذلك، التوقيع إن اقتراح إعادة التنظيم يمثل مشكلة تنسيق لا يمكن حلها يتم حلها بواسطة أي بروتوكول غير متزامن (أي تلقائيًا، و دون وضع افتراضات حول موثوقية الشبكة الأساسية). في الوقت الحالي، نترك مشكلة تنسيق إعادة التنظيم للتنسيق البشري من خلال الإجماع الاجتماعي على وسائل الإعلام عبر الإنترنت. يجب على المصادقين الحرص على التأكد من ذلك لا توجد أقسام شبكة متبقية قبل التوقيع على اقتراح إعادة التنظيم، لتجنب المواقف التي يتم فيها التوقيع على اقتراحين متعارضين لإعادة التنظيم. على افتراض أن وسيلة التنسيق الخارجي والبروتوكول قوية، ويترتب على ذلك أن الشوكات أقل إثارة للقلق من الرقابة الهجمات. بالإضافة إلى الشوكة والرقابة التي تتطلب ≥⅓ البيزنطية قوة التصويت، قد يلتزم ائتلاف من >⅔ قوة التصويت حالة تعسفية وغير صالحة. وهذه هي سمة أي (BFT) نظام الإجماع. على عكس التوقيع المزدوج الذي يخلق الشوكات بأدلة يمكن التحقق منها بسهولة، والكشف عن ارتكاب جريمة ما تتطلب الحالة غير الصالحة أن يقوم أقران لم يتم التحقق من صحتهم بالتحقق من الكتل بأكملها، مما يعني أنهم يحتفظون بنسخة محلية من الدولة وينفذونها كل معاملة، وحساب جذر الدولة بشكل مستقل ل أنفسهم. وبمجرد الكشف عنها، فإن الطريقة الوحيدة للتعامل مع مثل هذا الفشل يتم عن طريق الإجماع الاجتماعي. على سبيل المثال، في المواقف التي يكون فيها Bitcoin قد فشل، سواء كان التفرع بسبب أخطاء برمجية (كما في مارس 2013)، أو ارتكاب حالة باطلة بسبب السلوك البيزنطي عمال المناجم (كما في يوليو 2015)، مجتمع متصل جيدًا بـ الشركات والمطورين وعمال المناجم وغيرها من المنظمات أنشأ إجماعًا اجتماعيًا حول ماهية الإجراءات اليدويةالمطلوبة من قبل المشاركين لشفاء الشبكة. وعلاوة على ذلك، منذ من المتوقع أن يكون validators من النعناع blockchain يمكن تحديدها، بل قد يكون التزام دولة غير صالحة يعاقب عليها القانون أو بعض الاجتهادات القضائية الخارجية، إذا رغبت في ذلك. ABCI يتكون من 3 أنواع رسائل أساسية يتم تسليمها منها جوهر التطبيق. التطبيق يجيب ب رسائل الرد المقابلة. تعتبر رسالة  AppendTx  بمثابة العمود الفقري للتطبيق. كل يتم تسليم المعاملة في blockchain مع هذه الرسالة. ال يحتاج التطبيق إلى التحقق من صحة كل المعاملات الواردة مع رسالة AppendTx مقابل الحالة الحالية، وبروتوكول التطبيق، وبيانات اعتماد التشفير للمعاملة. تم التحقق من صحتها تحتاج المعاملة بعد ذلك إلى تحديث حالة التطبيق — بواسطة ربط قيمة في مخزن القيم الأساسية، أو عن طريق تحديث UTXO قاعدة البيانات. تشبه رسالة  CheckTx  رسالة AppendTx، ولكنها مخصصة فقط لـ التحقق من صحة المعاملات. الشيكات الأولى لذاكرة Tendermint Core صلاحية المعاملة مع CheckTx، والمرحلات صالحة فقط المعاملات لأقرانها. قد تحقق التطبيقات زيادة nonce في المعاملة وإرجاع خطأ عند CheckTx إذا كان nonce قديم. يتم استخدام رسالة  Commit  لحساب التشفير الالتزام بحالة التطبيق الحالية، ليتم وضعها في رأس الكتلة التالي. هذا له بعض الخصائص المفيدة. ستظهر الآن التناقضات في تحديث تلك الحالة blockchain شوكات تلتقط فئة كاملة من البرمجة أخطاء. وهذا أيضًا يبسط عملية تطوير آمنة وخفيفة الوزن العملاء، حيث يمكن التحقق من أدلة Merkle-hash عن طريق التحقق منها الكتلة-hash، والكتلة-hash تم توقيعها بنصاب قانوني validators (حسب قوة التصويت).

تسمح رسائل ABCI الإضافية للتطبيق بتتبعها وقم بتغيير مجموعة validator، ولكي يحصل التطبيق على معلومات الحظر، مثل الارتفاع وأصوات الالتزام. ABCI الطلبات/الردود هي رسائل Protobuf بسيطة. تحقق خارج المخطط. الحجج: البيانات ([]بايت): بايتات معاملة الطلب العوائد: الرمز (uint32): رمز الاستجابة البيانات ([]بايت): بايتات النتيجة، إن وجدت السجل (سلسلة): تصحيح الأخطاء أو رسالة الخطأ الاستخدام:

إلحاق المعاملة وتشغيلها. إذا كانت الصفقة صحيحة ترجع CodeType.OK الحجج: البيانات ([]بايت): بايتات معاملة الطلب العوائد: الرمز (uint32): رمز الاستجابة البيانات ([]بايت): بايتات النتيجة، إن وجدت السجل (سلسلة): تصحيح الأخطاء أو رسالة الخطأ الاستخدام:

التحقق من صحة المعاملة. لا ينبغي أن تتحور هذه الرسالة الدولة. يتم تشغيل المعاملات لأول مرة من خلال CheckTx من قبل البث إلى أقرانهم في طبقة mempool. يمكنك صنع CheckTx شبه حالة ومسح الحالة عند الالتزام أو BeginBlock، للسماح بتسلسلات المعاملات التابعة في نفس الكتلة.

العوائد: البيانات ([]بايت): جذر Merkle hash السجل (سلسلة): تصحيح الأخطاء أو رسالة الخطأ الاستخدام:

قم بإرجاع جذر Merkle hash لحالة التطبيق. الحجج: البيانات ([]بايت): بايتات طلب الاستعلام العوائد: الرمز (uint32): رمز الاستجابة البيانات ([]بايت): بايت استجابة الاستعلام السجل (سلسلة): تصحيح الأخطاء أو رسالة الخطأ الاستخدام:

مسح قائمة انتظار الاستجابة. التطبيقات التي تنفذ أنواع.لا يحتاج التطبيق إلى تنفيذ هذه الرسالة - إنه كذلك يعالجها المشروع. العوائد: البيانات ([]بايت): بايت المعلومات الاستخدام:

إرجاع معلومات حول حالة التطبيق. التطبيق com.speciyc. الحجج: المفتاح (سلسلة): مفتاح للضبط

القيمة (سلسلة): القيمة المطلوب تعيينها للمفتاح العوائد: السجل (سلسلة): تصحيح الأخطاء أو رسالة الخطأ الاستخدام:

ضبط خيارات التطبيق. على سبيل المثال. المفتاح = "الوضع"، القيمة = "mempool" لـ اتصال mempool، أو المفتاح = "الوضع"، القيمة = "الإجماع" لـ اتصال توافقي. الخيارات الأخرى هي تطبيق محدد. الحجج: أدوات التحقق من الصحة ([] أداة التحقق من الصحة): التكوين الأولي-validators الاستخدام:

دعا مرة واحدة في سفر التكوين الحجج: الارتفاع (uint64) : ارتفاع الكتلة الذي يبدأ الاستخدام:

يشير إلى بداية كتلة جديدة. دعا قبل أي إلحاقTxs. الحجج: الارتفاع (uint64) : ارتفاع الكتلة الذي انتهى العوائد: أدوات التحقق ([]أداة التحقق) : تم تغيير validators بأخرى جديدة صلاحيات التصويت (0 لإزالة) الاستخدام:

إشارات نهاية الكتلة. تم الاتصال به قبل كل التزام بعد كل شيء المعاملات راجع مستودع ABCI لمزيد من التفاصيل.هناك عدة أسباب وراء رغبة المرسل في الحصول على إقرار بتسليم الحزمة من خلال سلسلة الاستقبال. على سبيل المثال، قد لا يعرف المرسل حالة الملف سلسلة الوجهة، إذا كان من المتوقع أن تكون معيبة. أو يجوز للمرسل تريد فرض مهلة على الحزمة (باستخدام MaxHeight  packet yeld)، في حين أن أي سلسلة وجهة قد تعاني من هجوم رفض الخدمة مع ارتفاع مفاجئ في عدد الرسائل الواردة الحزم. في هذه الحالات، يمكن للمرسل أن يطلب إقرار التسليم من خلال تعيين حالة الحزمة الأولية على  AckPending. ثم، هو مسؤولية سلسلة الاستلام عن التسليم عن طريق تضمين يُختصر  IBCPacket  في تطبيق Merkle hash. أولاً، تم نشر IBCBlockCommit و IBCPacketTx على "Hub" مما يثبت وجود IBCPacket على "Zone1". قل ذلك  IBCPacketTx  له القيمة التالية: من معرف السلسلة: "المنطقة 1" من بلوك الارتفاع: 100 (على سبيل المثال) الحزمة : IBC الحزمة :

الرأس: IBCرأس الحزمة: معرف SrcChain: "المنطقة 1" معرف DstChain: "المنطقة 2" الرقم: 200 (قل) الحالة: قيد الانتظار النوع: "عملة" MaxHeight : 350 (قل "Hub" حاليًا على ارتفاع 300) الحمولة: <بايتات الحمولة "العملة"> بعد ذلك، يتم نشر IBCBlockCommit و IBCPacketTx على "Zone2" مما يثبت وجود IBCPacket على "Hub". قل ذلك  IBCPacketTx  له القيمة التالية: FromChainID: "المركز" من ارتفاع الكتلة: 300 الحزمة : IBC الحزمة : الرأس: IBCPacketHeader: معرف SrcChain: "المنطقة 1" معرف DstChain: "المنطقة 2" العدد : 200 الحالة: قيد الانتظار النوع: "عملة" أقصى ارتفاع: 350 الحمولة: <نفس وحدات البايت لحمولة "العملة"> بعد ذلك، يجب أن تتضمن "Zone2" في تطبيقها-hash حزمة مختصرة الذي يوضح الحالة الجديدة لـ  AckSent. IBCBlockCommit و  IBCPacketTx  تم نشرها مرة أخرى على "Hub" مما يثبت وجودها من IBCPacket المختصرة في "Zone2". قل ذلك IBCPacketTx  له القيمة التالية: من معرف السلسلة: "المنطقة 2"

من بلوك الارتفاع: 400 (على سبيل المثال) الحزمة : IBC الحزمة : الرأس: IBCرأس الحزمة: معرف SrcChain: "المنطقة 1" معرف DstChain: "المنطقة 2" العدد : 200 الحالة: تم الإرسال النوع: "عملة" أقصى ارتفاع: 350 PayloadHash : <البايتات hash من نفس الحمولة النافعة "للعملة"> وأخيرًا، يجب على "Hub" تحديث حالة الحزمة من  "AckPending" إلى "AckReceived". دليل على هذا الوضع الجديد ynalized يجب أن يعود إلى "المنطقة 2". لنفترض أن IBCPacketTx  يحتوي على ما يلي القيمة: FromChainID: "المركز" من ارتفاع الكتلة: 301 الحزمة : IBC الحزمة : الرأس: IBCرأس الحزمة: معرف SrcChain: "المنطقة 1" معرف DstChain: "المنطقة 2" العدد : 200 الحالة: تم الاستلام النوع: "عملة" أقصى ارتفاع: 350 PayloadHash : <البايتات hash من نفس الحمولة النافعة "للعملة"> وفي الوقت نفسه، قد تفترض "المنطقة 1" بشكل متفائل التسليم الناجح حزمة "النقود المعدنية" ما لم يثبت خلاف ذلك "المحور". في المثال أعلاه، إذا لم يتلق "Hub" رسالة AckSent

الحالة من "المنطقة 2" بواسطة الكتلة 350، كانت ستحدد الحالة تلقائيًا إلى  المهلة. يمكن الحصول على هذا الدليل على المهلة تم نشرها مرة أخرى على "Zone1"، ويمكن إرجاع أي tokens. هناك نوعان من Merkle trees مدعومان في النظام البيئي Tendermint/Cosmos: الشجرة البسيطة وIAVL+ شجرة. الشجرة البسيطة هي Merkle tree لقائمة ثابتة من العناصر. إذا عدد العناصر ليس قوة اثنين، وبعض الأوراق ستكون في مستويات مختلفة. تحاول Simple Tree الحفاظ على جانبي الشجرة نفس الارتفاع، ولكن اليسار قد يكون أكبر من ذلك. هذا Merkle tree هو يستخدم لـ Merkle-ize معاملات الكتلة والمستوى الأعلى عناصر جذر حالة التطبيق.الغرض من بنية بيانات IAVL+ هو توفير الدعم المستمر تخزين أزواج القيمة الرئيسية في حالة التطبيق بحيث يكون أ يمكن حساب جذر Merkle الحتمي hash بكفاءة. ال تتم موازنة الشجرة باستخدام البديل من خوارزمية AVL، وجميع العمليات هي O(log(n)). في شجرة AVL، ارتفاعات الشجرتين الفرعيتين لأي عقدة تختلف بواحدة على الأكثر. كلما تم انتهاك هذا الشرط على التحديث، يتم إعادة توازن الشجرة عن طريق إنشاء العقد الجديدة O(log(n)) التي أشر إلى العقد غير المعدلة من الشجرة القديمة. في AVL الأصلي الخوارزمية، يمكن للعقد الداخلية أيضًا الاحتفاظ بأزواج القيمة الرئيسية. ايه في ال+ الخوارزمية (لاحظ الزائد) تقوم بتعديل خوارزمية AVL للاحتفاظ بكل شيء القيم على العقد الطرفية، مع استخدام العقد الفرعية فقط لتخزين المفاتيح. يؤدي هذا إلى تبسيط الخوارزمية مع الحفاظ على مسار Merkle hash قصيرة. تشبه شجرة AVL+ محاولات باتريشيا Ethereum. هناك المقايضات. لا يلزم أن تكون المفاتيح hashed قبل إدراجها أشجار IAVL+، مما يوفر تكرارًا مرتبًا بشكل أسرع في المفتاح المساحة التي قد تفيد بعض التطبيقات. المنطق هو أبسط ل تنفيذ، يتطلب نوعين فقط من العقد - العقد الداخلية و العقد الورقية. إن برهان ميركل أقصر في المتوسط، كونه أ                 *                 / \               /     \             /         \           /             \          *               *         / \             / \        /   \           /   \       /     \         /     \      *       *       *       h6     / \     / \     / \    h0  h1  h2  h3  h4  h5    شجرة بسيطة تحتوي على 7 عناصر

شجرة ثنائية متوازنة من ناحية أخرى، جذر ميركل ل تعتمد شجرة IAVL+ على ترتيب التحديثات. سوف ندعم المزيد من Merkle trees، مثل Ethereum باتريشيا تري عندما يصبح المتغير الثنائي متاح. في التنفيذ الأساسي، يتم تدفق المعاملات إلى Cosmos تطبيق المحور عبر واجهة ABCI. سيقبل Cosmos Hub عددًا من المعاملات الأساسية الأنواع، بما في ذلك  SendTx ،  BondTx ،  UnbondTx ،  ReportHackTx ،  SlashTx، وBurnAtomTx، وProposalCreateTx، وProposalVoteTx، والتي لا تحتاج إلى شرح إلى حد ما وسيتم توثيقها في ملف المراجعة المستقبلية لهذه الورقة. هنا نقوم بتوثيق الأمرين الأساسيين أنواع المعاملات لـ IBC:  IBCBlockCommitTx  و  IBCPacketTx . تتكون معاملة  IBCBlockCommitTx  من: ChainID (سلسلة): معرف blockchain BlockHash ([]بايت): الكتلة-hash بايت، جذر Merkle والذي يتضمن التطبيق-hash BlockPartsHeader (PartSetHeader): رأس مجموعة أجزاء الكتلة البايتات، مطلوبة فقط للتحقق من توقيعات التصويت BlockHeight (int) : ارتفاع الالتزام BlockRound (int): جولة الالتزام الالتزام ([]تصويت) : يصوت >⅔ Tendermint Precommit على ذلك تتضمن التزامًا بالكتلة ValidatorsHash ([]بايت): جذر شجرة ميركل hash للجديد validator مجموعة

ValidatorsHashProof (SimpleProof): SimpleTree Merkleproof لإثبات ValidatorsHash مقابل BlockHash AppHash ([]بايت): جذر شجرة IAVLTree Merkle hash لـ حالة التطبيق AppHashProof (SimpleProof): أداة SimpleTree Merkle-proof لـ إثبات AppHash مقابل BlockHash تتكون الحزمة IBCPacket من: Header (IBCPacketHeader): رأس الحزمة الحمولة ([]بايت): بايتات حمولة الحزمة. اختياري PayloadHash ([]بايت): hash لبايتات الحزمة. اختياري يجب أن يكون أي من  Payload أو  PayloadHash موجودًا. hash  IBCPacket  هو جذر Merkle البسيط للعنصرين،  الرأس  و  الحمولة. يُطلق على  IBCPacket  بدون الحمولة الكاملة اسم الحزمة المختصرة. يتكون  IBCPacketHeader  من: SrcChainID (سلسلة): معرف المصدر blockchain DstChainID (سلسلة): معرف الوجهة blockchain الرقم (int) : رقم فريد لجميع الحزم الحالة (التعداد): يمكن أن تكون واحدة من AckPending أو AckSent أو AckReceived أو NoAck أو Timeout النوع (سلسلة): تعتمد الأنواع على التطبيق. Cosmos يحتفظ بنوع الحزمة "العملة المعدنية". MaxHeight (int) : إذا كانت الحالة ليست NoAckWanted أو AckReceived وبهذا الارتفاع، تصبح الحالة Timeout . اختياري تتكون معاملة IBCPacketTx من:FromChainID (سلسلة): معرف blockchain وهو توفير هذه الحزمة؛ ليس بالضرورة المصدر FromBlockHeight (int) : الارتفاع blockchain الذي يوجد فيه تم تضمين الحزمة التالية (بحجم Merkle) في الكتلة-hash من سلسلة المصدر الحزمة (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" إرسال حزمة إلى "Zone2" من خلال "Hub"، تكون بيانات  IBCPacket  متطابقة سواء كانت الحزمة Merkleized على "Zone1" أو "Hub" أو "Zone2". الحقل الوحيد القابل للتغيير هو  الحالة  لتتبع التسليم. ونشكر أصدقائنا وزملائنا الذين ساعدونا في وضع المفهوم، مراجعة وتقديم الدعم لعملنا مع Tendermint و Cosmos. IBC///<الرقم>

قدم زكي مانيان من SkuChain الكثير من المساعدة في التنسيق والتنسيق الصياغة، خاصة ضمن القسم ABCI جيهان تريمباك من ألثيا وداستن بينجتون للمساعدة التكرارات الأولية أندرو ميلر من Honey Badger للحصول على تعليقات حول الإجماع جريج سليباك للحصول على تعليقات بشأن الإجماع والصياغة شكرًا أيضًا لبيل جليم وسيونغهوان هان على جهودهما المتنوعة المساهمات. اسمك ومنظمتك هنا لمساهمتك 1 Bitcoin: https://bitcoin.org/bitcoin.pdf 2 زيرو كاش: http://zerocash-project.org/paper 3 Ethereum: https://github.com/ethereum/wiki/wiki/WhitePaper 4 DAO: 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 فBFT: http://pmg.csail.mit.edu/papers/osdi99.pdf 12 بت: https://bitshares.org/technology/delegatedproof-of-stake-consensus/

13 Stellar: 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/ 17 ABCI: https://github.com/tendermint/abci 18 Ethereum المشاركة: https://github.com/ethereum/EIPs/issues/53 19 ليب سويفت: http://www.ds.ewi.tudelft.nl/yleadmin/pds/papers/Performa nceAnalysOfLibswift.pdf 20 دي إل إس: 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

Ó ه