devarno
read
back to downlink

$ downlink · build

the atmosphere, part 2: inside the repo

i pulled my whole repo off my own server and proved, offline, that every byte was signed by my key.

Devarno·December 6, 2026·7min

atproto · bluesky · protocols · devlog

§ sections

  • export it
  • read one commit
  • walk the tree
  • check it without my server
  • what this does and doesn't prove

part 1 ended on a claim: anyone holding a commit and my did document can check the signature without asking my server whether it's telling the truth. this week i tested it. i pulled my whole repo off my own server, closed the connection, and tried to prove from the raw bytes alone that the history is mine.

$ downlink · the tapestry

panel 2 of 5. every new page i write is sealed together with all the pages before it. change one word anywhere and the seal breaks.

  1. devarno.com

    1 · the map

  2. 2 · this part

  3. ???

    3 · not yet woven

  4. 4 · not yet woven

  5. app.bskysh.tangled

    5 · not yet woven

export it

one request returns the entire repo as a single file:

$ xrpc

GET pds.devarno.com/xrpc/com.atproto.sync.getRepo

did = did:web:devarno.com

content-type
application/vnd.ipld.car
bytes
11402
time
0.19s

published response · run it to compare with what the server says now

the file is a car: a content-addressed archive. a short header names one root, then blocks follow, each tagged with the hash of its own bytes. there are 17 blocks in mine. the first thing my checker does is rehash every one and compare it to its tag. all 17 match, so nothing in the file was altered after the server hashed it, and the file is the whole account: 9 posts, one profile, one follow, one chat setting, one tangled profile.

eleven kilobytes is the cost of carrying my whole presence on the network around. a backup is one curl.

read one commit

the header's root points at the commit. decoded, it has six fields:

did did:web:devarno.com version 3 rev 3mwq6576bv22j prev null data bafyreifrgcthpkiivmdjw3h7ag7pu4wqarzhrj4rg6msjzhf2vcmdsjv3q sig 64 bytes

did says whose repo this is. rev is a timestamp-shaped counter that only moves forward; in part 1 it read 3mour3bhkkk2p, and every post since has pushed it on. data is the hash of the root of a tree that holds every record. sig is a signature over the other five fields.

prev surprised me. it's empty. a version 3 commit doesn't point at the commit before it, so the repo isn't a chain i can walk backwards. each commit stands alone: a signed snapshot of everything, stamped with a rev.

walk the tree

data leads into a merkle search tree. mine is small enough to draw whole:

the merkle search tree inside the null0 repothe signed commit points at a root node holding three keys: the profile record, one post, and the tangled profile. between them hang two child nodes. the first holds eight posts. the second holds the follow and the chat declaration. the path to the profile record is the commit, then the root node, then the record.commit, signedroot node: 3 keysapp.bsky.actor.profile/selfnode: 8 postsapp.bsky.feed.post/3mwoimpsi6c2xnode: follow + chatdeclarationsh.tangled.actor.profile/self

three nodes, two levels, 13 records. the path to profile/self is two hops: commit, root node, record. the record's block decodes to a display name of null0.

what decides that the profile sits on the top level and eight posts sit one level down? not the order i wrote them. each key is hashed, and the number of leading zero pairs in that hash sets its layer. i computed it for all 13 keys: the three on the top level have one leading zero pair, the ten below have none. no exceptions.

that rule is the point. the shape of the tree comes from the keys alone, so two repos holding the same records build the same tree and the same root hash, whatever order the records arrived in. two copies of my account can be compared by one hash.

check it without my server

this is the part i care about. with the file on disk and the network off, the check needs one more thing: the public key, which part 1 found in my did document under #atproto:

publicKeyMultibase zQ3shMXqrJnBeMigS2nCw1KbM9avnEp1vUpgK3wiAaPqAFqbj

the zQ3s prefix marks a key. the checker takes the commit, drops sig, re-encodes the remaining five fields canonically, hashes them, and verifies the 64-byte signature against that key.

SIGNATURE VALID (0.012s)

then i flipped one bit in the last byte of the encoded commit and ran it again:

SIGNATURE INVALID

one bit is enough. and because the commit carries data, the hash of the tree root, which carries the hashes of every node and record under it, the one signature covers all 11 kilobytes. change a letter in any post and its block hash changes, the node above it changes, the root changes, and the signature no longer fits.

what this does and doesn't prove

it proves this: the holder of the key named in my did document signed a snapshot of exactly these 13 records, at rev 3mwq6576bv22j. a mirror, a relay or a stranger with a copy can check that without trusting .devarno.com, and can't edit a byte without being caught.

it doesn't prove four things.

  • that the snapshot is current. a server could hand you an older signed commit. the rev only helps if you remember a higher one.
  • what came before. with prev empty, deleted records leave no trace in the repo. history lives with whoever kept old copies.
  • who holds the key. the pds generated it and holds it. the signature proves the key signed, not that i pressed anything. on a server i run, that's the same thing. on someone else's, it isn't.
  • that the key is the right key. the check is only as good as the did document i fetched, and that document is a file on my domain. whoever controls devarno.com controls which key counts. part 3 is about that: two keys and a domain.
$ verifychecks run from your browser
whole repopds.devarno.com/xrpc/com.atproto.sync.getRepo?did=did:web:devarno.com
latest commitpds.devarno.com/xrpc/com.atproto.sync.getLatestCommit?did=did:web:devarno.com
signing keydevarno.com/.well-known/did.json

$ the atmosphere · part 2 of 5

  1. part 1the atmosphere, part 1: the map
  2. part 2you are here
  3. part 3 · two keys and a domainwhat does it cost to own the root of an identity?
  4. part 4 · who's listeningwho picks up what my server announces, and what do they check?
  5. part 5 · the second appwhat carries over when the same identity signs into an app that isn't bluesky?

part 3, two keys and a domain, is on its way. subscribe below and it lands in your inbox.

$ related field reports

  • the atmosphere, part 1: the map

    September 28, 2026read →
  • my automation factory: step inside

    March 1, 2026read →
  • the spec was already correct. then i watched the film.

    June 29, 2026read →
$ sharex ↗linkedin ↗hacker news ↗

downlink shows the off-duty hours across everything i build. the protocol work is logged at null0.blue/journal.

i don't post often. when i do, something happened.

$ what comes next

stratt.blue ↗devaqua.blue ↗tangled ↗