Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Sync

The sync layer provides content-addressed data synchronization for the OBJECTS protocol. It handles blob transfer, metadata reconciliation, and sync discovery, enabling data to move seamlessly between devices and collaborators without central coordination.

Design Goals

GoalDescription
Content-AddressedAll data identified by cryptographic hash
IncrementalTransfer only what's missing, verify as you go
Offline-FirstNodes operate independently, sync when connected
Transport-AgnosticWorks over any OBJECTS transport connection
Eventual ConsistencyAll nodes converge to the same state

Sync Primitives

The protocol defines two complementary sync mechanisms:

MechanismPurpose
Blob SyncTransfer binary content by hash
Metadata SyncReconcile structured entries between nodes

Blob Sync handles raw data transfer with verification. Metadata Sync handles the index of what data exists and where it lives.

Blob Sync

Blobs are opaque sequences of bytes identified by their BLAKE3 hash. When you request a blob, you specify the expected hash. The content is verified incrementally during transfer.

Content Addressing

hash = BLAKE3(content)

Same content always produces the same 32-byte hash. This enables deduplication and integrity verification without trusting the source.

Verified Streaming

Blob transfer uses BLAKE3 verified streaming with BAO (BLAKE3 Authenticated Output).

ParameterValue
Chunk size1024 bytes
Chunk group size16 KiB (16 chunks)
Verification granularityPer chunk group

Content is verified incrementally as it arrives. Corrupted data is rejected immediately without waiting for the full transfer. Nodes can request byte ranges for partial or resumed transfers, making large file sync resilient to network interruptions.

Collections

A Collection is an ordered list of blobs treated as a unit. Use cases include:

  • Multi-file transfers (e.g., CAD assembly with parts)
  • Atomic updates (all-or-nothing sync)
  • Chunked large files

Metadata Sync

Metadata Sync reconciles structured entries between nodes using set reconciliation.

Entries

An Entry associates a key with a blob reference:

FieldDescription
keyApplication-defined key (path, ID, etc.)
authorEd25519 public key of entry creator
hashBLAKE3 hash reference to blob content
sizeSize of referenced blob in bytes
timestampUnix timestamp in microseconds when entry was created

Entries are signed by the author's private key. Multiple authors can write to the same key. Each author's entry is preserved independently.

Replicas

A Replica is a local collection of entries that syncs with peers. Each replica has a unique ID derived from a keypair:

CapabilityGrants
WriteCreate/update entries (requires private key)
ReadFetch and verify entries
SyncParticipate in reconciliation

Set Reconciliation

Nodes sync entries efficiently using range-based set reconciliation:

  1. Nodes exchange fingerprints of entry ranges
  2. Differing ranges are recursively subdivided
  3. Process continues until missing entries identified
  4. Only missing entries are transferred

Transfer is proportional to differences, not total size. Syncing one new entry from a million-entry replica is fast.

Sync Discovery

Sync Discovery enables nodes to find and initiate data synchronization.

Explicit Sync

Once connected via the transport layer, nodes request sync directly by specifying which replica or blob they want.

Tickets

A Ticket encodes everything needed to sync specific data. Tickets are designed for:

  • Copy/paste sharing
  • QR code encoding
  • URL embedding
Ticket TypeContainsGrants
Blob ticketHash + peer addressRead access to specific blob
Doc ticket (read)Replica ID + peerRead access to all entries
Doc ticket (write)Replica secret + peerWrite access to replica

Write tickets must be treated as secrets. Sharing one grants full write access to the replica.

Vault Discovery

User vaults enable private, decentralized project discovery. Unlike explicit tickets, vaults allow applications to discover all of a user's projects without centralized infrastructure.

Vault Access Pattern

Applications cannot derive vault namespace IDs themselves. They must request vault access from the user's wallet or keyring.

StepActorAction
1. AuthenticateUserSigns challenge with identity signer
2. Request AccessAppRequests vault ticket from wallet
3. Derive NamespaceWalletDerives namespace ID from signing key (HKDF-SHA256)
4. Issue TicketWalletCreates read-only DocTicket for vault
5. Sync VaultAppSyncs vault replica using ticket
6. Request KeyAppRequests decryption key from wallet
7. Decrypt CatalogAppDecrypts catalog entries to discover projects
8. Sync ProjectsAppSyncs each discovered project replica

Privacy Properties

AspectPrivacy Level
Vault IDPrivate (requires signing key)
Catalog keysPrivate (visible only after vault access)
Catalog valuesEncrypted (XChaCha20-Poly1305)
Project IDsPrivate (encrypted in catalog)

Without the identity signing key, vault namespace ID cannot be computed. This prevents enumeration of projects or correlation of vaults across identities.

Vault Availability

Vaults may be hosted by user devices, self-hosted nodes, foundation seed nodes, or third-party services. The protocol does not mandate hosting location. If vaults are unavailable, applications fall back to explicit project ticket sharing.

Consistency Model

The protocol provides eventual consistency: if no new updates are made, all nodes will eventually converge to the same state.

Conflict Handling

When multiple authors write to the same key:

  1. All entries are preserved (multi-value)
  2. Entries are distinguishable by author
  3. Applications implement resolution strategies
  4. Protocol does not automatically discard entries

Applications can implement last-write-wins, author-priority, merge logic, or manual resolution. The protocol preserves all entries to enable any strategy.

Security

Content Verification

All blob content is verified against its hash. Nodes reject content that doesn't match or entries with invalid signatures.

Capability Security

Write capability requires possession of the replica private key. Entries must be signed. Unsigned entries are never accepted.

Privacy

Content hashes reveal nothing about content. However, sync patterns are observable. Nodes can see who syncs what. Applications requiring confidentiality must encrypt at the data layer.