DASL — Data-Addressed Structures & Links — is a small set of simple, standard primitives for working with content-addressed, linked data. If dasl.ing

STAR: ordered key-value archive format #21

Closed bad-example.com
Closed opened by bad-example.com

Hello! I'd like to propose new work for DASL: the STAR (/STAR-lite) archive format.

I originally made STAR as a stricter, simpler, safer, more efficient alternative to CARs for atproto public repository exports. Its v0 now has several library implementations and has at least two production producers and half a dozen consumers in the Atmosphere, but is very atproto-coupled.

STAR is being considered as the standard format for atproto spaces repo exports. After iteration with @dholms.at and @bnewbold.net, STAR's spaces-compatible v1 is becoming a more general-purpose format for ordered key-value data, and I think, a potentially good fit with DASL.

Following the DASL governance steps for proposing new work:

What will be implemented #

A specification (in progress), reference implementations, test vectors.

Who wants it #

Data exports in atproto is one established use-case.

People have been motivated to request public archives in STAR-lite format from hubble: 260M STAR-lite archives served vs 6M CAR. Repositories compress to a bit under half the size compared to CARs, which translates directly into faster network backfill rate in many cases (this is not exactly apples-to-apples: STAR-lite omits the MST entirely since it's deterministic from the data and cheap to reconstruct). More on the pain it addresses here.

The atproto spaces protocol proposes an LtHash set as its canonical data integrity structure instead of a MST: flat key-value with no tree or DAG structure at all to benefit from CAR's CID indexing, fitting more naturally (and without the incompressible CID overhead) into something like STAR.

Fit with existing primitives #

STAR-lite builds on DRISL/DASL-CBOR, and uses varint-prefixed framing like DASL-CAR. Where DASL-CAR fits DAG-shaped data well, STAR-lite is a more natural fit for flat key-value data.

Confirm willingness to serve as an editor #

I confirm!

Other criteria not covered above #

Implementation: there is currently a v0 reference rust + a third-party Objective-C implementation. I will be adding v1 support to the rust library soon. I think there will be more implementations, especially if it gets adopted by atproto spaces.

Community Support: Existing growing uptake of the v0 format, possible standardized use in atproto-spaces, active evolution based on feedback.


Atmosphere post: https://bsky.app/profile/did:plc:lulmyldiq4sb2ikags5sfb25/post/3mwohvqxhpc2h

Upcoming CID Congress presentation at https://luma.com/8w8swmx2

Thanks a lot for submitting this. Frankly, it simply looks good — I don't have any concerns with adding this.

I've been working with STAR/STAR-lite quite a bit and I am enthusiastically in favor of it.

I thing STAR is a good addition to DASL. I think CID-removal has pros and cons (redundant integrity can be good), and I don't expect this to completely replace CAR files, but it is great for a lot of use-cases. I like the existence of a clear magic header, and that the metadata header object is separate from other data blocks and is extensible.

The name is good. I'd lean towards calling the DASL version just "STAR" (or "DASL-STAR" in long form), and drop the "-lite". And I guess rename any previous STAR variants "legacy STAR" or something like that.

To confirm, dholms and I both expect that STAR will be the space repo transport format, and for that to ship in the next couple weeks. I expect to do a basic golang implementation and to collaborate on test vectors (not sure if it will be a generic STAR implementation or spaces-specific).

I hope that we can have some wiggle room for back and forth on spec details in the next couple weeks, though I don't have any asks today. In other words I hope this can stay at "Hot New Stuff" maturity through October 2026.

That's really simple enough and flexible. I like the idea of the application profiles.

Given the broad support, I think STAR is ready to turn into a PR, with @bad-example.com as editor and status of Hot New Stuff. I expect we'll want to consider bumping to Stabilizing after ATProto Spaces gets some production uptake.

Separately, let's keep collecting specific use cases where CAR is still a better fit. If that list gets short enough over time, STAR could eventually become the archive default.

Sign up or Sign in to add to the discussion.