Files
pezkuwi-subxt/polkadot/roadmap/implementors-guide/src/node/availability/bitfield-signing.md
T
Sergei Shulepov 90a1ba1e90 Fix glossary link (snowballed) (#1297)
* Add mdbook-linkcheck

* Convert todo to not a link

* Fix external glossary link

* Fix various broken links

* Mass replace: s/.html/.md/

* My sloppy attempt to add a gitlab CI check
2020-06-20 14:23:28 -04:00

1.3 KiB

Bitfield Signing

Validators vote on the availability of a backed candidate by issuing signed bitfields, where each bit corresponds to a single candidate. These bitfields can be used to compactly determine which backed candidates are available or not based on a 2/3+ quorum.

Protocol

Output:

  • BitfieldDistribution::DistributeBitfield: distribute a locally signed bitfield
  • AvailabilityStore::QueryChunk(CandidateHash, validator_index, response_channel)

Functionality

Upon onset of a new relay-chain head with StartWork, launch bitfield signing job for the head. Stop the job on StopWork.

Bitfield Signing Job

Localized to a specific relay-parent r If not running as a validator, do nothing.

  • Determine our validator index i, the set of backed candidates pending availability in r, and which bit of the bitfield each corresponds to.
  • TODO: wait T time for availability distribution?

  • Start with an empty bitfield. For each bit in the bitfield, if there is a candidate pending availability, query the Availability Store for whether we have the availability chunk for our validator index.
  • For all chunks we have, set the corresponding bit in the bitfield.
  • Sign the bitfield and dispatch a BitfieldDistribution::DistributeBitfield message.