Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parachain/availability-distribution): handle ChunkFetchingRequest #4487

Open
1 task
Tracked by #3598
haikoschol opened this issue Jan 21, 2025 · 0 comments
Open
1 task
Tracked by #3598
Labels
C-simple Minor changes changes, no additional research needed. Good first issue/review. S-subsystems-availability issues related to polkadot host availability subsystem functionality. T-implementation this issue/pr is a new feature or functionality.

Comments

@haikoschol
Copy link
Contributor

Issue summary

This is a network message received from other validators. The node responds with an erasure chunk from the local availability store.

Implementation details

When receiving a request, send availabilitystore.QueryChunk to the availability store via the overseer, passing the candidate hash and validator index from the request. Receive the response from the channel included in QueryChunk, construct a ChunkFetchingResponse from it and send it to the requesting peer.

Protocol versions v1 and v2 exist for chunk fetching. The ChunkFetchingRequest message is structurally identical in both versions. There is a subtle difference in the meaning of validator index between the two request messages, but it should not affect this issue. The ChunkFetchingResponse message in v1 omits the chunks index. In v2 it contains the full ErasureChunk object.
Our implementation only covers v1 so far. We should probably add the chunk index to this struct and only support v2 for the initial
implementation, analogous the approach in other subsystems.

The implementation depends on support for receiving requests of request/response network protocols being implemented. This is tracked in #4453.

Other information and links

Acceptance criteria

  • New code is 60% covered with unit tests
@haikoschol haikoschol added C-simple Minor changes changes, no additional research needed. Good first issue/review. S-subsystems-availability issues related to polkadot host availability subsystem functionality. T-implementation this issue/pr is a new feature or functionality. labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-simple Minor changes changes, no additional research needed. Good first issue/review. S-subsystems-availability issues related to polkadot host availability subsystem functionality. T-implementation this issue/pr is a new feature or functionality.
Projects
None yet
Development

No branches or pull requests

1 participant