ChainSafe / ChainSafe/gossamer
Availability recovery: Implement fetch chunks
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Issue summary
The least performant strategy (though apparently the most used one according to [this](https://github.com/paritytech/polkadot-sdk/issues/598#issuecomment-1792007099)) but also the most comprehensive one. It's the only one that cannot fail under the byzantine threshold assumption,
so it's always added as the last one in the recovery_strategies queue. Performs parallel chunk requests to validators. When enough chunks were received, do the reconstruction.
In the worst case, all validators will be tried.
The most expensive part of this algorithm (the same source as above) is reed solomon reconstruct algorithm.
Implementation of this strategy requires for reed-solomon reconstruction algorithm that is available to call from the `lib/erasure` module.
In Parity implementation they assume that FetchChunks is always run as a last resort strategy, hence they do initially do some checks and remove all requested validators from list.
**Main loop**
- check amount of chunks recovered if >= threshold recover them.
- Some unavailability checks are pretty simple in logic, though there is no info on why they run.
- get_desired_request_count
- launch_parallel_chunk_requests
- wait_for_chunks
- call reed-solomon reconstruction
## Other information and links
- [Implementers' Guide](https://paritytech.github.io/polkadot-sdk/book/node/availability/availability-recovery.html#fetchchunks)
- [design doc](https://github.com/ChainSafe/gossamer/blob/development/docs/docs/design/availability-recovery.md)
- [example code](https://github.com/paritytech/polkadot-sdk/blob/6f96f7219ac3414db847c6fbade7e0841f9088de/polkadot/node/network/availability-recovery/src/task/strategy/chunks.rs#L54)
Contributor guide
Assessment
This issue has not been assessed yet.