ipld / specs

Content-addressed, authenticated, immutable data structures
Other
592 stars 108 forks source link

graphsync spec - missing information about message framing #303

Open chafey opened 3 years ago

chafey commented 3 years ago

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

rvagg commented 3 years ago

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.

chafey commented 3 years ago

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