ipfs / go-graphsync

Initial Implementation Of GraphSync Wire Protocol
Other
100 stars 38 forks source link

Include block size in metadata #377

Open hannahhoward opened 2 years ago

hannahhoward commented 2 years ago

For metadata only requests, it may prove quite useful to add a BlockSize field to metadata, so we can factor raw bytes into decisions about how far to look ahead with fetching untrusted blocks.

rvagg commented 2 years ago

But we'd have to trust the peer to report the block size correctly, is that going to be a problem? I suppose we could check the size matches and abort requests if the peer reports anything wrong.