You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, our pause mechanism in retrieval requires inspecting every block and telling graphsync whether you want to pause, and executing this synchronously. It is less than ideal to say the least. A better mechanism would be for the retrieval protocol to tell graphsync ahead of time when to pause. This becomes especially neccesary if we move to a mode where the payments might be happening in a different process -- and checking with them is an HTTP call (that we definitely would prefer not to make on each call)
Note that multiple hooks may create planned pauses so we may need to keep a sorted array of pauses.
Logic is after each block, check pause requests, if any are before the current pause point, call on OnPause for all that have passed, add the extensions to the response, and pause it.
The text was updated successfully, but these errors were encountered:
I mean it's considering the request "not done" -- this is one of the more bizarre aspects of the retrieval protocol, where the request is "stopped" pending the last payment, even though the other party has all their data and can easily walk away. Essentially it allows the retriever to send one last request for payment.
Goals
Right now, our pause mechanism in retrieval requires inspecting every block and telling graphsync whether you want to pause, and executing this synchronously. It is less than ideal to say the least. A better mechanism would be for the retrieval protocol to tell graphsync ahead of time when to pause. This becomes especially neccesary if we move to a mode where the payments might be happening in a different process -- and checking with them is an HTTP call (that we definitely would prefer not to make on each call)
Note that we could implement this entirely in go-data-transfer without these changes in Graphsync. see filecoin-project/go-data-transfer#297
That said, this seems like it'd make it easier.
For now, I see this working like as follows:
Add an action for the IncomingRequestHook:
Note that multiple hooks may create planned pauses so we may need to keep a sorted array of pauses.
Logic is after each block, check pause requests, if any are before the current pause point, call on OnPause for all that have passed, add the extensions to the response, and pause it.
The text was updated successfully, but these errors were encountered: