Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Add request update, pause response code #258

Merged
merged 1 commit into from
Apr 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions block-layer/graphsync/graphsync.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ message GraphsyncMessage {
map<string, bytes> 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 {
Expand Down Expand Up @@ -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

```
Expand All @@ -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.
Expand Down