Polkadot [in progress]

elopio
Sun, 24 Nov 2019 03:44:31 +0000
General

This post is part of our Blockchains Study Group. Take a look there to learn more about related topics.

Polkadot is a heterogeneous multi-chain system with Nominated Proof of Stake (NPoS).

It has one relay chain and multiple parachains, parathreads, and bridges to other blockchains. The relay chain has high fees and a small set of contracts limited to the core functionality of the system. It secures the network by sealing the headers of the parachains into its blocks. It is also used for communication between parachains.

Parachains have their own consensus and state transitions rules. They are added via candle auction, where prospective parachains bid with refundable bonds, which are returned after the period they bid for ends. They can be suspended or removed before their lease period ends through referendum, in case of emergency.

Validators and nominators deposit their stake in the relay chain. At each block validators must be ready to seal a new block on a randomly selected parachain. Collators create these unsealed blocks with their validity proof and send them to validators. Validators not fulfilling their duties are punished by withholding their rewards and the reduction of their stake.

Malicious validators are punished by losing their entire bond. Fisher nodes who prove the invalid actions of validators get part of their stake as a reward.

There is one single sealing consensus process to seal the new blocks of the relay chain and the parachains at the same time.

Polkadot is planned to be released at the end of 2019. The DOT tokens have not been assigned to their holders. There is a smart contract in Ethereum registering the allocations of the DOT token. This register will be used in the Polkadot genesis for the initial assignment.

Currently there is a canary network called Kusama used to test the software in a real environment. It has its own token called KSM, instead of DOT, which is based on a snapshot of DOT allocations at the time of Kusama's genesis.

Category

(According to the criteria from the Classification of blockchains)

Chain architecture: Multi-blockchain.

It has one relay chain and multiple parachains.

Parachains are heterogeneous.

Parachains can be added and removed.

Parachains use the relay chain to seal their blocks.

Consensus mechanism: Nominated Proof of Stake.

It uses hybrid consensus: The BABE algorithm for producing blocks and the GRANDPA algorithm as finality gadget.

Validators produce new blocks.

Validators participate in a lottery in every slot to select the next block producer.

Validators continuously vote on the finality of blocks in the chain

Full nodes only need to validate unfinalized blocks, and can validate signatures of finalized blocks.

Validators currently require states of all blocks they are voting on finality of locally.

Newly produced blocks are only signed by the block producer.

The relay chain can execute a limited set of smart contracts. Parachains can execute smart contracts.

Actresses

Nominators - Bond stake and select a set of validators that stake will be assigned to via Phragmen's Method.

Validators - Produce and finalize relay chain blocks, may nominate themselves. Validate parachain block validity proofs for parachains they are assigned and include them in blocks they produce.

Collators - Act as a full node of a parachain and pass valid parachain blocks to validators.

Fisher nodes.

Council Members - Table half of the referenda for consideration of voters. Approve or deny treasury proposals.

Technical Committee Members - Consists of development teams as assigned by the Council. When in agreement, may fast-track votes to skip the voting timetable if additionally approved by council.

Voters - Create referenda, elect council members, bond referenda to table for a vote, vote on referends, create treasury proposals.

Consensus Protocol

Consensus is achieved during the execution of the block production procedure and the finality procedure.

Block Production with BABE

It is based on Ouroboros praos.

A block production epoch is a period with pre-known starting time and fixed length during which the set of block producers stays constant. Each epoch is divided into equal length periods known as block
production slots.

At the beginning of each epoch, the validator node runs an algorithm to find out in which slots it should produce a block.

At the end of an epoch, each block producer is able to compute the randomness seed it needs in order to participate in the block production lottery corresponding to two blocks in the future. For epoch 0 and 1, the randomness seed is provided in the genesis block.

[TODO]

Finality with GRANDPA

[TODO]

Lifecycle of a transaction

[TODO]

References and more learning resources

Polkadot wiki.

Polkadot Whitepaper (or the version annotated by @elopio).

Polkadot Runtime Environment Protocol Specification.

4 posts - 3 participants