This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to consensus-shipyard/ipc#287
Implements
KVStore
for RocksDB. Unfortunately I could not use the Forest RocksDB library any more, because even if I specified themulti-threaded-cf
feature which is required for.transaction()
, I had to create anOptimisticTransactionDB
, not aDB
, so I ended up copying a lot of the Forest code.The PR changes
App
to useKVStore
.In this instance, after so much work, it doesn't make a difference because we don't modify the app state concurrently, nor do we perform multiple steps during writes/reads. Still, it felt right to put the data into a different column family, and at least this way we can use the same abstraction elsewhere in the application, like for relayers. Another area is where it can help is supporting queries by maintaining a list of the past N state roots. If it's slow, we can always go back.
I will add tests in a follow up PR.