forked from celestiaorg/celestia-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(share/availability): persist random samples selection in availab…
…ility call (celestiaorg#3239) This PR introduces persistence for sample selection in random sampling. It addresses the issue by storing all failed samples into the datastore, allowing them to be reloaded on the next sampling attempt. This ensures that if the availability call fails fully or partially during the last sampling attempt, the sampling retry will use the same preselected random coordinates of shares. Provided solution is backwards compatible with previously stored empty byte slice on sampling success, allowing the change to be non-breaking for existing storage. Additionally, this PR includes basic refactoring to simplify concurrency logic in availability. It also ensures that errors returned by the call are aligned with the interface declaration in [availability.go](https://github.com/celestiaorg/celestia-node/blob/main/share/availability.go) enhancing code consistency and maintainability. Resolves celestiaorg#2780
- Loading branch information
Showing
5 changed files
with
182 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.