🚧 WIP 🚧
Generic Go implementation of CAR Mirror.
Will be used in kubo-car-mirror when complete.
Car Mirror is a synchronization protocol for directed acyclic graphs (DAGs) which uses Bloom filters to efficiently share information about a graph under synchronization between two parties. Car Mirror is written with IPFS and Kubo in mind, but go-car-mirror itself attempts to minimize dependencies on the existing Kubo codebase. The intent is that go-car-mirror should clearly express the Car Mirror specification in a way that is easily portable to other IPFS implementations.
core
package contains interfaces for Block and BlockStore which are generic for BlockId - BlockId may be any compatible type.
It also contains the SourceSession and SinkSession objects which are responsible for accessing the provided BlockStore objects,
queing blocks and status updates for delivery, and processing received blocks in order to generate status updates.filter
package contains an interface Filter
which can represents a bloom filter or a heterogenous collection of bloom filters.
Filter
is used to represent a set of Block Ids known to be present on the Sinkbatch
package adds additional functionality specific to a synchronous, batch based implementation of the protocol. In this
scenario, blocks from the source are grouped into batches to be sent to the sink. Once a batch is sent, no further blocks are sent
until the sink has responded with a status update.messages
package contains code for serializing lists of Blocks, Block Ids, and Filters into Block and Status messages. The
'Blocks' message should be binary compatible with the IPFS CAR file format (hence the name of the project)http
package contains a full implementation of the synchronous batch-based version of the protocol over HTTPipld
package contains implementations of the Block and BlockId interfaces which are compatible with Kubo's Node and CID respectivelyfixtures
package contains simple implementations of Block, BlockId, and BlockStore for use in unit testsmake build
make test
export GOLOG_LOG_LEVEL="go-car-mirror=debug"