This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Description
Instead of immediately adding minimally-attested candidates to the parachain, we instead keep them in a "pending" state before adding it to the chain. The pending candidate will either be removed after MaxPending blocks or added to the parachain if all validators consider it available.
The way that we decide that something is available is by having each validator submit a bitfield at every block. Each bit in the bitfield corresponds to a particular parachain and should be 1 if and only if there is a pending parachain candidate and the validator has their availability piece for that candidate. The runtime keeps the most recently submitted bitfield for every validator and uses that to determine which pending candidates are available.