Skip to content

Commit dd6b359

Browse files
authored
Merge pull request ipld#258 from ipld/feat/graphsync-updates
Add request update, pause response code
2 parents 7d8b896 + 5693d4f commit dd6b359

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

block-layer/graphsync/graphsync.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ message GraphsyncMessage {
6969
map<string, bytes> extensions = 4; // side channel information
7070
int32 priority = 5; // the priority (normalized). default to 1
7171
bool cancel = 6; // whether this cancels a request
72+
bool update = 7; // whether this is an update to an in progress request
7273
}
7374
7475
message Response {
@@ -99,6 +100,14 @@ Extensions help make Graphsync operate more efficiently, or provide a mechanism
99100

100101
A list of well known extensions is found [here](./known_extensions.md)
101102

103+
### Updating requests
104+
105+
A client may send an updated version of a request.
106+
107+
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.
108+
109+
The update mechanism in conjunction with the paused response code can also be used to support incremental payment protocols.
110+
102111
### Response Status Codes
103112

104113
```
@@ -108,6 +117,7 @@ A list of well known extensions is found [here](./known_extensions.md)
108117
12 Not enough vespene gas ($)
109118
13 Other Protocol - info in extra.
110119
14 Partial Response w/ metadata, may include blocks
120+
15 Request Paused, pending update, see extensions for info
111121
112122
# success - terminal
113123
20 Request Completed, full content.

0 commit comments

Comments
 (0)