ChainSafe / ChainSafe/gossamer

Availability recovery: Implement FetchSystematicChunks recovery strategy

Open
#4,300 0 comments 0 reactions 0 assignees View on GitHub
A-design S-subsystems-availability
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

## Issue summary
This should be the last to implement strategy ( it looks to be pretty much as effective as FullFetch but less possible, check [design doc](https://github.com/ChainSafe/gossamer/blob/development/docs/docs/design/availability-recovery.md) for details).

This strategy should be tried as a 2nd option after FullFetch and before FetchChunk strategies.

_Very similar to FetchChunks below but requests from the validators that hold the systematic chunks, so that we avoid reed-solomon reconstruction.
Only possible if node_features::FeatureIndex::AvailabilityChunkMapping is enabled and the core_index is supplied (currently only for recoveries triggered by approval voting).
More info in RFC-47._
We can only attempt systematic recovery if we received the core index of the candidate and chunk mapping is enabled.
`availability_chunk_mapping_is_enabled` Tells if the chunk mapping feature is enabled. Enables the implementation of
[RFC-47](https://github.com/polkadot-fellows/RFCs/blob/main/text/0047-assignment-of-availability-chunks.md).
Must not be enabled unless all validators and collators have stopped using `req_chunk`
protocol version 1. If it is enabled, validators can start systematic chunk recovery.

We would need to implement `availability_chunk_indices` method that defines indices.

**Additional related information:**
- https://github.com/paritytech/polkadot-sdk/issues/598
- https://github.com/polkadot-fellows/RFCs/blob/main/text/0047-assignment-of-availability-chunks.md
## Other information and links
- [Implementers' Guide](https://paritytech.github.io/polkadot-sdk/book/node/availability/availability-recovery.html#fetchsystematicchunks)
- [RFC-47](https://github.com/polkadot-fellows/RFCs/blob/main/text/0047-assignment-of-availability-chunks.md)
- [example code](https://github.com/paritytech/polkadot-sdk/blob/6f96f7219ac3414db847c6fbade7e0841f9088de/polkadot/node/network/availability-recovery/src/task/strategy/systematic.rs#L56)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.