ChainSafe / ChainSafe/gossamer

Availability recovery: Prepare and launch recovery tasks

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

Description

## Issue summary
As part of the availability subsystem, we need to listen to overseer signals AvailabilityRecoveryMessage::RecoverAvailableData and start doing the recovery.
Note that this issue is not about implementing the strategy (here, we should consider it as a black box interface). Well, currently, we are only considering the `FetchChunks` strategy. That is the default one and does not need any additional checks. It should be operatable in 100% of cases, though less efficient.
We also should check the Availability store for cases where we have PoV locally and implement and check the LRU cache in cases where we recently performed a recovery.

### Implementation details
- [ ] Implement receiving of AvailabilityRecoveryMessage::RecoverAvailableData
- [ ] Implement LRU cache for data to be there
- [ ] Check availability store if data is there
- [ ] Spawn recovery process (although now it will be empty)
- [ ] Implement infrastructure (channels that will wait for recovery task response)
- [ ] Check RecoveryResult write to LRU and send it to `awaiters`.

## Other information and links
- [ Implementers' Guide ](https://paritytech.github.io/polkadot-sdk/book/node/availability/availability-recovery.html#recovery-logic)
- [launch_recovery_test example code](https://github.com/paritytech/polkadot-sdk/blob/6f96f7219ac3414db847c6fbade7e0841f9088de/polkadot/node/network/availability-recovery/src/lib.rs#L347)
- [design doc](https://github.com/ChainSafe/gossamer/blob/development/docs/docs/design/availability-recovery.md)

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.