specs icon indicating copy to clipboard operation
specs copied to clipboard

graphsync spec - missing information about message framing

Open chafey opened this issue 5 years ago • 2 comments

go-graphsync writes a varint containing the message size of the protobuf message before writing the actual message on the libp2p stream. This is done so the receiver of the message knows how big the actual message is so it can fully read it before trying to parse it. This should be documented as part of the spec to make it complete

chafey avatar Sep 25 '20 02:09 chafey

Ouch, did you discover this when trying to implement it? Can you open a PR for it? The spec doesn't really have an owner as such on the team so if you're willing to take on touch-ups then that would be very helpful.

rvagg avatar Sep 25 '20 03:09 rvagg

Yes, discovered while implementing js-graphsync. I'll submit a PR for this, perhaps with other changes I discover during implementation. Just wanted a place to keep track of it until then

chafey avatar Sep 25 '20 09:09 chafey