Skip to content

Push channel monitor doesn't detect when not all data received #153

@dirkmc

Description

@dirkmc

Background

A "push" data-transfer channel is a channel where the node that initiates the transfer sends (pushes) data to the remote peer. The steps are:

  1. Initiator sends a push request to Responder
  2. Responder opens a graphsync request to Initiator
  3. Initiator's graphsync handler sends the data

The push channel monitor watches the amount of data that is sent in a push data-transfer (a transfer where data is sent from the local node to the remote peer) and attempts to restart the transfer if the data rate falls too low.
It does so by listening for DataQueued and DataSent events; if there is data queued but not sent for some interval of time, it attempts to connect to the remote peer and send a restart request.

However in the situation where

  • all data has been sent by the local node
  • not all data has been received by the remote peer
    the push channel monitor doesn't notice (because it only knows about the local node's state).

Proposed Solution

Extend the push channel monitor:

  • When the initiator sends the initial request to open a push channel to the Responder:
    If the Responder doesn't respond within a timeout, fail the transfer
  • When the initiator has sent all data to the Responder:
    If the Responder doesn't send a "completed" response within a timeout, fail the transfer

Metadata

Metadata

Assignees

No one assigned

    Labels

    x/igniteIssues and PRs being tracked by Team Ignite at Protocol Labs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions