Storj protocol (from the customer's point of view)

There is not a formal description of the protocol, at this point, unless you count the protocol definitions in the .proto files. And no, the protocol is not 100% stable; there may still be changes made to it when necessary, but they will be backwards compatible wherever possible.

To answer the broader question, though, it would not be trivial to write an uplink in pure C. The uplink has to do a lot more work than a typical S3 client; it is responsible for performing the encryption of the content and path, splitting segments into pieces via erasure encoding, and talking directly to the selected nodes to upload pieces to them while managing the restricted bandwidth allocation from the white paper. (Also, the reverse of each of those for downloads.)

Maybe the trickiest part would be the erasure encoding; the C library would need to produce output byte-for-byte equivalent to the output of the vivint/infectious library.

2 Likes