Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rocksdb backed Hypercore #182

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open

Support rocksdb backed Hypercore #182

wants to merge 45 commits into from

Conversation

chm-diederichs
Copy link
Contributor

No description provided.

chm-diederichs and others added 11 commits October 7, 2024 09:48
* make sure we close all opened cores

* snapshots should only have one open session

* crypto does not live on core anymore

* update store to pass preload promise

* update wakeup
* add simple append test

* add simple reorg test

* add memory based store session

* only memory view backed sessions are writable

* apply writes to a memory batch, which is flushed after

* get info from memory views during apply

* emit truncate events on reorg

* truncate events emit length

* getWriterByKey should use applySystem by default

* migrate system before making pre ff gets

* derive key from memview core

* reduce the number of appends in ff tests

* pass system to force reset and length to update batch

* pass apply system to version check

* snapshots should detach before hc state is mutated

* always close apply store

* close writable core session immediately

* bump BootRecord version to v1

* wakeup add is now async because of user data api

* hc API is now createUserDataStream

* set namespace on original store

* enable corestore based tests

* set corestore namespace in openPreSystem
* move wakeup extension onto base

* views are just hypercores

* kill pendingIndexedLength

* remove namespace session

* initialise indexedLength on open and on ff

* applyUpdate returns indexedLength

* use getSystemCore method

* flush indexes to lengths from indexed system

* undo computes checkout from indexed system info

* implement autocore catchup and migrate using moveTo

* explicitly pass lengths that were previously inferred

* flush returns early if nothing indexed

* add helper for indexed info

* review by @mafintosh

* view sessions should never be writable

* migrate event emitted from hypercore

* rename flushedLength to signedLength

* update tests
chm-diederichs and others added 4 commits December 13, 2024 16:14
* make flushing writable batches atomic

* flushing signed cores is atomic

* rename atomizer to atom

* userData is flushed atomically with updates

* add viewInfo method and refactor undoAll

* view migration is now atomic

* clearer append values in upgrade test

* applying fast forward is now atomic

* if bootstrap is writable thats always the local core

* defer closing used cores until closure until we have a good flush api

* remove dead code

* always teardown atom

* ensure main fork is used for signatures

* test that the fork is bumped on views

---------

Co-authored-by: Mathias Buus <[email protected]>
* do not infill on fast forward

* rename option to shallow
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