From ce151e7117a3de8ed1766a4c4b560de975ed3df0 Mon Sep 17 00:00:00 2001 From: hannahhoward Date: Fri, 10 Apr 2020 18:07:16 -0700 Subject: [PATCH] feat(graphsync): add request update, pause response code --- block-layer/graphsync/graphsync.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/block-layer/graphsync/graphsync.md b/block-layer/graphsync/graphsync.md index 838349c0..0e040987 100644 --- a/block-layer/graphsync/graphsync.md +++ b/block-layer/graphsync/graphsync.md @@ -69,6 +69,7 @@ message GraphsyncMessage { map extensions = 4; // side channel information int32 priority = 5; // the priority (normalized). default to 1 bool cancel = 6; // whether this cancels a request + bool update = 7; // whether this is an update to an in progress request } message Response { @@ -99,6 +100,14 @@ Extensions help make Graphsync operate more efficiently, or provide a mechanism A list of well known extensions is found [here](./known_extensions.md) +### Updating requests + +A client may send an updated version of a request. + +An update contains ONLY extension data, which the responder can use to modify an in progress request. For example, if a responder supports the Do Not Send CIDs extension, it could choose to also accept an update to this list and ignore CIDs encountered later. It is not possible to modify the original root and selector of a request through this mechanism. If this is what is needed, you should cancel the request and send a new one. + +The update mechanism in conjunction with the paused response code can also be used to support incremental payment protocols. + ### Response Status Codes ``` @@ -108,6 +117,7 @@ A list of well known extensions is found [here](./known_extensions.md) 12 Not enough vespene gas ($) 13 Other Protocol - info in extra. 14 Partial Response w/ metadata, may include blocks +15 Request Paused, pending update, see extensions for info # success - terminal 20 Request Completed, full content.