Commit 4a67bed
[Feature] UUIDs, protocol versioning, v2 protocol w/ dag-cbor messaging (#332)
* feat(net): initial dag-cbor protocol support
also added first roundtrip benchmark
* feat(requestid): use uuids for requestids
Ref: ipfs/go-graphsync#278
Closes: ipfs/go-graphsync#279
Closes: ipfs/go-graphsync#281
* fix(requestmanager): make collect test requests with uuids sortable
* fix(requestid): print requestids as string uuids in logs
* fix(requestid): use string as base type for RequestId
* chore(requestid): wrap requestid string in a struct
* feat(libp2p): add v1.0.0 network compatibility
* chore(net): resolve most cbor + uuid merge problems
* feat(net): to/from ipld bindnode types, more cbor protoc improvements
* feat(net): introduce 2.0.0 protocol for dag-cbor
* fix(net): more bindnode dag-cbor protocol fixes
Not quite working yet, still need some upstream fixes and no extensions work
has been attempted yet.
* chore(metadata): convert metadata to bindnode
* chore(net,extensions): wire up IPLD extensions, expose as Node instead of []byte
* Extensions now working with new dag-cbor network protocol
* dag-cbor network protocol still not default, most tests are still exercising
the existing v1 protocol
* Metadata now using bindnode instead of cbor-gen
* []byte for deferred extensions decoding is now replaced with datamodel.Node
everywhere. Internal extensions now using some form of go-ipld-prime
decode to convert them to local types (metadata using bindnode, others using
direct inspection).
* V1 protocol also using dag-cbor decode of extensions data and exporting the
bytes - this may be a breaking change for exising extensions - need to check
whether this should be done differently. Maybe a try-decode and if it fails
export a wrapped Bytes Node?
* fix(src): fix imports
* fix(mod): clean up go.mod
* fix(net): refactor message version format code to separate packages
* feat(net): activate v2 network as default
* fix(src): build error
* chore: remove GraphSyncMessage#Loggable
Ref: ipfs/go-graphsync#332 (comment)
* chore: remove intermediate v1.1 pb protocol message type
v1.1.0 was introduced to start the transition to UUID RequestIDs. That
change has since been combined with the switch to DAG-CBOR messaging format
for a v2.0.0 protocol. Thus, this interim v1.1.0 format is no longer needed
and has not been used at all in a released version of go-graphsync.
Fixes: filecoin-project/lightning-planning#14
* fix: clarify comments re dag-cbor extension data
As per dission in ipfs/go-graphsync#338, we are going
to be erroring on extension data that is not properly dag-cbor encoded from now
on
* feat: new LinkMetadata iface, integrate metadata into Response type (#342)
* feat(metadata): new LinkMetadata iface, integrate metadata into Response type
* LinkMetadata wrapper around existing metadata type to allow for easier
backward-compat upgrade path
* integrate metadata directly into GraphSyncResponse type, moving it from an
optional extension
* still deal with metadata as an extension for now—further work for v2 protocol
will move it into the core message schema
Ref: ipfs/go-graphsync#335
* feat(metadata): move metadata to core protocol, only use extension in v1 proto
* fix(metadata): bindnode expects Go enum strings to be at the type level
* fix(metadata): minor fixes, tidy up naming
* fix(metadata): make gofmt and staticcheck happy
* fix(metadata): docs and minor tweaks after review
Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
* fix: avoid double-encode for extension size estimation
Closes: filecoin-project/lightning-planning#15
* feat(requesttype): introduce RequestType enum to replace cancel&update bools (#352)
Closes: ipfs/go-graphsync#345
* fix(metadata): extend round-trip tests to byte representation (#350)
* feat!(messagev2): tweak dag-cbor message schema (#354)
* feat!(messagev2): tweak dag-cbor message schema
For:
1. Efficiency: compacting the noisy structures into tuples representations and
making top-level components of a message optional.
2. Migrations: providing a secondary mechanism to lean on for versioning if we
want a gentler upgrade path than libp2p protocol versioning.
Closes: ipfs/go-graphsync#351
* fix(messagev2): adjust schema per feedback
* feat(graphsync): unify req & resp Pause, Unpause & Cancel by RequestID (#355)
* feat(graphsync): unify req & resp Pause, Unpause & Cancel by RequestID
Closes: ipfs/go-graphsync#349
* fixup! feat(graphsync): unify req & resp Pause, Unpause & Cancel by RequestID
* fixup! feat(graphsync): unify req & resp Pause, Unpause & Cancel by RequestID
when using error type T, use *T with As, rather than **T
* fixup! feat(graphsync): unify req & resp Pause, Unpause & Cancel by RequestID
* fixup! feat(graphsync): unify req & resp Pause, Unpause & Cancel by RequestID
Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
* feat: SendUpdates() API to send only extension data to via existing request
* fix(responsemanager): send update while completing
If request has finished selector traversal but is still sending blocks,
I think it should be possible to send updates. As a side effect, this
fixes our race.
Logically, this makes sense, cause our external indicator that we're
done (completed response listener) has not been called.
* fix(requestmanager): revert change to pointer type
* Refactor async loading for simplicity and correctness (#356)
* feat(reconciledloader): first working version of reconciled loader
* feat(traversalrecorder): add better recorder for traversals
* feat(reconciledloader): pipe reconciled loader through code
style(lint): fix static checks
* Update requestmanager/reconciledloader/injest.go
Co-authored-by: Rod Vagg <rod@vagg.org>
* feat(reconciledloader): respond to PR comments
Co-authored-by: Rod Vagg <rod@vagg.org>
* fix(requestmanager): update test for rebase
Co-authored-by: Daniel Martí <mvdan@mvdan.cc>
Co-authored-by: hannahhoward <hannah@hannahhoward.net>1 parent 5e32397 commit 4a67bed
1 file changed
+16
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
389 | | - | |
| 388 | + | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
0 commit comments