Skip to content

v10: Attachments, Read-only shares, and Efficient Sync

Choose a tag to compare

@sgwilym sgwilym released this 02 Jan 12:32
· 85 commits to main since this release
3b1623c

v10.0.0 - Squirrel

🐿 Cute, fast, and likes to store things.

This is a major release which introduces attachments, share keypairs, efficient
sync
, and much much more. It is the biggest release of Earthstar ever.

As such, this version breaks compatibility with previous versions of Earthstar.

Here are the headline features:

  • Attachments. When a new document is written to a Replica you can attach
    arbitary binary data to it. This can be used for sharing large images, music,
    video, anything. There is no size limit.
  • Shares with granular read / write access. Share addresses are now the
    public key of a share keypair. The public key grants discovery and read
    access, the secret key grants write access to the replica.
  • Efficient sync. Syncing has been completely overhauled to use a new
    efficient reconclition mechanism powered by
    range-reconcile and
    push-pull-push-multicast trees.

The server APIs have also been moved into this repo.

In addition to new features, many APIs have been tweaked or changed entirely.
Please see the API documentation and the README to see what these new API
changes are like.

Server

  • Moved existing server APIs into the core module, available as Server.

Peer

  • Added Peer.onReplicasChange
  • Added Peer.onSyncersChange

Replica

  • Significantly improved the performance of querying documents.
  • Replicas now can create documents with attachments with Replica.set
  • Added Replica.ingestAttachment
  • Added Replica.getAttachment
  • Added Replica.addAttachments
  • Added Replica.wipeDocAtPath
  • Added Replica.getEventStream
  • Added Replica.getQueryStream
  • Added Replica.onEvent
  • Added MultiformatReplica, a Replica which is able to read, write, and sync
    documents of different formats.
  • Added FormatEs5, which supports share keypairs and attachments
  • Added ReplicaDriverWeb
  • Added ReplicaDriverFs
  • Added RelpicaDriverMemory
  • Added DocDriverSqliteFFI, which uses an FFI implemetation of Sqlite.
    Requires the --unstable flag on Deno.
  • Updated syncReplicaAndFsDir to use attachments for large files.
  • ReplicaCache now has attachment methods

Syncing

  • Added PartnerLocal, for syncing with local peers.

  • Added PartnerWebServer, for syncing with servers.

  • Added PartnerWebClient, for syncing with web clients.

  • Removed earthstar_streaming_rpc as a dependency.

Queries

  • Removed the contentLength options on QueryFilter.

  • Removed QueryFollower. Use Replica.getQueryStream instead.

  • queryByTemplateAsync and queryByGlobAsync have had the redundant async
    taken out of their name.

Cryptography

  • Added Crypto.generateShareKeypair
  • Added CryptoDriverSodium which uses a WASM version of libsodium for very
    fast operations. This is now the default driver on Deno.
  • Updated CryptoDriverNoble to use a new, faster, audited version.

Other

  • Added a new SharedSettings class for easily saving and retrieving an author
    keypair, shares and secrets, and favourite servers.
  • Added parseAuthorOrShareAddress
  • Added a new minified web bundle, available from
    https://cdn.earthstar-project.org/js/earthstar.web.v10.0.0.js
  • Added ARCHITECTURE.md
  • Added CONTRIBUTING.md
  • Added CODE_OF_CONDUCT.md