~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/pds.js

An atproto PDS in JavaScript, for Cloudflare Workers and Node

0
0
main
17 lines · 893 B Raw History
---
'@pdsjs/core': patch
---

A commit's blocks are enough to check it. Sync 1.1 consumers (relays, tap,
jetstream, hydrant) undo a commit's ops on the new tree with only the blocks
it carries, and compare the root they reach with `prevData`. Putting back a
key that a delete removed splits the tree where the key goes, which reads
unchanged nodes beside it, and a commit carried only the nodes it created.
About one delete in five failed that check, and each consumer that failed it
fetched the whole repo with `getRepo`, all at once. On a Durable Object that
held the account for a minute or more, refusing every other request with
"Durable Object is overloaded".

`createCommit` now undoes its own ops (`mstInvert`, new in `@pdsjs/core/mst`)
and carries every existing node that reads, as well as the existing nodes
the ops read on the way. It warns when undoing does not reach `prevData`.