Skip to content
A distributed go-datastore implementation using Merkle-CRDTs.
Branch: master
Clone or download
Latest commit 12db4c1 May 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gx gx Mar 1, 2019
pb Initial implementation Feb 22, 2019
.gitignore Initial commit Feb 22, 2019
.travis.yml Test with go1.12 Apr 11, 2019
COPYRIGHT
LICENSE-APACHE Initial commit Feb 22, 2019
LICENSE-MIT Initial commit Feb 22, 2019
README.md More verbose logging. Improve documentation Apr 17, 2019
crdt.go Address review May 15, 2019
crdt_test.go Tests: fix mockDAGSyncer May 13, 2019
go.mod New libp2p May 21, 2019
go.sum New libp2p May 21, 2019
heads.go More verbose logging. Improve documentation Apr 17, 2019
ipld.go
package.json Update deps Mar 1, 2019
pubsub_broadcaster.go More verbose logging. Improve documentation Apr 17, 2019
set.go Add Put and Delete hooks Mar 29, 2019

README.md

go-ds-crdt

A distributed go-datastore implementation using Merkle-CRDTs.

go-ds-crdt is a key-value store implementation using Merkle CRDTs, as described in the paper by Héctor Sanjuán, Samuli Pöyhtäri and Pedro Teixeira. It satisfies the Datastore, ThreadSafeDatastore and Batching interfaces from go-datastore.

Internally it uses a delta-CRDT Add-Wins Observed-Removed set. The current value for a key is the one with highest priority. Priorities are defined as the height of the Merkle-CRDT node in which the key was introduced.

Usage

go-ds-crdt needs:

  • A user-provided, thread-safe, go-datastore implementation to be used as permanent storage. We recommend using the Badger implementation.
  • A user-defined Broadcaster component to broadcast and receive updates from a set of replicas. If your application uses libp2p, you can use libp2p PubSub and the provided PubsubBroadcaster.
  • A user-defined DAGSyncer component to publish and retrieve Merkle DAGs to the network. For example, you can use IPFS-Lite which casually satisfies this interface.

The permanent storage layout is optimized for KV stores with fast indexes and key-prefix support.

See https://godoc.org/github.com/ipfs/go-ds-crdt for more information.

Captain

This project is captained by @hsanjuan.

License

This library is dual-licensed under Apache 2.0 and MIT terms.

Copyright 2019. Protocol Labs, Inc.

You can’t perform that action at this time.