chadtmiller.com/pds.js
An atproto PDS in JavaScript, for Cloudflare Workers and Node
0
0
---
'@pdsjs/core': patch
---
The CBOR encoders write an integer of 2^32 or more with an 8-byte head. They
wrote nothing for it, which left a map key with no value: a record holding a
time in milliseconds was stored cut short, under a CID of the cut bytes.
knotless starts a ref's generation at such a time, so every new ref in a
space was stored so, and knotless-serve could not sync any space that held one.
An encoder now throws a TypeError for a value it cannot write: a number that
is not a safe integer, a BigInt, or `undefined` in an array. It wrote nothing
for those too.
The decoder reads 8-byte integers, and throws for bytes that end inside an
item, for floats and for reserved heads. It read a missing byte as 0, so a
record cut short decoded as one with plausible values.
A record already stored cut short stays so until it is written again.