Revert loop prevention (#4472)

* Provisioner: Only include and sign bitfields on fresh leaves.
This commit is contained in:
Robert Klotzner
2021-12-13 12:20:49 +01:00
committed by GitHub
parent a94accb57e
commit bd5721fbf5
9 changed files with 59 additions and 47 deletions
@@ -9,7 +9,7 @@ In particular this subsystem is responsible for:
- Respond to network requests requesting availability data by querying the
[Availability Store](../utility/availability-store.md).
- Request chunks from backing validators to put them in the local `Availability
Store` whenever we find an occupied core on the chain,
Store` whenever we find an occupied core on any fresh leaf,
this is to ensure availability by at least 2/3+ of all validators, this
happens after a candidate is backed.
- Fetch `PoV` from validators, when requested via `FetchPoV` message from
@@ -22,7 +22,7 @@ Upon receipt of an `ActiveLeavesUpdate`, launch bitfield signing job for each `a
Localized to a specific relay-parent `r`
If not running as a validator, do nothing.
- Begin by waiting a fixed period of time so availability distribution has the chance to make candidates available.
- For each fresh leaf, begin by waiting a fixed period of time so availability distribution has the chance to make candidates available.
- Determine our validator index `i`, the set of backed candidates pending availability in `r`, and which bit of the bitfield each corresponds to.
- Start with an empty bitfield. For each bit in the bitfield, if there is a candidate pending availability, query the [Availability Store](../utility/availability-store.md) for whether we have the availability chunk for our validator index. The `OccupiedCore` struct contains the candidate hash so the full candidate does not need to be fetched from runtime.
- For all chunks we have, set the corresponding bit in the bitfield.
@@ -14,7 +14,7 @@ The block author can choose 0 or 1 backed parachain candidates per parachain; th
### Signed Bitfields
[Signed bitfields](../../types/availability.md#signed-availability-bitfield) are attestations from a particular validator about which candidates it believes are available.
[Signed bitfields](../../types/availability.md#signed-availability-bitfield) are attestations from a particular validator about which candidates it believes are available. Those will only be provided on fresh leaves.
### Misbehavior Reports