Polkadot: رؤية لإطار متعدد السلاسل غير متجانس

Polkadot: Vision for a Heterogeneous Multi-Chain Framework

作者 Gavin Wood · 2016

Abstract

Abstract

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 DR. GAVIN WOOD FOUNDER, ETHEREUM & PARITY [email protected] Abstract. Present-day blockchain architectures all suffer from a number of issues not least practical means of extensibility and scalability. We believe this stems from tying two very important parts of the consensus architecture, namely canonicality and validity, too closely together. This paper introduces an architecture, the heterogeneous multi-chain, which fundamentally sets the two apart. In compartmentalising these two parts, and by keeping the overall functionality provided to an absolute minimum of security and transport, we introduce practical means of core extensibility in situ. Scalability is addressed through a divide-and-conquer approach to these two functions, scaling out of its bonded core through the incentivisation of untrusted public nodes. The heterogeneous nature of this architecture enables many highly divergent types of consensus systems interoperating in a trustless, fully decentralised “federation”, allowing open and closed networks to have trust-free access to each other. We put forward a means of providing backwards compatibility with one or more pre-existing networks such as Ethereum. We believe that such a system provides a useful base-level component in the overall search for a practically implementable system capable of achieving global-commerce levels of scalability and privacy. 1. Preface This is intended to be a technical “vision” summary of one possible direction that may be taken in further developing the blockchain paradigm together with some rationale as to why this direction is sensible. It lays out in as much detail as is possible at this stage of development a system which may give a concrete improvement on a number of aspects of blockchain technology. It is not intended to be a specification, formal or otherwise. It is not intended to be comprehensive nor to be a final design. It is not intended to cover non-core aspects of the framework such as APIs, bindings, languages and usage. This is notably experimental; where parameters are specified, they are likely to change. Mechanisms will be added, refined and removed in response to community ideas and critiques. Large portions of this paper will likely be revised as experimental evidence and prototyping gives us information about what will work and what not. This document includes a core description of the protocol together with ideas for directions that may be taken to improve various aspects. It is envisioned that the core description will be used as the starting point for an initial series of proofs-of-concept. A final “version 1.0” would be based around this refined protocol together with the additional ideas that become proven and are determined to be required for the project to reach its goals. 1.1. History. • 09/10/2016: 0.1.0-proof1 • 20/10/2016: 0.1.0-proof2 • 01/11/2016: 0.1.0-proof3 • 10/11/2016: 0.1.0 2. Introduction Blockchains have demonstrated great promise of utility over several fields including “Internet of Things” (IoT), finance, governance, identity management, webdecentralisation and asset-tracking. However, despite the technological promise and grand talk, we have yet to see significant real-world deployment of present technology. We believe that this is down to five key failures of present technology stacks: Scalability: How much resources are spent globally on processing, bandwidth and storage for the system to process a single transaction and how many transactions can be reasonably processed under peak conditions? Isolatability: Can the divergent needs of multiple parties and applications be addressed to a nearoptimal degree under the same framework? Developability: How well do the tools work? Do the APIs address the developers’ needs? Are educational materials available? Are the right integrations there? Governance: Can the network remain flexible to evolve and adapt over time? Can decisions be made with sufficient inclusivity, legitimacy and transparency to provide effective leadership of a decentralised system? Applicability: Does the technology actually address a burning need on its own? Is other “middleware” required in order to bridge the gap to actual applications? In the present work, we aim to address the first two issues: scalability and isolatability. That said, we believe the Polkadot framework can provide meaningful improvements in each of these classes of problems. Modern, efficient blockchain implementations such as the Parity Ethereum client [17] can process in excess of 3,000 transactions per second when running on performant consumer hardware. However, current real-world blockchain networks are practically limited to around 30 transactions per second. This limitation mainly originates from the fact that the current synchronous consensus mechanisms require wide timing margins of safety on the expected processing time, which is exacerbated by the 1

خلاصة

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 د. جافين وود مؤسس الإيثيريوم والتكافؤ جافين@PARITY.IO مجردة. تعاني جميع بنيات blockchain الحالية من عدد من المشكلات ليس أقلها الوسائل العملية لقابلية التوسعة وقابلية التوسع. ونعتقد أن هذا ينبع من ربط جزأين مهمين للغاية في بنية الإجماع، وهما الشرعية والصلاحية، قريبان جدًا من بعضهما البعض. تقدم هذه الورقة بنية، السلاسل المتعددة غير المتجانسة، الذي يميز بين الاثنين بشكل أساسي. في تقسيم هذين الجزأين، ومن خلال الحفاظ على الوظائف العامة المقدمة إلى الحد الأدنى المطلق فيما يتعلق بالأمن والنقل، فإننا نقدم وسائل عملية للتوسعة الأساسية في الموقع. تتم معالجة قابلية التوسع من خلال نهج فرق تسد في هاتين الوظيفتين، والخروج من جوهره المستعبد من خلال تحفيز العقد العامة غير الموثوق بها. إن الطبيعة غير المتجانسة لهذه البنية تمكن العديد من الأنواع المتباينة للغاية من أنظمة الإجماع التي تتفاعل في "اتحاد" غير موثوق به ولامركزي بالكامل، مما يسمح للشبكات المفتوحة والمغلقة بالوصول دون ثقة إلى بعضها البعض. لقد طرحنا وسيلة لتوفير التوافق العكسي مع واحدة أو أكثر من الشبكات الموجودة مسبقًا مثل Ethereum. ونحن نعتقد أن مثل هذا النظام يوفر مكونًا مفيدًا على المستوى الأساسي في البحث الشامل عن عملية نظام قابل للتنفيذ قادر على تحقيق مستويات التجارة العالمية من قابلية التوسع والخصوصية. 1. المقدمة يهدف هذا إلى أن يكون ملخص "رؤية" فنية لاتجاه واحد محتمل يمكن اتخاذه في مواصلة تطوير نموذج blockchain مع بعض الأسباب المنطقية لسبب كون هذا الاتجاه معقولًا. انها تضع في أكبر قدر ممكن من التفاصيل في هذه المرحلة من التطوير النظام الذي قد يعطي تحسنا ملموسا على أ عدد جوانب تقنية blockchain. وليس المقصود أن تكون مواصفات رسمية أو غير ذلك. وليس المقصود أن تكون شاملة ولا أن تكون التصميم النهائي. وليس المقصود منه تغطية الجوانب غير الأساسية للإطار مثل واجهات برمجة التطبيقات والارتباطات واللغات و الاستخدام. هذا تجريبي بشكل خاص. حيث المعلمات محددة، فمن المرجح أن تتغير. الآليات سوف تتم إضافتها وصقلها وإزالتها استجابة للمجتمع الأفكار والانتقادات. من المحتمل أن تكون أجزاء كبيرة من هذه الورقة يمكن تنقيحها كأدلة تجريبية ونماذج أولية لنا معلومات حول ما سيعمل وما لا. تتضمن هذه الوثيقة وصفًا أساسيًا للبروتوكول بالإضافة إلى أفكار حول التوجيهات التي يمكن اتخاذها لتحسين الجوانب المختلفة. ومن المتصور أن الأساسية سيتم استخدام الوصف كنقطة بداية للبداية سلسلة من البراهين على المفهوم. سيكون "الإصدار 1.0" النهائي استنادًا إلى هذا البروتوكول المكرر جنبًا إلى جنب مع الأفكار الإضافية التي تم إثباتها وعقد العزم على تحقيقها اللازمة حتى يصل المشروع إلى أهدافه. 1.1. تاريخ. • 10/09/2016: 0.1.0-proof1 • 20/10/2016: 0.1.0-proof2 • 11/01/2016: 0.1.0-proof3 • 10/11/2016: 0.1.0 2. مقدمة لقد أظهرت Blockchains وعدًا كبيرًا بالفائدة في العديد من المجالات بما في ذلك "إنترنت الأشياء" (إنترنت الأشياء)، والتمويل، والحوكمة، وإدارة الهوية، ولامركزية الويب، وتتبع الأصول. ومع ذلك، على الرغم من الوعد التكنولوجي والحديث الكبير، لم نر بعد نشر كبير في العالم الحقيقي للتكنولوجيا الحالية. ونحن نعتقد أن هذا يرجع إلى خمسة إخفاقات رئيسية في الوقت الحاضر مكدسات التكنولوجيا: قابلية التوسع: مقدار الموارد التي يتم إنفاقها على مستوى العالم حول المعالجة وعرض النطاق الترددي والتخزين للنظام لمعالجة معاملة واحدة وكم عددها يمكن معالجة المعاملات بشكل معقول بموجب ظروف الذروة؟ قابلية العزلة: يمكن أن تكون الاحتياجات المتباينة متعددة هل تتم معالجة الأطراف والطلبات بدرجة قريبة من المستوى الأمثل ضمن نفس الإطار؟ قابلية التطوير: ما مدى جودة عمل الأدوات؟ افعل هل تلبي واجهات برمجة التطبيقات احتياجات المطورين؟ هل المواد التعليمية متوفرة؟ هل التكامل الصحيح موجود؟ الحوكمة: هل يمكن أن تظل الشبكة مرنة؟ تتطور وتتكيف مع مرور الوقت؟ هل يمكن أن تكون القرارات مصنوعة بالشمولية والشرعية الكافية الشفافية لتوفير القيادة الفعالة ل النظام اللامركزي؟ قابلية التطبيق: هل تعالج التكنولوجيا بالفعل حاجة ملحة من تلقاء نفسها؟ هل هناك حاجة إلى "برامج وسيطة" أخرى من أجل سد الفجوة التطبيقات الفعلية؟ في العمل الحالي، ونحن نهدف إلى معالجة الأولين القضايا: قابلية التوسع والعزلة. وقيل: نحن نؤمن يمكن لإطار عمل Polkadot أن يوفر تحسينات ذات معنى في كل فئة من هذه الفئات من المشاكل. تطبيقات blockchain الحديثة والفعالة مثل يمكن لعميل التكافؤ Ethereum [17] إجراء العمليةيس ما يزيد على 3000 معاملة في الثانية عند التشغيل على أجهزة استهلاكية عالية الأداء. ومع ذلك، العالم الحقيقي الحالي تقتصر شبكات blockchain عمليًا على حوالي 30 شبكة المعاملات في الثانية الواحدة. ينشأ هذا القيد أساسًا من حقيقة أن آليات الإجماع المتزامن الحالية تتطلب هوامش توقيت واسعة من الأمان وقت المعالجة المتوقع، والذي يتفاقم بسبب 1

Introduction

Introduction

Blockchains have demonstrated great promise of utility over several fields including “Internet of Things” (IoT), finance, governance, identity management, webdecentralisation and asset-tracking. However, despite the technological promise and grand talk, we have yet to see significant real-world deployment of present technology. We believe that this is down to five key failures of present technology stacks: Scalability: How much resources are spent globally on processing, bandwidth and storage for the system to process a single transaction and how many transactions can be reasonably processed under peak conditions? Isolatability: Can the divergent needs of multiple parties and applications be addressed to a nearoptimal degree under the same framework? Developability: How well do the tools work? Do the APIs address the developers’ needs? Are educational materials available? Are the right integrations there? Governance: Can the network remain flexible to evolve and adapt over time? Can decisions be made with sufficient inclusivity, legitimacy and transparency to provide effective leadership of a decentralised system? Applicability: Does the technology actually address a burning need on its own? Is other “middleware” required in order to bridge the gap to actual applications? In the present work, we aim to address the first two issues: scalability and isolatability. That said, we believe the Polkadot framework can provide meaningful improvements in each of these classes of problems. Modern, efficient blockchain implementations such as the Parity Ethereum client [17] can process in excess of 3,000 transactions per second when running on performant consumer hardware. However, current real-world blockchain networks are practically limited to around 30 transactions per second. This limitation mainly originates from the fact that the current synchronous consensus mechanisms require wide timing margins of safety on the expected processing time, which is exacerbated by the

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 2 desire to support slower implementations. This is due to the underlying consensus architecture: the state transition mechanism, or the means by which parties collate and execute transactions, has its logic fundamentally tied into the consensus “canonicalisation” mechanism, or the means by which parties agree upon one of a number of possible, valid, histories. This applies equally to both proof-of-work (PoW) systems such as Bitcoin [15] and Ethereum [5,23] and proofof-stake (PoS) systems such as NXT [8] and Bitshares [12]: all ultimately suffer from the same handicap. It is a simple strategy that helped make blockchains a success. However, by tightly coupling these two mechanisms into a single unit of the protocol, we also bundle together multiple different actors and applications with different risk profiles, different scalability requirements and different privacy needs. One size does not fit all. Too often it is the case that in a desire for broad appeal, a network adopts a degree of conservatism which results in a lowest-common-denominator optimally serving few and ultimately leading to a failing in the ability to innovate, perform and adapt, sometimes dramatically so. Some systems such as e.g. Factom [21] drop the statetransition mechanism altogether. However, much of the utility that we desire requires the ability to transition state according to a shared state-machine. Dropping it solves an alternative problem; it does not provide an alternative solution. It seems clear, therefore, that one reasonable direction to explore as a route to a scalable decentralised compute platform is to decouple the consensus architecture from the state-transition mechanism. And, perhaps unsurprisingly, this is the strategy that Polkadot adopts as a solution to scalability. 2.1. Protocol, Implementation and Network. Like Bitcoin and Ethereum, Polkadot refers at once to a network protocol and the (hitherto presupposed) primary public network that runs this protocol. Polkadot is intended to be a free and open project, the protocol specification being under a Creative Commons license and the code being placed under a FLOSS license. The project is developed in an open manner and accepts contributions where ever they are useful. A system of RFCs, not unlike the Python Enhancement Proposals, will allow a means of publicly collaborating over protocol changes and upgrades. Our initial implementation of the Polkadot protocol will be known as the Parity Polkadot Platform and will include a full protocol implementation together with API bindings. Like other Parity blockchain implementations, PPP is designed to be a general-purpose blockchain technology stack, neither uniquely for a public network nor for private/consortium operation. The development of it thus far has been funded by several parties including through a grant from the British government. This paper nonetheless describes Polkadot under the context of a public network. The functionality we envision in a public network is a superset of that required in alternative (e.g. private and/or consortium) settings. Furthermore, in this context, the full scope of Polkadot can be more clearly described and discussed. This does mean the reader should be aware that certain mechanisms may be described (for example interoperation with other public networks) which are not directly relevant to Polkadot when deployed under non-public (“permissioned”) situations. 2.2. Previous work. Decoupling the underlying consensus from the state-transition has been informally proposed in private for at least two years—Max Kaye was a proponent of such a strategy during the very early days of Ethereum. A more complex scalable solution known as Chain fibers, dating back to June 2014 and first published later that year1, made the case for a single relay-chain and multiple homogeneous chains providing a transparent interchain execution mechanism. Decoherence was paid for through transaction latency—transactions requiring the coordination of disparate portions of the system would take longer to process. Polkadot takes much of its architecture from that and the follow-up conversations with various people, though it differs greatly in much of its design and provisions. While there are no systems comparable to Polkadot actually in production, several systems of some relevance have been proposed, though few in any substantial level of detail. These proposals can be broken down into systems which drop or reduce the notion of a globally coherent state machine, those which attempt to provide a globally coherent singleton machine through homogeneous shards and those which target only heterogeneity. 2.2.1. Systems without Global State. Factom [21] is a system that demonstrates canonicality without the according validity, effectively allowing the chronicling of data. Because of the avoidance of global state and the difficulties with scaling which this brings, it can be considered a scalable solution. However, as mentioned previously, the set of problems it solves is strictly and substantially smaller. Tangle [18] is a novel approach to consensus systems. Rather than arranging transactions into blocks and forming consensus over a strictly linked list to give a globally canonical ordering of state-changes, it largely abandons the idea of a heavily structured ordering and instead pushes for a directed acyclic graph of dependent transactions with later items helping canonicalise earlier items through explicit referencing. For arbitrary state-changes, this dependency graph would quickly become intractable, however for the much simpler UTXO model2 this becomes quite reasonable. Because the system is only loosely coherent and transactions are generally independent of each other, a large amount of global parallelism becomes quite natural. Using the UTXO model does have the effect of limiting Tangle to a purely value-transfer “currency” system rather than anything more general or extensible. Furthermore without the hard global coherency, interaction with other systems—which tend to need an absolute degree knowledge over the system state—becomes impractical. 1https://github.com/ethereum/wiki/wiki/Chain-Fibers-Redux 2unspent transaction output, the model that Bitcoin uses whereby the state is effectively the set of address associated with some value; transactions collate such addresses and reform them into a new set of addresses whose sum total is equivalent

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 3 2.2.2. Heterogeneous Chain Systems. Side-chains [3] is a proposed addition to the Bitcoin protocol which would allow trustless interaction between the main Bitcoin chain and additional side-chains. There is no provision for any degree of ‘rich’ interaction between side-chains: the interaction would be limited to allowing side-chains to be custodians of each other’s assets, effecting—in the local jargon—a two-way peg 3. The end vision is for a framework where the Bitcoin currency could be provided with additional, if peripheral, functionality through pegging it onto some other chains with more exotic state transition systems than the Bitcoin protocol allows. In this sense, side-chains addresses extensibility rather than scalability. Indeed, there is fundamentally no provision for the validity of side-chains; tokens from one chain (e.g. Bitcoin) held on behalf of a side-chain are secured only by the side-chain’s ability to incentivise miners to canonicalise valid transitions. The security of the Bitcoin network cannot easily be transitioned to work on behalf of other blockchains. Furthermore, a protocol for ensuring Bitcoin miners merge-mine (that is duplicate their canonicalisation power onto that of the side-chain) and, more importantly, validate the side-chain’s transitions is outside the scope of this proposal. Cosmos [10] is a proposed multi-chain system in the same vein as side-chains, swapping the Nakamoto PoW consensus method for Jae Kwon’s Tendermint algorithm. Essentially, it describes multiple chains (operating in zones) each using individual instances of Tendermint, together with a means for trust-free communication via a master hub chain. This interchain communication is limited to the transfer of digital assets (“specifically about tokens”) rather than arbitrary information, however such interchain communication does have a return path for data, e.g. to report to the sender on the status of the transfer. Validator sets for the zoned chains, and in particular the means of incentivising them, are, like side-chains, left as an unsolved problem. The general assumption is that each zoned chain will itself hold a token of value whose inflation is used to pay for validators. Still in the early stages of design, at present the proposal lacks comprehensive details over the economic means of achieving the scalable certainty over global validity. However, the loose coherence required between the zones and the hub will allow for additional flexibility over the parameters of the zoned chains compared to that of a system enforcing stronger coherence. 2.2.3. Casper. As yet no comprehensive review or sideby-side comparison between Casper [6] and Polkadot have been made, though one can make a fairly sweeping (and accordingly inaccurate) characterisation of the two. Casper is a reimagining of how a PoS consensus algorithm could be based around participants betting on which fork would ultimately become canonical. Substantial consideration was given to ensuring that it be robust to network forks, even when prolonged, and have some additional degree of scalability on top of the basic Ethereum model. As such, Casper to date has tended to be a substantially more complex protocol than Polkadot and its forebears, and a substantial deviation from the basic blockchain format. It remains unseen as to how Casper will iterate in the future and what it will look like should it finally be deployed. While Casper and Polkadot both represent interesting new protocols and, in some sense, augmentations of Ethereum, there are substantial differences between their ultimate goals and paths to deployment. Casper is an Ethereum Foundation-centered project originally designed to be a PoS alteration to the protocol with no desire to create a fundamentally scalable blockchain. Crucially, it is designed to be a hard-fork, rather than anything more expansive and thus all Ethereum clients and users would be required to upgrade or remain on a fork of uncertain adoption. As such, deployment is made substantially more difficult as is inherent in a decentralised project where tight coordination is necessary. Polkadot differs in several ways; first and foremost, Polkadot is designed to be a fully extensible and scalable blockchain development, deployment and interaction test bed. It is built to be a largely future-proof harness able to assimilate new blockchain technology as it becomes available without over-complicated decentralised coordination or hard forks. We already envision several use cases such as encrypted consortium chains and high-frequency chains with very low block times that are unrealistic to do in any future version of Ethereum currently envisioned. Finally, the coupling between it and Ethereum is extremely loose; no action on the part of Ethereum is necessary to enable trustless transaction forwarding between the two networks. In short, while Casper/Ethereum 2.0 and Polkadot share some fleeting similarities we believe their end goal is substantially different and that rather than competing, the two protocols are likely to ultimately co-exist under a mutually beneficial relationship for the foreseeable future.

مقدمة

لقد أظهرت Blockchains وعدًا كبيرًا بالفائدة في العديد من المجالات بما في ذلك "إنترنت الأشياء" (إنترنت الأشياء)، والتمويل، والحوكمة، وإدارة الهوية، ولامركزية الويب، وتتبع الأصول. ومع ذلك، على الرغم من الوعد التكنولوجي والحديث الكبير، لم نر بعد نشر كبير في العالم الحقيقي للتكنولوجيا الحالية. ونحن نعتقد أن هذا يرجع إلى خمسة إخفاقات رئيسية في الوقت الحاضر مكدسات التكنولوجيا: قابلية التوسع: مقدار الموارد التي يتم إنفاقها على مستوى العالم حول المعالجة وعرض النطاق الترددي والتخزين للنظام لمعالجة معاملة واحدة وكم عددها يمكن معالجة المعاملات بشكل معقول بموجب ظروف الذروة؟ قابلية العزلة: يمكن أن تكون الاحتياجات المتباينة متعددة هل تتم معالجة الأطراف والطلبات بدرجة قريبة من المستوى الأمثل ضمن نفس الإطار؟ قابلية التطوير: ما مدى جودة عمل الأدوات؟ افعل هل تلبي واجهات برمجة التطبيقات احتياجات المطورين؟ هل المواد التعليمية متوفرة؟ هل التكامل الصحيح موجود؟ الحوكمة: هل يمكن أن تظل الشبكة مرنة؟ تتطور وتتكيف مع مرور الوقت؟ هل يمكن أن تكون القرارات مصنوعة بالشمولية والشرعية الكافية الشفافية لتوفير القيادة الفعالة ل النظام اللامركزي؟ قابلية التطبيق: هل تعالج التكنولوجيا بالفعل حاجة ملحة من تلقاء نفسها؟ هل هناك حاجة إلى "برامج وسيطة" أخرى من أجل سد الفجوة التطبيقات الفعلية؟ في العمل الحالي، ونحن نهدف إلى معالجة الأولين القضايا: قابلية التوسع والعزلة. وقيل: نحن نؤمن يمكن لإطار عمل Polkadot أن يوفر تحسينات ذات معنى في كل فئة من هذه الفئات من المشاكل. تطبيقات blockchain الحديثة والفعالة مثل يمكن لعميل التماثل Ethereum [17] معالجة ما يزيد عن 3000 معاملة في الثانية عند التشغيل على أجهزة استهلاكية عالية الأداء. ومع ذلك، العالم الحقيقي الحالي تقتصر شبكات blockchain عمليًا على حوالي 30 شبكة المعاملات في الثانية الواحدة. ينشأ هذا القيد أساسًا من حقيقة أن آليات الإجماع المتزامن الحالية تتطلب هوامش توقيت واسعة من الأمان وقت المعالجة المتوقع، والذي يتفاقم بسبببولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 2 الرغبة في دعم عمليات التنفيذ الأبطأ. هذا يرجع إلى بنية التوافق الأساسية: آلية انتقال الدولة، أو الوسائل التي يتم من خلالها تجميع الأحزاب وتنفيذ المعاملات، له منطق مرتبط بشكل أساسي في آلية "التحديد الأساسي" المتفق عليها، أو الوسائل التي تتفق الأطراف من خلالها على واحد من عدد من ممكن، صحيح، التواريخ. ينطبق هذا بالتساوي على كل من أنظمة proof-of-work (PoW) مثل Bitcoin [15] و Ethereum [5,23] وأنظمة إثبات الحصة (PoS) مثل NXT [8] وBitshares [12]: جميعهم يعانون في النهاية من نفس الإعاقة. إنها بسيطة الإستراتيجية التي ساعدت في إنجاح blockchains. ومع ذلك، عن طريق ربط هاتين الآليتين بإحكام في وحدة واحدة من البروتوكول، نقوم أيضًا بتجميع العديد من العناصر المختلفة معًا الجهات الفاعلة والتطبيقات ذات ملفات تعريف المخاطر المختلفة ومتطلبات قابلية التوسع المختلفة واحتياجات الخصوصية المختلفة. حجم واحد لا يناسب الجميع. في كثير من الأحيان يكون الأمر كذلك في أ الرغبة في الحصول على جاذبية واسعة، تتبنى الشبكة درجة من المحافظة مما يؤدي إلى القاسم المشترك الأدنى يخدم القليل على النحو الأمثل ويؤدي في النهاية إلى الفشل في القدرة على الابتكار والأداء والتكيف، في بعض الأحيان بشكل كبير جدا. بعض الأنظمة مثل على سبيل المثال. Factom [21] أسقط آلية انتقال الحالة تمامًا. ومع ذلك، فإن الكثير من المنفعة التي نرغب فيها تتطلب القدرة على الانتقال إلى الحالة وفقا لآلة الدولة المشتركة. إسقاطه يحل مشكلة بديلة؛ ولا يوفر بديلاً الحل. لذلك يبدو من الواضح أن هناك اتجاهًا واحدًا معقولًا للاستكشاف كطريق إلى حوسبة لامركزية قابلة للتطوير النظام الأساسي هو فصل بنية الإجماع عن آلية انتقال الدولة وربما ليس من المستغرب أن هذه هي الإستراتيجية التي يتبناها Polkadot كحل لقابلية التوسع. 2.1. البروتوكول والتنفيذ والشبكة. مثل Bitcoin و Ethereum، Polkadot يشير في الوقت نفسه إلى بروتوكول الشبكة والبروتوكول الأساسي (المفترض حتى الآن) الشبكة العامة التي تقوم بتشغيل هذا البروتوكول. Polkadot يهدف إلى أن يكون مشروعًا حرًا ومفتوحًا، حيث تكون مواصفات البروتوكول خاضعة لترخيص المشاع الإبداعي و يتم وضع الكود تحت ترخيص FLOSS. المشروع هو تم تطويره بطريقة مفتوحة ويقبل المساهمات أينما كانت مفيدة. نظام RFCs، لا يختلف ستسمح مقترحات تحسين بايثون بوسيلة لـ التعاون علنًا في تغييرات البروتوكول وترقياته. تنفيذنا الأولي لبروتوكول Polkadot سيعرف باسم منصة التكافؤ Polkadot وسوف تضمين تنفيذ بروتوكول كامل مع واجهة برمجة التطبيقات (API). الارتباطات. مثل تطبيقات Parity blockchain الأخرى، تم تصميم PPP لتكون مجموعة تقنية blockchain ذات أغراض عامة، وليست مخصصة بشكل فريد لشبكة عامة ولا لـ عملية خاصة/كونسورتيوم. تطوره هكذا تم تمويل Far من قبل عدة أطراف بما في ذلك من خلال منحة من الحكومة البريطانية. مع ذلك، تصف هذه الورقة Polkadot ضمن سياق الشبكة العامة. الوظائف التي نتصورها في الشبكة العامة هي مجموعة شاملة من تلك المطلوبة في إعدادات بديلة (مثل القطاع الخاص و/أو الاتحاد). علاوة على ذلك، في هذا السياق، يمكن للنطاق الكامل لـ Polkadot أن يتم وصفها ومناقشتها بشكل أكثر وضوحًا. هذا يعني يجب أن يدرك القارئ أن بعض الآليات قد تفعل ذلك سيتم وصفها (على سبيل المثال، التشغيل البيني مع الشبكات العامة الأخرى) والتي لا تتعلق بشكل مباشر بـ Polkadot عند نشرها في مواقف غير عامة ("مسموح بها"). 2.2. العمل السابق. لقد تم اقتراح فصل الإجماع الأساسي عن عملية انتقال الدولة بشكل غير رسمي على انفراد لمدة عامين على الأقل - كان ماكس كاي من أنصار مثل هذه الإستراتيجية خلال الأيام الأولى من الثورة Ethereum. حل أكثر تعقيدًا وقابل للتطوير يُعرف باسم Chain ألياف، يعود تاريخه إلى يونيو 2014 وتم نشره لأول مرة لاحقًا في ذلك العام 1، قدمت الحجة لسلسلة ترحيل واحدة وسلاسل متعددة متجانسة توفر آلية تنفيذ شفافة بين السلاسل. تم دفع ثمن فك الترابط من خلال زمن استجابة المعاملة - المعاملات التي تتطلب تنسيق أجزاء متباينة من النظام سوف يستغرق وقتا أطول للمعالجة. Polkadot يأخذ الكثير من بنيته من ذلك ومن محادثات المتابعة معه مختلف الناس، على الرغم من أنها تختلف بشكل كبير في الكثير من تصميمها وأحكامها. في حين لا توجد أنظمة مماثلة لـ Polkadot في الواقع في الإنتاج، عدة أنظمة ذات أهمية معينة تم اقتراحها، على الرغم من قلة عددها في أي مستوى كبير من التفاصيل. هذه المقترحات يمكن أن تكونمقسمة إلى أنظمة مما يسقط أو يقلل من فكرة التماسك العالمي آلة الدولة، تلك التي تحاول توفير عالميًا آلة مفردة متماسكة من خلال شظايا متجانسة وتلك التي تستهدف عدم التجانس فقط. 2.2.1. أنظمة بدون دولة عالمية. Factom [21] هو نظام يوضح القانون الأساسي دون المطابقة الصلاحية، مما يسمح بشكل فعال بتأريخ البيانات. بسبب تجنب الدولة العالمية والصعوبات ومع التوسع الذي يجلبه هذا، يمكن اعتباره حلاً قابلاً للتطوير. ومع ذلك، كما ذكرنا سابقًا، المجموعة من المشاكل التي يحلها أصغر بشكل صارم وجوهري. يعد Tangle [18] أسلوبًا جديدًا لأنظمة الإجماع. فبدلاً من ترتيب المعاملات في كتل وتشكيل إجماع حول قائمة مرتبطة بشكل صارم لإعطاء ترتيب عالمي عالمي لتغييرات الحالة، فإنه يتخلى إلى حد كبير عن فكرة الترتيب شديد التنظيم وبدلاً من ذلك يدفع للحصول على رسم بياني حلقي موجه للمعاملات التابعة مع العناصر اللاحقة مما يساعد في تحديد العناصر السابقة من خلال الإشارة الصريحة. لإجراء تغييرات تعسفية في الحالة، هذا الرسم البياني للتبعية سيصبح سريعًا مستعصيًا على الحل، ولكن بالنسبة للطراز UTXO model2 الأبسط بكثير، يصبح هذا الأمر معقول جدا. لأن النظام متماسك بشكل فضفاض فقط والمعاملات مستقلة بشكل عام عن كل منها أخرى، يصبح قدر كبير من التوازي العالمي تماما طبيعي. إن استخدام النموذج UTXO له التأثير قصر Tangle على "عملة" نقل القيمة البحتة النظام بدلا من أي شيء أكثر عمومية أو قابلة للتوسيع. علاوة على ذلك، من دون التماسك العالمي الصعب، فإن التفاعل مع الأنظمة الأخرى - والذي يميل إلى الحاجة إلى المطلق درجة المعرفة بحالة النظام - تصبح غير عملية. 1https://github.com/ethereum/wiki/wiki/Chain-Fibers-Redux 2مخرجات المعاملات غير المنفقة، النموذج الذي يستخدمه Bitcoin حيث تكون الحالة بشكل فعال مجموعة العناوين المرتبطة ببعض القيمة؛ تقوم المعاملات بجمع هذه العناوين وإصلاحها في مجموعة جديدة من العناوين التي يكون مجموعها مكافئًا

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 3 2.2.2. أنظمة السلسلة غير المتجانسة. السلاسل الجانبية [3] هي أ الإضافة المقترحة إلى بروتوكول Bitcoin والتي من شأنها أن تسمح بالتفاعل غير الموثوق به بين سلسلة Bitcoin الرئيسية وسلاسل جانبية إضافية. لا يوجد أي شرط لأي درجة التفاعل "الغني" بين السلاسل الجانبية: سيقتصر التفاعل على السماح بوجود السلاسل الجانبية أوصياء على أصول بعضهم البعض، ويؤثرون على المستوى المحلي المصطلحات - ربط ثنائي الاتجاه 3. الرؤية النهائية هي لإطار يمكن من خلاله توفير عملة Bitcoin وظائف إضافية، إذا كانت طرفية، من خلال ربطها إلى بعض السلاسل الأخرى التي تتمتع بانتقال حالة أكثر غرابة الأنظمة التي يسمح بها بروتوكول Bitcoin. وبهذا المعنى، تتناول السلاسل الجانبية قابلية التوسعة بدلاً من قابلية التوسع. في الواقع، لا يوجد أي نص أساسي على صحة السلاسل الجانبية؛ tokens من سلسلة واحدة (على سبيل المثال Bitcoin) يتم الاحتفاظ بها نيابة عن سلسلة جانبية ويتم تأمينها فقط من خلال قدرة السلسلة الجانبية على تحفيز القائمين بالتعدين على تحديد المعايير الأساسية التحولات صالحة. أمان شبكة Bitcoin لا يمكن بسهولة أن تنتقل للعمل نيابة عن الآخرين blockchains. علاوة على ذلك، بروتوكول لضمان Bitcoin يقوم القائمون بالتعدين بدمج منجمي (أي تكرار قوة تحديد المعايير الخاصة بهم على تلك الخاصة بالسلسلة الجانبية)، والأهم من ذلك، التحقق من صحة انتقالات السلسلة الجانبية خارج نطاق نطاق هذا الاقتراح. Cosmos [10] هو نظام متعدد السلاسل مقترح في على نفس المنوال مثل السلاسل الجانبية، مبادلة ناكاموتو PoW طريقة الإجماع لخوارزمية Tendermint لـ Jae Kwon. بشكل أساسي، فهو يصف سلاسل متعددة (تعمل في المناطق) تستخدم كل منها مثيلات فردية من Tendermint، جنبًا إلى جنب مع وسيلة للاتصال الخالي من الثقة عبر a سلسلة المحور الرئيسي. يقتصر هذا الاتصال بين السلاسل على نقل الأصول الرقمية ("على وجه التحديد حول tokens") بدلاً من المعلومات التعسفية، ومع ذلك فإن هذا الاتصال بين السلاسل لديه مسار عودة للبيانات، على سبيل المثال لإبلاغ المرسل بحالة النقل. مجموعات المدقق للسلاسل المخصصة، وعلى وجه الخصوص وسائل تحفيزهم، مثل السلاسل الجانبية، لم تعد موجودة باعتبارها مشكلة لم يتم حلها. الافتراض العام هو ذلك ستحتوي كل سلسلة مخصصة بحد ذاتها على token من القيمة التي يستخدم تضخمها لدفع ثمن validators. لا تزال في المراحل المبكرة فيما يتعلق بالتصميم، يفتقر الاقتراح في الوقت الحالي إلى تفاصيل شاملة حول الوسائل الاقتصادية لتحقيق ما هو قابل للتطوير اليقين بشأن الصلاحية العالمية. ومع ذلك، فإن التماسك الفضفاض المطلوب بين المناطق والمحور سوف يسمح بذلك لمزيد من المرونة على المعلمات المخصصة للمنطقة سلاسل مقارنة بنظام فرض أقوى التماسك. 2.2.3. كاسبر. حتى الآن لا توجد مراجعة شاملة أو مقارنة جانبية بين Casper [6] وPolkadot تم إجراؤها، على الرغم من أنه يمكن للمرء أن يقوم بعملية كاسحة إلى حد ما (وبالتالي غير دقيق) توصيف الاثنين. يعد Casper بمثابة إعادة تصور لكيفية خوارزمية إجماع PoS يمكن أن يعتمد على مراهنة المشاركين على أي شوكة سيصبح في النهاية قانونيًا. وقد تم إيلاء اهتمام كبير لضمان أن تكون قوية للتواصل الشوكات، حتى عندما تطول، وتتمتع بدرجة إضافية من قابلية التوسع أعلى النموذج الأساسي Ethereum. كما على هذا النحو، يميل كاسبر حتى الآن إلى أن يكون أكثر بكثير بروتوكول معقد من Polkadot وأسلافه، و أ انحراف كبير عن تنسيق blockchain الأساسي. ذلك لا يزال غير واضح بشأن كيفية تكرار كاسبر في المستقبل وكيف سيبدو إذا تم نشره أخيرًا. بينما يمثل كل من Casper و Polkadot بروتوكولات جديدة مثيرة للاهتمام، وإلى حد ما، تعزيزات لـ Ethereum، هناك اختلافات جوهرية بينهما الأهداف النهائية ومسارات النشر. كاسبر هو Ethereum تم تصميم المشروع الذي يتمحور حول المؤسسة في الأصل أن يكون تغييرًا في إثبات الحصة (PoS) للبروتوكول دون الرغبة في ذلك إنشاء blockchain قابل للتطوير بشكل أساسي. إنه أمر حاسم تم تصميمه ليكون بمثابة شوكة صلبة، بدلاً من أي شيء أكثر توسعية، وبالتالي سيكون جميع عملاء ومستخدمي Ethereum مطلوب للترقية أو البقاء على مفترق اعتماد غير مؤكد. على هذا النحو، يصبح النشر أكثر صعوبة إلى حد كبير كما هو متأصل في المشروع اللامركزي حيث يكون ضيقًا التنسيق ضروري. Polkadot يختلف بعدة طرق؛ أولا وقبل كل شيء، تم تصميم Polkadot ليكون قابلاً للتوسيع والتوسع بشكل كامل blockchain اختبار التطوير والنشر والتفاعل سرير. لقد تم تصميمه ليكون بمثابة حزام مقاوم للمستقبل إلى حد كبير استيعاب blockchain الجديدالتكنولوجيا عندما تصبح متاحة دون التنسيق اللامركزي المعقد أو الشوكات الصلبة. نحن نتصور بالفعل العديد من حالات الاستخدام مثل كسلاسل الكونسورتيوم المشفرة والسلاسل عالية التردد مع أوقات حظر منخفضة للغاية ومن غير الواقعي القيام بها أي إصدار مستقبلي من Ethereum متصور حاليًا. وأخيرًا، فإن الاقتران بينه وبين Ethereum كبير للغاية فضفاضة؛ ليس من الضروري اتخاذ أي إجراء من جانب Ethereum تمكين إعادة توجيه المعاملات غير الموثوقة بين الاثنين الشبكات. باختصار، بينما Casper/Ethereum 2.0 وPolkadot نشارك بعض أوجه التشابه العابرة التي نعتقد أنها هدفها النهائي مختلفة إلى حد كبير، وذلك بدلا من التنافس، من المرجح أن يتعايش البروتوكولان في النهاية تحت عنوان علاقة منفعة متبادلة في المستقبل المنظور.

Summary

Summary

Polkadot is a scalable heterogeneous multi-chain. This means that unlike previous blockchain implementations which have focused on providing a single chain of varying degrees of generality over potential applications, Polkadot itself is designed to provide no inherent application functionality at all. Rather, Polkadot provides the bedrock “relay-chain” upon which a large number of validatable, globally-coherent dynamic data-structures may be hosted side-by-side. We call these data-structures “parallelised” chains or parachains, though there is no specific need for them to be blockchain in nature. In other words, Polkadot may be considered equivalent to a set of independent chains (e.g. the set containing Ethereum, Ethereum Classic, Namecoin and Bitcoin) except for two very important points: • Pooled security; • trust-free interchain transactability. These points are why we consider Polkadot to be “scalable”. In principle, a problem to be deployed on Polkadot may be substantially parallelised—scaled out—over a large number of parachains. Since all aspects of each parachain may be conducted in parallel by a different segment of the Polkadot network, the system has some ability to scale. Polkadot provides a rather bare-bones piece of 3as opposed to a one-way peg which is essentially the action of destroying tokens in one chain to create tokens in another without the mechanism to do the converse in order to recover the original tokens

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 4 infrastructure leaving much of the complexity to be addressed at the middleware level. This is a conscious decision intended to reduce development risk, enabling the requisite software to be developed within a short time span and with a good level of confidence over its security and robustness. 3.1. The Philosophy of Polkadot. Polkadot should provide an absolute rock-solid foundation on which to build the next wave of consensus systems, right through the risk spectrum from production-capable mature designs to nascent ideas. By providing strong guarantees over security, isolation and communication, Polkadot can allow parachains to select from a range of properties themselves. Indeed, we foresee various experimental blockchains pushing the properties of what could be considered sensible today. We see conservative, high-value chains similar to Bitcoin or Z-cash [20] co-existing alongside lower-value “theme-chains” (such marketing, so fun) and test-nets with zero or near-zero fees. We see fully-encrypted, “dark”, consortium chains operating alongside—and even providing services to—highly functional and open chains such as those like Ethereum. We see experimental new VM-based chains such as a subjective time-charged wasm chain being used as a means of outsourcing difficult compute problems from a more mature Ethereum-like chain or a more restricted Bitcoin-like chain. To manage chain upgrades, Polkadot will inherently support some sort of governance structure, likely based on existing stable political systems and having a bicameral aspect similar to the Yellow Paper Council [24]. As the ultimate authority, the underlying stakable token holders would have “referendum” control. To reflect the users’ need for development but the developers’ need for legitimacy, we expect a reasonable direction would be to form the two chambers from a “user” committee (made up of bonded validators) and a “technical” committee made up of major client developers and ecosystem players. The body of token holders would maintain the ultimate legitimacy and form a supermajority to augment, reparameterise, replace or dissolve this structure, something we don’t doubt the eventual need for: in the words of Twain “Governments and diapers must be changed often, and for the same reason”. Whereas reparameterisation is typically trivial to arrange within a larger consensus mechanism, more qualitative changes such as replacement and augmentation would likely need to be either non-automated “soft-decrees” (e.g. through the canonicalisation of a block number and the hash of a document formally specifying the new protocol) or necessitate the core consensus mechanism to contain a sufficiently rich language to describe any aspect of itself which may need to change. The latter is an eventual aim, however, the former more likely to be chosen in order to facilitate a reasonable development timeline. Polkadot’s primary tenets and the rules within which we evaluate all design decisions are: Minimal: Polkadot should have as little functionality as possible. Simple: no additional complexity should be present in the base protocol than can reasonably be offloaded into middleware, placed through a parachain or introduced in a later optimisation. General: no unnecessary requirement, constraint or limitation should be placed on parachains; Polkadot should be a test bed for consensus system development which can be optimised through making the model into which extensions fit as abstract as possible. Robust: Polkadot should provide a fundamentally stable base-layer. In addition to economic soundness, this also means decentralising to minimise the vectors for high-reward attacks.

ملخص

Polkadot عبارة عن سلسلة متعددة غير متجانسة وقابلة للتطوير. هذا يعني أنه على عكس تطبيقات blockchain السابقة التي ركزت على توفير سلسلة واحدة متفاوتة درجات العمومية على التطبيقات المحتملة، Polkadot تم تصميمه في حد ذاته بحيث لا يوفر أي وظيفة تطبيق متأصلة على الإطلاق. بل إن Polkadot يوفر الأساس المتين "سلسلة الترحيل" التي يعتمد عليها عدد كبير من التحقق من الصحة، يمكن استضافة هياكل البيانات الديناميكية المتماسكة عالميًا جنبا إلى جنب. نحن نطلق على هياكل البيانات هذه اسم "المتوازية" السلاسل أو المظلات، على الرغم من عدم وجود حاجة محددة لها أن تكون blockchain بطبيعتها. بمعنى آخر، يمكن اعتبار Polkadot مكافئًا لمجموعة من السلاسل المستقلة (على سبيل المثال، المجموعة التي تحتوي على Ethereum، Ethereum Classic، Namecoin و Bitcoin) باستثناء نقطتين مهمتين للغاية: • الأمن المجمع. • إمكانية التعامل بين السلاسل دون ثقة. هذه النقاط هي سبب اعتبارنا Polkadot "قابلة للتطوير". من حيث المبدأ، قد تكون المشكلة التي سيتم نشرها على Polkadot متوازية إلى حد كبير - أو متدرجة - على مدى عدد كبير من المظلات. وبما أن جميع جوانب كل منهما يمكن إجراء سلسلة المظلة بالتوازي بواسطة جزء مختلف من شبكة Polkadot، يتمتع النظام ببعض القدرة على نطاق واسع. Polkadot يوفر قطعة مجردة إلى حد ما 3 على عكس الربط أحادي الاتجاه والذي هو في الأساس عملية تدمير tokens في سلسلة واحدة لإنشاء tokens في سلسلة أخرى بدون آلية لإجراء العكس من أجل استعادة tokens الأصليةبولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 4 البنية التحتية تترك الكثير من التعقيد ليتم معالجتها على مستوى البرمجيات الوسيطة. وهذا قرار واعي يهدف إلى الحد من مخاطر التنمية، وتمكين البرامج المطلوبة التي سيتم تطويرها خلال فترة زمنية قصيرة ومع مستوى جيد من الثقة في أمنها و المتانة. 3.1. فلسفة Polkadot. Polkadot ينبغي توفير أساس متين مطلق يمكن القيام به قم ببناء الموجة التالية من أنظمة الإجماع، حتى النهاية طيف المخاطر من التصاميم الناضجة القادرة على الإنتاج إلى الأفكار الناشئة. من خلال توفير ضمانات قوية بشأن الأمان والعزل والتواصل، يمكن أن يسمح Polkadot بذلك المظلات للاختيار من بين مجموعة من الخصائص بأنفسهم. في الواقع، نتوقع أن تقوم العديد من التجارب التجريبية بدفع خصائص ما يمكن اعتباره معقولًا اليوم. نرى المحافظين سلاسل ذات قيمة عالية مماثلة ل Bitcoin أو Z-cash [20] تتواجد جنبًا إلى جنب مع القيمة الأقل "سلاسل المواضيع" (مثل هذا التسويق، ممتع جدًا) وشبكات الاختبار مع رسوم صفر أو قريبة من الصفر. نرى مشفرة بالكامل، سلاسل الكونسورتيوم "المظلمة" تعمل جنبًا إلى جنب - وحتى تقديم الخدمات لسلاسل مفتوحة وفعالة للغاية مثل تلك مثل Ethereum. نرى تجريبية جديدة السلاسل المستندة إلى VM مثل الـWasm المشحون بالوقت يتم استخدام السلسلة كوسيلة لالاستعانة بمصادر خارجية لمشاكل الحوسبة الصعبة من سلسلة أكثر نضجًا تشبه Ethereum أو سلسلة تشبه Bitcoin أكثر تقييدًا. لإدارة ترقيات السلسلة، سيتم Polkadot بطبيعته دعم نوع ما من هيكل الإدارة، على الأرجح على الأنظمة السياسية المستقرة القائمة ولها جانب من مجلسين مماثل لمجلس الورقة الصفراء [24]. كما السلطة النهائية، سيكون لأصحاب token الأساسيين سيطرة "الاستفتاء". لتعكس المستخدمين الحاجة إلى التطوير ولكن حاجة المطورين إلى الشرعية، نتوقع أن يكون هناك اتجاه معقول للتشكيل الغرفتين من لجنة "المستخدمين" (المكونة من المستعبدين validators) وتشكيل لجنة "فنية". من مطوري العملاء الرئيسيين واللاعبين في النظام البيئي. ال ستحافظ هيئة حاملي token على الشرعية النهائية وتشكل أغلبية ساحقة لزيادة هذا الهيكل أو إعادة قياسه أو استبداله أو حله، وهو أمر نحن لا تشك في الحاجة النهائية إلى: على حد تعبير توين "يجب تغيير الحفاضات والحفاضات بشكل متكرر، ومن أجل ذلك نفس السبب". في حين أن إعادة تحديد المعايير عادة ما تكون تافهة للترتيب ضمن آلية إجماع أكبر، فإن المزيد من التغييرات النوعية مثل الاستبدال والزيادة من شأنها أن تكون مفيدة. من المحتمل أن تكون إما "مراسيم ناعمة" غير آلية (على سبيل المثال. من خلال تحديد رقم الكتلة و hash لوثيقة تحدد البروتوكول الجديد رسميًا) أو تستلزم آلية الإجماع الأساسية أن تحتوي على أ لغة غنية بما فيه الكفاية لوصف أي جانب من جوانب نفسها والتي قد تحتاج إلى التغيير. والأخير هو هدف نهائي، ومع ذلك، فمن المرجح أن يتم اختيار الأول من أجل ذلك تسهيل جدول زمني معقول للتنمية. مبادئ Polkadot الأساسية والقواعد التي يتم من خلالها نقوم بتقييم جميع قرارات التصميم هي: الحد الأدنى: Polkadot يجب أن يتمتع بأقل قدر ممكن من الوظائف. بسيط: لا ينبغي أن يكون هناك أي تعقيد إضافي في البروتوكول الأساسي مما يمكن أن يكون بشكل معقول تم تفريغها في البرامج الوسيطة، وضعت من خلال أ parachain أو تم تقديمه في تحسين لاحق. عام: لا يوجد شرط غير ضروري، القيد أو ينبغي وضع قيود على المظلات؛ يجب أن يكون Polkadot بمثابة اختبار لتطوير نظام الإجماع الذي يمكن تحسينه من خلاله جعل النموذج الذي تتناسب معه الامتدادات مجردًا قدر الإمكان. قوية: Polkadot يجب أن توفر بشكل أساسي طبقة أساسية مستقرة. وبالإضافة إلى السلامة الاقتصادية، فإن هذا يعني أيضًا تقليل المركزية ناقلات للهجمات ذات المكافأة العالية.

Participation in Polkadot

Participation in Polkadot

There are four basic roles in the upkeep of an Polkadot network: collator, fisherman, nominator and validator. In one possible implementation of Polkadot, the latter role may actually be broken down into two roles: basic validator and availability guarantor; this is discussed in section 6.5.3. Collator Fisherman Validators (this group) Validators (other groups) approves becomes monitors reports bad behaviour to provides block candidates for Nominator Figure 1. The interaction between the four roles of Polkadot. 4.1. Validators. A validator is the highest charge and helps seal new blocks on the Polkadot network. The validator’s role is contingent upon a sufficiently high bond being deposited, though we allow other bonded parties to nominate one or more validators to act for them and as such some portion of the validator’s bond may not necessarily be owned by the validator itself but rather by these nominators. A validator must run a relay-chain client implementation with high availability and bandwidth. At each block the node must be ready to accept the role of ratifying a new block on a nominated parachain. This process involves receiving, validating and republishing candidate blocks. The nomination is deterministic but virtually unpredictable much in advance. Since the validator cannot reasonably be expected to maintain a fully-synchronised database of all parachains, it is expected that the validator will nominate the task of devising a suggested new parachain block to a third-party, known as a collator. Once all new parachain blocks have been properly ratified by their appointed validator subgroups, validators must then ratify the relay-chain block itself. This involves updating the state of the transaction queues (essentially moving data from a parachain’s output queue to another parachain’s input queue), processing the transactions of the ratified relay-chain transaction set and ratifying the final block, including the final parachain changes.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 5 A validator not fulfilling their duty to find consensus under the rules of our chosen consensus algorithm is punished. For initial, unintentional failures, this is through withholding the validator’s reward. Repeated failures result in the reduction of their security bond (through burning). Provably malicious actions such as double-signing or conspiring to provide an invalid block result in the loss of the entire bond (which is partially burnt but mostly given to the informant and the honest actors). In some sense, validators are similar to the mining pools of current PoW blockchains. 4.2. Nominators. A nominator is a stake-holding party who contributes to the security bond of a validator. They have no additional role except to place risk capital and as such to signal that they trust a particular validator (or set thereof) to act responsibly in their maintenance of the network. They receive a pro-rata increase or reduction in their deposit according to the bond’s growth to which they contribute. Together with collators, next, nominators are in some sense similar to the miners of the present-day PoW networks. 4.3. Collators. Transaction collators (collators for short) are parties who assist validators in producing valid parachain blocks. They maintain a “full-node” for a particular parachain; meaning that they retain all necessary information to be able to author new blocks and execute transactions in much the same way as miners do on current PoW blockchains. Under normal circumstances, they will collate and execute transactions to create an unsealed block, and provide it, together with a zero-knowledge proof, to one or more validators presently responsible for proposing a parachain block. The precise nature of the relationship between collators, nominators and validators will likely change over time. Initially, we expect collators to work very closely with validators, since there will be only a few (perhaps only one) parachain(s) with little transaction volume. The initial client implementation will include RPCs to allow a parachain collator node to unconditionally supply a (relaychain) validator node with a provably valid parachain block. As the cost of maintaining a synced version of all such parachains increases, we expect to see additional infrastructure in place which will help separate out the duties to independent, economically-motivated, parties. Eventually, we expect to see collator pools who vie to collect the most transaction fees. Such collators may become contracted to serve particular validators over a period of time for an on-going share in the reward proceeds. Alternatively, “freelance” collators may simply create a market offering valid parachain blocks in return for a competitive share of the reward payable immediately. Similarly, decentralised nominator pools would allow multiple bonded participants to coordinate and share the duty of a validator. This ability to pool ensures open participation leading to a more decentralised system. 4.4. Fishermen. Unlike the other two active parties, fishermen are not directly related to the block-authoring process. Rather they are independent “bounty hunters” motivated by a large one-offreward. Precisely due to the existence of fishermen, we expect events of misbehaviour to happen seldom, and when they do only due to the bonded party being careless with secret key security, rather than through malicious intent. The name comes from the expected frequency of reward, the minimal requirements to take part and the eventual reward size. Fishermen get their reward through a timely proof that at least one bonded party acted illegally. Illegal actions include signing two blocks each with the same ratified parent or, in the case of parachains, helping ratify an invalid block. To prevent over-rewarding or the compromise and illicit use of a session’s secret key, the base reward for providing a single validator’s illegally signed message is minimal. This reward increases asymptotically as more corroborating illegal signatures from other validators are provided implying a genuine attack. The asymptote is set at 66% following our base security assertion that at least two-thirds of the validators act benevolently. Fishermen are somewhat similar to “full nodes” in present-day blockchain systems that the resources needed are relatively small and the commitment of stable uptime and bandwidth is not necessary. Fishermen differ in so much as they must post a small bond. This bond prevents sybil attacks from wasting validators’ time and compute resources. It is immediately withdrawable, probably no more than the equivalent of a few dollars and may lead to reaping a hefty reward from spotting a misbehaving validator.

المشاركة في Polkadot

هناك أربعة أدوار أساسية في صيانة Polkadot الشبكة: المتعاون والصياد والمرشح وvalidator. في أحد التطبيقات المحتملة لـ Polkadot، الدور الأخير يمكن تقسيمها فعليًا إلى دورين: validator الأساسي وضامن التوفر؛ تمت مناقشة هذا في القسم 6.5.3. جامع صياد المدققون (هذه المجموعة) المدققون (مجموعات أخرى) يوافق يصبح المراقبين التقارير سيئة السلوك ل يوفر كتلة المرشحين ل المرشح الشكل 1. التفاعل بين أربعة أدوار Polkadot. 4.1. المدققون. validator هو أعلى شحن و يساعد في إغلاق الكتل الجديدة على شبكة Polkadot. يتوقف دور validator على وجود رابطة عالية بما فيه الكفاية يتم إيداعها، على الرغم من أننا نسمح للأطراف المستعبدة الأخرى بذلك قم بترشيح واحد أو أكثر من validator لتمثيلهم وبصفتهم قد لا يكون هذا الجزء من سند validator مملوكًا بالضرورة لـ validator نفسه ولكن بالأحرى من قبل هؤلاء الترشيحات. يجب أن يقوم validator بتشغيل تطبيق عميل سلسلة الترحيل مع توفر عالي وعرض النطاق الترددي. عند كل كتلة يجب أن تكون العقدة جاهزة لقبول دور التصديق كتلة جديدة على المظلة المرشحة. هذه العملية يتضمن تلقي المرشح والتحقق من صحته وإعادة نشره كتل. إن الترشيح أمر حتمي ولكن لا يمكن التنبؤ به تقريبًا مقدمًا. نظرًا لأن validator لا يمكن ذلك ومن المتوقع بشكل معقول للحفاظ على متزامنة بالكامل قاعدة بيانات لجميع المظلات، من المتوقع أن يرشح validator مهمة ابتكار قاعدة بيانات جديدة مقترحة كتلة المظلة لطرف ثالث، والمعروفة باسم المجمع. بمجرد التصديق على جميع كتل المظلات الجديدة بشكل صحيح من خلال مجموعاتها الفرعية validator، validators يجب بعد ذلك التصديق على كتلة سلسلة التتابع نفسها. هذا ينطوي على تحديث حالة قوائم انتظار المعاملات (بشكل أساسي نقل البيانات من قائمة انتظار إخراج سلسلة Parachain إلى أخرى قائمة انتظار إدخال Parachain)، ومعالجة المعاملات مجموعة معاملات سلسلة الترحيل المعتمدة والتصديق على الكتلة النهائية، بما في ذلك تغييرات الباراشين النهائية.بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 5 validator لا يقومون بواجبهم في التوصل إلى توافق في الآراء بموجب قواعد خوارزمية الإجماع التي اخترناها يعاقب. بالنسبة لحالات الفشل الأولية غير المقصودة، يتم ذلك حجز مكافأة validator. يؤدي الفشل المتكرر إلى تقليل سندات الضمان الخاصة بهم (من خلال الحرق). من المحتمل أن تكون الإجراءات الضارة مثل التوقيع المزدوج أو التآمر لتقديم كتلة غير صالحة يؤدي إلى خسارة السند بأكمله (الذي يتم حرقه جزئيًا ولكن يتم تقديمه في الغالب إلى المخبرين والفاعلين الصادقين). إلى حد ما، validators تشبه مجمعات التعدين من إثبات العمل الحالي blockchains. 4.2. الترشيحات. المرشح هو طرف صاحب مصلحة الذي يساهم في السند الضماني لـ validator. هم ليس لها دور إضافي سوى وضع رأس المال المخاطر وكما للإشارة إلى أنهم يثقون في validator معين (أو مجموعة منها) للتصرف بمسؤولية في صيانتها شبكة. ويحصلون على زيادة أو تخفيض تناسبي في ودائعهم وفقا لنمو السند الذي يساهمون. جنبا إلى جنب مع المتعاونين، التالي، المرشحون في بعض يشبه عمال المناجم في شبكات إثبات العمل (PoW) الحالية. 4.3. المقارنات. جامعو المعاملات (جامعو المعاملات باختصار) هي الأطراف التي تساعد validators في إنتاج صالحة كتل المظلة. إنهم يحافظون على "عقدة كاملة" لسلسلة باراشين معينة؛ وهذا يعني أنهم يحتفظون بكل ما هو ضروري المعلومات لتكون قادرة على تأليف كتل جديدة وتنفيذها المعاملات بنفس الطريقة التي يقوم بها القائمون بالتعدين على إثبات العمل (PoW) blockchains الحالي. في الظروف العادية هم سوف نقوم بجمع وتنفيذ المعاملات لإنشاء ملف مفتوح كتلة، وتوفيرها، جنبا إلى جنب مع المعرفة الصفرية إثبات، إلى واحد أو أكثر من validator المسؤولين حاليًا عن اقتراح كتلة المظلة. من المرجح أن تتغير الطبيعة الدقيقة للعلاقة بين المتعاونين والمرشحين وvalidators بمرور الوقت الوقت. في البداية، نتوقع أن يعمل المترجمون بشكل وثيق جدًا مع validators، نظرًا لأنه لن يكون هناك سوى عدد قليل (ربما سلسلة (سلاسل) واحدة فقط ذات حجم معاملات صغير. ال سيتضمن التنفيذ الأولي للعميل RPCs للسماح بـ عقدة ربط سلسلة Parachain لتزويد عقدة (سلسلة ترحيل) validator بشكل غير مشروط بسلسلة Parachain صالحة بشكل مثبت كتلة. كتكلفة الحفاظ على نسخة متزامنة من كل هذه المظلات تتزايد، ونتوقع أن نرى المزيد البنية التحتية الموجودة والتي ستساعد في فصل واجبات الأطراف المستقلة ذات الدوافع الاقتصادية. في نهاية المطاف، نتوقع أن نرى مجموعات من المتعاونين الذين يتنافسون عليها جمع معظم رسوم المعاملات. قد يتم التعاقد مع هؤلاء المجمعين لخدمة validator معينة على مدى فترة زمنية مقابل حصة مستمرة في عائدات المكافأة. وبدلاً من ذلك، يمكن للمجمعين "المستقلين" ببساطة إنشاء ملف يقدم السوق كتل باراشين صالحة مقابل حصة تنافسية من المكافأة تدفع على الفور. وبالمثل، فإن مجمعات الترشيح اللامركزية ستسمح بالتعددية المشاركون المستعبدين للتنسيق وتقاسم واجب أ validator. تضمن هذه القدرة على التجميع المشاركة المفتوحة مما يؤدي إلى نظام أكثر لامركزية. 4.4. الصيادين. على عكس الحزبين النشطين الآخرين، لا يرتبط الصيادون مباشرة بتأليف الكتلة عملية. بل هم "صائدو جوائز" مستقلون بدافع من مكافأة كبيرة. على وجه التحديد بسبب بوجود الصيادين، نتوقع أن حوادث سوء السلوك نادرًا ما تحدث، وعندما تحدث فقط بسبب كون الطرف المستعبد مهملاً بأمن المفتاح السري، وليس من خلال النوايا الخبيثة. يأتي الاسم من التكرار المتوقع للمكافأة، والحد الأدنى من متطلبات المشاركة وحجم المكافأة النهائية. يحصل الصيادون على أجرهم من خلال إثبات ذلك في الوقت المناسب تصرف طرف مستعبد واحد على الأقل بشكل غير قانوني. أعمال غير قانونية تتضمن التوقيع على كتلتين مع نفس الوالد المعتمد، أو، في حالة المظلات، المساعدة في التصديق على غير صالح كتلة. لمنع الإفراط في المكافأة أو التسوية و الاستخدام غير المشروع للمفتاح السري للجلسة، المكافأة الأساسية مقابل تقديم رسالة واحدة موقعة بشكل غير قانوني من validator هو الحد الأدنى. وتزداد هذه المكافأة بشكل مقارب أكثر يتم إثبات التوقيعات غير القانونية من validators الأخرى بشرط أن يكون ذلك بمثابة هجوم حقيقي. تم تعيين الخط المقارب بنسبة 66% بعد تأكيدنا الأمني الأساسي على الأقل ثلثا validators يتصرفون بشكل خيري. يشبه الصيادون إلى حد ما "العقد الكاملة" في أنظمة blockchain الحالية التي تحتاج إلى الموارد صغيرة نسبيًا والالتزام بوقت تشغيل مستقر وعرض النطاق الترددي ليس ضروريا. ويختلف الصيادون في ذلك بقدر ما يجب عليهم نشر سند صغير.يمنع هذا السند هجمات sybil من إضاعة وقت وحساب validators الموارد. يمكن سحبه على الفور، ربما لا أكثر من ما يعادل بضعة دولارات وربما يؤدي لجني مكافأة ضخمة من اكتشاف سوء التصرف validator.

Design Overview

Design Overview

This section is intended to give a brief overview of the system as a whole. A more thorough exploration of the system is given in the section following it. 5.1. Consensus. On the relay-chain, Polkadot achieves low-level consensus over a set of mutually agreed valid blocks through a modern asynchronous Byzantine faulttolerant (BFT) algorithm. The algorithm will be inspired by the simple Tendermint [11] and the substantially more involved HoneyBadgerBFT [14]. The latter provides an efficient and fault-tolerant consensus over an arbitrarily defective network infrastructure, given a set of mostly benign authorities or validators. For a proof-of-authority (PoA) style network, this alone would be sufficient, however Polkadot is imagined to be also deployable as a network in a fully open and public situation without any particular organisation or trusted authority required to maintain it. As such we need a means of determining a set of validators and incentivising them to be honest. For this we utilise PoS based selection criteria. 5.2. Proving the Stake. We assume that the network will have some means of measuring how much “stake” any particular account has. For ease of comparison to pre-existing systems, we will call the unit of measurement “tokens”. Unfortunately the term is less than ideal for a number of reasons, not least that being simply a scalar value associated with an account, there is no notion of individuality. We imagine validators be elected, infrequently (at most once per day but perhaps as seldom as once per quarter), through a Nominated Proof-of-Stake (NPoS) scheme. Incentivisation can happen through a pro-rata allocation of

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 6 Relay chain Validator swarm (each coloured by its designated parachain) Transaction (submitted by external actor) Parachain bridge Virtual parachain (e.g. Ethereum) Parachain Parachain queues and I/O Propagated transactions Block candidate submission 2nd order Relay-chain Parachain community Account Inbound transaction Outbound transaction Interchain transactions (managed by validators) Collator Propagated block Fisherman Figure 2. A summary schematic of the Polkadot system. This shows collators collecting and propagating user-transactions, as well as propagating block candidates to fishermen and validators. It also shows how an account can post a transaction which is carried out of its parachain, via the relay-chain and on into another parachain where it can be interpreted as a transaction to an account there. funds coming from a token base expansion (up to 100% per year, though more likely around 10%) together with any transaction fees collected. While monetary base expansion typically leads to inflation, since all token owners would have a fair opportunity at participation, no tokenholder would need to suffer a reduction in value of their holdings over time provided they were happy to take a role in the consensus mechanism. A particular proportion of tokens would be targeted for the staking process; the effective token base expansion would be adjusted through a market-based mechanism to reach this target. Validators are bonded heavily by their stakes; exiting validators’ bonds remain in place long after the validators’ duties cease (perhaps around 3 months). This long bond-liquidation period allows future misbehaviour to be punished up until the periodic checkpointing of the chain. Misbehaviour results in punishment, such as reduction of reward or, in cases which intentionally compromise the network’s integrity, the validator losing some or all of its stake to other validators, informants or the stakeholders as a whole (through burning). For example, a validator who attempts to ratify both branches of a fork (sometimes known as a “short-range” attack) may be identified and punished in the latter way. Long-range “nothing-at-stake” attacks4 are circumvented through a simple “checkpoint” latch which prevents a dangerous chain-reorganisation of more than a particular chain-depth. To ensure newly-syncing clients are not able to be fooled onto the wrong chain, regular “hard forks” will occur (of at most the same period of the validators’ bond liquidation) that hard-code recent checkpoint block hashes into clients. This plays well with a further footprint-reducing measure of “finite chain length” or periodic reseting of the genesis-block. 5.3. Parachains and Collators. Each parachain gets similar security affordances to the relay-chain: the parachains’ headers are sealed within the relay-chain block ensuring no reorganisation, or “double-spending”, is possible following confirmation. This is a similar security guarantee to that offered by Bitcoin’s side-chains and mergemining. Polkadot, however, also provides strong guarantees that the parachains’ state transitions are valid. This happens through the set of validators being cryptographically randomly segmented into subsets; one subset per parachain, the subsets potentially differing per block. This setup generally implies that parachains’ block times will be at least as long as that of the relay-chain. The specific means of determining the partitioning is outside the scope 4Such an attack is where the adversary forges an entirely new chain of history from the genesis block onwards. Through controlling a relatively insignificant portion of stake at the offset, they are able to incrementally increase their portion of the stake relative to all other stakeholders as they are the only active participants in their alternative history. Since no intrinsic physical limitation exists on the creation of blocks (unlike PoW where quite real computational energy must be spent), they are able to craft a chain longer than the real chain in a relatively short timespan and potentially make it the longest and best, taking over the canonical state of the network.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 7 of this document but would likely be based either around a commit-reveal framework similar to the RanDAO [19] or use data combined from previous blocks of each parachain under a cryptographically secure hash. Such subsets of validators are required to provide a parachain block candidate which is guaranteed valid (on pain of bond confiscation). Validity revolves around two important points; firstly that it is intrinsically valid—that all state transitions were executed faithfully and that all external data referenced (i.e. transactions) is valid for inclusion. Secondly, that any data which is extrinsic to its candidate, such as those external transactions, has sufficiently high availability so that participants are able to download it and execute the block manually.5 Validators may provide only a “null” block containing no external “transactions” data, but may run the risk of getting a reduced reward if they do. They work alongside a parachain gossip protocol with collators—individuals who collate transactions into blocks and provide a noninteractive, zero-knowledge proof that the block constitutes a valid child of its parent (and taking any transaction fees for their trouble). It is left to parachain protocols to specify their own means of spam-prevention: there is no fundamental notion of “compute-resource metering” or “transaction fee” imposed by the relay-chain. There is also no direct enforcement on this by the relay-chain protocol (though it is unlikely that the stakeholders would choose to adopt a parachain which didn’t provide a decent mechanism). This is an explicit nod to the possibility of chains unlike Ethereum, e.g. a Bitcoin-like chain which has a much simpler fee model or some other, yet-to-be-proposed spamprevention model. Polkadot’s relay-chain itself will probably exist as an Ethereum-like accounts and state chain, possibly an EVMderivative. Since the relay-chain nodes will be required to do substantial other processing, transaction throughput will be minimised partly through large transaction fees and, should our research models require, a block size limit. 5.4. Interchain Communication. The critical final ingredient of Polkadot is interchain communication. Since parachains can have some sort of information channel between them, we allow ourselves to consider Polkadot a scalable multi-chain. In the case of Polkadot, the communication is as simple as can be: transactions executing in a parachain are (according to the logic of that chain) able to effect the dispatch of a transaction into a second parachain or, potentially, the relay-chain. Like external transactions on production blockchains, they are fully asynchronous and there is no intrinsic ability for them to return any kind of information back to its origin. Destination: gets data from prior block’s validators. Account receives post: entry removed from ingress Merkle tree Account sends post: entry placed in egress Merkle tree for destination parachain egress Source: shares data with next block’s validators proof-of-post stored in parachain egress Merkle tree routed reference placed in destination parachain’s ingress Merkle tree ingress Figure 3. A basic schematic showing the main parts of routing for posted transactions (”posts”). To ensure minimal implementation complexity, minimal risk and minimal straight-jacketing of future parachain architectures, these interchain transactions are effectively indistinguishable from standard externallysigned transactions. The transaction has an origin segment, providing the ability to identify a parachain, and an address which may be of arbitrary size. Unlike common current systems such as Bitcoin and Ethereum, interchain transactions do not come with any kind of “payment” of fee associated; any such payment must be managed through negotiation logic on the source and destination parachains. A system such as that proposed for Ethereum’s Serenity release [7] would be a simple means of managing such a cross-chain resource payment, though we assume others may come to the fore in due course. Interchain transactions are resolved using a simple queuing mechanism based around a Merkle tree to ensure fidelity. It is the task of the relay-chain maintainers to move transactions on the output queue of one parachain into the input queue of the destination parachain. The passed transactions get referenced on the relay-chain, however are not relay-chain transactions themselves. To prevent a parachain from spamming another parachain with transactions, for a transaction to be sent, it is required that the destination’s input queue be not too large at the time of the end of the previous block. If the input queue is too large after block processing, then it is considered “saturated” and no transactions may be routed to it within subsequent blocks until reduced back below the limit. These queues are administered on the relay-chain allowing parachains to determine each other’s saturation status; this way a failed attempt to post a transaction to a stalled destination may be reported synchronously. (Though since no return path exists, if a secondary transaction failed for that reason, it could not be reported back to the original caller and some other means of recovery would have to take place.) 5.5. Polkadot and Ethereum. Due to Ethereum’s Turing completeness, we expect there is ample opportunity for Polkadot and Ethereum to be interoperable with each other, at least within some easily deducible security bounds. In short, we envision that transactions from Polkadot can be signed by validators and then fed into 5Such a task might be shared between validators or could become the designate task of a set of heavily bonded validators known as availability guarantors.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 8 Ethereum where they can be interpreted and enacted by a transaction-forwarding contract. In the other direction, we foresee the usage of specially formatted logs (events) coming from a “break-out contract” to allow a swift verification that a particular message should be forwarded. 5.5.1. Polkadot to Ethereum. Through the choice of a BFT consensus mechanism with validators formed from a set of stakeholders determined through an approval voting mechanism, we are able to get a secure consensus with an infrequently changing and modest number of validators. In a system with a total of 144 validators, a block time of 4 seconds and a 900-block finality (allowing for malicious behaviour such as double-votes to be reported, punished and repaired), the validity of a block can reasonably be considered proven through as little as 97 signatures (twothirds of 144 plus one) and a following 60-minute verification period where no challenges are deposited. Ethereum is able to host a “break-in contract” which can maintain the 144 signatories and be controlled by them. Since elliptic curve digital signature (ECDSA) recovery takes only 3,000 gas under the EVM, and since we would likely only want the validation to happen on a super-majority of validators (rather than full unanimity), the base cost of Ethereum confirming that an instruction was properly validated as coming from the Polkadot network would be no more than 300,000 gas—a mere 6% of the total block gas limit at 5.5M. Increasing the number of validators (as would be necessary for dealing with dozens of chains) inevitably increases this cost, however it is broadly expected for Ethereum’s transaction bandwidth to grow over time as the technology matures and infrastructure improves. Together with the fact that not all validators need to be involved (e.g. only the highest staked validators may be called upon for such a task) the limits of this mechanism extend reasonably well. Assuming a daily rotation of such validators (which is fairly conservative—weekly or even monthly may be acceptable), then the cost to the network of maintaining this Ethereum-forwarding bridge would be around 540,000 gas per day or, at present gas prices, $45 per year. A basic transaction forwarded alone over the bridge would cost around $0.11; additional contract computation would cost more, of course. By buffering and bundling transactions together, the break-in authorisation costs can easily be shared, reducing the cost per transaction substantially; if 20 transactions were required before forwarding, then the cost for forwarding a basic transaction would fall to around $0.01. One interesting, and cheaper, alternative to this multisignature contract model would be to use threshold signatures in order to achieve the multi-lateral ownership semantics. While threshold signature schemes for ECDSA are computationally expensive, those for other schemes such as Schnorr signatures are very reasonable. Ethereum plans to introduce primitives which would make such schemes cheap to use in the upcoming Metropolis hardfork. If such a means were able to be utilised, the gas costs for forwarding a Polkadot transaction into the Ethereum network would be dramatically reduced to a near zero overhead over and above the basic costs for validating the signature and executing the underlying transaction. In this model, Polkadot’s validator nodes would have to do little other than sign messages. To get the transactions actually routed onto the Ethereum network, we assume either validators themselves would also reside on the Ethereum network or, more likely, that small bounties be offered to the first actor who forwards the message on to the network (the bounty could trivially be paid to the transaction originator). 5.5.2. Ethereum to Polkadot. Getting transactions to be forwarded from Ethereum to Polkadot uses the simple notion of logs. When an Ethereum contract wishes to dispatch a transaction to a particular parachain of Polkadot, it need simply call into a special “break-out contract”. The break-out contract would take any payment that may be required and issue a logging instruction so that its existence may be proven through a Merkle proof and an assertion that the corresponding block’s header is valid and canonical. Of the latter two conditions, validity is perhaps the most straightforward to prove. In principle, the only requirement is for each Polkadot node needing the proof (i.e. appointed validator nodes) to be running a fully synchronised instance of a standard Ethereum node. Unfortunately, this is itself a rather heavy dependency. A more lightweight method would be to use a simple proof that the header was evaluated correctly through supplying only the part of Ethereum’s state trie needed to properly execute the transactions in the block and check that the logs (contained in the block receipt) are valid. Such “SPV-like”6 proofs may yet require a substantial amount of information; conveniently, they would typically not be needed at all: a bond system inside Polkadot would allow bonded third-parties to submit headers at the risk of losing their bond should some other third-party (such as a “fisherman”, see 6.2.3) provide a proof that the header is invalid (specifically that the state root or receipt roots were impostors). On a non-finalising PoW network like Ethereum, the canonicality is impossible to proof conclusively. To address this, applications that attempt to rely on any kind of chain-dependent cause-effect wait for a number of “confirmations”, or until the dependent transaction is at some particular depth within the chain. On Ethereum, this depth varies from 1 block for the least valuable transactions with no known network issues to 1200 blocks as was the case during the initial Frontier release for exchanges. On the stable “Homestead” network, this figure sits at 120 blocks for most exchanges, and we would likely take a similar parameter. So we can imagine our Polkadot-side Ethereuminterface to have some simple functions: to be able to accept a new header from the Ethereum network and validate the PoW, to be able to accept some proof that a particular log was emitted by the Ethereum-side breakout contract for a header of sufficient depth (and forward the corresponding message within Polkadot) and finally to be able to accept proofs that a previously accepted but not-yet-enacted header contains an invalid receipt root. To actually get the Ethereum header data itself (and any SPV proofs or validity/canonicality refutations) into the Polkadot network, an incentivisation for forwarding 6SPV refers to Simplified Payment Verification in Bitcoin and describes a method for clients to verify transactions while keeping only a copy of all blocks headers of the longest PoW chain.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 9 data is needed. This could be as simple as a payment (funded from fees collected on the Ethereum side) paid to anyone able to forward a useful block whose header is valid. Validators would be called upon to retain information relating to the last few thousand blocks in order to be able to manage forks, either through some protocolintrinsic means or through a contract maintained on the relay chain. 5.6. Polkadot and Bitcoin. Bitcoin interoperation presents an interesting challenge for Polkadot: a so-called “two-way peg” would be a useful piece of infrastructure to have on the side of both networks. However, due to the limitations of Bitcoin, providing such a peg securely is a non-trivial undertaking. Delivering a transaction from Bitcoin to Polkadot can in principle be done with a process similar to that for Ethereum; a “break-out address” controlled in some way by the Polkadot validators could receive transferred tokens (and data sent alongside them). SPV proofs could be provided by incentivised oracles and, together with a confirmation period, a bounty given for identifying non-canonical blocks implying the transaction has been “double-spent”. Any tokens then owned in the “break-out address” would then, in principle, be controlled by those same validators for later dispersal. The problem however is how the deposits can be securely controlled from a rotating validator set. Unlike Ethereum which is able to make arbitrary decisions based upon combinations of signatures, Bitcoin is substantially more limited, with most clients accepting only multisignature transactions with a maximum of 3 parties. Extending this to 36, or indeed thousands as might ultimately be desired, is impossible under the current protocol. One option is to alter the Bitcoin protocol to enable such functionality, however so-called “hard forks” in the Bitcoin world are difficult to arrange judging by recent attempts. One possibility is the use of threshold signatures, cryptographic schemes to allow a singly identifiable public key to be effectively controlled by multiple secret “parts”, some or all of which must be utilised to create a valid signature. Unfortunately, threshold signatures compatible with Bitcoin’s ECDSA are computationally expensive to create and of polynomial complexity. Other schemes such a Schnorr signatures provide far lower costs, however the timeline on which they may be introduced into the Bitcoin protocol is uncertain. Since the ultimate security of the deposits rests with a number of bonded validators, one other option is to reduce the multi-signature key-holders to only a heavily bonded subset of the total validators such that threshold signatures become feasible (or, at worst, Bitcoin’s native multi-signature is possible). This of course reduces the total amount of bonds that could be deducted in reparations should the validators behave illegally, however this is a graceful degradation, simply setting an upper limit of the amount of funds that can securely run between the two networks (or indeed, on the % losses should an attack from the validators succeed). As such we believe it not unrealistic to place a reasonably secure Bitcoin interoperability “virtual parachain” between the two networks, though nonetheless a substantial effort with an uncertain timeline and quite possibly requiring the cooperation of the stakeholders within that network.

نظرة عامة على التصميم

يهدف هذا القسم إلى تقديم لمحة موجزة عن النظام ككل. استكشاف أكثر شمولا لل النظام موجود في القسم الذي يليه 5.1. إجماع. على سلسلة التتابع، Polkadot يحقق توافق منخفض المستوى حول مجموعة صالحة متفق عليها بشكل متبادل الكتل من خلال خوارزمية التسامح مع الأخطاء البيزنطية غير المتزامنة (BFT). سيتم إلهام الخوارزمية بواسطة Tendermint البسيط [11] وأكثر من ذلك بكثير المعنية HoneyBadgerBFT [14]. هذا الأخير يوفر إجماع فعال ومتسامح مع الأخطاء على نحو تعسفي بنية تحتية معيبة للشبكة، نظرًا لمجموعة من السلطات الحميدة في الغالب أو validators. بالنسبة لشبكة نمط إثبات السلطة (PoA)، هذا وحده سيكون كافيًا، ولكن من المفترض أن يكون Polkadot كذلك كما يمكن نشرها كشبكة مفتوحة بالكامل وعامة الوضع دون أي منظمة معينة أو موثوق بها السلطة اللازمة للحفاظ عليه. وعلى هذا النحو نحن بحاجة إلى وسائل تحديد مجموعة من validator والتحفيز لهم أن يكونوا صادقين. ولهذا نستخدم الاختيار القائم على إثبات الحصة (PoS). المعايير. 5.2. إثبات الحصة. نحن نفترض أن الشبكة سيكون لديه بعض الوسائل لقياس مقدار "الحصة" أي حساب معين لديه. لسهولة المقارنة الأنظمة الموجودة مسبقًا، سوف نسميها وحدة القياس "tokens". لسوء الحظ فإن المصطلح أقل من مثالي لـ أ لعدد من الأسباب، ليس أقلها كونها مجرد عددية القيمة المرتبطة بالحساب، لا توجد فكرة عنها الفردية. نحن نتخيل أن يتم انتخاب validator، بشكل غير متكرر (على الأكثر مرة واحدة يوميًا ولكن ربما نادرًا مثل مرة واحدة كل ربع سنة)، من خلال نظام إثبات الحصة المرشح (NPoS). يمكن أن يحدث التحفيز من خلال التخصيص التناسبي لـبولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 6 تتابع سلسلة سرب المدقق (كل لون حسب لونه المظلة المعينة) الصفقة (مقدم من ممثل خارجي) باراشين جسر المظلة الافتراضية (على سبيل المثال Ethereum) باراشين باراشين قوائم الانتظار والإدخال/الإخراج المعاملات المنتشرة منع تقديم المرشح الترتيب الثاني سلسلة التتابع مجتمع باراشين الحساب المعاملة الواردة المعاملة الصادرة المعاملات بين السلاسل (تتم إدارته بواسطة validators) جامع كتلة منتشرة صياد الشكل 2. ملخص تخطيطي لنظام Polkadot. يُظهر هذا أن المتعاونين يقومون بجمع ونشر معاملات المستخدم، بالإضافة إلى نشر مرشحي الكتلة للصيادين وvalidators. إنه أيضًا يوضح كيف يمكن للحساب نشر معاملة يتم تنفيذها من سلسلة Parachain الخاصة به، عبر سلسلة الترحيل ثم إلى سلسلة باراشين أخرى حيث يمكن تفسيرها على أنها معاملة لحساب هناك. الأموال القادمة من توسيع القاعدة token (حتى 100% سنويًا، على الرغم من أنه من المرجح أن يصل إلى حوالي 10٪) مع أي رسوم المعاملات التي تم جمعها. في حين أن توسع القاعدة النقدية يؤدي عادة إلى التضخم، حيث أن جميع مالكي token سيكون لديهم فرصة عادلة للمشاركة، فلن يحتاج أي مالك token إلى أن يعاني من انخفاض في قيمة أسهمه المقتنيات بمرور الوقت بشرط أن يكونوا سعداء بالحصول على دور في آلية التوافق. نسبة معينة من tokens سيتم استهدافها لعملية staking؛ ال سيتم تعديل توسيع القاعدة الفعال token من خلال آلية قائمة على السوق للوصول إلى هذا الهدف. يتم ربط المدققين بشكل كبير بحصصهم؛ الخروج تظل سندات validators سارية لفترة طويلة بعد توقف واجبات validators (ربما حوالي 3 أشهر). هذا طويل تسمح فترة تصفية السندات بحدوث سوء سلوك في المستقبل يعاقب حتى التفتيش الدوري للسلسلة. يؤدي سوء السلوك إلى العقوبة، مثل تقليل مكافأة أو، في الحالات التي تضر عمدا سلامة الشبكة، حيث يفقد validator بعضًا أو كلًا منها حصة validators أو المخبرين أو أصحاب المصلحة الآخرين ككل (من خلال الحرق). على سبيل المثال، validator الذي يحاول التصديق على فرعي الشوكة (أحيانًا المعروف باسم هجوم "قصير المدى") يمكن تحديده و يعاقب بالطريقة الأخيرة. يتم التحايل على هجمات "لا شيء على المحك" بعيدة المدى4 من خلال مزلاج "نقطة تفتيش" بسيط يمنع إعادة تنظيم سلسلة خطيرة لأكثر من عمق سلسلة معينة. لضمان مزامنة العملاء حديثًا لا يمكن أن ينخدعوا بالسلسلة الخاطئة، العادية سيحدث "الهارد فورك" (في نفس الفترة على الأكثر). تصفية سندات validators) التي تقوم بحظر نقطة تفتيش حديثة ذات كود ثابت hashes في العملاء. يلعب هذا بشكل جيد مع مقياس إضافي لتقليل البصمة وهو "طول السلسلة المحدودة" أو إعادة ضبط دورية لكتلة التكوين. 5.3. المظلات والمجمعات. يحصل كل مظلة معايير أمنية مماثلة لسلسلة الترحيل: ال يتم إغلاق رؤوس المظلات داخل كتلة سلسلة التتابع ضمان عدم إمكانية إعادة التنظيم أو "الإنفاق المزدوج" بعد التأكيد. يعد هذا ضمانًا أمنيًا مشابهًا لذلك الذي توفره السلاسل الجانبية والدمج لـ Bitcoin. ومع ذلك، فإن Polkadot يوفر أيضًا ضمانات قوية بأن انتقالات حالة المظلات صالحة. هذا يحدث من خلال مجموعة validators التي يتم تقسيمها بشكل عشوائي إلى مجموعات فرعية؛ مجموعة فرعية واحدة لكل Parachain، من المحتمل أن تختلف المجموعات الفرعية لكل كتلة. هذا يشير الإعداد عمومًا إلى أن أوقات حظر سلاسل المظلات ستفعل ذلك تكون على الأقل بنفس طول سلسلة التتابع. المحدد وسائل تحديد التقسيم خارج النطاق 4مثل هذا الهجوم هو حيث يقوم الخصم بصياغة سلسلة جديدة تمامًا من التاريخ بدءًا من كتلة التكوين وما بعده. من خلال التحكم أ حصة ضئيلة نسبيًا من الحصة في المقابل، فإنهم قادرون على زيادة حصتهم من الحصة بشكل تدريجي مقارنة بجميع الحصص الأخرى أصحاب المصلحة لأنهم المشاركون النشطون الوحيدون في تاريخهم البديل. نظرًا لعدم وجود قيود مادية جوهرية على الخلق من الكتل (على عكس إثبات العمل (PoW) حيث يجب إنفاق طاقة حسابية حقيقية تمامًا)، فإنهم قادرون على صياغة سلسلة أطول من السلسلة الحقيقية في فترة زمنية قصيرة نسبيًا وربما تجعلها الأطول والأفضل، وتتولى الحالة الأساسية للشبكة.بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 7 من هذه الوثيقة ولكن من المرجح أن تستند إما حولها إطار عمل كشف الالتزام مشابه لـ RanDAO [19] أو استخدم البيانات المجمعة من الكتل السابقة لكل سلسلة باراشين تحت hash آمن تشفيريًا. هذه المجموعات الفرعية من validators مطلوبة لتوفير أ مرشح كتلة الباراشين الذي يضمن صلاحيته (on ألم مصادرة السندات). الصلاحية تدور حول اثنين نقاط مهمة؛ أولاً أنه صحيح جوهريًا – ذلك تم تنفيذ جميع التحولات في الدولة بأمانة وهذا كل شيء البيانات الخارجية المشار إليها (أي المعاملات) صالحة للتضمين. ثانياً: أن أي بيانات خارجية عنه المرشح، مثل تلك المعاملات الخارجية، يتمتع بتوافر عالٍ بدرجة كافية حتى يتمكن المشاركون من ذلك قم بتنزيله وتنفيذ الكتلة يدويًا.5 قد يقدم المدققون كتلة "خالية" فقط لا تحتوي على بيانات "معاملات" خارجية، ولكنهم قد يتعرضون لخطر الحصول على مكافأة مخفضة إذا فعلوا ذلك. إنهم يعملون جنبا إلى جنب بروتوكول ثرثرة باراشين مع المتعاونين - الأفراد الذي يجمع المعاملات في كتل ويقدم دليلاً غير تفاعلي وصفر المعرفة على أن الكتلة تشكل فرعًا صالحًا لوالدها (ويأخذ أي معاملة رسوم على متاعبهم). يُترك الأمر لبروتوكولات Parachain لتحديد البروتوكولات الخاصة بها وسائل منع البريد العشوائي: لا توجد فكرة أساسية عن "قياس موارد الكمبيوتر" أو "رسوم المعاملات" التي تفرضها سلسلة التتابع. لا يوجد أيضًا تطبيق مباشر لهذا الأمر من خلال بروتوكول سلسلة الترحيل (على الرغم من أنه ومن غير المرجح أن يختار أصحاب المصلحة اعتمادها المظلة التي لم توفر آلية لائقة). هذه إشارة صريحة إلى إمكانية وجود سلاسل مختلفة Ethereum، على سبيل المثال. سلسلة تشبه Bitcoin ولها نموذج رسوم أبسط بكثير أو نموذج آخر لمنع البريد العشوائي لم يتم اقتراحه بعد. من المحتمل أن تكون سلسلة الترحيل الخاصة بـ Polkadot نفسها موجودة كـ Ethereum-حسابات شبيهة وسلسلة الحالة، من المحتمل أن تكون EVMمشتقة. نظرًا لأن عقد سلسلة التتابع ستكون مطلوبة القيام بمعالجة كبيرة أخرى، وإنتاجية المعاملات سيتم تقليلها جزئيًا من خلال رسوم المعاملات الكبيرة وإذا كانت نماذجنا البحثية تتطلب حدًا لحجم الكتلة. 5.4. الاتصالات بين السلاسل. العنصر الأخير الحاسم في Polkadot هو التواصل بين السلاسل. منذ يمكن أن تحتوي المظلات على نوع من قناة المعلومات فيما بينها، ونحن نسمح لأنفسنا بالنظر في Polkadot أ متعددة السلاسل قابلة للتطوير. في حالة Polkadot، يكون الاتصال بسيطًا قدر الإمكان: يتم تنفيذ المعاملات في المظلة (وفقًا لمنطق تلك السلسلة) قادرة على ذلك يؤثر على إرسال المعاملة إلى سلسلة Parachain ثانية أو ربما سلسلة التتابع. مثل المعاملات الخارجية في الإنتاج blockchains، فهي غير متزامنة تمامًا وليس هناك قدرة جوهرية لهم على العودة أي نوع من المعلومات يعود إلى أصله. الوجهة: يحصل البيانات من السابقة الكتلة validators. يتلقى الحساب منشورًا: تمت إزالة الإدخال من دخول Merkle tree يرسل الحساب منشورًا: تم وضع الإدخال في الخروج Merkle tree للوجهة المظلة الخروج المصدر: أسهم البيانات مع الكتلة التالية validators إثبات البريد المخزن في خروج المظلة ميركل شجرة تم وضع المرجع الموجه في باراتشين الوجهة دخول Merkle tree دخول الشكل 3. عرض تخطيطي أساسي الأجزاء الرئيسية من التوجيه لنشرها المعاملات ("المشاركات"). لضمان الحد الأدنى من تعقيد التنفيذ، الحد الأدنى خطر و الحد الأدنى سترات مستقيمة من المستقبل أبنية Parachain، هذه المعاملات بين السلاسل هي لا يمكن تمييزها بشكل فعال عن المعاملات القياسية الموقعة خارجيا. تحتوي المعاملة على جزء أصل، مما يوفر القدرة على تحديد سلسلة Parachain، و عنوان قد يكون ذو حجم تعسفي. على عكس الأنظمة الحالية الشائعة مثل Bitcoin وEthereum، لا تأتي المعاملات بين السلاسل مع أي نوع من "الدفع" للرسوم المرتبطة بها؛ ويجب إدارة أي دفع من هذا القبيل من خلال منطق التفاوض على سلاسل المصدر والوجهة. نظام مثل ذلك المقترح ل سيكون إصدار Serenity الخاص بـ Ethereum [7] وسيلة بسيطة لإدارة مثل هذا الدفع للموارد عبر السلسلة نحن نفترض أن الآخرين قد يبرزون إلى الواجهة في الوقت المناسب. يتم حل المعاملات Interchain باستخدام بسيطة آلية الانتظار تعتمد على Merkle tree لضمان ذلك الإخلاص. إنها مهمة مشرفي سلسلة التتابع نقل المعاملات في قائمة انتظار الإخراج لسلسلة باراشين واحدة في قائمة انتظار الإدخال لسلسلة المظلة الوجهة. ال تتم الإشارة إلى المعاملات التي تم تمريرها في سلسلة الترحيل، ولكنها ليست ذات صلةمعاملات ay-chain نفسها. لمنع سلسلة مظلة من إرسال رسائل غير مرغوب فيها إلى سلسلة مظلة أخرى المعاملات، ليتم إرسال المعاملة، هو مطلوب أن قائمة انتظار إدخال الوجهة ليست كبيرة جدًا وقت نهاية الكتلة السابقة. إذا كان الإدخال قائمة الانتظار كبيرة جدًا بعد معالجة الكتلة، وبالتالي تعتبر "مشبعة" ولا يمكن توجيه أي معاملات إليها ضمن الكتل اللاحقة حتى يتم تخفيضها مرة أخرى إلى ما دون الحد. تتم إدارة قوائم الانتظار هذه على سلسلة الترحيل السماح للمظلات بتحديد تشبع بعضها البعض الحالة؛ بهذه الطريقة محاولة فاشلة لنشر المعاملة إلى وجهة متوقفة قد يتم الإبلاغ عنها بشكل متزامن. (على الرغم من عدم وجود مسار إرجاع، إذا فشلت معاملة ثانوية لهذا السبب، فلا يمكن الإبلاغ عنها مرة أخرى للمتصل الأصلي وبعض وسائل الاسترداد الأخرى يجب أن يحدث.) 5.5. Polkadot و Ethereum. نظرًا لاكتمال تورينج Ethereum، نتوقع أن تكون هناك فرصة كبيرة لـ Polkadot وEthereum للتشغيل المتبادل مع بعضها البعض، على الأقل ضمن بعض الحدود الأمنية التي يمكن استنتاجها بسهولة. باختصار، نحن نتصور أن المعاملات من يمكن توقيع Polkadot بواسطة validators ثم إدخاله في 5قد تتم مشاركة مثل هذه المهمة بين validators أو يمكن أن تصبح المهمة المعينة لمجموعة من validators المرتبطة بشكل كبير والمعروفة باسم ضمانات التوفر.

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 8 Ethereum حيث يمكن تفسيرها وسنها عقد إعادة توجيه المعاملة. وفي الاتجاه الآخر، نتوقع استخدام السجلات (الأحداث) المنسقة خصيصًا القادمة من "عقد الاختراق" للسماح بالتحقق السريع من ضرورة إعادة توجيه رسالة معينة. 5.5.1. Polkadot إلى Ethereum. من خلال اختيار أ BFT آلية الإجماع مع validators المكونة من أ مجموعة من أصحاب المصلحة يتم تحديدهم من خلال التصويت بالموافقة آلية، نحن قادرون على الحصول على إجماع آمن مع عدد قليل ومتواضع من validators. في نظام يحتوي على إجمالي 144 validators، فإن وقت الكتلة يبلغ 4 ثوانٍ ونهاية 900 كتلة (مما يسمح بالبرامج الضارة سيتم الإبلاغ عن السلوكيات مثل الأصوات المزدوجة ومعاقبتها وإصلاحها)، يمكن أن تكون صلاحية الكتلة معقولة تعتبر مثبتة من خلال ما لا يقل عن 97 توقيعًا (ثلثي 144 زائد واحد) وفترة تحقق تالية مدتها 60 دقيقة حيث لا يتم إيداع أي اعتراضات. Ethereum قادر على استضافة "عقد اقتحام" والذي ويمكن الحفاظ على الموقعين الـ 144 والسيطرة عليهم لهم. نظرًا لأن استرداد التوقيع الرقمي للمنحنى الإهليلجي (ECDSA) لا يتطلب سوى 3000 غاز تحت EVM، ومنذ ذلك الحين من المحتمل أننا نريد فقط أن يتم التحقق من الصحة على الأغلبية العظمى من validators (بدلاً من الإجماع الكامل)، التكلفة الأساسية لـ Ethereum لتأكيد تلك التعليمات تم التحقق من صحتها بشكل صحيح حيث أن القادمة من شبكة Polkadot لن تزيد عن 300000 غاز - أي 6% فقط من الحد الإجمالي للغاز عند 5.5 م. زيادة عدد validators (كما هو ضروري للتعامل معها العشرات من السلاسل) يزيد حتما من هذه التكلفة من المتوقع على نطاق واسع أن ينمو النطاق الترددي لمعاملات Ethereum بمرور الوقت مع نضوج التكنولوجيا و تتحسن البنية التحتية. جنبا إلى جنب مع حقيقة أن لا يجب مشاركة جميع validators (على سبيل المثال، الأعلى فقط قد يتم استدعاء validators المثبت لمثل هذه المهمة). وتمتد حدود هذه الآلية بشكل جيد إلى حد معقول. بافتراض التناوب اليومي لمثل هذه validators (وهو متحفظ إلى حد ما - أسبوعيًا أو حتى شهريًا قد يكون مقبولاً)، ثم التكلفة التي تتحملها الشبكة للصيانة سيكون هذا الجسر Ethereum-إعادة التوجيه حوالي 540.000 الغاز يوميًا أو، بأسعار الغاز الحالية، 45 دولارًا سنويًا. ستتكلف المعاملة الأساسية التي يتم إرسالها بمفردها عبر الجسر حوالي 0.11 دولار؛ سيكلف حساب العقد الإضافي أكثر، بطبيعة الحال. عن طريق التخزين المؤقت وتجميع المعاملات معا، يمكن بسهولة أن تكون تكاليف ترخيص الاقتحام المشتركة، مما يقلل تكلفة المعاملة بشكل كبير؛ إذا كانت هناك حاجة إلى 20 معاملة قبل إعادة التوجيه، إذن ستنخفض تكلفة إعادة توجيه المعاملة الأساسية إلى حوالي 0.01 دولار. أحد البدائل المثيرة للاهتمام والأرخص لنموذج العقد متعدد التوقيع هو استخدام توقيعات العتبة من أجل تحقيق دلالات الملكية متعددة الأطراف. بينما مخططات توقيع العتبة لـ ECDSA باهظة الثمن من الناحية الحسابية، كتلك الخاصة بالمخططات الأخرى مثل توقيعات شنور معقولة جدًا. Ethereum تخطط لإدخال البدائيين التي من شأنها أن تفعل ذلك مخططات رخيصة للاستخدام في شوكة متروبوليس الصلبة القادمة. إذا كان من الممكن استخدام مثل هذه الوسيلة، فستكون تكلفة الغاز لإعادة توجيه معاملة Polkadot إلى Ethereum سيتم تخفيض الشبكة بشكل كبير إلى ما يقرب من الصفر النفقات العامة بالإضافة إلى التكاليف الأساسية للتحقق من صحة التوقيع وتنفيذ المعاملة الأساسية. في هذا النموذج، سيكون لعقد Polkadot validator لفعل القليل بخلاف توقيع الرسائل. لتوجيه المعاملات فعليًا إلى شبكة Ethereum، نحن افترض أن أيًا من validators نفسها ستتواجد أيضًا شبكة Ethereum أو على الأرجح تلك المكافآت الصغيرة يتم عرضه على الممثل الأول الذي يقوم بإعادة توجيه الرسالة إلى الشبكة (يمكن دفع المكافأة بشكل تافه إلى منشئ المعاملة). 5.5.2. Ethereum إلى Polkadot. الحصول على المعاملات لتكون تستخدم إعادة التوجيه من Ethereum إلى Polkadot المفهوم البسيط للسجلات. عندما يرغب عقد Ethereum في إرسال معاملة إلى سلسلة معينة من Polkadot، إنها تحتاج ببساطة إلى إبرام "عقد انفصال" خاص. سيتطلب عقد الاختراق أي دفعة قد تكون تكون مطلوبة وإصدار تعليمات التسجيل بحيث يمكن إثبات وجودها من خلال إثبات Merkle والتأكيد على أن رأس الكتلة المقابلة صالح و الكنسي. ومن بين الشرطين الأخيرين، ربما تكون الصلاحية هي الأكثر وضوحا لإثبات. من حيث المبدأ، فإن الشرط الوحيد هولكل عقدة Polkadot تحتاج إلى الإثبات (أي العقد validator المعينة) لتشغيل نسخة متزامنة بالكامل من عقدة Ethereum القياسية. لسوء الحظ، هذا في حد ذاته تبعية ثقيلة إلى حد ما. أكثر ستكون الطريقة خفيفة الوزن هي استخدام دليل بسيط على أن تم تقييم الرأس بشكل صحيح من خلال توفير فقط يلزم تنفيذ جزء من محاولة حالة Ethereum بشكل صحيح المعاملات في الكتلة والتحقق من صحة السجلات (الواردة في إيصال الكتلة). مثل هذه "الشبيهة بـ SPV"6 قد تتطلب البراهين قدرًا كبيرًا من المعلومات؛ بشكل ملائم، لن تكون هناك حاجة إليها عادةً الكل: نظام السندات داخل Polkadot سيسمح بالارتباط أطراف ثالثة لتقديم رؤوس مع خطر فقدانها يجب أن يقدم طرف ثالث آخر (مثل "الصياد"، انظر 6.2.3) دليلاً على أن الرأس غير صالح (على وجه التحديد أن جذر الحالة أو جذور الاستلام كانوا محتالين). على شبكة إثبات العمل (PoW) غير النهائية مثل Ethereum، فإن من المستحيل إثبات الشرعية بشكل قاطع. ولمعالجة ذلك، يجب على التطبيقات التي تحاول الاعتماد على أي نوع من السبب المعتمد على السلسلة انتظر عددًا من "التأكيدات"، أو حتى تصل المعاملة التابعة إلى مرحلة ما. عمق خاص داخل السلسلة. على Ethereum، هذا يتراوح العمق من كتلة واحدة للمعاملات الأقل قيمة مع عدم وجود مشكلات معروفة في الشبكة إلى 1200 كتلة كما كان القضية أثناء إصدار Frontier الأولي للتبادلات. على شبكة "Homestead" المستقرة، يقع هذا الرقم عند 120 قطعة لمعظم البورصات، ومن المحتمل أن نتقبلها معلمة مماثلة. هكذا نحن يمكن تخيل لدينا Polkadot-الجانب Ethereumواجهة تحتوي على بعض الوظائف البسيطة: لتكون قادرًا على ذلك قبول رأس جديد من شبكة Ethereum والتحقق من صحة إثبات العمل، لتتمكن من قبول بعض الأدلة على أن تم إصدار سجل معين بواسطة عقد الاختراق من الجانب Ethereum لرأس ذو عمق كافٍ (وإلى الأمام الرسالة المقابلة داخل Polkadot) وأخيرًا لتكون قادرة على قبول البراهين التي سبق قبولها ولكن يحتوي الرأس الذي لم يتم تفعيله بعد على جذر إيصال غير صالح. للحصول فعليًا على بيانات الرأس Ethereum نفسها (و أي أدلة SPV أو تفنيد الصلاحية/القانونية) إلى شبكة Polkadot، تحفيز لإعادة التوجيه يشير 6SPV إلى التحقق المبسط من الدفع في Bitcoin ويصف طريقة للعملاء للتحقق من المعاملات مع الاحتفاظ فقط نسخة من جميع رؤوس الكتل لأطول سلسلة إثبات العمل (PoW).بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 9 هناك حاجة إلى البيانات. يمكن أن يكون هذا بسيطًا مثل الدفع (ممولة من الرسوم المحصلة من جهة Ethereum) المدفوعة لأي شخص قادر على إعادة توجيه كتلة مفيدة رأسها صالح. وسيُطلب من المدققين الاحتفاظ بالمعلومات المتعلقة بالآلاف القليلة الأخيرة من الكتل من أجل تكون قادرًا على إدارة الانقسامات، إما من خلال بعض الوسائل الجوهرية للبروتوكول أو من خلال عقد يتم الاحتفاظ به على سلسلة التتابع. 5.6. Polkadot و Bitcoin. Bitcoin التشغيل البيني يمثل تحديًا مثيرًا للاهتمام لـ Polkadot: ما يسمى ومن شأن "الربط المتبادل" أن يشكل جزءاً مفيداً من البنية الأساسية ليكون على جانب كلا الشبكتين. ومع ذلك، بسبب قيود Bitcoin، مع توفير مثل هذا الربط بشكل آمن مشروع غير تافه. تسليم المعاملة من يمكن من حيث المبدأ إجراء Bitcoin إلى Polkadot بعملية مشابهة لتلك الخاصة بـ Ethereum؛ "عنوان الانفصال" يمكن التحكم فيه بطريقة ما بواسطة Polkadot validators تلقي tokens المنقولة (والبيانات المرسلة بجانبها). يمكن تقديم أدلة SPV عن طريق oracles و، جنبًا إلى جنب مع فترة التأكيد، والمكافأة الممنوحة مقابل ذلك تحديد الكتل غير القانونية التي تنطوي على المعاملة لقد تم "الإنفاق المزدوج". أي tokens مملوكة بعد ذلك في سيتم بعد ذلك، من حيث المبدأ، التحكم في "عنوان الاختراق" بواسطة نفس validator لتوزيعه لاحقًا. لكن المشكلة تكمن في كيفية التحكم بشكل آمن في الودائع من خلال مجموعة دوارة validator. على عكس Ethereum والتي يمكنها اتخاذ قرارات تعسفية بناء على ذلك بناء على مجموعات من التوقيعات، Bitcoin هو إلى حد كبير أكثر محدودية، حيث يقبل معظم العملاء فقط المعاملات متعددة التوقيع بحد أقصى 3 أطراف. وتوسيع هذا العدد إلى 36، أو في الواقع الآلاف كما هو مطلوب في نهاية المطاف، أمر مستحيل بموجب البروتوكول الحالي. أحد الخيارات هو تغيير بروتوكول Bitcoin للتمكين مثل هذه الوظيفة، ولكن ما يسمى بـ "الهارد فورك" في Bitcoin من الصعب ترتيب العالم بناءً على المحاولات الأخيرة. أحد الاحتمالات هو استخدام توقيعات العتبة، مخططات التشفير للسماح لجمهور محدد الهوية المفتاح ليتم التحكم فيه بشكل فعال من خلال "أجزاء" سرية متعددة، يجب استخدام بعضها أو جميعها لإنشاء توقيع صالح. لسوء الحظ، عتبة التوقيعات متوافقة مع Bitcoin's ECDSA باهظة الثمن من الناحية الحسابية إنشاء والتعقيد متعدد الحدود. مخططات أخرى من هذا القبيل توفر توقيعات شنور تكاليف أقل بكثير، إلا أن الجدول الزمني الذي يمكن تقديمهم فيه إلى Bitcoin البروتوكول غير مؤكد. منذ الأمن النهائي للودائع تقع على عاتق عدد من validators المستعبدين، هناك خيار آخر هو تقليل حاملي المفاتيح متعددي التوقيعات إلى عدد كبير فقط مجموعة فرعية مستعبدة من إجمالي validators مثل تلك العتبة تصبح التوقيعات ممكنة (أو، في أسوأ الأحوال، موطن Bitcoin الأصلي التوقيع المتعدد ممكن). وهذا بالطبع يقلل من المبلغ الإجمالي للسندات التي يمكن خصمها كتعويضات في حالة تصرف validator بشكل غير قانوني، ولكن هذا هو تدهور رشيق، ببساطة وضع حد أعلى ل مقدار الأموال التي يمكن تشغيلها بشكل آمن بين شبكتان (أو في الواقع، على نسبة الخسائر في حالة حدوث هجوم من validators تنجح). على هذا النحو، نعتقد أنه ليس من غير الواقعي وضع Bitcoin قابلية التشغيل البيني "سلسلة مظلات افتراضية" آمنة بشكل معقول بين الشبكتين، على الرغم من أنه جهد كبير بجدول زمني غير مؤكد، ومن المحتمل جدًا مما يتطلب تعاون الجهات المعنية في ذلك شبكة.

Protocol in Detail

Protocol in Detail

The protocol can be roughly broken down into three parts: the consensus mechanism, the parachain interface and interchain transaction routing. 6.1. Relay-chain Operation. The relay-chain will likely be a chain broadly similar to Ethereum in that it is state-based with the state mapping address to account information, mainly balances and (to prevent replays) a transaction counter. Placing accounts here fulfils one purpose: to provide accounting for which identity possesses what amount of stake in the system.7 There will be notable differences, though: • Contracts cannot be deployed through transactions; following from the desire to avoid application functionality on the relay-chain, it will not support public deployment of contracts. • Compute resource usage (“gas”) is not accounted; since the only functions available for public usage will be fixed, the rationale behind gas accounting no longer holds. As such, a flat fee will apply in all cases, allowing for more performance from any dynamic code execution that may need to be done and a simpler transaction format. • Special functionality is supported for listed contracts that allows for auto-execution and networkmessage outputs. In the event that the relay-chain has a VM and it be based around the EVM, it would have a number of modifications to ensure maximal simplicity. It would likely have a number of built-in contracts (similar to those at addresses 1-4 in Ethereum) to allow for platform-specific duties to be managed including a consensus contract, a validator contract and a parachain contract. If not the EVM, then a WebAssembly [2] (wasm) backend is the most likely alternative; in this case the overall structure would be similar, but there would be no need for the built-in contracts with Wasm being a viable target for general purpose languages rather than the immature and limited languages for the EVM. Other likely deviations from the present Ethereum protocol are quite possible, for example a simplification of the transaction-receipt format allowing for the parallel execution of non-conflicting transactions within the same block, as proposed for the Serenity series of changes. It is possible, though unlikely, that a Serenity-like “pure” chain be deployed as the relay-chain, allowing for a particular contract to manage things like the staking token balances rather than making that a fundamental part of the chain’s protocol. At present, we feel it is unlikely this will offer a sufficiently great protocol simplification to be worth the additional complexity and uncertainty involved in developing it. 7As a means of representing the amount a given holder is responsible for the overall security of the system, these stake accounts will inevitably encode some economic value. However, it should be understood that since there is no intention that such values be used in any way for the purpose of exchanging for real-world goods and services, it should be accordingly noted that the tokens not be likened to currency and as such the relay-chain retain its nihilistic philosophy regarding applications.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 10 There are a number of small pieces of functionality required for administrating the consensus mechanism, validator set, validation mechanism and parachains. These could be implemented together under a monolithic protocol. However, for reasons of auguring modularity, we describe these as “contracts” of the relay-chain. This should be taken to mean that they are objects (in the sense of object-orientated programming) managed by the relaychain’s consensus mechanism, but not necessarily that they are defined as programs in EVM-like opcodes, nor even that they be individually addressable through the account-system. 6.2. Staking Contract. This contract maintains the validator set. It manages: • which accounts are currently validators; • which are available to become validators at short notice; • which accounts have placed stake nominating to a validator; • properties of each including staking volume, acceptable payout-rates and addresses and shortterm (session) identities. It allows an account to register a desire to become a bonded validator (along with its requirements), to nominate to some identity, and for preexisting bonded validators to register their desire to exit this status. It also includes the machinery itself for the validation and canonicalisation mechanism. 6.2.1. Stake-token Liquidity. It is generally desirable to have as much of the total staking tokens as possible to be staked within the network maintenance operations since this directly ties the network security to the overall “market capitalisation” of the staking token. This can easily be incentivised through inflating the currency and handing out the proceeds to those who participate as validators. However, to do so presents a problem: if the token is locked in the Staking Contract under punishment of reduction, how can a substantial portion remain sufficiently liquid in order to allow price discovery? One answer to this is allowing a straight-forward derivative contract, securing fungible tokens on an underlying staked token. This is difficult to arrange in a trustfree manner. Furthermore, these derivative tokens cannot be treated equally for the same reason that different Eurozone government’s bonds are not fungible: there is a chance of the underlying asset failing and becoming worthless. With Eurozone governments, there could be a default. With validator-staked tokens, the validator may act maliciously and be punished. Keeping with our tenets, we elect for the simplest solution: not all tokens be staked. This would mean that some proportion (perhaps 20%) of tokens will forcibly remain liquid. Though this is imperfect from a security perspective, it is unlikely to make a fundamental difference in the security of the network; 80% of the reparations possible from bond-confiscations would still be able to be made compared to the “perfect case” of 100% staking. The ratio between staked and liquid tokens can be targeted fairly simply through a reverse auction mechanism. Essentially, token holders interested in being a validator would each post an offer to the staking contract stating the minimum payout-rate that they would require to take part. At the beginning of each session (sessions would happen regularly, perhaps as often as once per hour) the validator slots would be filled according to each would-be validator’s stake and payout rate. One possible algorithm for this would be to take those with the lowest offers who represent a stake no higher than the total stake targeted divided by the number of slots and no lower than a lowerbound of half that amount. If the slots cannot be filled, the lower bound could be repeatedly reduced by some factor in order to satisfy. 6.2.2. Nominating. It is possible to trustlessly nominate ones staking tokens to an active validator, giving them the responsibility of validators duties. Nominating works through an approval-voting system. Each would-be nominator is able to post an instruction to the staking contract expressing one or more validator identities under whose responsibility they are prepared to entrust their bond. Each session, nominators’ bonds are dispersed to be represented by one or more validators. The dispersal algorithm optimises for a set of validators of equivalent total bonds. Nominators’ bonds become under the effective responsibility of the validator and gain interest or suffer a punishment-reduction accordingly. 6.2.3. Bond Confiscation/Burning. Certain validator behaviour results in a punitive reduction of their bond. If the bond is reduced below the allowable minimum, the session is prematurely ended and another started. A nonexhaustive list of punishable validator misbehaviour includes: • Being part of a parachain group unable to provide consensus over the validity of a parachain block; • actively signing for the validity of an invalid parachain block; • inability to supply egress payloads previously voted as available; • inactivity during the consensus process; • validating relay-chain blocks on competing forks. Some cases of misbehaviour threaten the network’s integrity (such as signing invalid parachain blocks and validating multiple sides of a fork) and as such result in effective exile through the total reduction of the bond. In other, less serious cases (e.g. inactivity in the consensus process) or cases where blame cannot be precisely allotted (being part of an ineffective group), a small portion of the bond may instead be fined. In the latter case, this works well with sub-group churn to ensure that malicious nodes suffer substantially more loss than the collaterallydamaged benevolent nodes. In some cases (e.g. multi-fork validation and invalid sub-block signing) validators cannot themselves easily detect each others’ misbehaviour since constant verification of each parachain block would be too arduous a task. Here it is necessary to enlist the support of parties external to the validation process to verify and report such misbehaviour. The parties get a reward for reporting such activity; their term, “fishermen” stems from the unlikeliness of such a reward. Since these cases are typically very serious, we envision that any rewards can easily be paid from the confiscated bond. In general we prefer to balance burning (i.e. reduction to nothing) with reallocation, rather than attempting wholesale reallocation. This has the effect of

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 11 increasing the overall value of the token, compensating the network in general to some degree rather than the specific party involved in discovery. This is mainly as a safety mechanism: the large amounts involved could lead to extreme and acute behaviour incentivisation were they all bestowed on a single target. In general, it is important that the reward is sufficiently large to make verification worthwhile for the network, yet not so large as to offset the costs of fronting a well-financed, well-orchestrated ”industrial-level” criminal hacking attack on some unlucky validator to force misbehaviour. In this way, the amount claimed should generally be no greater than the direct bond of the errant validator, lest a perverse incentive arise of misbehaving and reporting oneself for the bounty. This can be combated either explicitly through a minimum direct bond requirement for being a validator or implicitly by educating nominators that validators with little bonds deposited have no great incentive to behave well. 6.3. Parachain Registry. Each parachain is defined in this registry. It is a relatively simple database-like construct and holds both static and dynamic information on each chain. Static information includes the chain index (a simple integer), along with the validation protocol identity, a means of distinguishing between the different classes of parachain so that the correct validation algorithm can be run by validators consigned to putting forward a valid candidate. An initial proof-of-concept would focus on placing the new validation algorithms into clients themselves, effectively requiring a hard fork of the protocol each time an additional class of chain were added. Ultimately, though, it may be possible to specify the validation algorithm in a way both rigorous and efficient enough that clients are able to effectively work with new parachains without a hard-fork. One possible avenue to this would be to specify the parachain validation algorithm in a well-established, natively-compiled, platform-neutral language such as WebAssembly. Additional research is necessary to determine whether this is truly feasible, however if so, it could bring with it the tremendous advantage of banishing hard-forks for good. Dynamic information includes aspects of the transaction routing system that must have global agreement such as the parachain’s ingress queue (described in section 6.6). The registry is able to have parachains added only through full referendum voting; this could be managed internally but would more likely be placed in an external referendum contract in order to facilitate re-usage under more general governance components. The parameters to voting requirements (e.g. any quorum required, majority required) for registration of additional chains and other, less formal system upgrades will be set out in a “master constitution” but are likely to follow a fairly traditional path, at least initially. The precise formulation is out of scope for the present work, but e.g. a two thirds supermajority to pass with more than one third of total system stake voting positively may be a sensible starting point. Additional operations include the suspension and removal of parachains. Suspension would hopefully never happen, however it is designed to be a safeguard least there be some intractable problem in a parachain’s validation system. The most obvious instance where it might be needed is a consensus-critical difference between implementations leading validators to be unable to agree on validity or blocks. Validators would be encouraged to use multiple client implementations in order that they are able to spot such a problem prior to bond confiscation. Since suspension is an emergency measure, it would be under the auspices of the dynamic validator-voting rather than a referendum. Re-instating would be possible both from the validators or a referendum. The removal of parachains altogether would come only after a referendum and with which would be required a substantial grace period to allow an orderly transition to either a standalone chain or to become part of some other consensus-system. The grace period would likely be of the order of months and is likely to be set out on a perchain basis in the parachain registry in order that different parachains can enjoy different grace periods according to their need. 6.4. Sealing Relay Blocks. Sealing refers, in essence, to the process of canonicalisation; that is, a basic data transform which maps the original into something fundamentally singular and meaningful. Under a PoW chain, sealing is effectively a synonym for mining. In our case, it involves the collection of signed statements from validators over the validity, availability and canonicality of a particular relay-chain block and the parachain blocks that it represents. The mechanics of the underlying BFT consensus algorithm is out of scope for the present work. We will instead describe it using a primitive which assumes a consensus-creating state-machine. Ultimately we expect to be inspired by a number of promising BFT consensus algorithms in the core; Tangaora [9] (a BFT variant of Raft [16]), Tendermint [11] and HoneyBadgerBFT [14]. The algorithm will have to reach an agreement on multiple parachains in parallel, thus differing from the usual blockchain consensus mechanisms. We assume that once consensus is reached, we are able to record the consensus in an irrefutable proof which can be provided by any of the participants to it. We also assume that misbehaviour within the protocol can be generally reduced to a small group containing misbehaving participants to minimise the collateral damage when dealing out punishment.8 The proof, which takes the form of our signed statements, is placed in the relay-chain block’s header together with certain other fields not least the relay-chain’s statetrie root and transaction-trie root. The sealing process takes place under a single consensus-generating mechanism addressing both the relay-chain’s block and the parachains’ blocks which make up part of the relay’s content: parachains are not separately “committed” by their sub-groups and then collated later. This results in a more complex process for the relaychain, but allows us to complete the entire system’s consensus in a single stage, minimising latency and allowing for quite complex data-availability requirements which are helpful for the routing process below. 8Existing PoS-based BFT consensus schemes such as Tendermint BFT and the original Slasher fulfill these assertions.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 12 The state of each participant’s consensus machine may be modelled as a simple (2-dimensional) table. Each participant (validator) has a set of information, in the form of signed-statements (“votes”) from other participants, regarding each parachain block candidate as well the relaychain block candidate. The set of information is two pieces of data: Availability: does this validator have egress transaction-post information from this block so they are able to properly validate parachain candidates on the following block? They may vote either 1(known) or 0 (not yet known). Once they vote 1, they are committed to voting similarly for the rest of this process. Later votes that do not respect this are grounds for punishment. Validity: is the parachain block valid and is all externally-referenced data (e.g. transactions) available? This is only relevant for validators assigned to the parachain on which they are voting. They may vote either 1 (valid), -1 (invalid) or 0 (not yet known). Once they vote non-zero, they are committed to voting this way for the rest of the process. Later votes that do not respect this are grounds for punishment. All validators must submit votes; votes may be resubmitted, qualified by the rules above. The progression of consensus may be modelled as multiple standard BFT consensus algorithms over each parachain happening in parallel. Since these are potentially thwarted by a relatively small minority of malicious actors being concentrated in a single parachain group, the overall consensus exists to establish a backstop, limiting the worst-case scenario from deadlock to merely one or more void parachain blocks (and a round of punishment for those responsible). The basic rules for validity of the individual blocks (that allow the total set of validators as a whole to come to consensus on it becoming the unique parachain candidate to be referenced from the canonical relay): • must have at least two thirds of its validators voting positively and none voting negatively; • must have over one third validators voting positively to the availability of egress queue information. If there is at least one positive and at least one negative vote on validity, an exceptional condition is created and the whole set of validators must vote to determine if there are malicious parties or if there is an accidental fork. Aside from valid and invalid, a third kind of votes are allowed, equivalent to voting for both, meaning that the node has conflicting opinions. This could be due to the node’s owner running multiple implementations which do not agree, indicating a possible ambiguity in the protocol. After all votes are counted from the full validator set, if the losing opinion has at least some small proportion (to be parameterised; at most half, perhaps significantly less) of the votes of the winning opinion, then it is assumed to be an accidental parachain fork and the parachain is automatically suspended from the consensus process. Otherwise, we assume it is a malicious act and punish the minority who were voting for the dissenting opinion. The conclusion is a set of signatures demonstrating canonicality. The relay-chain block may then be sealed and the process of sealing the next block begun. 6.5. Improvements for Sealing Relay Blocks. While this sealing method gives strong guarantees over the system’s operation, it does not scale out particularly well since every parachain’s key information must have its availability guaranteed by over one-third of all validators. This means that every validator’s responsibility footprint grows as more chains are added. While data availability within open consensus networks is essentially an unsolved problem, there are ways of mitigating the overhead placed on validator nodes. One simple solution is to realise that while validators must shoulder the responsibility for data availability, they need not actually store, communicate or replicate the data themselves. Secondary data silos, possibly related to (or even the very same) collators who compile this data, may manage the task of guaranteeing availability with the validators providing a portion of their interest/income in payment. However, while this might buy some intermediate scalability, it still doesn’t help the underlying problem; since adding more chains will in general require additional validators, the ongoing network resource consumption (particularly in terms of bandwidth) grows with the square of the chains, an untenable property in the long-term. Ultimately, we are likely to keep bashing our heads against the fundamental limitation which states that for a consensus network to be considered available safe, the ongoing bandwidth requirements are of the order of total validators times total input information. This is due to the inability of an untrusted network to properly distribute the task of data storage across many nodes, which sits apart from the eminently distributable task of processing. 6.5.1. Introducing Latency. One means of softening this rule is to relax the notion of immediacy. By requiring 33%+1 validators voting for availability only eventually, and not immediately, we can better utilise exponential data propagation and help even out peaks in datainterchange. A reasonable equality (though unproven) may be: (1) latency = participants × chains Under the current model, the size of the system scales with the number of chains to ensure that processing is distributed; since each chain will require at least one validator and we fix the availability attestation to a constant proportion of validators, then participants similarly grows with the number of chains. We end up with: (2) latency = size2 Meaning that as the system grows, the bandwidth required and latency until availability is known across the network, which might also be characterised as the number of blocks before finality, increases with its square. This is a substantial growth factor and may turn out to be a notable road blocker and force us into “non-flat” paradigms such as composing several “Polkadotes” into a hierarchy for multi-level routing of posts through a tree of relaychains.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 13 6.5.2. Public Participation. One more possible direction is to enlist public participation in the process through a micro-complaints system. Similar to the fishermen, there could be external parties to police the validators who claim availability. Their task is to find one who appears unable to demonstrate such availability. In doing so they can lodge a micro-complaint to other validators. PoW or a staked bond may be used to mitigate the sybil attack which would render the system largely useless. 6.5.3. Availability Guarantors. A final route would be to nominate a second set of bonded validators as “availability guarantors”. These would be bonded just as with the normal validators, and may even be taken from the same set (though if so, they would be chosen over a long-term period, at least per session). Unlike normal validators, they would not switch between parachains but rather would form a single group to attest to the availability of all important interchain data. This has the advantage of relaxing the equivalence between participants and chains. Essentially, chains can grow (along with the original chain validator set), whereas the participants, and specifically those taking part in dataavailability testament, can remain at the least sub-linear and quite possibly constant. 6.5.4. Collator Preferences. One important aspect of this system is to ensure that there is a healthy selection of collators creating the blocks in any given parachain. If a single collator dominated a parachain then some attacks become more feasible since the likelihood of the lack of availability of external data would be less obvious. One option is to artificially weight parachain blocks in a pseudo-random mechanism in order to favour a wide variety of collators. In the first instance, we would require as part of the consensus mechanism that validators favour parachain block candidates determined to be “heavier”. Similarly, we must incentivise validators to attempt to suggest the weightiest block they can find—this could be done through making a portion of their reward proportional to the weight of their candidate. To ensure that collators are given a reasonable fair chance of their candidate being chosen as the winning candidate in consensus, we make the specific weight of a parachain block candidate determinate on a random function connected with each collator. For example, taking the XOR distance measure between the collator’s address and some cryptographically-secure pseudorandom number determined close to the point of the block being created (a notional “winning ticket”). This effectively gives each collator (or, more specifically, each collator’s address) a random chance of their candidate block “winning” over all others. To mitigate the sybil attack of a single collator “mining” an address close to the winning ticket and thus being a favourite each block, we would add some inertia to a collator’s address. This may be as simple as requiring them to have a baseline amount of funds in the address. A more elegant approach would be to weight the proximity to the winning ticket with the amount of funds parked at the address in question. While modelling has yet to be done, it is quite possible that this mechanism enables even very small stakeholders to contribute as a collator. 6.5.5. Overweight Blocks. If a validator set is compromised, they may create and propose a block which though valid, takes an inordinate amount of time to execute and validate. This is a problem since a validator group could reasonably form a block which takes a very long time to execute unless some particular piece of information is already known allowing a short cut, e.g. factoring a large prime. If a single collator knew that information, then they would have a clear advantage in getting their own candidates accepted as long as the others were busy processing the old block. We call these blocks overweight. Protection against validators submitting and validating these blocks largely falls under the same guise as for invalid blocks, though with an additional caveat: Since the time taken to execute a block (and thus its status as overweight) is subjective, the final outcome of a vote on misbehaviour will fall into essentially three camps. One possibility is that the block is definitely not overweight— in this case more than two-thirds declare that they could execute the block within some limit (e.g. 50% of the total time allowed between blocks). Another is that the block is definitely overweight—this would be if more than two-thirds declare that they could not execute the block within said limit. One final possibility is a fairly equal split of opinion between validators. In this case, we may choose to do some proportionate punishment. To ensure validators can predict when they may be proposing an overweight block, it may be sensible to require them to publish information on their own performance for each block. Over a sufficient period of time, this should allow them to profile their processing speed relative to the peers that would be judging them. 6.5.6. Collator Insurance. One issue remains for validators: unlike with PoW networks, to check a collator’s block for validity, they must actually execute the transactions in it. Malicious collators can feed invalid or overweight blocks to validators causing them grief (wasting their resources) and exacting a potentially substantial opportunity cost. To mitigate this, we propose a simple strategy on the part of validators. Firstly, parachain block candidates sent to validators must be signed from a relay chain account with funds; if they are not, then the validator should drop it immediately. Secondly, such candidates should be ordered in priority by a combination (e.g. multiplication) of the amount of funds in the account up to some cap, the number of previous blocks that the collator has successfully proposed in the past (not to mention any previous punishments), and the proximity factor to the winning ticket as discussed previously. The cap should be the same as the punitive damages paid to the validator in the case of them sending an invalid block. To disincentivise collators from sending invalid or overweight block candidates to validators, any validator may place in the next block a transaction including the offending block alleging misbehaviour with the effect of transferring some or all of the funds in the misbehaving collator’s account to the aggrieved validator. This type of transaction front-runs any others to ensure the collator cannot remove the funds prior to the punishment. The amount of funds transferred as damages is a dynamic parameter yet

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 14 to be modelled but will likely be a proportion of the validator block reward to reflect the level of grief caused. To prevent malicious validators arbitrarily confiscating collators’ funds, the collator may appeal the validator’s decision with a jury of randomly chosen validators in return for placing a small deposit. If they find in the validator’s favour, the deposit is consumed by them. If not, the deposit is returned and the validator is fined (since the validator is in a much more vaulted position, the fine will likely be rather hefty). 6.6. Interchain Transaction Routing. Interchain transaction routing is one of the essential maintenance tasks of the relay-chain and its validators. This is the logic which governs how a posted transaction (often shortened to simply “post”) gets from being a desired output from one source parachain to being a non-negotiable input of another destination parachain without any trust requirements. We choose the wording above carefully; notably we don’t require there to have been a transaction in the source parachain to have explicitly sanctioned this post. The only constraints we place upon our model is that parachains must provide, packaged as a part of their overall block processing output, the posts which are the result of the block’s execution. These posts are structured as several FIFO queues; the number of lists is known as the routing base and may be around 16. Notably, this number represents the quantity of parachains we can support without having to resort to multi-phase routing. Initially, Polkadot will support this kind of direct routing, however we will outline one possible multi-phase routing process (“hyper-routing”) as a means of scaling out well past the initial set of parachains. We assume that all participants know the subgroupings for next two blocks n, n + 1. In summary, the routing system follows these stages: • CollatorS: Contact members of V alidators[n][S] • CollatorS: FOR EACH subgroup s: ensure at least 1 member of V alidators[n][s] in contact • CollatorS: FOR EACH subgroup s: assume egress[n −1][s][S] is available (all incoming post data to ‘S‘ from last block) • CollatorS: Compose block candidate b for S: (b.header, b.ext, b.proof, b.receipt, b.egress) • CollatorS: Send proof information proof[S] = (b.header, b.ext, b.proof, b.receipt) to V alidators[n][S] • CollatorS: Ensure external transaction data b.ext is made available to other collators and validators • CollatorS: FOR EACH subgroup s: Send egress information egress[n][S][s] = (b.header, b.receipt, b.egress[s]) to the receiving sub-group’s members of next block V alidators[n + 1][s] • V alidatorV : Pre-connect all same-set members for next block: let N = Chain[n + 1][V ]; connect all validators v such that Chain[n + 1][v] = N • V alidatorV : Collate all data ingress for this block: FOR EACH subgroup s: Retrieve egress[n −1][s][Chain[n][V ]], get from other validators v such that Chain[n][v] = Chain[n][V ]. Possibly going via randomly selected other validators for proof of attempt. • V alidatorV : Accept candidate proofs for this block proof[Chain[n][V ]]. Vote block validity • V alidatorV : Accept candidate egress data for next block: FOR EACH subgroup s, accept egress[n][s][N]. Vote block egress availability; republish among interested validators v such that Chain[n + 1][v] = Chain[n + 1][V ]. • V alidatorV : UNTIL CONSENSUS Where: egress[n][from][to] is the current egress queue information for posts going from parachain ‘from‘, to parachain ‘to‘ in block number ‘n‘. CollatorS is a collator for parachain S. V alidators[n][s] is the set of validators for parachain s at block number n. Conversely, Chain[n][v] is the parachain to which validator v is assigned on block number n. block.egress[to] is the egress queue of posts from some parachain block block whose destination parachain is to. Since collators collect (transaction) fees based upon their blocks becoming canonical they are incentivised to ensure that for each next-block destination, the subgroup’s members are informed of the egress queue from the present block. Validators are incentivised only to form a consensus on a (parachain) block, as such they care little about which collator’s block ultimately becomes canonical. In principle, a validator could form an allegiance with a collator and conspire to reduce the chances of other collators’ blocks becoming canonical, however this is both difficult to arrange due to the random selection of validators for parachains and could be defended against with a reduction in fees payable for parachain blocks which hold up the consensus process. 6.6.1. External Data Availability. Ensuring a parachain’s external data is actually available is a perennial issue with decentralised systems aiming to distribute workload across the network. At the heart of the issue is the availability problem which states that since it is neither possible to make a non-interactive proof of availability nor any sort of proof of non-availability, for a BFT system to properly validate any transition whose correctness relies upon the availability of some external data, the maximum number of acceptably Byzantine nodes, plus one, of the system must attest to the data being available. For a system to scale out properly, like Polkadot, this invites a problem: if a constant proportion of validators must attest to the availability of the data, and assuming that validators will want to actually store the data before asserting it is available, then how do we avoid the problem of the bandwidth/storage requirements increasing with the system size (and therefore number of validators)? One possible answer would be to have a separate set of validators (availability guarantors), whose order grows sublinearly with the size of Polkadot as a whole. This is described in 6.5.3. We also have a secondary trick. As a group, collators have an intrinsic incentive to ensure that all data is available for their chosen parachain since without it they are unable to author further blocks from which they can collect transaction fees. Collators also form a group, membership of which is varied (due to the random nature of parachain validator groups) non-trivial to enter and easy

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 15 to prove. Recent collators (perhaps of the last few thousand blocks) are therefore allowed to issue challenges to the availability of external data for a particular parachain block to validators for a small bond. Validators must contact those from the apparently offending validator sub-group who testified and either acquire and return the data to the collator or escalate the matter by testifying to the lack of availability (direct refusal to provide the data counts as a bond-confiscating offence, therefore the misbehaving validator will likely just drop the connection) and contacting additional validators to run the same test. In the latter case, the collator’s bond is returned. Once a quorum of validators who can make such nonavailability testimonials is reached, they are released, the misbehaving sub-group is punished, and the block reverted. 6.6.2. Posts Routing. Each parachain header includes an egress-trie-root; this is the root of a trie containing the routing-base bins, each bin being a concatenated list of egress posts. Merkle proofs may be provided across parachain validators to prove that a particular parachain’s block had a particular egress queue for a particular destination parachain. At the beginning of processing a parachain block, each other parachain’s egress queue bound for said block is merged into our block’s ingress queue. We assume strong, probably CSPR9, sub-block ordering to achieve a deterministic operation that offers no favouritism between any parachain block pairing. Collators calculate the new queue and drain the egress queues according to the parachain’s logic. The contents of the ingress queue is written explicitly into the parachain block. This has two main purposes: firstly, it means that the parachain can be trustlessly synchronised in isolation from the other parachains. Secondly, it simplifies the data logistics should the entire ingress queue not be able to be processed in a single block; validators and collators are able to process following blocks without having to source the queue’s data specially. If the parachain’s ingress queue is above a threshold amount at the end of block processing, then it is marked saturated on the relay-chain and no further messages may be delivered to it until it is cleared. Merkle proofs are used to demonstrate fidelity of the collator’s operation in the parachain block’s proof. 6.6.3. Critique. One minor flaw relating to this basic mechanism is the post-bomb attack. This is where all parachains send the maximum amount of posts possible to a particular parachain. While this ties up the target’s ingress queue at once, no damage is done over and above a standard transaction DoS attack. Operating normally, with a set of well-synchronised and non-malicious collators and validators, for N parachains, N × M total validators and L collators per parachain, we can break down the total data pathways per block to: Validator: M −1+L+L: M −1 for the other validators in the parachain set, L for each collator providing a candidate parachain block and a second L for each collator of the next block requiring the egress payloads of the previous block. (The latter is actually more like worst-case operation since it is likely that collators will share such data.) Collator: M +kN: M for a connection to each relevant parachain block validator, kN for seeding the egress payloads to some subset of each parachain validator group for the next block (and possibly some favoured collator(s)). As such, the data path ways per node grow linearly with the overall complexity of the system. While this is reasonable, as the system scales into hundreds or thousands of parachains, some communication latency may be absorbed in exchange for a lower complexity growth rate. In this case, a multi-phase routing algorithm may be used in order to reduce the number of instantaneous pathways at a cost of introducing storage buffers and latency. 6.6.4. Hyper-cube Routing. Hyper-cube routing is a mechanism which can mostly be build as an extension to the basic routing mechanism described above. Essentially, rather than growing the node connectivity with the number of parachains and sub-group nodes, we grow only with the logarithm of parachains. Posts may transit between several parachains’ queues on their way to final delivery. Routing itself is deterministic and simple. We begin by limiting the number of bins in the ingress/egress queues; rather than being the total number of parachains, they are the routing-base (b) . This will be fixed as the number of parachains changes, with the routing-exponent (e) instead being raised. Under this model, our message volume grows with O(be), with the pathways remaining constant and the latency (or number of blocks required for delivery) with O(e). Our model of routing is a hypercube of e dimensions, with each side of the cube having b possible locations. Each block, we route messages along a single axis. We alternate the axis in a round-robin fashion, thus guaranteeing worst-case delivery time of e blocks. As part of the parachain processing, foreign-bound messages found in the ingress queue are routed immediately to the appropriate egress queue’s bin, given the current block number (and thus routing dimension). This process necessitates additional data transfer for each hop on the delivery route, however this is a problem itself which may be mitigated by using some alternative means of data payload delivery and including only a reference, rather than the full payload of the post in the post-trie. An example of such a hyper-cube routing for a system with 4 parachains, b = 2 and e = 2 might be: Phase 0, on each message M: • sub0: if \(M_{\text{dest}} \in \{2, 3\}\) then sendTo(2) else keep • sub1: if \(M_{\text{dest}} \in \{2, 3\}\) then sendTo(3) else keep • sub2: if \(M_{\text{dest}} \in \{0, 1\}\) then sendTo(0) else keep • sub3: if \(M_{\text{dest}} \in \{0, 1\}\) then sendTo(1) else keep Phase 1, on each message M: • sub0: if \(M_{\text{dest}} \in \{1, 3\}\) then sendTo(1) else keep • sub1: if \(M_{\text{dest}} \in \{0, 2\}\) then sendTo(0) else keep • sub2: if \(M_{\text{dest}} \in \{1, 3\}\) then sendTo(3) else keep • sub3: if \(M_{\text{dest}} \in \{0, 2\}\) then sendTo(2) else keep The two dimensions here are easy to see as the first two bits of the destination index; for the first block, the higher-order bit alone is used. The second block deals with the low-order bit. Once both happen (in arbitrary order) then the post will be routed. 9cryptographically secure pseudo-random

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 16 6.6.5. Maximising Serendipity. One alteration of the basic proposal would see a fixed total of c2 −c validators, with c−1 validators in each sub-group. Each block, rather than there being an unstructured repartitioning of validators among parachains, instead for each parachain sub-group, each validator would be assigned to a unique and different parachain sub-group on the following block. This would lead to the invariant that between any two blocks, for any two pairings of parachain, there exists two validators who have swapped parachain responsibilities. While this cannot be used to gain absolute guarantees on availability (a single validator will occasionally drop offline, even if benevolent), it can nonetheless optimise the general case. This approach is not without complications. The addition of a parachain would also necessitate a reorganisation of the validator set. Furthermore the number of validators, being tied to the square of the number of parachains, would start initially very small and eventually grow far too fast, becoming untenable after around 50 parachains. None of these are fundamental problems. In the first case, reorganisation of validator sets is something that must be done regularly anyway. Regarding the size of the validator set, when too small, multiple validators may be assigned to the same parachain, applying an integer factor to the overall total of validators. A multi-phase routing mechanism such as Hypercube Routing, discussed in 6.6.4 would alleviate the requirement for large number of validators when there is a large number of chains. 6.7. Parachain Validation. A validator’s main purpose is to testify, as a well-bonded actor, that a parachain’s block is valid, including but not limited to any state transition, any external transactions included, the execution of any waiting posts in the ingress queue and the final state of the egress queue. The process itself is fairly simple. Once the validator sealed the previous block they are free to begin working to provide a candidate parachain block candidate for the next round of consensus. Initially, the validator finds a parachain block candidate through a parachain collator (described next) or one of its co-validators. The parachain block candidate data includes the block’s header, the previous block’s header, any external input data included (for Ethereum and Bitcoin, such data would be referred to as transactions, however in principle they may include arbitrary data structures for arbitrary purposes), egress queue data and internal data to prove state-transition validity (for Ethereum this would be the various state/storage trie nodes required to execute each transaction). Experimental evidence shows this full dataset for a recent Ethereum block to be at the most a few hundred KiB. Simultaneously, if not yet done, the validator will be attempting to retrieve information pertaining to the previous block’s transition, initially from the previous block’s validators and later from all validators signing for the availability of the data. Once the validator has received such a candidate block, they then validate it locally. The validation process is contained within the parachain class’s validator module, a consensus-sensitive software module that must be written for any implementation of Polkadot (though in principle a library with a C ABI could enable a single library to be shared between implementations with the appropriate reduction in safety coming from having only a single “reference” implementation). The process takes the previous block’s header and verifies its identity through the recently agreed relay-chain block in which its hash should be recorded. Once the parent header’s validity is ascertained, the specific parachain class’s validation function may be called. This is a single function accepting a number of data fields (roughly those given previously) and returning a simple Boolean proclaiming the validity of the block. Most such validation functions will first check the header-fields which are able to be derived directly from the parent block (e.g. parent hash, number). Following this, they will populate any internal data structures as necessary in order to process transactions and/or posts. For an Ethereum-like chain this amounts to populating a trie database with the nodes that will be needed for the full execution of transactions. Other chain types may have other preparatory mechanisms. Once done, the ingress posts and external transactions (or whatever the external data represents) will be enacted, balanced according to chain’s specification. (A sensible default might be to require all ingress posts be processed before external transactions be serviced, however this should be for the parachain’s logic to decide.) Through this enactment, a series of egress posts will be created and it will be verified that these do indeed match the collator’s candidate. Finally, the properly populated header will be checked against the candidate’s header. With a fully validated candidate block, the validator can then vote for the hash of its header and send all requisite validation information to the co-validators in its subgroup. 6.7.1. Parachain Collators. Parachain collators are unbonded operators who fulfill much of the task of miners on the present-day blockchain networks. They are specific to a particular parachain. In order to operate they must maintain both the relay-chain and the fully synchronised parachain. The precise meaning of “fully synchronised” will depend on the class of parachain, though will always include the present state of the parachain’s ingress queue. In Ethereum’s case it also involves at least maintaining a Merkle-tree database of the last few blocks, but might also include various other data structures including Bloom filters for account existence, familial information, logging outputs and reverse lookup tables for block number. In addition to keeping the two chains synchronised, it must also “fish” for transactions by maintaining a transaction queue and accepting properly validated transactions from the public network. With the queue and chain, it is able to create new candidate blocks for the validators chosen at each block (whose identity is known since the relaychain is synchronised) and submit them, together with the various ancillary information such as proof-of-validity, via the peer network. For its trouble, it collects all fees relating to the transactions it includes. Various economics float around this arrangement. In a heavily competitive market where there is a surplus of collators, it is possible that the transaction fees be shared with the parachain validators to incentivise the inclusion of a particular collator’s block. Similarly,

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 17 some collators may even raise the required fees that need to be paid in order to make the block more attractive to validators. In this case, a natural market should form with transactions paying higher fees skipping the queue and having faster inclusion in the chain. 6.8. Networking. Networking on traditional blockchains like Ethereum and Bitcoin has rather simple requirements. All transactions and blocks are broadcast in a simple undirected gossip. Synchronisation is more involved, especially with Ethereum but in reality this logic was contained in the peer strategy rather than the protocol itself which resolved around a few request and answer message types. While Ethereum made progress on current protocol offerings with the devp2p protocol, which allowed for many subprotocols to be multiplexed over a single peer connection and thus have the same peer overlay support many p2p protocols simultaneously, the Ethereum portion of the protocol still remained relatively simple and the p2p protocol as a while remains unfinished with important functionality missing such as QoS support. Sadly, a desire to create a more ubiquitous “web 3” protocol largely failed, with the only projects using it being those explicitly funded from the Ethereum crowd-sale. The requirements for Polkadot are rather more substantial. Rather then a wholly uniform network, Polkadot has several types of participants each with different requirements over their peer makeup and several network “avenues” whose participants will tend to converse about particular data. This means a substantially more structured network overlay—and a protocol supporting that— will likely be necessary. Furthermore, extensibility to facilitate future additions such as new kinds of “chain” may themselves require a novel overlay structure. While an in-depth discussion of how the networking protocol may look is outside of the scope of this document, some requirements analysis is reasonable. We can roughly break down our network participants into two sets (relay-chain, parachains) each of three subsets. We can also state that each of the parachain participants are only interested in conversing between themselves as opposed to participants in other parachains: • Relay-chain participants: • Validators: P, split into subsets P[s] for each parachain • Availability Guarantors: A (this may be represented by Validators in the basic form of the protocol) • Relay-chain clients: M (note members of each parachain set will also tend to be members of M) • Parachain participants: • Parachain Collators: C[0], C[1], . . . • Parachain Fishermen: F[0], F[1], . . . • Parachain clients: S[0], S[1], . . . • Parachain light-clients: L[0], L[1], . . . In general we name particular classes of communication will tend to take place between members of these sets: • P | A <-> P | A: The full set of validators/guarantors must be well-connected to achieve consensus. • P[s] <-> C[s] | P[s]: Each validator as a member of a given parachain group will tend to gossip with other such members as well as the collators of that parachain to discover and share block candidates. • A <-> P[s] | C | A: Each availability guarantor will need to collect consensus-sensitive cross-chain data from the validators assigned to it; collators may also optimise the chance of consensus on their block by advertising it to availability guarantors. Once they have it, the data will be disbursed to other such guarantor to facilitate consensus. • P[s] <-> A | P[s']: Parachain validators will need to collect additional input data from the previous set of validators or the availability guarantors. • F[s] <-> P: When reporting, fishermen may place a claim with any participant. • M <-> M | P | A: General relay-chain clients disburse data from validators and guarantors. • S[s] <-> S[s] | P[s] | A: Parachain clients disburse data from the validator/guarantors. • L[s] <-> L[s] | S[s]: Parachain light clients disburse data from the full clients. To ensure an efficient transport mechanism, a “flat” overlay network—like Ethereum’s devp2p—where each node does not (non-arbitrarily) differentiate fitness of its peers is unlikely to be suitable. A reasonably extensible peer selection and discovery mechanism will likely need to be included within the protocol as well as aggressive planning an lookahead to ensure the right sort of peers are “serendipitously” connected at the right time. The precise strategy of peer make-up will be different for each class of participant: for a properly scaled-out multi-chain, collators will either need to be continuously reconnecting to the accordingly elected validators, or will need on-going agreements with a subset of the validators to ensure they are not disconnected during the vast majority of the time that they are useless for that validator. Collators will also naturally attempt to maintain one or more stable connections into the availability guarantor set to ensure swift propagation of their consensus-sensitive data. Availability guarantors will mostly aim to maintain a stable connection to each other and to validators (for consensus and the consensus-critical parachain data to which they attest), as well as to some collators (for the parachain data) and some fishermen and full clients (for dispersing information). Validators will tend to look for other validators, especially those in the same sub-group and any collators that can supply them with parachain block candidates. Fishermen, as well as general relay-chain and parachain clients will generally aim to keep a connection open to a validator or guarantor, but plenty of other nodes similar to themselves otherwise. Parachain light clients will similarly aim to be connected to a full client of the parachain, if not just other parachain light-clients. 6.8.1. The Problem of Peer Churn. In the basic protocol proposal, each of these subsets constantly alter randomly with each block as the validators assigned to verify the parachain transitions are randomly elected. This can be a problem should disparate (non-peer) nodes need to pass data between each other. One must either rely on a fairly-distributed and well-connected peer network to

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 18 ensure that the hop-distance (and therefore worst-case latency) only grows with the logarithm of the network size (a Kademlia-like protocol [13] may help here), or one must introduce longer block times to allow the necessary connection negotiation to take place to keep a peer-set that reflects the node’s current communication needs. Neither of these are great solutions: long block times being forced upon the network may render it useless for particular applications and chains. Even a perfectly fair and connected network will result in substantial wastage of bandwidth as it scales due to uninterested nodes having to forward data useless to them. While both directions may form part of the solution, a reasonable optimisation to help minimise latency would be to restrict the volatility of these parachain validator sets, either reassigning the membership only between series of blocks (e.g. in groups of 15, which at a 4 second block time would mean altering connections only once per minute) or by rotating membership in an incremental fashion, e.g. changing by one member at a time (e.g. if there are 15 validators assigned to each parachain, then on average it would be a full minute between completely unique sets). By limiting the amount of peer churn, and ensuring that advantageous peer connections are made well in advance through the partial predictability of parachain sets, we can help ensure each node keep a permanently serendipitous selection of peers. 6.8.2. Path to an Effective Network Protocol. Likely the most effective and reasonable development effort will focus on utilising a pre-existing protocol rather than rolling our own. Several peer-to-peer base protocols exist that we may use or augment including Ethereum’s own devp2p [22], IPFS’s libp2p [1] and GNU’s GNUnet [4]. A full review of these protocols and their relevance for building a modular peer network supporting certain structural guarantees, dynamic peer steering and extensible sub-protocols is well beyond the scope of this document but will be an important step in the implementation of Polkadot. 7. Practicalities of the Protocol 7.1. Interchain Transaction Payment. While a great amount of freedom and simplicity is gained through dropping the need for a holistic computation resource accounting framework like Ethereum’s gas, this does raise an important question: without gas, how does one parachain avoid another parachain from forcing it to do computation? While we can rely on transaction-post ingress queue buffers to prevent one chain from spamming another with transaction data, there is no equivalent mechanism provided by the protocol to prevent the spamming of transaction processing. This is a problem left to the higher level. Since chains are free to attach arbitrary semantics on to the incoming transaction-post data, we can ensure that computation must be paid-for before started. In a similar vein to the model espoused by Ethereum Serenity, we can imagine a “break-in” contract within a parachain which allows a validator to be guaranteed payment in exchange for the provision of a particular volume of processing resources. These resources may be measured in something like gas, but could also be some entirely novel model such as subjective time-to-execute or a Bitcoin-like flat-fee model. On its own this isn’t so useful since we cannot readily assume that the off-chain caller has available to them whatever value mechanism is recognised by the break-in contract. However, we can imagine a secondary “breakout” contract in the source chain. The two contracts together would form a bridge, recognising each other and providing value-equivalence. (Staking-tokens, available to each, could be used to settle up the balance-of-payments.) Calling into another such chain would mean proxying through this bridge, which would provide the means of negotiating the value transfer between chains in order to pay for the computation resources required on the destination parachain. 7.2. Additional Chains. While the addition of a parachain is a relatively cheap operation, it is not free. More parachains means fewer validators per parachain and, eventually, a larger number of validators each with a reduced average bond. While the issue of a smaller coercion cost for attacking a parachain is mitigated through fishermen, the growing validator set essentially forces a higher degree of latency due to the mechanics of the underlying consensus method. Furthermore each parachain brings with it the potential to grief validators with an over-burdensome validation algorithm. As such, there will be some “price” that validators and/or the stake-holding community will extract for the addition of a new parachain. This market for chains will possibly see the addition of either: • Chains that likely have zero net contribution paying (in terms of locking up or burning staking tokens) to be made a part (e.g. consortium chains, Doge-chains, app-specific chains); • chains that deliver intrinsic value to the network through adding particular functionality difficult to get elsewhere (e.g. confidentiality, internal scalability, service tie-ins). Essentially, the community of stakeholders will need to be incentivized to add child chains—either financially or through the desire to add featureful chains to the relay. It is envisioned that new chains added will have a very short notice period for removal, allowing for new chains to be experimented with without any risk of compromising the medium or long-term value proposition. 8. Conclusion We have outlined a direction one may take to author a scalable, heterogeneous multi-chain protocol with the potential to be backwards compatible to certain, pre-existing blockchain networks. Under such a protocol, participants work in enlightened self-interest to create an overall system which can be extended in an exceptionally free manner and without the typical cost for existing users that comes from a standard blockchain design. We have given a rough outline of the architecture it would take including the nature of the participants, their economic incentives and the processes under which they must engage. We have identified a basic design and discussed its strengths and limitations; accordingly we have further directions which may ease those limitations and yield further ground towards a fully scalable blockchain solution.

POLKADOT: VISION FOR A HETEROGENEOUS MULTI-CHAIN FRAMEWORK DRAFT 1 19 8.1. Missing Material and Open Questions. Network forking is always a possibility from divergent implementations of the protocol. The recovery from such an exceptional condition was not discussed. Given the network will necessarily have a non-zero period of finalisation, it should not be a large issue to recover from the relaychain forking, however will require careful integration into the consensus protocol. Bond-confiscation and conversely reward provision has not been deeply explored. At present we assume rewards are provided under a winner-takes-all basis: this may not give the best incentivisation model for fishermen. A shortperiod commit-reveal process would allow many fishermen to claim the prize giving a fairer distribution of rewards, however the process could lead to additional latency in the discovery of misbehaviour. 8.2. Acknowledgments. Many thanks to all of the proof-readers who have helped get this in to a vaguely presentable shape. In particular, Peter Czaban, Bj¨orn Wagner, Ken Kappler, Robert Habermeier, Vitalik Buterin, Reto Trinkler and Jack Petersson. Thanks to all the people who have contributed ideas or the beginnings thereof, Marek Kotewicz and Aeron Buchanan deserve especial mention. And thanks to everyone else for their help along the way. All errors are my own. Portions of this work, including initial research into consensus algorithms, was funded in part by the British Government under the Innovate UK programme.

البروتوكول بالتفصيل

يمكن تقسيم البروتوكول تقريبًا إلى ثلاثة الأجزاء: آلية التوافق، واجهة الباراشين وتوجيه المعاملات بين السلاسل. 6.1. سلسلة التتابع العملية. ال سلسلة التتابع سوف من المحتمل أن تكون سلسلة مشابهة إلى حد كبير لـ Ethereum من حيث أنها يعتمد على الحالة مع عنوان تعيين الحالة للحساب المعلومات، وبشكل رئيسي الأرصدة و(لمنع الإعادة) أ عداد المعاملات. إن وضع الحسابات هنا يحقق غرضًا واحدًا: توفير المحاسبة التي تمتلكها الهوية ما هو حجم الحصة في النظام.7 ومع ذلك، ستكون هناك اختلافات ملحوظة: • لا يمكن نشر العقود من خلال المعاملات. بناءً على الرغبة في تجنب وظائف التطبيق على سلسلة الترحيل، فلن يحدث ذلك دعم النشر العام للعقود. • حساب استخدام الموارد ("الغاز") لا يتم احتسابه؛ منذ الوظائف الوحيدة المتاحة للاستخدام العام سيتم إصلاح الأساس المنطقي وراء حساب الغاز لم يعد يحمل. وعلى هذا النحو، سيتم تطبيق رسوم ثابتة جميع الحالات، مما يسمح بمزيد من الأداء من أي تنفيذ التعليمات البرمجية الديناميكية التي قد يلزم القيام بها وتنسيق معاملة أبسط. • يتم دعم وظيفة خاصة للعقود المدرجة التي تسمح بالتنفيذ التلقائي ومخرجات رسائل الشبكة. في حالة أن سلسلة التتابع تحتوي على جهاز افتراضي ويكون كذلك استنادًا إلى EVM، سيكون لها عدد من التعديلات لضمان أقصى قدر من البساطة. من المحتمل لديك عدد من العقود المضمنة (على غرار تلك الموجودة في العناوين 1-4 في Ethereum) للسماح بالنظام الأساسي المحدد الواجبات التي يجب إدارتها بما في ذلك عقد الإجماع، أ validator العقد وعقد الباراشين. إذا لم يكن EVM، فإن الواجهة الخلفية WebAssembly [2] (wasm) هي البديل الأكثر احتمالاً؛ في هذه الحالة عموما سيكون الهيكل مماثلا، ولكن لن تكون هناك حاجة لكون العقود المضمنة مع Wasm هدفًا قابلاً للتطبيق للغات الأغراض العامة بدلا من اللغات غير الناضجة ولغات محدودة لـ EVM. الانحرافات المحتملة الأخرى عن بروتوكول Ethereum الحالي ممكنة تمامًا، على سبيل المثال تبسيط البروتوكول تنسيق إيصال المعاملة الذي يسمح بالتنفيذ المتوازي للمعاملات غير المتعارضة داخل نفس الكتلة، كما هو مقترح لسلسلة تغييرات Serenity. من الممكن، على الرغم من أنه من غير المحتمل، أن يكون مثل الصفاء يتم نشر السلسلة "النقية" كسلسلة ترحيل، مما يسمح بـ عقد خاص لإدارة أشياء مثل staking token أرصدة بدلا من جعل ذلك جزءا أساسيا من بروتوكول السلسلة. في الوقت الحاضر، نشعر أنه من غير المرجح أن يحدث هذا سيوفر تبسيطًا رائعًا للبروتوكول بشكل كافٍ يستحق التعقيد الإضافي وعدم اليقين الذي ينطوي عليه الأمر في تطويره. 7 كوسيلة لتمثيل المبلغ الذي يكون حامل معين مسؤولاً عن الأمن العام للنظام، فإن حسابات الحصص هذه ستكون كذلك حتما ترميز بعض القيمة الاقتصادية. ومع ذلك، ينبغي أن يكون مفهوما أنه نظرا لعدم وجود نية لاستخدام هذه القيم في بأي طريقة بغرض التبادل بسلع وخدمات في العالم الحقيقي، تجدر الإشارة وفقًا لذلك إلى أنه لا يمكن تشبيه tokens بـ العملة وعلى هذا النحو تحتفظ سلسلة الترحيل بفلسفتها العدمية فيما يتعلق بالتطبيقات.بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 10 هناك عدد من الأجزاء الصغيرة من الوظائف المطلوبة لإدارة آلية الإجماع، ومجموعة validator، وآلية التحقق من الصحة، والمظلات. هذه يمكن تنفيذها معًا بموجب بروتوكول متجانس. ومع ذلك، ولأسباب تتعلق بالنموذجية، فإننا نصفها بأنها "عقود" لسلسلة الترحيل. ينبغي لهذا يجب أن تؤخذ على أنها أشياء (بمعنى برمجة موجهة للكائنات) تتم إدارتها بواسطة آلية الإجماع الخاصة بسلسلة الترحيل، ولكن ليس ذلك بالضرورة يتم تعريفها كبرامج في أكواد التشغيل التي تشبه EVM، ولا حتى أنها يمكن معالجتها بشكل فردي من خلال نظام الحساب. 6.2. عقد التوقيع المساحي. يحافظ هذا العقد على مجموعة validator. يدير: • ما هي الحسابات حاليًا validators؛ • والتي هي متاحة لتصبح validators باختصار إشعار؛ • الحسابات التي وضعت حصة الترشيح لها أ validator؛ • خصائص كل منها بما في ذلك staking الحجم ومعدلات الدفع المقبولة والعناوين وهويات (الجلسة) قصيرة المدى. يسمح للحساب بتسجيل الرغبة في أن يصبح المستعبدين validator (مع متطلباته)، للترشيح لبعض الهوية، وللمستعبدين الموجودين مسبقًا validators لتسجيل رغبتهم في الخروج من هذه الحالة. إنه أيضًا يتضمن الآلية نفسها لآلية التحقق من الصحة وتحديد المعايير الأساسية. 6.2.1. الحصة-token السيولة. ومن المرغوب فيه عموما أن الحصول على أكبر قدر ممكن من إجمالي staking tokens وتشارك ضمن عمليات صيانة الشبكة منذ ذلك الحين وهذا يربط بشكل مباشر أمان الشبكة بـ "القيمة السوقية" الإجمالية لـ staking token. هذا يمكن بسهولة سيتم تحفيزك من خلال تضخيم العملة وتسليم العائدات لأولئك الذين يشاركون باسم validators. ومع ذلك، فإن القيام بذلك يمثل مشكلة: إذا كان token مقفل في عقد التوقيع المساحي تحت عقوبة التخفيض، فكيف يمكن أن يظل جزء كبير كافيًا السائل من أجل السماح باكتشاف الأسعار؟ إحدى الإجابات على ذلك هي السماح بعقد مشتق مباشر، وتأمين tokens القابلة للاستبدال على token المرهونة الأساسية. ومن الصعب ترتيب ذلك بطريقة خالية من الثقة. علاوة على ذلك، لا يمكن معاملة هذه المشتقات token على قدم المساواة لنفس السبب الذي يجعل سندات حكومات منطقة اليورو المختلفة غير قابلة للاستبدال: هناك هي فرصة لفشل الأصول الأساسية وتصبح لا قيمة لها. مع حكومات منطقة اليورو، يمكن أن يكون هناك default. مع validator-s tokens، يجوز validator التصرف بشكل ضار ويعاقب. تمشيًا مع مبادئنا، اخترنا الحل الأبسط: ألا يتم الرهان على جميع token. وهذا يعني ذلك ستبقى نسبة معينة (ربما 20%) من tokens سائلة بالقوة. وعلى الرغم من أن هذا غير مثالي من منظور أمني، فمن غير المرجح أن يحدث فرقًا جوهريًا أمن الشبكة؛ وسيظل من الممكن تقديم 80% من التعويضات الممكنة نتيجة لمصادرة السندات مقارنة بـ "الحالة المثالية" بنسبة 100% staking. يمكن استهداف النسبة بين tokens المرهونة والسائلة بكل بساطة من خلال آلية المزاد العكسي. بشكل أساسي، أصحاب token مهتمون بأن يكونوا validator سينشر كل منهم عرضًا لعقد staking ينص على ذلك الحد الأدنى لمعدل الدفع الذي سيطلبون الحصول عليه جزء. في بداية كل جلسة (ستكون الجلسات يحدث بانتظام، ربما مرة واحدة في الساعة). سيتم ملء الخانات validator وفقًا لكل مرشح محتمل حصة validator ومعدل العائد. خوارزمية واحدة محتملة لأن هذا سيكون بمثابة قبول أولئك الذين لديهم أقل العروض تمثل حصة لا تزيد عن إجمالي الحصة المستهدفة مقسومًا على عدد الفتحات وما لا يقل عن الحد الأدنى لنصف هذا المبلغ. إذا لم يكن من الممكن ملء الفتحات، يمكن تخفيض الحد الأدنى بشكل متكرر بعامل ما من أجل الإرضاء. 6.2.2. ترشيح. من الممكن الترشيح دون ثقة منها staking tokens إلى validator نشط، مما يمنحهم مسؤولية واجبات validators. أعمال الترشيح من خلال نظام التصويت بالموافقة. يستطيع كل مرشح محتمل نشر تعليمات لعقد staking التعبير عن هوية واحدة أو أكثر validator تحت من المسؤولية وهم على استعداد لتكليف سنداتهم. في كل جلسة، يتم توزيع سندات المرشحين على أن تكون ممثلة بواحد أو أكثر من validators. تعمل خوارزمية التشتيت على تحسين مجموعة من validators من الإجمالي المكافئ السندات. تصبح سندات الترشيح تحت المسؤولية الفعلية لـ validator أوكسب الفائدة أو المعاناة أ تخفيف العقوبة وفقا لذلك. 6.2.3. مصادرة/حرق السندات. يؤدي سلوك validator المعين إلى تخفيض عقابي لسنداتهم. إذا يتم تخفيض السند إلى أقل من الحد الأدنى المسموح به، و انتهت الجلسة قبل الأوان وبدأت جلسة أخرى. تتضمن القائمة غير الشاملة لسوء السلوك الذي يعاقب عليه validator ما يلي: • أن تكون جزءًا من مجموعة غير قادرة على تقديم الدعم الإجماع على صحة كتلة المظلة؛ • التوقيع الفعال على صلاحية التوقيع كتلة المظلة • عدم القدرة على توريد حمولات الخروج سابقاً تم التصويت عليه حسب المتاح؛ • عدم النشاط أثناء عملية الإجماع. • التحقق من صحة كتل سلسلة الترحيل على الشوكات المتنافسة. تهدد بعض حالات سوء السلوك سلامة الشبكة (مثل التوقيع على كتل سلسلة غير صالحة والتحقق من صحة جوانب متعددة من الشوكة) وبالتالي تؤدي إلى نفي فعال من خلال التخفيض الكلي للسند. في حالات أخرى أقل خطورة (مثل عدم النشاط في الإجماع العملية) أو الحالات التي لا يمكن فيها تخصيص اللوم بدقة (كونك جزءًا من مجموعة غير فعالة)، جزء صغير يجوز بدلاً من ذلك تغريم السند. وفي الحالة الأخيرة هذا يعمل بشكل جيد مع زبد المجموعة الفرعية للتأكد من أن البرامج الضارة تعاني العقد من خسارة أكبر بكثير من العقد الخيرية المتضررة بشكل جانبي. في بعض الحالات (على سبيل المثال، التحقق من صحة الشوكة المتعددة وغير الصالح توقيع الكتلة الفرعية) لا يستطيع validators اكتشاف سوء سلوك بعضهم البعض بسهولة منذ التحقق المستمر ستكون مهمة كل كتلة باراشين مهمة شاقة للغاية. هنا من الضروري حشد دعم الأطراف الخارجية عملية التحقق للتحقق من سوء السلوك والإبلاغ عنه. يحصل الطرفان على مكافأة مقابل الإبلاغ عن مثل هذا النشاط؛ مصطلحهم "الصيادون" ينبع من عدم الاحتمال من مثل هذه المكافأة. وبما أن هذه الحالات عادة ما تكون خطيرة للغاية، فإننا نتصور أنه يمكن بسهولة دفع أي مكافآت من السند المصادر. بشكل عام نحن نفضل تحقيق التوازن في الحرق (أي التخفيض إلى لا شيء) مع إعادة التخصيص، بدلاً من محاولة إعادة التخصيص بالجملة. وهذا له تأثير

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 11 زيادة القيمة الإجمالية لـ token، وتعويض الشبكة بشكل عام إلى حد ما وليس على وجه التحديد الطرف المشارك في الاكتشاف. هذا هو في المقام الأول بمثابة السلامة الآلية: يمكن أن تؤدي الكميات الكبيرة المعنية إلى تحفيز السلوك المتطرف والحاد إذا كانت جميعها منح لهدف واحد. بشكل عام، من المهم أن تكون المكافأة كبيرة بما يكفي لجعل عملية التحقق جديرة بالاهتمام بالنسبة للشبكة، ولكن ليست كبيرة بحيث تعوض تكاليف مواجهة مشكلة ما. مجرم "على المستوى الصناعي" ممول بشكل جيد وجيد التنظيم هجوم قرصنة على بعض الأشخاص غير المحظوظين validator لإجبارهم على سوء السلوك. بهذه الطريقة، يجب أن يكون المبلغ المطالب به بشكل عام لا أكبر من الرابطة المباشرة للمخطئ validator، لئلا أ ينشأ الحافز الضار من سوء التصرف والإبلاغ عن المكافأة. ويمكن مكافحة هذا إما بشكل صريح من خلال الحد الأدنى من متطلبات السندات المباشرة لكونها validator أو ضمنيًا من خلال تثقيف المرشحين بأن validator الذين لديهم سندات قليلة مودعة ليس لديهم حافز كبير أن تتصرف بشكل جيد. 6.3. سجل الباراشين. يتم تعريف كل مظلة في هذا التسجيل. إنها بنية بسيطة نسبيًا تشبه قاعدة البيانات وتحتوي على معلومات ثابتة وديناميكية كل سلسلة. تتضمن المعلومات الثابتة فهرس السلسلة (ملف بسيط عدد صحيح)، إلى جانب هوية بروتوكول التحقق من الصحة، أ وسائل التمييز بين الفئات المختلفة Parachain بحيث يمكن أن تكون خوارزمية التحقق الصحيحة يتم تشغيله بواسطة validators المخصص لتقديم مرشح صالح. سيركز إثبات المفهوم الأولي على الوضع خوارزميات التحقق الجديدة في العملاء أنفسهم، مما يتطلب بشكل فعال شوكة صلبة للبروتوكول في كل مرة تمت إضافة فئة إضافية من السلسلة. في نهاية المطاف، على أية حال، قد يكون من الممكن تحديد خوارزمية التحقق من الصحة في طريقة صارمة وفعالة بما يكفي للعملاء قادرة على العمل بفعالية مع المظلات الجديدة دون شوكة صلبة. أحد السبل الممكنة لذلك هو التحديد خوارزمية التحقق من صحة Parachain في راسخة، لغة مجمعة محليًا ومحايدة للنظام الأساسي مثل WebAssembly. من الضروري إجراء بحث إضافي لتحديد إذا كان هذا ممكنا حقا، ولكن إذا كان الأمر كذلك، فإنه يمكن أن يحقق معها الميزة الهائلة المتمثلة في استبعاد الشوكات الصلبة من أجل الخير. تتضمن المعلومات الديناميكية جوانب من نظام توجيه المعاملات التي يجب أن تحظى باتفاقية عالمية كقائمة انتظار دخول المظلة (الموصوفة في القسم 6.6). السجل قادر على إضافة المظلات فقط من خلال التصويت في الاستفتاء الكامل؛ يمكن إدارة هذا داخليًا ولكن من المرجح أن يتم وضعها في الخارج عقد الاستفتاء من أجل تسهيل إعادة الاستخدام بموجب المزيد من مكونات الحوكمة العامة. المعلمات ل متطلبات التصويت (على سبيل المثال، أي نصاب قانوني مطلوب، الأغلبية مطلوب) لتسجيل سلاسل إضافية وغيرها، سيتم تحديد ترقيات النظام الأقل رسمية في ملف "master الدستور" ولكن من المرجح أن يتبعوا دستورًا تقليديًا إلى حد ما المسار، على الأقل في البداية. الصياغة الدقيقة خارج نطاق العمل الحالي، ولكن على سبيل المثال. أغلبية الثلثين لتمرير أكثر من ثلث إجمالي النظام قد يكون التصويت على الحصة بشكل إيجابي نقطة انطلاق معقولة. وتشمل العمليات الإضافية تعليق وإزالة المظلات. ونأمل أن التعليق أبدا يحدث ذلك، إلا أنه مصمم ليكون أقل ضمانًا هناك بعض المشاكل المستعصية في نظام التحقق من صحة سلسلة الباراتشين. المثال الأكثر وضوحا حيث قد يكون ذلك ما يلزم هو وجود اختلاف حاسم بالإجماع بين التطبيقات التي تؤدي إلى عدم قدرة validators على الاتفاق عليها صلاحية أو كتل. سيتم تشجيع المصادقين على استخدامها تطبيقات العميل المتعددة حتى يتمكنوا من ذلك لاكتشاف مثل هذه المشكلة قبل مصادرة السندات. وبما أن التعليق هو إجراء طارئ، فإنه سيكون كذلك تحت رعاية الديناميكية validator- التصويت بالأحرى من الاستفتاء. إعادة التثبيت ستكون ممكنة على حد سواء من validators أو الاستفتاء. إن إزالة المظلات تمامًا لن تأتي إلا بعد الاستفتاء والذي سيكون مطلوبا أ فترة سماح كبيرة للسماح بالانتقال المنظم إلى إما سلسلة مستقلة أو أن تصبح جزءًا من سلسلة أخرى نظام الإجماع. من المحتمل أن تكون فترة السماح من ترتيب الأشهر ومن المرجح أن يتم تحديده على أساس كل سلسلة في سجل الباراشين من أجل أن تكون مختلفة يمكن أن تتمتع سلاسل المظلات بفترات سماح مختلفة وفقًا لـ حاجتهم. 6.4. ختم كتل التتابع. يشير الختم، في جوهره، إلى عملية تحديد المعايير القانونية؛ وهذا هو، البيانات الأساسية تحويل الذييرسم الأصل إلى شيء فريد وذو معنى بشكل أساسي. تحت سلسلة PoW، الختم هو بشكل فعال مرادف للتعدين. في حالتنا، يتضمن جمع البيانات الموقعة من validators حول صحة وتوافر وقانونية ملف كتلة سلسلة تتابع معينة وكتل المظلة ذلك إنه يمثل. إن آليات خوارزمية الإجماع BFT الأساسية خارج نطاق العمل الحالي. سوف نقوم بذلك بدلاً من ذلك وصفها باستخدام بدائية والتي تفترض أ آلة الدولة التي تخلق الإجماع. في النهاية نتوقع للاستلهام من عدد من الإجماع الواعد BFT الخوارزميات في القلب؛ Tangaora [9] (أ BFT متغير من الطوافة [16])، النعناع [11] وعسل الغريرBFT [14]. سيتعين على الخوارزمية التوصل إلى اتفاق بشأن سلاسل مظلات متعددة بالتوازي، وبالتالي تختلف عن المعتاد blockchain آليات الإجماع. نحن نفترض ذلك مرة واحدة وبعد التوصل إلى الإجماع، أصبحنا قادرين على تسجيل الإجماع في دليل قاطع يمكن أن يقدمه أي من المشاركين إليها. ونحن نفترض أيضا أن سوء السلوك ضمن البروتوكول يمكن عموما تخفيضها إلى صغيرة مجموعة تحتوي على مشاركين يسيئون التصرف لتقليلها 8. الأضرار الجانبية عند تطبيق العقوبة يتم وضع الدليل، الذي يأخذ شكل بياناتنا الموقعة، في رأس كتلة سلسلة التتابع معًا مع بعض المجالات الأخرى، ليس أقلها جذر Statetrie لسلسلة الترحيل وجذر محاولة المعاملة. ال الختم عملية يأخذ مكان تحت أ واحد توليد الإجماع آلية معالجة على حد سواء ال كتلة سلسلة التتابع وكتل المظلات التي تصنعها جزء من محتوى التتابع: لا يتم "ارتكاب" المظلات بشكل منفصل من قبل مجموعاتها الفرعية ثم يتم تجميعها في وقت لاحق. يؤدي هذا إلى عملية أكثر تعقيدًا لسلسلة الترحيل، ولكنه يسمح لنا بإكمال إجماع النظام بأكمله في مرحلة واحدة، مما يقلل من زمن الوصول ويسمح لمتطلبات توافر البيانات المعقدة للغاية والتي مفيدة لعملية التوجيه أدناه. 8إن مخططات الإجماع القائمة على إثبات الحصة (PoS) BFT مثل Tendermint BFT وSlasher الأصلي تفي بهذه التأكيدات.

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 12 قد تكون حالة آلة الإجماع الخاصة بكل مشارك يمكن تصميمه على شكل جدول بسيط (ثنائي الأبعاد). كل مشارك (validator) لديه مجموعة من المعلومات في النموذج من البيانات الموقعة ("الأصوات") من المشاركين الآخرين، فيما يتعلق بكل مرشح كتلة سلسلة المظلات وكذلك مرشح كتلة سلسلة التتابع. مجموعة المعلومات مكونة من قطعتين من البيانات: التوفر: هل هذا validator لديك الخروج معلومات ما بعد المعاملة من هذه الكتلة لذلك هل هم قادرون على التحقق بشكل صحيح من صحة مرشحي الباراشين في الكتلة التالية؟ يمكنهم التصويت إما 1 (معروف) أو 0 (غير معروف بعد). مرة واحدة التصويت 1، وهم ملتزمون بالتصويت بالمثل بقية هذه العملية. الأصوات في وقت لاحق التي لا تفعل ذلك احترام هذا هو سبب للعقاب. الصلاحية: هل الكتلة المظلية صالحة وهي كلها البيانات المرجعية خارجيًا (على سبيل المثال. المعاملات) متاح؟ هذا ينطبق فقط على validator المعينين لسلسلة الباراشين التي يصوتون عليها. يمكنهم التصويت إما بـ 1 (صالح)، أو -1 (غير صالح) أو 0 (لم يعرف بعد). بمجرد أن يصوتوا بغير الصفر، فإنهم ملتزمون بالتصويت بهذه الطريقة لبقية هذه العملية. الأصوات اللاحقة التي لا تحترم هذا هي أسباب للعقاب. يجب على جميع validators تقديم الأصوات؛ ويجوز إعادة تقديم الأصوات، المؤهلة بموجب القواعد المذكورة أعلاه. تطور يمكن صياغة الإجماع على أنه خوارزميات إجماع قياسية متعددة BFT على كل سلسلة باراشين تحدث بالتوازي. نظرًا لأنه من المحتمل أن يتم إحباطها نسبيًا أقلية صغيرة من الجهات الفاعلة الخبيثة تتركز فيها مجموعة باراشين واحدة، يوجد إجماع عام على ذلك إنشاء مساندة، مما يحد من السيناريو الأسوأ طريق مسدود إلى واحد أو أكثر من كتل المظلة الفارغة (و جولة عقابية للمسؤولين). القواعد الأساسية لصحة الكتل الفردية (التي تسمح بوصول إجمالي مجموعة validators ككل الإجماع على أن يصبح المرشح الفريد من نوعه ليتم الرجوع إليها من التتابع الكنسي): • يجب أن يكون تصويت ثلثي validators على الأقل إيجابيًا وعدم تصويت أي منهم سلبيًا؛ • يجب أن يحصل أكثر من ثلث validator على تصويت إيجابي على توفر معلومات قائمة انتظار الخروج. إذا كان هناك صوت إيجابي واحد على الأقل وصوت سلبي واحد على الأقل بشأن الصلاحية، يتم إنشاء حالة استثنائية ويجب على مجموعة validators بأكملها التصويت لتحديد ذلك إذا كانت هناك أطراف كيدية أو إذا كان هناك حادث عرضي شوكة. فإلى جانب الصحيح والباطل، هناك نوع ثالث من الأصوات مسموح بها، أي ما يعادل التصويت لكليهما، وهذا يعني ذلك العقدة لديها آراء متضاربة. قد يكون هذا بسبب يقوم مالك العقدة بتشغيل تطبيقات متعددة والتي تقوم بذلك لا أتفق، مما يشير إلى الغموض المحتمل في البروتوكول. بعد احتساب جميع الأصوات من مجموعة validator الكاملة، إذا الرأي الخاسر له على الأقل نسبة صغيرة (إلى تكون ذات معلمات؛ على الأكثر النصف، وربما أقل بكثير) من أصوات الرأي الفائز، فيفترض ذلك يكون شوكة المظلة عرضية ويتم تعليق المظلة تلقائيًا من عملية الإجماع. وإلا فإننا نفترض أنه عمل خبيث ونعاقب عليه الأقلية الذين صوتوا للرأي المخالف. والختام عبارة عن مجموعة من التوقيعات الدالة الكنسية. قد يتم بعد ذلك إغلاق كتلة سلسلة الترحيل وبدأت عملية إغلاق الكتلة التالية. 6.5. تحسينات لختم كتل التتابع. بينما تعطي طريقة الختم هذه ضمانات قوية على تشغيل النظام، ولا تتوسع بشكل جيد نظرًا لأن المعلومات الأساسية لكل سلسلة باراشين يجب أن تحتوي على معلوماتها الخاصة التوفر مضمون بأكثر من ثلث جميع validators. وهذا يعني أن كل validator له بصمة المسؤولية ينمو مع إضافة المزيد من السلاسل. بينما توفر البيانات ضمن شبكات الإجماع المفتوحة هي في الأساس مشكلة لم يتم حلها، وهناك طرق لتخفيف الحمل الموضوع على العقد validator. واحدة بسيطة الحل هو إدراك أنه بينما يجب على validators تحمله يتحملون مسؤولية توفر البيانات، فهم لا يحتاجون فعليًا إلى تخزين البيانات أو توصيلها أو تكرارها بأنفسهم. صوامع البيانات الثانوية، ربما تتعلق بـ (أو حتى ذات الصلة). نفسه) يمكن للمجمعين الذين يقومون بتجميع هذه البيانات إدارة مهمة ضمان التوفر مع validators الذين يقدمون جزءًا من فوائدهم/دخلهم في الدفع. ومع ذلك، في حين أن هذا قد يشتري بعض قابلية التوسع المتوسطة، إلا أنه لا يزال لا يساعد في حل المشكلة الأساسية؛ منذ ذلك الحين ستتطلب إضافة المزيد من السلاسل بشكل عام validators إضافية، وينمو استهلاك موارد الشبكة المستمر (خاصة فيما يتعلق بعرض النطاق الترددي) مع مربع الالسلاسل، خاصية لا يمكن الدفاع عنها على المدى الطويل. في نهاية المطاف، من المرجح أن نستمر في ضرب رؤوسنا ضد القيد الأساسي الذي ينص على ذلك شبكة توافقية تعتبر آمنة ومتاحة متطلبات النطاق الترددي المستمر هي في حدود الإجمالي validators مرات إجمالي معلومات الإدخال. هذا يرجع إلى عدم قدرة شبكة غير موثوقة على توزيع مهمة تخزين البيانات بشكل صحيح عبر العديد من العقد، والتي تقع بصرف النظر عن مهمة المعالجة القابلة للتوزيع بشكل بارز. 6.5.1. تقديم الكمون. إحدى وسائل تخفيف هذا القاعدة هي تخفيف فكرة الفورية. من خلال المطالبة بنسبة 33%+1 validators للتصويت على التوفر فقط في نهاية المطاف، وليس على الفور، يمكننا الاستفادة بشكل أفضل من نشر البيانات الأسية والمساعدة في تجاوز الذروة في تبادل البيانات. مساواة معقولة (على الرغم من عدم إثباتها) قد يكون: (1) الكمون = المشاركين × السلاسل في ظل النموذج الحالي، يتم تغيير حجم النظام مع عدد السلاسل للتأكد من أن المعالجة موزعة؛ نظرًا لأن كل سلسلة ستتطلب validator واحدًا على الأقل ونصلح شهادة التوفر إلى ثابت نسبة validators، ثم ينمو المشاركون بالمثل مع عدد السلاسل ننتهي بـ: (2) الكمون = الحجم 2 وهذا يعني أنه مع نمو النظام، يصبح النطاق الترددي المطلوب وزمن الوصول حتى التوفر معروفًا عبر الشبكة الشبكة، والتي يمكن أيضًا وصفها بالرقم من الكتل قبل النهاية، يزيد مع مربعها. هذا هو عامل نمو كبير وقد يتحول إلى عائق ملحوظ ويجبرنا على اتباع نماذج "غير مسطحة" مثل إنشاء عدة "Polkadotes" في تسلسل هرمي لتوجيه المشاركات متعدد المستويات من خلال شجرة من سلاسل التتابع.

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 13 6.5.2. المشاركة العامة. اتجاه آخر ممكن هو تجنيد المشاركة العامة في العملية من خلال أ نظام الشكاوى الصغيرة. على غرار الصيادين، هناك يمكن أن تكون أطرافًا خارجية لضبط validators الذين يطالبون التوفر. وتتمثل مهمتهم في العثور على شخص يبدو غير قادر على إثبات هذا التوافر. في القيام بذلك هم يمكنه تقديم شكوى صغيرة إلى validators الآخرين. إثبات العمل أو يمكن استخدام السندات المرصعة للتخفيف من هجوم سيبيل الأمر الذي من شأنه أن يجعل النظام عديم الفائدة إلى حد كبير. 6.5.3. ضمانات التوفر. سيكون الطريق النهائي هو قم بترشيح مجموعة ثانية من validators المستعبدة كـ "مدى التوفر الضامنين”. سيتم ربطها تمامًا كما هو الحال مع validators العادية، وقد يتم أخذها من نفس المجموعة (على الرغم من أنه إذا كان الأمر كذلك، فسيتم اختيارهم على مدى فترة طويلة، على الأقل لكل جلسة). على عكس validators العادية، فهي لن يقوم بالتبديل بين المظلات بل سيفعل ذلك قم بتشكيل مجموعة واحدة للتأكيد على توفر جميع البيانات المهمة بين السلاسل. وهذا له ميزة تخفيف التكافؤ بين المشاركين والسلاسل. في الأساس، يمكن للسلاسل Grow (مع مجموعة السلسلة الأصلية validator)، بينما يمكن للمشاركين، وعلى وجه التحديد أولئك الذين يشاركون في اختبار توافر البيانات، أن يظلوا على الأقل خطيًا فرعيًا وربما ثابت. 6.5.4. تفضيلات المنسق. جانب واحد مهم من هذا النظام هو التأكد من وجود اختيار صحي لل يقوم المجمعون بإنشاء الكتل في أي سلسلة معينة. إذا أ سيطر المنسق الفردي على المظلة ثم بعض الهجمات تصبح أكثر جدوى نظرا لاحتمال عدم وجود سيكون توافر البيانات الخارجية أقل وضوحًا. أحد الخيارات هو وزن كتل المظلات بشكل اصطناعي آلية شبه عشوائية من أجل تفضيل مجموعة واسعة من المجمعات. في الحالة الأولى، سوف نطلب كجزء من آلية الإجماع التي يفضلها validator تم تحديد مرشحي كتلة المظلة على أنهم "أثقل". وبالمثل، يجب علينا تحفيز validators لمحاولة القيام بذلك يقترحون الكتلة الأثقل التي يمكنهم العثور عليها، وقد تكون هذه هي الكتلة يتم ذلك من خلال جعل جزء من مكافأتهم يتناسب مع وزن مرشحهم. لضمان حصول المحصلين على عادلة معقولة فرصة اختيار مرشحهم على أنه الفائز المرشح بالإجماع، فإننا نحدد الوزن المحدد لـ أ يتم تحديد مرشح كتلة المظلة على وظيفة عشوائية متصلة بكل أداة تجميع. على سبيل المثال، أخذ قياس مسافة XOR بين عنوان المُجمِّع وبعض الأرقام العشوائية الزائفة الآمنة تشفيرًا يتم تحديدها بالقرب من نقطة الكتلة التي يتم إنشاؤها ("التذكرة الفائزة" الافتراضية). وهذا يعطي كل منهما بشكل فعال المُجمِّع (أو، بشكل أكثر تحديدًا، عنوان كل مُجمِّع) أ فرصة عشوائية لفوز كتلة مرشحيهم جميع الآخرين. للتخفيف من هجوم سيبيل الذي يقوم به مُجمِّع واحد "ينقب" عن عنوان قريب من التذكرة الفائزة، وبالتالي مفضلًا لكل كتلة، سنضيف بعض القصور الذاتي إلى عنوان المجمّع. قد يكون هذا بسيطًا مثل طلبهم للحصول على مبلغ أساسي من الأموال في العنوان. أكثر سيكون النهج الأنيق هو وزن القرب من التذكرة الفائزة بمبلغ الأموال المتوقفة في العنوان المعني. في حين لم يتم بعد النمذجة، فمن الممكن تماما أن هذه الآلية تمكن حتى جدا أصحاب المصلحة الصغار للمساهمة كمجمع. 6.5.5. كتل الوزن الزائد. إذا تم اختراق مجموعة validator، فيمكنهم إنشاء واقتراح كتلة بالرغم من ذلك صالحة، وتستغرق قدرا هائلا من الوقت للتنفيذ و التحقق من صحة. هذه مشكلة نظرًا لأن مجموعة validator يمكنها ذلك تشكيل كتلة بشكل معقول والتي تستغرق وقتًا طويلاً جدًا التنفيذ ما لم تكن بعض المعلومات المعينة معروفة بالفعل مما يسمح بالاختصار، على سبيل المثال. التخصيم كبير رئيس الوزراء. إذا كان أحد المتعاونين يعرف هذه المعلومات، إذن سيكون لديهم ميزة واضحة في الحصول على ميزة خاصة بهم تم قبول المرشحين طالما كان الآخرون مشغولين بمعالجة الكتلة القديمة. نحن نسمي هذه الكتل الوزن الزائد. الحماية ضد validator التي تقوم بإرسال هذه الكتل والتحقق من صحتها تقع إلى حد كبير تحت نفس المظهر كما في كتل غير صالحة، ولكن مع تحذير إضافي: منذ ذلك الحين الوقت المستغرق لتنفيذ الكتلة (وبالتالي حالتها الوزن الزائد) أمر شخصي، النتيجة النهائية للتصويت على سوف ينقسم سوء السلوك إلى ثلاثة معسكرات أساسية. واحد الاحتمال هو أن الكتلة بالتأكيد ليست زائدة الوزن - وفي هذه الحالة يعلن أكثر من الثلثين أنهم قادرون على ذلك تنفيذ الكتلة ضمن حد معين (على سبيل المثال، 50% من إجمالي الوقت المسموح به بين الكتل). آخر هو أن الكتلة هي دزيادة الوزن بالتأكيد - سيكون هذا إذا كان أكثر من يعلن الثلثان أنهم لا يستطيعون تنفيذ الكتلة ضمن الحد المذكور. هناك احتمال أخير وهو متساوٍ إلى حد ما انقسام في الرأي بين validators. في هذه الحالة يجوز لنا اختيار القيام ببعض العقوبة المتناسبة. للتأكد من أن validators يمكنها التنبؤ بموعد حدوثها باقتراح كتلة ذات وزن زائد، قد يكون من المعقول أن نطلب منهم نشر معلومات عن أدائهم لكل كتلة. وعلى مدى فترة زمنية كافية، وهذا من شأنه أن يسمح لهم بتحديد سرعة المعالجة الخاصة بهم مقارنة بأقرانهم الذين سيحكمون عليهم. 6.5.6. التأمين المجمع. تبقى مشكلة واحدة لـ validators: على عكس شبكات إثبات العمل (PoW)، للتحقق من المجمّع من أجل الصلاحية، يجب عليهم تنفيذ المعاملات فيه فعليًا. يمكن للمجمعين الضارين تغذية كتل غير صالحة أو زائدة الوزن إلى validators مما يسبب لهم الحزن (إهدار مواردهم) وفرض تكلفة فرصة كبيرة محتملة. للتخفيف من هذا، نقترح استراتيجية بسيطة على جزء من validators. أولاً، تم إرسال مرشحي كتلة الباراشين يجب التوقيع على validators من حساب سلسلة الترحيل بالأموال إذا لم تكن كذلك، فيجب أن ينخفض validator ذلك على الفور. ثانيًا، ينبغي ترتيب هؤلاء المرشحين حسب الأولوية من خلال مجموعة (مثل الضرب) من مبلغ الأموال في الحساب يصل إلى بعض الحد الأقصى، و عدد الكتل السابقة التي اقترحها المُجمِّع بنجاح في الماضي (ناهيك عن أي كتل سابقة العقوبات)، وعامل القرب من الفوز تذكرة كما نوقش سابقا. يجب أن يكون الغطاء هو نفسه مثل التعويضات الجزائية المدفوعة إلى validator في هذه القضية منهم إرسال كتلة غير صالحة. لتثبيط المتعاونين من إرسال مرشحي الكتلة غير الصالحين أو ذوي الوزن الزائد إلى validators، يجوز لأي validator ضع في الكتلة التالية معاملة تتضمن الكتلة المخالفة التي تدعي سوء التصرف مع تأثير تحويل بعض أو كل الأموال الموجودة في المتعاقد الذي يسيء التصرف حساب للمتضرر validator. يقوم هذا النوع من المعاملات بتشغيل أي معاملات أخرى للتأكد من عدم قدرة المُجمِّع على ذلك إزالة الأموال قبل العقوبة. كمية الأموال المحولة كتعويضات هي معلمة ديناميكية حتى الآن

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 14 ليتم تصميمها ولكن من المحتمل أن تكون نسبة من مكافأة الكتلة validator لتعكس مستوى الحزن الناتج. ل منع validators الخبيثة من مصادرة أموال المتعاونين بشكل تعسفي، يجوز للمنسق استئناف قرار validator أمام هيئة محلفين مكونة من validators تم اختيارها عشوائيًا في المقابل لوضع وديعة صغيرة. إذا وجدوا في صالح validator، فسيتم استهلاك الوديعة من قبلهم. إذا لم يكن الأمر كذلك، فإن يتم إرجاع الوديعة ويتم تغريم validator (منذ validator في وضع مقبب أكثر بكثير، الإرادة الجميلة من المرجح أن تكون ضخمة إلى حد ما). 6.6. إنترشين الصفقة التوجيه. إنترشين يعد توجيه المعاملات أحد أعمال الصيانة الأساسية مهام سلسلة التتابع وvalidators. هذا هو المنطق الذي يحكم كيفية تحول المعاملة المنشورة (التي غالبًا ما يتم اختصارها إلى "نشر") إلى ناتج مرغوب من سلسلة باراتشين مصدر واحد إلى مدخلات غير قابلة للتفاوض لسلسلة باراتشين وجهة أخرى دون أي ثقة المتطلبات. نختار الصياغة أعلاه بعناية؛ ولا سيما نحن لا تتطلب أن تكون هناك معاملة في المصدر Parachain قد وافق صراحة على هذا المنصب. الوحيد القيود التي نضعها على نموذجنا هي تلك المظلات يجب توفيرها وتعبئتها كجزء من الكتلة الشاملة الخاصة بها معالجة الإخراج، والمشاركات التي هي نتيجة تنفيذ الكتلة. تم تنظيم هذه المنشورات على هيئة عدة قوائم انتظار FIFO؛ ال يُعرف عدد القوائم بقاعدة التوجيه وقد يكون كذلك حوالي 16. والجدير بالذكر أن هذا الرقم يمثل الكمية من المظلات التي يمكننا دعمها دون الحاجة إلى اللجوء إليها التوجيه متعدد المراحل. في البداية، Polkadot سيدعم هذا نوع من التوجيه المباشر، ولكننا سنحدد واحدًا ممكنًا عملية توجيه متعددة المراحل ("التوجيه الفائق") كوسيلة من التوسع إلى ما هو أبعد من المجموعة الأولية من المظلات. نحن نفترض ذلك الكل المشاركين أعرف ال مجموعات فرعية للكتلتين التاليتين n، n + 1. باختصار، يتبع نظام التوجيه هذه المراحل: • CollatorS: اتصل بأعضاء V alidators[n][S] • المتعاونون: لكل مجموعة فرعية: تأكد من ذلك عضو واحد على الأقل من V alidators[n][s] على اتصال • المقارنات: لكل مجموعة فرعية: نفترض الخروج [n −1] [s] [S] متاح (جميع المشاركات الواردة البيانات إلى 'S' من الكتلة الأخيرة) • المقارنات: إنشاء مرشح الكتلة b لـ S: (b.header، b.ext، b.proof، b.receipt، b.egress) • المقارنات: أرسل دليل معلومات إثبات [S] = (b.header، b.ext، b.proof، b.receipt) إلى أدوات تعديل V [ن] [S] • CollatorS: ضمان بيانات المعاملات الخارجية b.ext أصبح متاحًا للمجمعين وvalidators الآخرين • المقارنات: ل لكل منهما مجموعة فرعية الصورة: أرسل الخروج معلومات الخروج [ن] [S] [ق] = (b.header، b.receipt، b.egress[s]) ل ال تلقي المجموعة الفرعية أعضاء من التالي كتلة أدوات تعديل V[n + 1][s] • V alidatorV: قم بتوصيل جميع أعضاء المجموعة نفسها مسبقًا للكتلة التالية: Let N = Chain[n + 1][V ]; الاتصال جميع validators v بحيث تكون السلسلة[n + 1][v] = N • الإضافة الخامسة : جمع كافة إدخال البيانات لهذا الغرض كتلة: ل لكل منهما مجموعة فرعية الصورة: استرداد egress[n −1][s][Chain[n][V ]]، احصل عليه من validators v الأخرى بحيث Chain[n][v] = Chain[n][V ]. من المحتمل أن يتم المرور عبر validators أخرى تم اختيارها عشوائيًا لإثبات المحاولة. • الإضافة الخامسة : قبول البراهين المرشحة لهذا إثبات الكتلة [سلسلة [ن] [V ]]. صلاحية كتلة التصويت • الإضافة الخامسة : قبول بيانات خروج المرشح ل الكتلة التالية: بالنسبة لكل مجموعة فرعية، اقبل الخروج [ن] [ق] [ن]. توفر مخرج كتلة التصويت؛ إعادة النشر بين المهتمين validators v هكذا السلسلة[n + 1][v] = السلسلة[n + 1][V ]. • المصادقة الخامسة: حتى يتم الإجماع حيث: الخروج [ن] [من] [إلى] هو قائمة انتظار الخروج الحالية معلومات للمشاركات التي تنتقل من Parachain "من"، إلى المظلة "إلى" في الكتلة رقم "ن". CollatorS عبارة عن أداة تجميع لـ parachain S. V alidators[n][s] هي مجموعة validators لـ parachain s عند الكتلة رقم n. على العكس من ذلك، Chain[n][v] هي المظلة التي تم تعيين validator v لها على الكتلة رقم n. block.egress[to] هو الخروج قائمة انتظار المشاركات من بعض كتلة المظلة التي الوجهة باراشين هو. نظرًا لأن المجامعين يجمعون رسوم (المعاملة) بناءً على ذلك تصبح كتلهم أساسية ويتم تحفيزهم عليها تأكد من أنه بالنسبة لكل وجهة للكتلة التالية، فإن المجموعة الفرعية يتم إبلاغ الأعضاء بقائمة انتظار الخروج من الحاضر كتلة. يتم تحفيز المصادقين فقط لتشكيل إجماع على كتلة (المظلة)، وبالتالي فإنهم لا يهتمون بها كثيرًا والتي تصبح كتلة المترجم في النهاية أساسية. في من حيث المبدأ، يمكن لـ validator أن يشكل ولاءً مع أحد المتعاونين ويتآمر لتقليل فرص المتعاونين الآخرين تصبح الكتل أساسية، ولكن هذا أمر صعب للترتيب بسبب الاختيار العشوائيإجراء validators لـ ويمكن الدفاع ضد سلاسل المظلات من خلال تخفيض الرسوم المستحقة على كتل المظلات التي تصمد عملية الإجماع. 6.6.1. توفر البيانات الخارجية. ضمان المظلة تعتبر البيانات الخارجية المتوفرة بالفعل مشكلة دائمة الأنظمة اللامركزية التي تهدف إلى توزيع عبء العمل عبر الشبكة. في قلب المشكلة هو التوفر المشكلة التي تنص على أنه لأنه ليس من الممكن تقديم دليل غير تفاعلي على التوفر ولا من أي نوع دليل على عدم التوفر، لنظام BFT للعمل بشكل صحيح التحقق من صحة أي انتقال تعتمد صحته على توافر بعض البيانات الخارجية، والحد الأقصى لعددها من العقد البيزنطية المقبولة، بالإضافة إلى واحدة، من النظام يجب أن تشهد على البيانات المتاحة. لكي يتم توسيع نطاق النظام بشكل صحيح، مثل Polkadot، هذا يدعو إلى مشكلة: إذا كانت نسبة ثابتة من validators يجب أن يشهد على توافر البيانات، وعلى افتراض أن validators سيرغب في تخزين البيانات فعليًا قبل التأكد من توفرها، فكيف نتجنب مشكلة زيادة عرض النطاق الترددي/متطلبات التخزين مع حجم النظام (وبالتالي عدد validators)؟ إحدى الإجابات المحتملة هي أن يكون لديك مجموعة منفصلة من validators (ضامني التوفر)، الذين ينمو طلبهم خط فرعي بحجم Polkadot ككل. هذا هو الموصوفة في 6.5.3. لدينا أيضًا خدعة ثانوية. كمجموعة، لدى المجمعين حافز جوهري للتأكد من أن جميع البيانات صحيحة متاح للمظلة التي اختاروها لأنه بدونها غير قادرين على تأليف المزيد من الكتل التي يمكنهم منها جمع رسوم المعاملات. يشكل المتعاونون أيضًا مجموعة تتنوع عضويتها (بسبب الطبيعة العشوائية). Parachain validator مجموعات) غير تافهة للدخول وسهلة

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 15 لإثبات. لذلك يُسمح للمجمعين الجدد (ربما من الآلاف القليلة الأخيرة من الكتل) بإصدار تحديات توافر البيانات الخارجية لسلسلة معينة كتلة إلى validators لسندات صغيرة. يجب على المصادقين الاتصال بأولئك الذين ينتمون إلى المجموعة الفرعية validator التي أدلت بشهادتها على ما يبدو، وإما الحصول على البيانات وإعادتها إلى المتعاون أو تصعيد الأمر الأمر من خلال الشهادة على عدم التوفر (الرفض المباشر لتقديم البيانات يعتبر جريمة تستلزم مصادرة السندات، وبالتالي فإن سوء التصرف validator من المرجح أن يكون مجرد قم بإسقاط الاتصال) والاتصال بـ validators الإضافيين لإجراء نفس الاختبار. وفي الحالة الأخيرة، سند المجمع يتم إرجاعها. بمجرد اكتمال النصاب القانوني المكون من validator الذين يمكنهم تقديم شهادات عدم التوفر هذه، يتم إطلاق سراحهم، تتم معاقبة المجموعة الفرعية التي تسيء التصرف، ويتم إرجاع الحظر. 6.6.2. توجيه المشاركات. يتضمن كل رأس باراشين خروج-جذر-جذر؛ هذا هو جذر المحاولة التي تحتوي على ملف صناديق قاعدة التوجيه، كل حاوية عبارة عن قائمة متسلسلة من مراكز الخروج. قد يتم توفير أدلة ميركل عبر Parachain validators لإثبات أن Parachain معينة تحتوي الكتلة على قائمة انتظار خروج معينة لسلسلة Parachain لوجهة معينة. في بداية تجهيز كتلة المظلة لكل منها قائمة انتظار الخروج الخاصة بـ Parachain الأخرى المرتبطة بالكتلة المذكورة هي تم دمجها في قائمة انتظار الدخول الخاصة بالكتلة الخاصة بنا. نحن نفترض قوية، ربما CSPR9، ترتيب الكتلة الفرعية لتحقيق عملية حتمية لا تقدم أي محاباة بين أي الاقتران كتلة المظلة. يقوم Collators بحساب قائمة الانتظار الجديدة وتصريف طوابير الخروج حسب المظلة المنطق. تتم كتابة محتويات قائمة انتظار الدخول بشكل صريح في كتلة المظلة. وهذا له غرضين رئيسيين: أولاً، هذا يعني أنه يمكن مزامنة المظلات بشكل موثوق بمعزل عن المظلات الأخرى. ثانيا، إنه يبسط لوجستيات البيانات في حالة الدخول بالكامل لا يمكن معالجة قائمة الانتظار في كتلة واحدة؛ validators والمجمعون قادرون على معالجة الكتل التالية دون الحاجة إلى مصدر بيانات قائمة الانتظار بشكل خاص. إذا كانت قائمة انتظار دخول الباراشين أعلى من العتبة المبلغ في نهاية معالجة الكتلة، ثم يتم وضع علامة عليه مشبعة على سلسلة التتابع ولا يجوز إرسال رسائل أخرى تسليمه إليها حتى يتم تطهيرها. البراهين ميركل هي تستخدم لإثبات دقة عملية المجمع في دليل كتلة المظلة. 6.6.3. نقد. عيب بسيط يتعلق بهذا الأساسي الآلية هي هجوم ما بعد القنبلة. هذا هو المكان الذي كل شيء ترسل سلاسل المظلات أكبر عدد ممكن من المشاركات إلى باراشين معين. في حين أن هذا يربط الهدف قائمة انتظار الدخول مرة واحدة، ولا يحدث أي ضرر أكثر من ذلك هجوم DoS القياسي للمعاملات. تعمل بشكل طبيعي، مع مجموعة من متزامنة بشكل جيد و أدوات تجميع غير ضارة وvalidators، لسلاسل N parachains، إجمالي N × M validators وL لكل مظلة، نحن يمكن تقسيم إجمالي مسارات البيانات لكل كتلة إلى: المدقق: M −1+L+L: M −1 للـ validators الأخرى في مجموعة المظلة، L لكل مُجمِّع يوفر كتلة باراشين مرشحة وL ثاني لكل مُجمِّع من الكتلة التالية التي تتطلب حمولات الخروج من الكتلة السابقة. (الأخير هو في الواقع أشبه بأسوأ الحالات العملية لأنه من المحتمل أن يشاركها المجمعون البيانات.) Collator: M +kN: M للاتصال بكل ذي صلة كتلة المظلة validator، كيلو نيوتن لبذر حمولات الخروج إلى مجموعة فرعية من كل مجموعة المظلة validator لـ الكتلة التالية (وربما بعض المجمّعات المفضلة). على هذا النحو، تنمو طرق مسار البيانات لكل عقدة بشكل خطي مع التعقيد العام للنظام. بينما هذا معقول، مع توسع النظام إلى مئات أو آلاف المظلات، قد يكون هناك بعض الكمون في الاتصالات استيعابها في مقابل معدل نمو أقل تعقيدا. في هذه الحالة، يمكن استخدام خوارزمية توجيه متعددة المراحل من أجل تقليل عدد المسارات اللحظية على حساب إدخال مخازن التخزين المؤقتة وزمن الوصول. 6.6.4. توجيه المكعب الفائق. توجيه المكعب الفائق عبارة عن آلية يمكن إنشاؤها في الغالب كامتداد لـ آلية التوجيه الأساسية الموضحة أعلاه. في الأساس، بدلاً من زيادة اتصال العقدة بعدد المظلات وعقد المجموعة الفرعية، فإننا ننمو فقط باستخدام لوغاريتم المظلات. قد تنتقل المشاركات بين العديد من طوابير المظلات في طريقهم إلى التسليم النهائي. التوجيه في حد ذاته أمر حتمي وبسيط. نبدأ بها الحد من عدد الصناديق في طوابير الدخول/الخروج؛ بدلاً من أن تكون العدد الإجمالي للمظلات، فهي هيقاعدة التوجيه (ب). سيتم تثبيت هذا كرقم من التغييرات في المظلات، مع رفع أس التوجيه (e) بدلاً من ذلك. وفي ظل هذا النموذج، حجم رسالتنا ينمو مع O(be)، مع بقاء المسارات ثابتة والكمون (أو عدد الكتل المطلوبة للتسليم) مع يا (ه). نموذج التوجيه الخاص بنا هو عبارة عن مكعب زائد ذو أبعاد e، مع وجود كل جانب من جوانب المكعب ب مواقع محتملة. في كل كتلة، نقوم بتوجيه الرسائل على طول محور واحد. نحن قم بتبديل المحور بطريقة دائرية، وبالتالي ضمان وقت تسليم الكتل الإلكترونية في أسوأ الحالات. كجزء من تجهيز الباراشين، متجهة إلى الخارج يتم توجيه الرسائل الموجودة في قائمة انتظار الدخول على الفور إلى حاوية قائمة انتظار الخروج المناسبة، نظرًا لـ رقم الكتلة الحالي (وبالتالي بُعد التوجيه). هذا تتطلب العملية نقل بيانات إضافية لكل قفزة على طريق التسليم، ولكن هذه مشكلة في حد ذاتها والتي يمكن تخفيفها باستخدام بعض الوسائل البديلة تسليم حمولة البيانات بما في ذلك مرجع فقط، بدلاً من الحمولة الكاملة للمنشور في مرحلة ما بعد المحاولة. مثال على توجيه المكعب الفائق لنظام ما مع 4 سلاسل، b = 2 و e = 2 يمكن أن تكون: المرحلة 0، في كل رسالة M: • sub0: إذا كان Mdest ∈{2, 3} ثم أرسل إلى(2) وإلا احتفظ به • sub1: إذا كان Mdest ∈{2, 3} ثم أرسل إلى(3) وإلا احتفظ به • sub2: إذا كان Mdest ∈{0, 1} ثم أرسل إلى(0) وإلا احتفظ به • sub3: إذا كان Mdest ∈{0, 1} ثم أرسل إلى(1) وإلا احتفظ به المرحلة 1، في كل رسالة م: • sub0: إذا كان Mdest ∈{1, 3} ثم أرسل إلى(1) وإلا احتفظ به • sub1: إذا كان Mdest ∈{0, 2} ثم أرسل إلى(0) وإلا احتفظ به • sub2: إذا كان Mdest ∈{1, 3} ثم أرسل إلى(3) وإلا احتفظ به • sub3: إذا كان Mdest ∈{0, 2} ثم أرسل إلى(2) وإلا احتفظ به من السهل رؤية البعدين هنا باعتبارهما البعد الأول قطعتين من فهرس الوجهة؛ للكتلة الأولى، ويتم استخدام البت ذو الترتيب الأعلى وحده. صفقات الكتلة الثانية مع البت ذو الترتيب المنخفض. بمجرد حدوث كلاهما (بشكل تعسفي الطلب) ثم سيتم توجيه المنشور. 9. آمن بشكل عشوائي زائف

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 16 6.6.5. تعظيم الصدفة. تعديل واحد من الأساسي سيشهد الاقتراح إجماليًا ثابتًا قدره c2 -c validators، مع c−1 validators في كل مجموعة فرعية. كل كتلة، بدلا من هناك إعادة تقسيم غير منظمة لـ validators بين المظلات، بدلاً من ذلك لكل مجموعة فرعية من المظلات، سيتم تعيين كل validator إلى فريد ومختلف المجموعة الفرعية المظلية على الكتلة التالية. هذا من شأنه يؤدي إلى الثابت الذي بين أي كتلتين، لأي اثنين من أزواج المظلة، يوجد اثنان من validators لقد تبادلنا مسؤوليات الباراشين. في حين لا يمكن استخدام هذا للحصول على ضمانات مطلقة بشأن التوفر (سوف ينقطع اتصال validator واحد أحيانًا، حتى لو كان خيرية)، ومع ذلك يمكنها تحسين الحالة العامة. وهذا النهج لا يخلو من التعقيدات. إن إضافة المظلة ستتطلب أيضًا إعادة التنظيم من المجموعة validator. علاوة على ذلك، فإن عدد validators، مرتبط بمربع عدد المظلات، سيبدأ في البداية صغيرًا جدًا وينمو في النهاية بعيدًا سريع جدًا، وأصبح لا يمكن الدفاع عنه بعد حوالي 50 مظلة. ولا تعتبر أي من هذه المشاكل أساسية. في الحالة الأولى، إعادة تنظيم مجموعات validator أمر لا بد منه القيام به بانتظام على أي حال. فيما يتعلق بحجم validator المحددة، عندما تكون صغيرة جدًا، قد يتم تعيين عدة validators إلى نفس المظلة، مع تطبيق عامل عدد صحيح على الإجمالي الإجمالي validators. آلية التوجيه متعددة المراحل مثل Hypercube Routing، التي تمت مناقشتها في 6.6.4 ستكون كذلك تخفيف متطلبات عدد كبير من validators عندما يكون هناك عدد كبير من السلاسل. 6.7. التحقق من صحة الباراشين. الغرض الرئيسي لـ validator هو أن يشهد، كممثل جيد الارتباط، أن باراشين الكتلة صالحة، بما في ذلك على سبيل المثال لا الحصر، أي انتقال للحالة، وأي معاملات خارجية متضمنة، وتنفيذ أي مشاركات انتظار في قائمة انتظار الدخول والحالة النهائية من صف الخروج. العملية نفسها بسيطة إلى حد ما. بمجرد إغلاق validator للكتلة السابقة، يصبحون أحرارًا لبدء العمل على توفير كتلة المظلة المرشحة مرشح للجولة القادمة من الإجماع. في البداية، يجد validator مرشحًا لكتلة باراشين من خلال مُجمِّع باراشين (الموصوف لاحقًا) أو واحد من validators المشتركة. بيانات المرشح كتلة Parachain يتضمن رأس الكتلة، ورأس الكتلة السابقة، تم تضمين أي بيانات إدخال خارجية (بالنسبة لـ Ethereum وBitcoin، ستتم الإشارة إلى هذه البيانات على أنها معاملات، ولكن من حيث المبدأ قد تتضمن هياكل بيانات عشوائية لأغراض عشوائية)، وبيانات قائمة انتظار الخروج والبيانات الداخلية لإثبات صحة انتقال الحالة (لـ Ethereum سيكون هذا هو عقد محاولة الحالة/التخزين المختلفة المطلوبة لتنفيذ كل معاملة). تُظهر الأدلة التجريبية مجموعة البيانات الكاملة هذه لكتلة Ethereum حديثة أن تكون على الأكثر بضع مئات من الكي بايت. في الوقت نفسه، إذا لم يتم ذلك بعد، فسيكون validator محاولة استرجاع المعلومات المتعلقة بانتقال الكتلة السابقة، مبدئيًا من الكتلة السابقة validators والإصدارات الأحدث من جميع validators الموقعة على توافر البيانات. بمجرد أن يتلقى validator كتلة المرشح هذه، ثم يقومون بالتحقق من صحتها محليًا. تم تضمين عملية التحقق من الصحة ضمن وحدة validator الخاصة بفئة الباراشين، أ وحدة برمجية حساسة للإجماع والتي يجب كتابتها لأي تنفيذ لـ Polkadot (على الرغم من أنه من حيث المبدأ يمكن للمكتبة التي تحتوي على C ABI تمكين مكتبة واحدة من ذلك أن تكون مشتركة بين التطبيقات مع المناسب انخفاض في السلامة يأتي من وجود تطبيق "مرجعي" واحد فقط). تأخذ العملية رأس الكتلة السابقة وتتحقق من هويتها من خلال سلسلة الترحيل المتفق عليها مؤخرًا الكتلة التي يجب تسجيل hash بها. بمجرد التأكد من صحة الرأس الأصلي، يتم استخدام سلسلة الباراشين المحددة يمكن استدعاء وظيفة التحقق من صحة الفصل. هذه وظيفة واحدة تقبل عددًا من حقول البيانات (تقريبًا تلك المقدمة سابقًا) وإرجاع قيمة منطقية بسيطة إعلان صلاحية الكتلة. ستقوم معظم وظائف التحقق هذه أولاً بالتحقق من حقول الرأس التي يمكن استخلاصها مباشرة من الكتلة الأصلية (على سبيل المثال الأصل hash، الرقم). متابعة هذا، وسوف يقومون بملء أي هياكل البيانات الداخلية كما ضرورية لمعالجة المعاملات و/أو المشاركات. بالنسبة لسلسلة تشبه Ethereum، فإن هذا يصل إلى ملء ملف حاول قاعدة البيانات مع العقد التي ستكون مطلوبة لـ التنفيذ الكامل للمعاملات. قد يكون هناك أنواع أخرى من السلسلة أخرى صآليات تعويضية. بمجرد الانتهاء من ذلك، ستكون منشورات الدخول والمعاملات الخارجية (أو ما تمثله البيانات الخارجية). سنت ومتوازنة وفقا لمواصفات السلسلة. (أ قد يكون الافتراضي المعقول هو المطالبة بجميع مشاركات الدخول تتم معالجتها قبل خدمة المعاملات الخارجية، ولكن هذا يجب أن يقرره منطق سلسلة المفاتيح.) من خلال هذا التشريع، سيتم إنشاء سلسلة من نقاط الخروج تم إنشاؤها وسيتم التحقق من تطابقها بالفعل مرشح المجمع. وأخيرا، المأهولة بالسكان بشكل صحيح سيتم فحص الرأس مقابل رأس المرشح. مع كتلة مرشح تم التحقق من صحتها بالكامل، validator يمكنه بعد ذلك التصويت لصالح hash لرأسه وإرسال كافة معلومات التحقق المطلوبة إلى المشاركين في validators في مجموعته الفرعية. 6.7.1. كولاتور باراشين. مُجمعو Parachain هم مشغلون غير مقيدين يقومون بمعظم مهام عمال المناجم على شبكات blockchain الحالية. فهي محددة إلى باراشين معين. لكي تعمل يجب عليهم الحفاظ على كل من سلسلة التتابع والمزامنة الكاملة المظلة. سيعتمد المعنى الدقيق لعبارة "متزامن بالكامل" على فئة سلسلة Parachain، على الرغم من أنه سيتضمن دائمًا الحالة الحالية لقائمة انتظار دخول سلسلة Parachain. في حالة Ethereum، يتضمن الأمر أيضًا الصيانة على الأقل قاعدة بيانات Merkle-tree للكتل القليلة الأخيرة، ولكن ربما تشمل أيضًا العديد من هياكل البيانات الأخرى بما في ذلك Bloom مرشحات لوجود الحساب والمعلومات العائلية والتسجيل المخرجات وجداول البحث العكسي لرقم الكتلة. بالإضافة إلى الحفاظ على تزامن السلسلتين، فإنه يجب أيضًا "البحث" عن المعاملات عن طريق الاحتفاظ بقائمة انتظار المعاملات وقبول المعاملات التي تم التحقق من صحتها بشكل صحيح من الشبكة العامة. مع قائمة الانتظار والسلسلة، هو عليه قادر على إنشاء كتل مرشحة جديدة لـ validators المختارة في كل كتلة (التي تعرف هويتها منذ مزامنة سلسلة التتابع) وإرسالها مع المعلومات المساعدة المختلفة مثل إثبات الصلاحية، عبر شبكة الأقران. ولمشكلتها، فإنها تقوم بجمع كافة الرسوم المتعلقة بالمعاملات التي تتضمنها. وتدور اقتصاديات مختلفة حول هذا الأمر الترتيب. في سوق تنافسية للغاية حيث هناك هو فائض من المجمعين، فمن الممكن أن الصفقة تتم مشاركة الرسوم مع سلسلة Parachain validators للتحفيز إدراج كتلة مجمعة معينة. بصورة مماثلة،

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 17 قد يقوم بعض المجمعين برفع الرسوم المطلوبة التي تحتاجها ليتم دفعها من أجل جعل الكتلة أكثر جاذبية ل validators. وفي هذه الحالة، يجب أن يتشكل سوق طبيعي مع المعاملات التي تدفع رسومًا أعلى تتخطى قائمة الانتظار وإدراجها بشكل أسرع في السلسلة. 6.8. الشبكات. التواصل على blockchains التقليدية مثل Ethereum وBitcoin لها متطلبات بسيطة إلى حد ما. يتم بث جميع المعاملات والكتل في ثرثرة بسيطة غير موجهة. التزامن أكثر مشاركة، على وجه الخصوص مع Ethereum ولكن في الواقع تم تضمين هذا المنطق في استراتيجية النظير بدلاً من البروتوكول نفسه الذي يتم حله حول عدد قليل من أنواع رسائل الطلب والإجابة. بينما أحرز Ethereum تقدمًا في عروض البروتوكول الحالية باستخدام بروتوكول devp2p، والذي سمح للكثيرين يتم مضاعفة البروتوكولات الفرعية عبر اتصال نظير واحد وبالتالي يكون لها نفس تراكب النظير الذي يدعم العديد من البروتوكولات الفرعية بروتوكولات p2p في وقت واحد، الجزء Ethereum من لا يزال البروتوكول بسيطًا نسبيًا ولا يزال بروتوكول p2p بروتوكول لفترة من الوقت لا يزال غير مكتمل مع المهم وظائف مفقودة مثل دعم جودة الخدمة. للأسف، هناك رغبة في إنشاء بروتوكول "ويب 3" أكثر انتشارًا إلى حد كبير فشل، والمشاريع الوحيدة التي تستخدمه هي تلك صراحة تم تمويله من عملية البيع الجماعي Ethereum. تعتبر متطلبات Polkadot أكثر أهمية. بدلاً من ذلك شبكة موحدة تمامًا، Polkadot لديه عدة أنواع من المشاركين لكل منهم متطلبات مختلفة فيما يتعلق بتركيبة أقرانهم والعديد من الشبكات "الطرق" التي يميل المشاركون إلى التحدث عنها بيانات معينة. وهذا يعني تراكب شبكة أكثر تنظيماً إلى حد كبير - وبروتوكول يدعم ذلك - من المرجح أن يكون ضروريا. علاوة على ذلك، قد تكون قابلية التوسعة لتسهيل الإضافات المستقبلية مثل الأنواع الجديدة من "السلسلة". تتطلب نفسها بنية تراكب جديدة. في حين مناقشة متعمقة لكيفية التواصل قد يبدو البروتوكول خارج نطاق هذه الوثيقة، إلا أن تحليل بعض المتطلبات معقول. نستطيع قم بتقسيم المشاركين في شبكتنا تقريبًا إلى مجموعتين (سلسلة التتابع، المظلات) كل من ثلاث مجموعات فرعية. نستطيع أذكر أيضًا أن كل من المشاركين في الباراشين هم فقط مهتمون بالتحدث فيما بينهم بدلاً من المشاركون في المظلات الأخرى: • المشاركون في سلسلة التتابع: • المصادقون: P، مقسمة إلى مجموعات فرعية P[s] لكل منها المظلة • الجهات الضامنة للتوفر: أ (قد يتم تمثيلها بواسطة جهات المصادقة في الشكل الأساسي للبروتوكول) • عملاء سلسلة الترحيل: م (ملاحظة أعضاء كل مجموعة المظلة سوف تميل أيضًا إلى أن تكون أعضاء M) • المشاركون في الباراشين: • مُجمّعات المظلات: C[0], C[1], . . . • صيادو المظلات: F[0], F[1], . . . • عملاء Parachain: S[0], S[1], . . . • عملاء المظلة الخفيفة: L[0]، L[1]، . . . بشكل عام، نقوم بتسمية فئات معينة من الاتصالات تميل إلى أن تتم بين أعضاء هذه المجموعات: • ف | أ <-> ف | ج: ال كامل مجموعة من validators/الضامنون يجب يكون على اتصال جيد ل تحقيق الإجماع. • P[s] <-> C[s] | P[s]: كل validator كعضو في مجموعة باراشين معينة سوف يميل إلى النميمة مع غيرهم من الأعضاء وكذلك المتعاونين من تلك المظلة لاكتشاف ومشاركة مرشحي الكتلة. • أ <-> P[s] | ج | ج: كل ضامن للتوافر سوف تحتاج إلى جمع سلسلة عبر سلسلة حساسة للإجماع البيانات من validators المخصصة لها؛ المجامع قد يؤدي أيضًا إلى تحسين فرصة التوصل إلى توافق في الآراء بشأنها قم بالحظر عن طريق الإعلان عنه أمام الجهات الضامنة للتوافر. بمجرد حصولهم عليها، سيتم صرف البيانات إلى ضامنون آخرون لتسهيل التوصل إلى توافق في الآراء. • P[s] <-> A | P[s']: المظلة validators سوف تحتاج إلى جمع بيانات إدخال إضافية من المجموعة السابقة من validators أو الجهات الضامنة للتوفر. • F[s] <-> P: عند الإبلاغ، يجوز للصيادين أن يضعوا مكانهم مطالبة مع أي مشارك. • م <-> م | ف | ج: يقوم عملاء سلسلة الترحيل العامة بتوزيع البيانات من validators والجهات الضامنة. • S[s] <-> S[s] | ص[ق] | ج: يقوم عملاء Parachain بتوزيع البيانات من validator/الضامنين. • L[s] <-> L[s] | S[s]: عملاء ضوء المظلة صرف البيانات من العملاء الكاملين. لضمان آلية نقل فعالة، "مسطحة" شبكة التراكب - مثل devp2p الخاص بـ Ethereum - حيث كل منها العقدة لا (بشكل غير تعسفي) تفرق بين صلاحيتها من غير المرجح أن يكون الأقران مناسبين. قابلة للتوسعة بشكل معقول من المحتمل أن تحتاج آلية اختيار الأقران واكتشافهم ليتم تضمينها في البروتوكول وكذلك العدوانية التخطيط للمستقبل لضمان النوع المناسب من الأقران هي "بالصدفة" conneCT في الوقت المناسب. ستكون الإستراتيجية الدقيقة لتكوين الأقران مختلفة لكل فئة من المشاركين: من أجل توسيع نطاقها بشكل صحيح متعددة السلاسل، سوف تحتاج المجمعات إما إلى أن تكون بشكل مستمر إعادة الاتصال بـ validators المنتخب وفقًا لذلك، أو سوف بحاجة إلى اتفاقيات مستمرة مع مجموعة فرعية من validators للتأكد من عدم فصلها خلال الغالبية العظمى من الوقت بحيث تكون غير مجدية لذلك validator. ومن الطبيعي أيضًا أن يحاول المُجمِّعون الحفاظ على واحدة أو اتصالات أكثر استقرارًا في ضامن التوفر تم تعيينها لضمان النشر السريع لتوافقها الحساس data. يهدف ضامنو التوفر في الغالب إلى الحفاظ على اتصال مستقر ببعضها البعض وبـ validators (للإجماع وبيانات الباراشين الحاسمة للإجماع التي يشهدون)، وكذلك لبعض المتعاونين (للباراشين البيانات) وبعض الصيادين والعملاء الكاملين (للتفريق المعلومات). سوف يميل المدققون إلى البحث عن validators أخرى، وخاصة تلك الموجودة في نفس المجموعة الفرعية وأي منها المقارنات التي يمكنها تزويدهم بمرشحات كتلة المظلات. الصيادين، فضلا عن سلسلة التتابع العامة والمظلة سيهدف العملاء عمومًا إلى إبقاء الاتصال مفتوحًا لـ validator أو الضامن، ولكن هناك الكثير من العقد الأخرى المشابهة لأنفسهم غير ذلك. سيهدف عملاء Parachain Light بالمثل إلى أن يكونوا متصلين بالعميل الكامل لـ Parachain، إن لم يكن فقط عملاء ضوء المظلة الآخرين. 6.8.1. مشكلة عنف الأقران. في مقترح البروتوكول الأساسي، تتغير كل مجموعة من هذه المجموعات الفرعية باستمرار بشكل عشوائي مع كل كتلة حيث تم تعيين validators للتحقق يتم اختيار التحولات المظلية بشكل عشوائي. هذا يمكن تكون مشكلة يجب أن تحتاج إليها العقد المتباينة (غير النظيرة). تمرير البيانات بين بعضها البعض. يجب على المرء إما الاعتماد على شبكة نظير موزعة إلى حد ما ومتصلة بشكل جيد

بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 18 تأكد من أن مسافة القفزة (وبالتالي زمن الوصول في أسوأ الحالات) تنمو فقط مع لوغاريتم حجم الشبكة (قد يساعد البروتوكول المشابه لـ Kademlia [13] هنا)، أو لا بد من ذلك تقديم أوقات حظر أطول للسماح بإجراء مفاوضات الاتصال اللازمة للحفاظ على مجموعة نظير يعكس احتياجات الاتصال الحالية للعقدة. لا يعد أي من هذين الحلين رائعًا: أوقات الحظر الطويلة قد يؤدي فرضها على الشبكة إلى جعلها عديمة الفائدة تطبيقات وسلاسل معينة. حتى عادلة تماما والشبكة المتصلة ستؤدي إلى هدر كبير من عرض النطاق الترددي لأنه يتوسع بسبب وجود العقد غير المهتمة لإعادة توجيه البيانات غير المفيدة لهم. وفي حين أن كلا الاتجاهين قد يشكلان جزءاً من الحل، سيكون التحسين المعقول للمساعدة في تقليل زمن الوصول يكون لتقييد تقلبات هذه المظلات validator مجموعات، إما إعادة تعيين العضوية فقط بين سلسلة من الكتل (على سبيل المثال، في مجموعات مكونة من 15 شخصًا، والتي في 4 ثوانٍ وقت الحظر يعني تغيير الاتصالات مرة واحدة فقط في كل مرة دقيقة) أو عن طريق تناوب العضوية بطريقة تدريجية، على سبيل المثال. يتغير بواسطة عضو واحد في كل مرة (على سبيل المثال، إذا كان هناك تم تخصيص 15 validators لكل مظلة، ففي المتوسط ستكون دقيقة كاملة بين فريدة تمامًا مجموعات). من خلال الحد من مقدار تقلب الأقران، والتأكد من إجراء اتصالات مفيدة مع الأقران بشكل جيد التقدم من خلال القدرة على التنبؤ الجزئي للباراشين مجموعات، يمكننا المساعدة في ضمان احتفاظ كل عقدة بشكل دائم اختيار الصدفة من أقرانهم. 6.8.2. المسار إلى بروتوكول الشبكة الفعال. من المحتمل أن ستركز جهود التطوير الأكثر فعالية ومعقولة على استخدام بروتوكول موجود مسبقًا بدلاً من التدوير منطقتنا. توجد العديد من البروتوكولات الأساسية من نظير إلى نظير يجوز لنا استخدام أو تعزيز ما يتضمنه Ethereum من أدوات تطوير devp2p [22]، libp2p الخاص بـ IPFS [1] وGNUnet الخاص بـ GNU [4]. مراجعة كاملة لهذه البروتوكولات وأهميتها لبناء أ شبكة نظيرة معيارية تدعم ضمانات هيكلية معينة وتوجيه ديناميكي نظير وبروتوكولات فرعية قابلة للتوسيع يتجاوز نطاق هذه الوثيقة بكثير ولكنه سيكون بمثابة خطوة مهمة في تنفيذ Polkadot. 7. الجوانب العملية للبروتوكول 7.1. دفع المعاملات Interchain. بينما عظيم يتم اكتساب قدر من الحرية والبساطة من خلال إسقاط الحاجة إلى إطار شامل لمحاسبة الموارد الحسابية مثل غاز Ethereum، وهذا يثير سؤالًا مهمًا: بدون غاز، كيف يمكن لسلسلة واحدة أن تعمل تجنب Parachain آخر من إجبارها على القيام بالحساب؟ بينما يمكننا الاعتماد على قائمة انتظار الدخول بعد المعاملة المخازن المؤقتة لمنع إحدى السلاسل من إرسال بريد عشوائي إلى أخرى بيانات المعاملات، لا توجد آلية مكافئة يوفرها البروتوكول لمنع إرسال البريد العشوائي أثناء معالجة المعاملات. هذه مشكلة متروكة للمستوى الأعلى. منذ السلاسل لهم الحرية في إرفاق دلالات تعسفية بالوارد بيانات ما بعد المعاملة، يمكننا التأكد من أن الحساب يجب أن يتم دفع ثمنها قبل البدء. وعلى نفس المنوال النموذج الذي يتبناه Ethereum الصفاء، يمكننا أن نتخيله عقد "اقتحام" ضمن سلسلة Parachain يسمح بـ validator لضمان الدفع مقابل توفير حجم معين من موارد المعالجة. ويمكن قياس هذه الموارد بشيء مثل الغاز، ولكن يمكن أيضًا أن يكون نموذجًا جديدًا تمامًا مثل وقت التنفيذ الشخصي أو نموذج الرسوم الثابتة الذي يشبه Bitcoin. هذا في حد ذاته ليس مفيدًا جدًا لأننا لا نستطيع أن نفترض بسهولة أن المتصل خارج السلسلة متاح لهم مهما كانت آلية القيمة التي يتم التعرف عليها من خلال الاقتحام العقد. ومع ذلك، يمكننا أن نتخيل عقد "اختراق" ثانوي في سلسلة المصدر. سيشكل العقدان معًا جسرًا، يعترف كل منهما بالآخر توفير معادلة القيمة. (التكديس-tokens، متاح لـ يمكن استخدام كل منها لتسوية ميزان المدفوعات.) إن الاتصال بسلسلة أخرى من هذا القبيل يعني التوكيل من خلال هذا الجسر الذي من شأنه أن يوفر وسائل التفاوض على نقل القيمة بين السلاسل من أجل ادفع مقابل موارد الحساب المطلوبة في سلسلة Parachain الوجهة. 7.2. إضافية سلاسل. بينما ال إضافة من أ تعتبر عملية الباراشين عملية رخيصة نسبيًا، وليست مجانية. المزيد من المظلات يعني عددًا أقل من validators لكل مظلة وفي النهاية، عدد أكبر من validators لكل منها علامة انخفاض متوسط السندات. في حين يتم تخفيف مسألة تكلفة الإكراه الأصغر لمهاجمة سلسلة المظلة الصيادين، مجموعة validator المتنامية تجبر بشكل أساسي على أ درجة أعلى من الكمون بسبب آليات الإجماع الأساسيthod. علاوة على ذلك كل مظلة يجلب معه احتمالية الحزن validators بـ خوارزمية التحقق المرهقة. على هذا النحو، سيكون هناك بعض "السعر" الذي validators و/أو سيقوم مجتمع أصحاب المصلحة بالاستخراج من أجل إضافة مظلة جديدة. هذا السوق للسلاسل سوف ربما نرى إضافة إما: • السلاسل التي من المحتمل أن يكون صافي المساهمة فيها صفرًا (من حيث الحبس أو الحرق staking tokens) التي سيتم جعلها جزءًا (على سبيل المثال، سلاسل الكونسورتيوم، سلاسل دوجي، سلاسل خاصة بالتطبيق)؛ • السلاسل التي تقدم قيمة جوهرية للشبكة من خلال إضافة وظائف معينة صعبة للوصول إلى مكان آخر (على سبيل المثال، السرية، وقابلية التوسع الداخلي، وارتباطات الخدمة). في الأساس، سيحتاج مجتمع أصحاب المصلحة إلى ذلك سيتم تحفيزهم لإضافة سلاسل فرعية - إما ماليًا أو من خلال الرغبة في إضافة سلاسل مميزة إلى التتابع. ومن المتصور أن السلاسل الجديدة المضافة سيكون لها جدا فترة إشعار قصيرة للإزالة، مما يسمح بسلاسل جديدة يتم تجربتها دون أي خطر للمساومة عرض القيمة المتوسطة أو الطويلة الأجل. 8. الاستنتاج لقد حددنا الاتجاه الذي يمكن للمرء أن يتخذه للمؤلف أ بروتوكول متعدد السلاسل قابل للتطوير وغير متجانس مع إمكانية أن يكون متوافقًا مع الإصدارات السابقة لبعض البروتوكولات الموجودة مسبقًا blockchain الشبكات. وبموجب هذا البروتوكول، المشاركين العمل من أجل المصلحة الذاتية المستنيرة لإنشاء نظام شامل يمكن توسيعه بطريقة مجانية بشكل استثنائي ودون تكلفة نموذجية للمستخدمين الحاليين يأتي من تصميم قياسي blockchain. لقد قدمنا مخطط تقريبي للهندسة المعمارية التي ستستغرقها بما في ذلك طبيعة المشاركين وحوافزهم الاقتصادية والعمليات التي يجب أن يشاركوا فيها. لدينا حددت التصميم الأساسي وناقشت نقاط قوته و القيود؛ وفقا لذلك لدينا المزيد من التوجيهات التي قد يخفف هذه القيود ويؤدي إلى مزيد من التقدم نحو حل blockchain قابل للتطوير بالكامل.بولكادوت: رؤية لإطار عمل متعدد السلاسل غير متجانس المسودة 1 19 8.1. المواد المفقودة والأسئلة المفتوحة. يعد تفرع الشبكة دائمًا احتمالًا من خلال التطبيقات المتباينة للبروتوكول. التعافي من مثل هذا لم تتم مناقشة حالة استثنائية. نظرًا لأن الشبكة سيكون لها بالضرورة فترة غير صفرية من الانتهاء، لا ينبغي أن يكون التعافي من تشعب سلسلة الترحيل مشكلة كبيرة، ولكنه سيتطلب دمجًا دقيقًا فيها بروتوكول الإجماع. وقد تم توفير مصادرة السندات والمكافأة على العكس من ذلك لم يتم استكشافها بعمق. في الوقت الحاضر نحن نفترض المكافآت يتم توفيرها على أساس أن الفائز يأخذ كل شيء: وهذا قد لا يكون كذلك تقديم أفضل نموذج تحفيزي للصيادين. ومن شأن عملية الكشف عن الالتزام قصيرة المدة أن تسمح للعديد من الصيادين للمطالبة بالجائزة مع توزيع أكثر عدالة للمكافآت، ومع ذلك، قد تؤدي هذه العملية إلى زمن انتقال إضافي في اكتشاف سوء السلوك. 8.2. شكر وتقدير. الشكر الجزيل لجميع المراجعين الذين ساعدوا في الحصول على هذا بشكل غامض شكل جيد. وعلى وجه الخصوص، بيتر تشابان، بيورن فاغنر، وكين كابلر، وروبرت هابرماير، وفيتاليك بوتيرين، وريتو ترينكلر، وجاك بيترسون. شكرا للجميع الأشخاص الذين ساهموا بالأفكار أو البدايات ولذلك يستحق ماريك كوتيويتز وإيرون بوكانان إشارة خاصة. والشكر للجميع على مساعدتهم على طول الطريق. كل الأخطاء هي بلدي. أجزاء من هذا العمل، بما في ذلك البحث الأولي في تم تمويل خوارزميات الإجماع جزئيًا من قبل البريطانيين الحكومة في إطار برنامج Innovate UK.