referrerpolicy=no-referrer-when-downgrade

polkadot_sdk_docs/polkadot_sdk/
polkadot.rs

1//! # Polkadot
2//!
3//! Implementation of the Polkadot node/host in Rust.
4//!
5//! ## Learn More and Get Involved
6//!
7//! - [Polkadot Forum](https://forum.polkadot.network/)
8//! - [Polkadot Parachains](https://parachains.info/)
9//! - [Polkadot (multi-chain) Explorer: Subscan](https://subscan.io/)
10//! - Polkadot Fellowship
11//!     - [Manifesto](https://github.com/polkadot-fellows/manifesto/blob/main/manifesto.pdf)
12//!     - [Runtimes](https://github.com/polkadot-fellows/runtimes)
13//!     - [RFCs](https://github.com/polkadot-fellows/rfcs)
14//! 	- [Dashboard](https://polkadot-fellows.github.io/dashboard/)
15//! - [Polkadot Specs](http://spec.polkadot.network)
16//! - [The Polkadot Parachain Host Implementers' Guide](https://paritytech.github.io/polkadot-sdk/book/)
17//! - [Polkadot papers](https://polkadot.com/papers/)
18//! - [JAM Graypaper](https://graypaper.com)
19//!
20//! ## Alternative Node Implementations 🌈
21//!
22//! - [Smoldot](https://docs.rs/crate/smoldot-light/latest). Polkadot light node/client.
23//! - [KAGOME](https://github.com/qdrvm/kagome). C++ implementation of the Polkadot host.
24//! - [Gossamer](https://github.com/ChainSafe/gossamer). Golang implementation of the Polkadot host.
25//!
26//! ## Platform
27//!
28//! In this section, we examine what platform Polkadot exactly provides to developers.
29//!
30//! ### Polkadot White Paper
31//!
32//! The original vision of Polkadot (everything in the whitepaper, which was eventually called
33//! **Polkadot 1.0**) revolves around the following arguments:
34//!
35//! * Future is multi-chain, because we need different chains with different specialization to
36//!   achieve widespread goals.
37//! * In other words, no single chain is good enough to achieve all goals.
38//! * A multi-chain future will inadvertently suffer from fragmentation of economic security.
39//!   * This stake fragmentation will make communication over consensus system with varying security
40//!     levels inherently unsafe.
41//!
42//! Polkadot's answer to the above is:
43//!
44//! > The chains of the future must have a way to share their economic security, whilst maintaining
45//! > their execution and governance sovereignty. These chains are called "Parachains".
46//!
47//! * Shared Security: The idea of shared economic security sits at the core of Polkadot. Polkadot
48//!   enables different parachains to pool their economic security from Polkadot (i.e. "*Relay
49//!   Chain*").
50//! * (heterogenous) Sharded Execution: Yet, each parachain is free to have its own execution logic
51//!   (runtime), which also encompasses governance and sovereignty. Moreover, Polkadot ensures the
52//!   correct execution of all parachains, without having all of its validators re-execute all
53//!   parachain blocks. When seen from this perspective, Polkadot achieves the ability to verify
54//!   the validity of the block execution of multiple parachains using the same set of validators as
55//!   the Relay Chain. In practice, this means that the shards (parachains) share the same economic
56//!   security as the Relay Chain.
57//!   Learn about this process called [Approval Checking](https://polkadot.com/blog/polkadot-v1-0-sharding-and-economic-security#approval-checking-and-finality).
58//! * A framework to build blockchains: In order to materialize the ecosystem of parachains, an easy
59//!   blockchain framework must exist. This is [Substrate](crate::polkadot_sdk::substrate),
60//!   [FRAME](crate::polkadot_sdk::frame_runtime) and [Cumulus](crate::polkadot_sdk::cumulus).
61//! * A communication language between blockchains: In order for these blockchains to communicate,
62//!   they need a shared language. [XCM](crate::polkadot_sdk::xcm) is one such language, and the one
63//!   that is most endorsed in the Polkadot ecosystem.
64//!
65//! > Note that the interoperability promised by Polkadot is unparalleled in that any two parachains
66//! > connected to Polkadot have the same security and can have much better guarantees about the
67//! > security of the recipient of any message.
68//! > Bridges enable transaction and information flow between different consensus systems, crucial
69//! > for Polkadot's multi-chain architecture. However, they can become the network's most
70//! > vulnerable points. If a bridge's security measures are weaker than those of the connected
71//! > blockchains, it poses a significant risk. Attackers might exploit these weaknesses to launch
72//! > attacks such as theft or disruption of services.
73//!
74//! Polkadot delivers the above vision, alongside a flexible means for parachains to schedule
75//! themselves with the Relay Chain. To achieve this, Polkadot has been developed with an
76//! architecture similar to that of a computer. Polkadot Relay Chain has a number of "cores". Each
77//! core is (in simple terms) capable of progressing 1 parachain at a time. For example, a parachain
78//! can schedule itself on a single core for 5 relay chain blocks.
79//!
80//! Within the scope of Polkadot 1.x, two main scheduling ways have been considered:
81//!
82//! * Long term Parachains, obtained through locking a sum of DOT in an auction system.
83//! * On-demand Parachains, purchased through paying DOT to the relay-chain whenever needed.
84//!
85//! ### The Future
86//!
87//! After delivering Polkadot 1.x, the future of Polkadot as a protocol and platform is in the hands
88//! of the community and the fellowship. This is happening most notable through the RFC process.
89//! Some of the RFCs that do alter Polkadot as a platform and have already passed are as follows:
90//!
91//! - RFC#1: [Agile-coretime](https://github.com/polkadot-fellows/RFCs/blob/main/text/0001-agile-coretime.md):
92//!   Agile periodic-sale-based model for assigning Coretime on the Polkadot Ubiquitous Computer.
93//! - RFC#5: [Coretime-interface](https://github.com/polkadot-fellows/RFCs/blob/main/text/0005-coretime-interface.md):
94//!   Interface for manipulating the usage of cores on the Polkadot Ubiquitous Computer.
95//!
96//! Learn more about [Polkadot as a Computational Resource](https://wiki.polkadot.network/docs/polkadot-direction#polkadot-as-a-computational-resource).