Closed tac0turtle closed 3 weeks ago
[!WARNING]
Review failed
The pull request is closed.
The update primarily modernizes dependencies and refines database interactions within the project. Key changes include upgrading golangci-lint
, transitioning from dbm
to corestore
for batch processing and iteration, and streamlining database initialization across tests. These alterations enhance code consistency, maintainability, and performance, reflecting a concerted effort to leverage updated libraries and improve overall project structure.
Files/Groups | Change Summary |
---|---|
Makefile |
Update golangci_version from v1.55.2 to v1.59.1 . |
basic_test.go |
Modify Iterate function call by removing the value parameter reference. |
batch.go , batch_test.go |
Update BatchWithFlusher to use corestore.Batch instead of dbm.Batch ; remove backend parameter. |
benchmarks/bench_test.go |
Import corestore , update parameter types, database initialization, error handling, and logging. |
benchmarks/cosmos-exim/main.go |
Replace tmdb with idbm for database operations. |
cmd/go.mod |
Add specific version for cosmossdk.io/core , remove indirect tag. |
cmd/iaviewer/main.go , wrapper.go |
Modify MutableTree instantiation, introduce Wrapper struct. |
db/README.md |
Update import formatting and adjust indentation within the main function. |
db/goleveldb.go |
Introduce GoLevelDB implementation for key-value store operations. |
db/memdb.go |
Update package import and function signatures to use corestore types. |
db/prefixdb.go |
Provide PrefixDB struct to namespace multiple corestore.KVStores . |
db/types.go |
Update imports and function return types to use corestore types. |
diff_test.go |
Modify callback function signature in TraverseStateChanges method. |
docs/proof/proof.md |
Update explanation of IAVL trees, range proofs, and proof generation. |
fast_iterator.go , iterator.go |
Change import statement and type usage to corestore . |
go.mod |
Add github.com/syndtr/goleveldb , update golang.org/x/crypto , remove various indirect dependencies. |
immutable_tree.go , mutable_tree.go |
Update return type of Iterator method from dbm.Iterator to corestore.Iterator . |
import.go , mock/db_mock.go |
Change import path and update return types to use corestore types. |
iterator_test.go |
Replace references to dbm.Iterator with corestore.Iterator in tests. |
migrate_test.go , tree_random_test.go , tree_test.go |
Replace dbm.NewDB with dbm.NewGoLevelDB and simplify database initialization. |
mockgen.sh |
Update package import path to cosmossdk.io/core . |
nodedb.go |
Replace dbm types with corestore types for batch writing and iterators. |
testutils_test.go |
Change assertIterator function signature to use corestore.Iterator . |
unsaved_fast_iterator.go |
Replace dependency on dbm with corestore for the fastIterator field. |
In the code where bytes do dance,
We’ve made a change, a bold advance.
Fromdbm
tocorestore
we glide,
Withgolangci-lint
by our side.
Trees and batches, now refined,
In this update, progress you'll find.
🌟 Happy coding, every line aligned! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
overall, lgtm! small concern of RocksDB users won't be compatible
what do you mean? since db is passed from above would it not work out of the box?
overall, lgtm! small concern of RocksDB users won't be compatible
what do you mean? since db is passed from above would it not work out of the box?
no, I'd like to add the small godoc or description of how to use wrapper
for pebbledb or rocksdb users
overall, lgtm! small concern of RocksDB users won't be compatible
what do you mean? since db is passed from above would it not work out of the box?
no, I'd like to add the small godoc or description of how to use
wrapper
for pebbledb or rocksdb users
in the cmd go.mod right?
Summary by CodeRabbit
New Features
GoLevelDB
implementation for key-value store operations.PrefixDB
struct for namespacingKVStores
.Bug Fixes
Format
method of theHexBytes
type.Refactor
corestore
instead ofdbm
for database operations.db.Batch
withstore.Batch
in relevant functions and structs.Documentation
Chores
golangci_version
in theMakefile
tov1.59.1
.go.mod
for improved compatibility and performance.