dat-ecosystem-archive / DEPs

Dat Enhancement Proposals. Contains all specs for the Dat protocol, including drafts. [ DEPRECATED - see https://github.com/hypercore-protocol/hypercore-proposals for similar functionality. More info on active projects and modules at https://dat-ecosystem.org/ ]
https://dat-ecosystem.github.io/DEPs
166 stars 17 forks source link

DEP-0007 - limited size header #52

Open martinheidegger opened 5 years ago

martinheidegger commented 5 years ago

When reading DEP-0007 I noticed that the dataStructureType can be any string. (of varint data-size: big) However: most file signatures are fixed in size, which makes me wonder if it wouldn't be a good idea to amend a limit of "how big the size can be" in order to prevent the downloading of a lot of data before checking if the data even fits the structure.

bnewbold commented 5 years ago

As a weakly held, somewhat subjective opinion, I think we should err on the side of "keeping it simple" by not specifying maximum lengths for every string and field at this level of the format/protocol (AKA, fields inside protobuf). We could add a statement like "use good judgement".

A couple unstructured thoughts: