Skip to content

fetch collation #4711

@EclesioMeloJunior

Description

@EclesioMeloJunior

Description

  • Retrieves the collation from network

  • The collator validator-side subsystem uses a field called collation_requests to receive responses from dispatch requests

  • The function request_collation creates the request and a return channel, the request is sent to network-bridge and the return channel keeps in the collation_requests as 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_timeouts that is a unordered future (channel) that is populated when a new request collation is sent and will trigger after 1 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions