Powered by Gemini
sg

Your trusted source for all things crypto.

Powered by Gemini
cryptopedia-trademark-logo
search

The Blockchain Architecture of Polkadot (DOT)

Here’s a detailed look under the hood at the technical components that could help Polkadot (DOT) achieve its ambitious vision for Web 3.0 functionality.

By Cryptopedia Staff

Updated October 5, 20235 min read

gemini-Polkadot (DOT)- Technical Architecture of a Web 3.0 Blockchain-100

Summary

Rather than seeking to compete with pre-existing blockchain systems like Ethereum and Bitcoin, Polkadot aims to provide an on-ramp for multiple blockchains to connect with each other. On a technical level, this goal is supported by the project’s main Relay Chain, which serves as a connector to different parachains (or individual blockchains) through a system of bridges. This article will cover Substrate, the next-generation blockchain and application-building framework developed by Polkadot and Parity Technologies. It will also discuss how Polkadot’s GRANDPA and BABE consensus algorithms work together to create a highly sophisticated consensus mechanism. The Polkadot blockchain network also ensures operational efficiency with a specialized node-nomination system that includes three distinct node types (validators, collators, and fishermen).

The Relay Chain and Its Relationship with Parachains and Bridges

Relay Chain: The Relay Chain is the main blockchain within the Polkadot network, and acts as the control center behind the entire Polkadot ecosystem. Its main goals are to provide cross-chain interoperability and communication to both internal (parachains) and external blockchains, as well as to maintain network security and the system's underlying consensus protocol. This is accomplished with the help of parachains and the network’s GRANDPA and BABE consensus methodologies.

The network’s validators stake DOT coins, Polkadot’s native cryptocurrency, to validate transactions on the Relay Chain. In the case of non-compliance with the consensus algorithm, some or all of the validator’s staked DOT is slashed. The Relay Chain is deliberately designed to have minimal functionality, in order to fulfill its goal of facilitating widespread network interoperability. For example, smart contracts are not supported via the Relay Chain; instead they are implemented through Substrate, Polkadot’s dedicated framework to expedite blockchain creation and development. The Relay Chain supports several transaction types that back the system’s network governance, conduct parachain auctions, and participate in Polkadot’s specialized Nominated Proof-of-Stake (NPoS) mechanism.

Parachains: Parachains are specialized sovereign blockchains — or even blockchain fragments (shards) — that connect to the Polkadot network, and typically yield extremely fast transaction times. To enable this speed, parachains utilize parallel processing and transactions are usually spread out across multiple parachains connected through Polkadot’s main Relay Chain.

Parachains can also host their own coins that are optimized for specific use cases, and can control their own governance. Parachains must pay to use the main Polkadot Relay chain via a pay-as-you-go structure, or by leasing a Relay Chain slot for continuous connectivity. New parachains are added to the system by bonding coins, while outdated and irrelevant parachains are eliminated by removing bonded coins. Bonded coins essentially work like a security deposit, where participating individual blockchains pay a fee and stake collateral in order to connect to Polkadot’s main Relay Chain.

Bridges: Bridges are used to help two (or more) separate blockchains communicate with each other. Polkadot bridges allow Polkadot shards to connect with the Ethereum and Bitcoin networks, as well as to parachain blockchain networks operating within the Polkadot ecosystem. Parachains attach to the Relay Chain through validator nodes that attach to the Relay Chain on one side and the parachain on the other. Collator nodes then assemble all the transactions, and a bridge is attached to the outside of each parachain (via the collator) to help connect to external blockchain networks.

Validators, Nominators, Collators, and Fishermen

The Polkadot blockchain network leverages a special Proof-of-Stake (PoS) subcategory called Nominated Proof of Stake (NPoS). NPoS selects sets of validators by allowing nominators to choose the best validators based on past performance. This system is designed so that nominators can vote on which validators are behaving in a non-malicious manner. The Polkadot ecosystem is made up of three different types of nodes, along with a node-nominator mechanism to help the Relay Chain maintain network consensus. Each type of node serves a different purpose and is designed to work in unison with the other types to preserve the integrity of the Relay Chain and the Polkadot blockchain network. The types of nodes that operate on the Polkadot network are validators, nominators, collators, fishermen.

Validators: Validators are the most powerful nodes within the Polkadot system. Their role is to maintain network consensus, as well as validate and produce new blocks on Polkadot’s Relay Chain. They validate and produce blocks for all parachains that pay to use the Polkadot network. Validators also help secure the network by staking their own DOT. Finally, validator nodes are also used to validate specialized proofs from collator nodes (receiving staking rewards in return).

Nominators: Nominators are mainly used to secure the Relay Chain by selecting trustworthy validators and staking DOT. Network participants nominate network validators by staking their DOT coins to incentivize validators to correctly produce blocks on the Relay Chain. In order for a DOT coin holder to stake through a validator node, DOT are bonded (or locked inside the validator). This process increases the overall security of the network and its algorithmic integrity. In turn, nominators receive a portion of validator node rewards. However, nominators are also susceptible to slashing (losing some of their DOT) should their selected validator nodes behave in a malicious manner.

Collators: Collators are full nodes that are present both on parachains and on the main Relay Chain. Their main purpose is to maintain parachains by collecting parachain transactions and producing state transition proofs (essentially machine-driven progress reports) for validators on the Relay Chain. Collators maintain both a full node for the Relay Chain and a full node for their specific parachain. These two full nodes enable collators to access all state transition information necessary to author new blocks and execute transactions — much like how miners provide value in a Proof-of-Work (PoW) system. Collators are used to collate and execute transactions to produce an unsealed block and deliver it, with a proof of transition, to validators responsible for proposing a parachain block. Collators are also used to send and receive messages from other parachains facilitating their communication through Cross-Chain Message Passing (XCMP).

Fishermen: Fishermen are also full nodes whose job is to monitor the Relay Chain and other parts of the protocol to pinpoint and report bad behavior to validator nodes. Rather than packaging state transitions and producing the next parachain blocks like collators, they monitor this process to make sure that no invalid transactions are included. Fishermen typically stake a small amount of DOT coins initially, but can be rewarded handsomely if they find bad behavior within the network. Unlike the network’s other nodes, fishermen act as “bounty hunters” to achieve their rewards, helping to recover lost or stolen funds.

The Polkadot Consensus Mechanism

The Polkadot crypto network maintains consensus through a complex process that uses two distinct yet complementary consensus algorithms. The Polkadot hybrid consensus model is enabled by two tools —  GRANDPA (GHOST-based Recursive Ancestor Deriving Prefix Agreement) helps achieve block finality, and BABE (Blind Assignment for Blockchain Extension) helps produce blocks. Polkadot’s hybrid consensus model gives the network the benefits of both probabilistic finality (the ability to continuously and accurately produce new blocks) and provable finality (the use of a universal agreement with no chance of reversion).

  • GRANDPA is the finality mechanism for the Polkadot Relay Chain. It functions as long as two-thirds of nodes are behaving correctly and can work with one-fifth of Byzantine nodes asynchronously (meaning that GRANDPA works correctly even if 1/5th of nodes are out of sync). When more than two-thirds of validators attest to a chain containing a specific block, all corresponding blocks leading up to that block are finalized simultaneously. GRANDPA reaches agreement on chains instead of specific blocks, significantly streamlining the transaction finalization process. Under optimal network conditions finalization is completed almost instantly. During poor network conditions GRANDPA is able to finalize theoretically millions of blocks simultaneously once the issues are resolved. 

  • BABE is designed to produce blocks on the Polkadot network. It achieves this by operating between the validator nodes to determine new block creation. BABE allocates block production slots to validators based on the amount of DOT they’ve staked, using a randomness cycle similar to the Ouroboros Praos consensus algorithm. Validators participate in a lottery for each slot to determine if they are the chosen block producer (multiple validators can be candidates for the same slot) or the slot can be empty, resulting in variable block time.

Substrate and Polkadot Application Development

Polkadot’s Relay Chain and all parachains that make up the Polkadot ecosystem use the Substrate blockchain development framework. Parity Technologies (which together with the Web3 Foundation designed Polkadot) created Substrate with help from Gavin Wood and the team’s experience building on Ethereum, Bitcoin, and other enterprise blockchain network systems. Polkadot’s state machine is compiled by using the ultra-performant WebAssembly (WASM) software development language, but the system also supports C, C++, C#, Typescript, and Rust.

Substrate is designed to come with all the features users need to build their own blockchain. Substrate’s pallets give developers the option to design their own custom development logic. Along with GRANDPA’s highly-scalable deterministic finality, Substrate’s light-client support, simple forkless upgrades, and state-of-the-art development tools give users what they need to build their blockchains in a simple, quick, and secure manner. A light-client is basically a light node that is interconnected with a full node — bonding full nodes together to allow the network to broadcast information more efficiently.

Substrate helps existing data and business logic integrate into a blockchain system with minimal cost and effort. A plethora of different blockchains (and blockchain-related systems) are already building their architecture with Substrate. These include industry leaders such as Chainlink, Ocean Protocol, Ren, Ankr Network, Ontology, Band Protocol, Injective Protocol, Ox, Acala Network, Moonbeam, Edgeware, Kusama, and Polkadot itself.

Cryptopedia does not guarantee the reliability of the Site content and shall not be held liable for any errors, omissions, or inaccuracies. The opinions and views expressed in any Cryptopedia article are solely those of the author(s) and do not reflect the opinions of Gemini or its management. The information provided on the Site is for informational purposes only, and it does not constitute an endorsement of any of the products and services discussed or investment, financial, or trading advice. A qualified professional should be consulted prior to making financial decisions. Please visit our Cryptopedia Site Policy to learn more.

Is this article helpful?

Yes

No

Topics in article
Up Next