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

Commit

Permalink
Merge pull request #258 from ipld/feat/graphsync-updates
Browse files Browse the repository at this point in the history
Add request update, pause response code
  • Loading branch information
hannahhoward authored Apr 22, 2020
2 parents 51eb2f6 + ce151e7 commit 9c1d14b
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 9c1d14b

Please sign in to comment.