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.

There's warnings like that peppered throughout the records api, I should probably start adding tiny readmes in those slices at this point 😅

Note that generic (old school) CAR libraries do have the excuse that supporting all IPFS CIDs is madness, but DASL CAR implementations, which is what applies in AT, really don't!

oop fixing that for atcute in a bit, thankfully managed to claw performance back elsewhere

I think this is legit to call out! STAR-lite is cool and solves a couple other paper cuts. but I think churning on low-level formats in the protocol spec itself probably isn't worth it? I do think the ecosystem can+should migrate away from older flexible IPLD libs to stricter DASL/atproto libs

yeah, if the reached-for libraries trend toward DASL (with actually-checked CID behaviour, which isn't technically required from the library itself in DASL) then hopefully the safety story gets better. i don't think the footgun will ever go away but maybe a kind of herd immunity works out

for public atproto this was really part 1 -- i think the streaming story is still bad, and that we need changes to DASL. (it doesn't actually say you're allowed to require a specific block order! it also vaguely hints that duplicate blocks could become disallowed! i worry about "happens to work")

oh i should reenable cid verification, i think i got stuck on a weird mix of @atproto libraries and having it on would somehow cause tsc to fail which is why i commented it out