I understand that the relay chain needs to store proofs for a certain amount of final blocks if a dispute occurs. But it's not clear to me what the implementation decisions were for explicitly writing certain things to Polkadot's runtime storage (such as the bit fields for availability and the onChainVotes from the para_inherent pallet).

Why is writing this to Polkadot's runtime storage really necessary if it's only needed per block? Assuming there's a good reason, why can't it work outside the runtime?

3 Answers 3


For bitfields: I am pretty sure that the only reason we store them is so we can accumulate them over several blocks until we reached availability/cores time out. While validators will re-send bitfields every block, this adds some more resilience in case of spurious network problems for example.

For the onChainVotes stuff: This is an implementation detail. It is strictly speaking not needed to store this on chain, but it is useful for disputes to have that information easily accessible by the node. Easily accessible means a versioned runtime API, hence the need to put it in storage.

For disputes it is crucial to have backing votes available for a candidate in case a dispute is raised at some point. We use the onChainVotes stuff in the dispute-coordinator to scrape votes from chain state at every block, as that is less troublesome than reading block data directly on the node side. Because we read the state at each block, there is no need to preserve votes in state for longer.

Hope that makes sense.

  • 1
    When you say: "..less troublesome than reading block data directly on the node side", by less troublesome do you mean that it's more costly in terms of latency to gossip this data to nodes rather than write it to storage? Jul 28, 2022 at 20:44
  • No, again just an implementation detail. Inspecting blocks from the node side is not straight forward/supported.
    – eskimor
    Oct 3, 2022 at 12:09

You can find additional resources on this topic here:


This article will answer the question in great details.

  • This is a great article, thank you tor sharing. It doesn’t state explicitly the implementation details for why storage is used in the way it is with the ‘paraInherent’ pallet though. Jul 28, 2022 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.