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

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

Closed
dirkmc opened this issue Mar 8, 2021 · 0 comments · Fixed by #157
Closed

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

dirkmc opened this issue Mar 8, 2021 · 0 comments · Fixed by #157
Labels
x/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs

Comments

@dirkmc
Copy link
Contributor

dirkmc commented Mar 8, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant