Open rklaehn opened 1 year ago
This https://github.com/n0-computer/iroh/pull/1402 is at least a start...
What would be needed in addition would be
Idea for the generator:
it produces a directory containing a number of blobs, like this:
<hash1>.data
<hash2>.data
and a number of request/response pairs that can be satisfied with the data in the directory:
<testnr>.request
<testnr>.response
Basically: given the files *.data, when given <x>.request
, I have to produce exactly the bytes in <x>.response
. Then I have a compatible impl. There is zero leeway here - everything should be completely deterministic.
This generator should be able to produce arbitrarily much test data.
https://github.com/n0-computer/iroh/pull/1407 is the way the wire level tests would be written...
basically write a spec for iroh-bytes that would allow somebody to do a clean room impl of the protocol.
this should be a textual spec, a generator of examples, and a number of handcrafted/curated examples.