pub const DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION: BlockNumber = 10;
Expand description

How many blocks after finalization an information about backed/included candidate should be kept.

We don’t want to remove scraped candidates on finalization because we want to be sure that disputes will conclude on abandoned forks. Removing the candidate on finalization creates a possibility for an attacker to avoid slashing. If a bad fork is abandoned too quickly because another better one gets finalized the entries for the bad fork will be pruned and we might never participate in a dispute for it.

This value should consider the timeout we allow for participation in approval-voting. In particular, the following condition should hold:

slot time * DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION > APPROVAL_EXECUTION_TIMEOUT

  • slot time