Skip to content

feat: bootstrap and pubsub replicators#87

Merged
tabcat merged 69 commits intohldb:masterfrom
saul-jb:feat/replicators
Sep 18, 2023
Merged

feat: bootstrap and pubsub replicators#87
tabcat merged 69 commits intohldb:masterfrom
saul-jb:feat/replicators

Conversation

@saul-jb
Copy link
Copy Markdown
Contributor

@saul-jb saul-jb commented Jul 13, 2023

This PR adds two new replicators: pubsub and bootstrap.

The pubsub replicator is a simplified version of the live replicator, sending heads on a shared pubsub channel. The bootstrap replicator uses content routing to locate peers with the database block then requests heads from them.

These two replicators work in conjunction with each other, the pubsub replicator can only handle live updates whereas the bootstrap replicator is for obtaining heads from peers when it first starts.

Note that the bootstrap replicator relies on a DHT service to be added to the Libp2p config.

Both of these currently lack tests and may contain bugs.

@saul-jb
Copy link
Copy Markdown
Contributor Author

saul-jb commented Jul 13, 2023

The bootstrap replicator seems to not work if the in-memory blockstore is used but works fine with a FsBlockstore, not sure why... needs more investigation.

The bootstrap replicator gets stuck trying to fetch a block regardless of what blockstore is used.

@saul-jb saul-jb marked this pull request as ready for review July 17, 2023 04:51
@tabcat tabcat force-pushed the feat/replicators branch 2 times, most recently from 14cf8da to 52d8b17 Compare July 18, 2023 05:36
@tabcat tabcat force-pushed the feat/replicators branch from 52d8b17 to c8fc3fc Compare July 18, 2023 05:43
@tabcat
Copy link
Copy Markdown
Member

tabcat commented Sep 8, 2023

Going to merge this since all but chrome tests are passing and people have been wanting to use it.

These changes affected more than I anticipated so not going to merge this yet. Will get #103 merged first. Large parts of this may need to be rewritten, mostly tests, but will make sure it's easy.

@tabcat tabcat merged commit 40d4fdc into hldb:master Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants