mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
* `computeIndicesByRootByPeer`: Add 1 slack epoch regarding peer head slot. * `FetchDataColumnSidecars`: Switch mode. Before this commit, this function returned on error as long as at least ONE requested sidecar was not retrieved. Now, this function retrieves what it can (best effort mode) and returns an additional value which is the map of missing sidecars after running this function. It is now the role of the caller to check this extra returned value and decide what to do in case some requested sidecars are still missing. * `fetchOriginDataColumnSidecars`: Optimize Before this commit, when running `fetchOriginDataColumnSidecars`, all the missing sidecars had to been retrieved in a single shot for the sidecars to be considered as available. The issue was, if for example `sync.FetchDataColumnSidecars` returned all but one sidecar, the returned sidecars were NOT saved, and on the next iteration, all the previously fetched sidecars had to be requested again (from peers.) After this commit, we greedily save all fetched sidecars, solving this issue. * Initial sync: Do not fetch data column sidecars before the retention period. * Implement perfect peerdas syncing. * Add changelog. * Fix James' comment. * Fix James' comment. * Fix James' comment. * Fix James' comment. * Fix James' comment. * Fix James' comment. * Fix James' comment. * Update beacon-chain/sync/data_column_sidecars.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> * Update beacon-chain/sync/data_column_sidecars.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> * Update beacon-chain/sync/data_column_sidecars.go Co-authored-by: Potuz <potuz@prysmaticlabs.com> * Update after Potuz's comment. * Fix Potuz's commit. * Fix James' comment. --------- Co-authored-by: Potuz <potuz@prysmaticlabs.com>
671 B
671 B
Changed
- Filtering peers for data column subnets: Added a one-epoch slack to the peer’s head slot view.
- Fetching data column sidecars: If not all requested sidecars are available for a given root, return the successfully retrieved ones along with a map indicating which could not be fetched.
- Fetching origin data column sidecars: If only some sidecars are fetched, save the retrieved ones and retry fetching the missing ones on the next attempt.
Added
- Implemented syncing in a disjoint network with respect to data column sidecars subscribed by peers.
Fixed
- Initial sync: Do not request data column sidecars for blocks before the retention period.