Post

Trying to remember why I put the cids in there in the first place and feeling like I wouldn’t have done that…

(my *guesses* at CID motivation were that you can seek/skip over blocks to find a specific one (validate it lazily), or build an index over contents (on disk?) without knowing in advance which CID type you want for each block)

Yeah, wanting to have an index was a big part of it. But at that point in time I was very very sensitive to any extra unnecessary bytes in places they didn't need to be, having the entire cid in there when you could just rehash things is a waste.

I think the main reason is that you can't reconstruct the cid properly without knowing the cid header: what hash function to use and what codec the block is. I remember wanting to just include the prefix in there, but that got confusing