Implement Repo V3
DavidBuchanan314 opened this issue · 1 comments
DavidBuchanan314 commented
https://atproto.com/specs/repository#repo-data-structure-v3
- Add
rev
field - Add
since
field -
Drop(EDIT: turns out the BGS does not like this!) (EDIT 2: The spec is being updated, the field is now mandatory but nullable)prev
field entirely (no backwards compat here!) - Tangentially related: correct this variable name (it should say micros)
Line 25 in 78ce69e
Edit: None of the stuff below here was actually related to V3. I'll leave it here for reference, though.
- Start deleting "stale" blocks from sqlite, the moment they're no longer referenced (i.e. don't bother trying to keep history)
- Stop bothering to store old commits, only keep the most recent one
- Add firehose history cursoring (not strictly related to V3 but ought to be an easy change)
Stretch goals (requires general refactoring - might move these to their own issue):
- Stop holding the whole MST in-memory, use sqlite with LRU cache
- Unify/deduplicate code in repo
create_record
anddelete_record
methods - Add a proper
put_record
codepath - Implement applyWrites
- Switch to using did:web? It's less centralised than did:plc and ought to be easier to make it Just Work
DavidBuchanan314 commented
Milestone: we have enough implemented to resume federation with the sandbox!
tbh the rest of the stuff I listed should probably be moved to a new issue