Skip to content
  • Rahul Subramaniyam's avatar
    Modular block request handler (#1524) · b35b28ca
    Rahul Subramaniyam authored
    Submit the outstanding PRs from the old repos(these were already
    reviewed and approved before the repo rorg, but not yet submitted):
    Main PR: https://github.com/paritytech/substrate/pull/14014
    Companion PRs: https://github.com/paritytech/polkadot/pull/7134,
    https://github.com/paritytech/cumulus/pull/2489
    
    
    
    The changes in the PR:
    1. ChainSync currently calls into the block request handler directly.
    Instead, move the block request handler behind a trait. This allows new
    protocols to be plugged into ChainSync.
    2. BuildNetworkParams is changed so that custom relay protocol
    implementations can be (optionally) passed in during network creation
    time. If custom protocol is not specified, it defaults to the existing
    block handler
    3. BlockServer and BlockDownloader traits are introduced for the
    protocol implementation. The existing block handler has been changed to
    implement these traits
    4. Other changes:
    [X] Make TxHash serializable. This is needed for exchanging the
    serialized hash in the relay protocol messages
    [X] Clean up types no longer used(OpaqueBlockRequest,
    OpaqueBlockResponse)
    
    ---------
    
    Co-authored-by: default avatarDmitry Markin <[email protected]>
    Co-authored-by: command-bot <>
    b35b28ca