1 of 29

STAR-lite

STreaming ARchive format

2 of 29

atproto sync

integrity checks over per-repository data updates (firehose, space repo ops)

​

​

repair via whole-repo exports

repo

app

incremental

(small)

repo

app

resync, backfill

(whole repo archive)

steady state

repair

3 of 29

atproto sync

integrity checks over per-repository data updates (firehose, space repo ops)

​

​

repair via whole-repo exports

repo

app

incremental

(small)

repo

app

resync, backfill

(whole repo archive)

steady state

repair

✨

✨

4 of 29

atproto sync

integrity checks over per-repository data updates (firehose, space repo ops)

​

​

repair via whole-repo exports

repo

app

incremental

(small)

repo

app

resync, backfill

(whole repo archive)

steady state

repair

✨

✨

✨

✨

✨

5 of 29

atproto sync

integrity checks over per-repository data updates (firehose, space repo ops)

​

​

repair via whole-repo exports, up to a few GiB

repo

app

resync, backfill

(whole repo archive)

repo

app

incremental

(small)

steady state

repair

✨

✨

✨

✨

✨

✨

✨

6 of 29

atproto CARs

Serialized Merkle Search Tree

​

​

  • Block CID verification footgun
  • Full archive buffering required
    • stream-ordering is tricky
  • Garbage blocks -> resource DOS
  • A lot of incompressible content

7 of 29

atproto CARs

Serialized Merkle Search Tree

​

redundant, MST is deterministic

  • Block CID verification footgun
  • Full archive buffering required
    • stream-ordering is tricky
  • Garbage blocks -> resource DOS
  • A lot of incompressible content
  • Streaming verification is possible

8 of 29

STAR-lite

9 of 29

STAR-lite

10 of 29

v0

public atproto repos

​

tall spec

11 of 29

v0

public atproto repos

​

tall spec

commit

12 of 29

v0

public atproto repos

​

tall spec

​

bleh

13 of 29

v0

public atproto repos

​

also algorithms

14 of 29

v0

public atproto repos only

​

with algorithms

verify MST

reconstruct

15 of 29

shipped.

Total exports: 32TiB

CAR: 3.8 billion records

STAR-lite: 330 billion?!

GET /xrpc/com.atproto.sync.getRepo

?did=did:plc:hdhoaan3xa3jiuq4fg4mefi

&accept=star-lite

16 of 29

atproto spaces???

space repo exports???????

17 of 29

space repos are

key-value set (not MST)

kv format -> kv format, easy?

18 of 29

“

The CAR header declares two roots, in order:

​

  1. the signed commit
  2. the index: a DRISL (DAG-CBOR) map from "{collection}/{rkey}" to the record's CID, with�keys in canonical DAG-CBOR map order (shortest key first, then bytewise)

​

record blocks MUST appear in that same order

sorting:

​

normal CBOR map

aaaaaaa ...

key001 key1

key1 key2

key10 ...

key2

zzz

​

19 of 29

“

The CAR header declares two roots, in order:

​

  • the signed commit
  • the index: a DRISL (DAG-CBOR) map from "{collection}/{rkey}" to the record's CID, with�keys in canonical DAG-CBOR map order (shortest key first, then bytewise)

​

record blocks MUST appear in that same order

sorting:

​

normal CBOR map

aaaaaaa ...

key001 key1

key1 key2

key10 key10

key2 key001

zzz ...

​

20 of 29

“

The CAR header declares two roots, in order:

​

  • the signed commit
  • the index: a DRISL (DAG-CBOR) map from "{collection}/{rkey}" to the record's CID, with�keys in canonical DAG-CBOR map order (shortest key first, then bytewise)

​

record blocks MUST appear in that same order

sorting:

​

normal CBOR map

aaaaaaa zzz

key001 key1

key1 key2

key10 key10

key2 key001

zzz aaaaaaa

​

21 of 29

v1

first attempt

​

reject cbor map sort order

​

still very atproto-coupled

22 of 29

v1

+ generic header meta

​

yay collaboration!

23 of 29

v1

+ generic header meta

+ plain bytes k/v

+ bigger size limits

+ ordered, not sorted

24 of 29

v1

STAR takes over the world??

25 of 29

v1

Application profiles

​

{

$type: “atproto-space-repo”,

...

}

26 of 29

v1

Application profiles

​

{

$type: “car-like”,

roots: [...]

}

as STAR: [ len CID len data ]

as CAR: [ len CID data ]

  • +0.89 bytes per block
  • +0.30% total overhead

(5.2M atproto repo block samples)

27 of 29

v1

Application profiles

​

{

$type: “scar”,

roots: [...]

}

STAR: [ len CIDpre len data ]

as CAR: [ len CID data ]

footgun-less CAR equiv?

28 of 29

questions

  • $type name authority?
  • content negotiation?
  • no separator/terminator ok?
  • define size limits or nah?

​

​

generally for DASL

  • bijou64??

29 of 29

next steps

  • Open DASL PR
  • Hot new stuff status?
  • Stabilizing with atproto spaces?
  • …
  • profit??

​

thanks especially: dholms, bnewbold, robin, volker, mosh, eve osman, nelind, sekoia.dev, a lot more people <3