Polkadot [in progress]

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

1 Like

Heya, adding a few comments:

I guess technically this is possible, but there is an auction mechanism for parachains which is how parachain slots are intended to be distributed (https://github.com/paritytech/polkadot/blob/a99977f6be1abd64d891d1fe435f874991e4513d/runtime/src/slots.rs#L17, https://wiki.polkadot.network/docs/en/learn-auction)

This is not the case - there may be a bridge or some information from Kusama inserted into the Polkadot genesis block, but it’s certainly not the case that Polkadot will be based on a snapshot of Kusama. (this is not a betanet scenario like tezos, for example, Kusama will always* be a separate network to Polkadot)

*anything can change under governance.

Full nodes are only required to validate all unfinalized blocks and grandpa proofs. Currently in order to vote on blocks for finality, a validator needs to have every state of those blocks available locally. (https://github.com/paritytech/substrate/pull/3835, this will no longer be the case after https://github.com/paritytech/substrate/issues/3639 is resolved)

At block production (BABE) blocks are only signed by the producer. Finality (GRANDPA) is achieved later when the majority of validators sign a chain that includes the block.

2 Likes

Hi @jam10o,

Welcome to the community :wave:.
Thanks for the feedback :pray:
You should now be able to edit the wiki post directly to make changes to correct/update.

2 Likes

Thanks a lot for the corrections and for adding more info to the post @jam10o. Welcome to our community! Feel free to share interesting things about polkadot.

2 Likes