-
Notifications
You must be signed in to change notification settings - Fork 146
fetch collation #4711
Description
Description
-
Retrieves the collation from network
-
The collator validator-side subsystem uses a field called
collation_requeststo receive responses from dispatch requests -
The function
request_collationcreates the request and a return channel, the request is sent to network-bridge and the return channel keeps in thecollation_requestsas well as a cancellation token so at any time we can cancel/shutdown the ongoing request. -
The collator validator-side has a field called
collation_fetch_timeoutsthat is a unordered future (channel) that is populated when a new request collation is sent and will trigger after1 second(MAX_UNSHARED_DOWNLOAD_TIME) to cancel the related ongoing request. -
It supports versioned requests depending on the peer's version we are requesting.
-
Supports cancelation (through
context.Context) -
Make sure to start the timeout based on
MAX_UNSHARED_DOWNLOAD_TIME -
Supports
request_v2::CollationFetchingRequest({ relay_parent, para_id }) -
Supports
request_v1::CollationFetchingRequest({ relay_parent, para_id, candidate_hash })
Approach
Using the same struct that is used by availability-distribution with NewOutgoingRequest, just need to forward the request.Result channel to the subsytem main loop (maybe using a new goroutine)
| request := networkbridgemessages.NewOutgoingRequest( |
Links
Metadata
Metadata
Assignees
Labels
Type
Projects
Status