-
Notifications
You must be signed in to change notification settings - Fork 26
Missing cbor tag encoding #33
Comments
Original spec suggestion: ipfs/specs#61 |
To my understanding of how things developed, once we figured out the The local resolver has the job of figuring out which are links, and it could use CBOR tags for that, but is there any benefit? If CBOR was length prefixed (so that we could seek), then it could make sense as the deserialization of some values would be faster, but since it is not, I don't see the value. On the |
I might accept the challenge, I like writing serialisers, especially fast ones ;) |
A big benefit to using a specific tag would be performance, as we wouldn't have to scan all keys anymore when decoding. In either case we need to update the spec, as it still reflects the situation where it is expected to use a specific tag. |
I believe we need to update the whole spec either way, it hasn't received any love AFAIK since August which was when CID came together and then September when IPLD Formats became a thing. |
FWIW, The Amazon ion implementation in Java looks much more complicated than the cbor implementation we are using. |
@whyrusleeping your tags in go work as you replace the whole object or just the CID value:
I believe it is option b), but I want to be sure. |
The implementation of this that I did, used tag
258
for encoding links{'/': mylink}
in cbor (ref:js-ipld-dag-cbor/src/cbor.js
Line 13 in 8f6c849
What happened to this?
cc @diasdavid @whyrusleeping @jbenet
The text was updated successfully, but these errors were encountered: