Repository navigation
Closed
Labels
P:tech-debtPriority: Technical debt that needs to be paid off to enable us to move faster, reliablyconfigdependenciesDependency updatesstoragetrackingA complex issue broken down into sub-problems
Description
Partially addresses #1039.
Context
The work in this issue will make CometBFT use only pebbleDB as database, thus deprecating cometbft-db.
As CometBFT will use the same DB interface that cometbft-db uses, users can provide their own implementation of the interface that uses a different database under the hood. They will, therefore, have to change the config.DefaultDBProvider function to return their implementation instead of our default.
However, we will support and maintain only the pebbleDB implementation of the DB interface that CometBFT will use.
ToDo
- Create
internal/storagepkg to port theDBinterface and pebbleDB's implementation of it that are currently in cometbft-db. - Add tests for pebble functionalities.
-
DBinteface. Merged with feat(storage): Add unit tests for pebble implementation ofDBinterface. #4515 -
Batchinterface. Merged with feat(storage): Add unit tests for pebble implementation ofBatchinterface. #4522 -
Iteratorinterface. Merged: feat(storage): Add unit tests for pebble implementation ofIteratorinterface. #4530
-
- Import
PrefixDBimplementation. Merged: feat(storage): AddPrefixDBto pkginternal/storage#4562 - Remove cometbft-db as a dependency. WIP: build(deps): CometBFT no longer imports
cometbft-db#4601 - Remove
DBBackendfield ofconfig.BaseConfigand from config options in toml. chore: removedb_backendconfig option and CLI argument #4915 - Remove cometbft-db from cometbft build process. Merged with build(deps): Remove cometbft-db from cometbft build. #4650
Reacted by Jacob Gadikian
Metadata
Metadata
Assignees
Labels
P:tech-debtPriority: Technical debt that needs to be paid off to enable us to move faster, reliablyconfigdependenciesDependency updatesstoragetrackingA complex issue broken down into sub-problems
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(storage): Add package `internal/storage` (#4511)
andynog commentedon Nov 19, 2024
Just a quick comment on the work related to this issue. I believe it's important to design abstractions that allow flexibility for users to choose their own database. This means we should avoid implementations that force the exclusive use of PebbleDB. Instead, we should support a structure where users can integrate their preferred database by implementing a custom provider.
The primary purpose of using a simple database like PebbleDB is to make testing and development straightforward. However, this simplicity should not restrict users from switching to another database if PebbleDB does not meet their specific needs. They should be able to develop and integrate their own database solution seamlessly.
andynog commentedon Nov 20, 2024
We should also at a task to replace the BadgerDB with PebbleDB in the tutorial
feat(storage): Add unit tests for pebble implementation of `DB` inter…
feat(storage): Add unit tests for pebble implementation of `Batch` in…
feat(storage): Add unit tests for pebble implementation of `Iterator`…
faddat commentedon Nov 27, 2024
Sounds very good
....using examples from earlier implementations like goleveldb
alesforz commentedon Nov 28, 2024
I think we will do this when doing the "Documentation updated" task of #1039 🙂
feat(storage): Add `PrefixDB` to pkg `internal/storage` (#4562)
build(deps): Remove cometbft-db from cometbft build. (#4650)
build(deps): CometBFT no longer imports `cometbft-db` (#4601)
feat(storage)!: remove `cometbft-db` (#4868)