From f8c1a862fb2f5a4d001a9776ed5d9a2b486b1c80 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Tue, 14 Jan 2025 17:17:12 +0700 Subject: [PATCH 1/5] fix: fix sub tree prefix and go to version 2.2.1 --- costs/Cargo.toml | 2 +- grovedb-epoch-based-storage-flags/Cargo.toml | 4 ++-- grovedb-version/Cargo.toml | 2 +- grovedb/Cargo.toml | 18 +++++++++--------- grovedbg-types/Cargo.toml | 2 +- merk/Cargo.toml | 12 ++++++------ node-grove/Cargo.toml | 4 ++-- path/Cargo.toml | 2 +- storage/Cargo.toml | 8 ++++---- storage/src/rocksdb_storage/storage.rs | 3 +-- storage/src/storage.rs | 3 +-- visualize/Cargo.toml | 2 +- 12 files changed, 30 insertions(+), 32 deletions(-) diff --git a/costs/Cargo.toml b/costs/Cargo.toml index db064e08d..382404d69 100644 --- a/costs/Cargo.toml +++ b/costs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grovedb-costs" -version = "2.2.0" +version = "2.2.1" edition = "2021" license = "MIT" description = "Costs extension crate for GroveDB" diff --git a/grovedb-epoch-based-storage-flags/Cargo.toml b/grovedb-epoch-based-storage-flags/Cargo.toml index 01594792f..2e32ec2b2 100644 --- a/grovedb-epoch-based-storage-flags/Cargo.toml +++ b/grovedb-epoch-based-storage-flags/Cargo.toml @@ -2,13 +2,13 @@ name = "grovedb-epoch-based-storage-flags" authors = ["Samuel Westrich "] description = "Epoch based storage flags for GroveDB" -version = "2.2.0" +version = "2.2.1" edition = "2021" license = "MIT" repository = "https://github.com/dashpay/grovedb" [dependencies] -grovedb-costs = { version = "2.2.0", path = "../costs" } +grovedb-costs = { version = "2.2.1", path = "../costs" } hex = { version = "0.4.3" } integer-encoding = { version = "4.0.0" } diff --git a/grovedb-version/Cargo.toml b/grovedb-version/Cargo.toml index 0c523e1ca..5cbd2dbec 100644 --- a/grovedb-version/Cargo.toml +++ b/grovedb-version/Cargo.toml @@ -2,7 +2,7 @@ name = "grovedb-version" authors = ["Samuel Westrich "] description = "Versioning library for Platform" -version = "2.2.0" +version = "2.2.1" edition = "2021" license = "MIT" repository = "https://github.com/dashpay/grovedb" diff --git a/grovedb/Cargo.toml b/grovedb/Cargo.toml index e1368278f..f977d0f4a 100644 --- a/grovedb/Cargo.toml +++ b/grovedb/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "grovedb" description = "Fully featured database using balanced hierarchical authenticated data structures" -version = "2.2.0" +version = "2.2.1" authors = ["Samuel Westrich ", "Wisdom Ogwu "] edition = "2021" license = "MIT" @@ -11,13 +11,13 @@ readme = "../README.md" documentation = "https://docs.rs/grovedb" [dependencies] -grovedb-costs = { version = "2.2.0", path = "../costs" , optional = true } -grovedbg-types = { version = "2.2.0", path = "../grovedbg-types", optional = true } -grovedb-merk = { version = "2.2.0", path = "../merk", optional = true, default-features = false } -grovedb-path = { version = "2.2.0", path = "../path" } -grovedb-storage = { version = "2.2.0", path = "../storage", optional = true } -grovedb-version = { version = "2.2.0", path = "../grovedb-version" } -grovedb-visualize = { version = "2.2.0", path = "../visualize", optional = true } +grovedb-costs = { version = "2.2.1", path = "../costs" , optional = true } +grovedbg-types = { version = "2.2.1", path = "../grovedbg-types", optional = true } +grovedb-merk = { version = "2.2.1", path = "../merk", optional = true, default-features = false } +grovedb-path = { version = "2.2.1", path = "../path" } +grovedb-storage = { version = "2.2.1", path = "../storage", optional = true } +grovedb-version = { version = "2.2.1", path = "../grovedb-version" } +grovedb-visualize = { version = "2.2.1", path = "../visualize", optional = true } axum = { version = "=0.7.5", features = ["macros"], optional = true } bincode = { version = "2.0.0-rc.3" } @@ -36,7 +36,7 @@ zip-extensions = { version = "0.8.1", optional = true } serde = { version = "1.0.210", features = ["derive"], optional = true } [dev-dependencies] -grovedb-epoch-based-storage-flags = { version = "2.2.0", path = "../grovedb-epoch-based-storage-flags" } +grovedb-epoch-based-storage-flags = { version = "2.2.1", path = "../grovedb-epoch-based-storage-flags" } criterion = "0.5.1" hex = "0.4.3" diff --git a/grovedbg-types/Cargo.toml b/grovedbg-types/Cargo.toml index be14fd54a..7c5eb549d 100644 --- a/grovedbg-types/Cargo.toml +++ b/grovedbg-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grovedbg-types" -version = "2.2.0" +version = "2.2.1" edition = "2021" description = "Common type definitions for data exchange over GroveDBG protocol" authors = ["Evgeny Fomin "] diff --git a/merk/Cargo.toml b/merk/Cargo.toml index a720f1273..903c61d7b 100644 --- a/merk/Cargo.toml +++ b/merk/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "grovedb-merk" description = "Merkle key/value store adapted for GroveDB" -version = "2.2.0" +version = "2.2.1" authors = ["Samuel Westrich ", "Wisdom Ogwu ", "Matt Bell "] edition = "2021" license = "MIT" @@ -11,11 +11,11 @@ readme = "README.md" documentation = "https://docs.rs/grovedb-merk" [dependencies] -grovedb-costs = { version = "2.2.0" , path = "../costs" } -grovedb-path = { version = "2.2.0", path = "../path" } -grovedb-storage = { version = "2.2.0", path = "../storage", optional = true } -grovedb-version = { version = "2.2.0", path = "../grovedb-version" } -grovedb-visualize = { version = "2.2.0", path = "../visualize" } +grovedb-costs = { version = "2.2.1" , path = "../costs" } +grovedb-path = { version = "2.2.1", path = "../path" } +grovedb-storage = { version = "2.2.1", path = "../storage", optional = true } +grovedb-version = { version = "2.2.1", path = "../grovedb-version" } +grovedb-visualize = { version = "2.2.1", path = "../visualize" } bincode = { version = "2.0.0-rc.3" } hex = "0.4.3" diff --git a/node-grove/Cargo.toml b/node-grove/Cargo.toml index cc5624c3b..bd91146b7 100644 --- a/node-grove/Cargo.toml +++ b/node-grove/Cargo.toml @@ -10,8 +10,8 @@ exclude = ["index.node"] crate-type = ["cdylib"] [dependencies] -grovedb = { version = "2.2.0", path = "../grovedb", features = ["full", "estimated_costs"] } -grovedb-version = { version = "2.2.0", path = "../grovedb-version" } +grovedb = { version = "2.2.1", path = "../grovedb", features = ["full", "estimated_costs"] } +grovedb-version = { version = "2.2.1", path = "../grovedb-version" } [dependencies.neon] version = "0.10.1" diff --git a/path/Cargo.toml b/path/Cargo.toml index 1334da45e..f5f89be73 100644 --- a/path/Cargo.toml +++ b/path/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grovedb-path" -version = "2.2.0" +version = "2.2.1" edition = "2021" license = "MIT" description = "Path extension crate for GroveDB" diff --git a/storage/Cargo.toml b/storage/Cargo.toml index 683470dee..e2db3bb6b 100644 --- a/storage/Cargo.toml +++ b/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grovedb-storage" -version = "2.2.0" +version = "2.2.1" edition = "2021" license = "MIT" description = "Storage extension crate for GroveDB" @@ -9,9 +9,9 @@ documentation = "https://docs.rs/grovedb-storage" repository = "https://github.com/dashpay/grovedb" [dependencies] -grovedb-costs = { version = "2.2.0", path = "../costs" } -grovedb-path = { version = "2.2.0", path = "../path" } -grovedb-visualize = { version = "2.2.0", path = "../visualize" } +grovedb-costs = { version = "2.2.1", path = "../costs" } +grovedb-path = { version = "2.2.1", path = "../path" } +grovedb-visualize = { version = "2.2.1", path = "../visualize" } blake3 = { version = "1.5.1", optional = true } hex = "0.4.3" diff --git a/storage/src/rocksdb_storage/storage.rs b/storage/src/rocksdb_storage/storage.rs index 445106947..b92d36bc3 100644 --- a/storage/src/rocksdb_storage/storage.rs +++ b/storage/src/rocksdb_storage/storage.rs @@ -55,11 +55,10 @@ use crate::{ worst_case_costs::WorstKeyLength, Storage, StorageBatch, }; +use crate::storage::SubtreePrefix; const BLAKE_BLOCK_LEN: usize = 64; -pub type SubtreePrefix = [u8; blake3::OUT_LEN]; - fn blake_block_count(len: usize) -> usize { if len == 0 { 1 diff --git a/storage/src/storage.rs b/storage/src/storage.rs index 2795cfc2f..196507a6a 100644 --- a/storage/src/storage.rs +++ b/storage/src/storage.rs @@ -42,8 +42,7 @@ use grovedb_path::SubtreePath; use grovedb_visualize::visualize_to_vec; use crate::{worst_case_costs::WorstKeyLength, Error}; - -pub type SubtreePrefix = [u8; blake3::OUT_LEN]; +pub type SubtreePrefix = [u8; 32]; /// Top-level storage_cost abstraction. /// Should be able to hold storage_cost connection and to start transaction when diff --git a/visualize/Cargo.toml b/visualize/Cargo.toml index 603fad718..233341a25 100644 --- a/visualize/Cargo.toml +++ b/visualize/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "grovedb-visualize" -version = "2.2.0" +version = "2.2.1" edition = "2021" license = "MIT" description = "Debug prints extension crate for GroveDB" From 52a84f8fec8bf17e7eed5ba132c5cd0c63f6697c Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Tue, 14 Jan 2025 17:19:24 +0700 Subject: [PATCH 2/5] fix: fix sub tree prefix and go to version 2.2.1 --- storage/src/rocksdb_storage/storage.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/src/rocksdb_storage/storage.rs b/storage/src/rocksdb_storage/storage.rs index b92d36bc3..4dd29ca9b 100644 --- a/storage/src/rocksdb_storage/storage.rs +++ b/storage/src/rocksdb_storage/storage.rs @@ -51,11 +51,10 @@ use super::{ use crate::{ error, error::Error::{CostError, RocksDBError}, - storage::AbstractBatchOperation, + storage::{AbstractBatchOperation, SubtreePrefix}, worst_case_costs::WorstKeyLength, Storage, StorageBatch, }; -use crate::storage::SubtreePrefix; const BLAKE_BLOCK_LEN: usize = 64; From 3adef42e9491bda77867b42a089f0dc8f0e9a47f Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Tue, 14 Jan 2025 17:30:33 +0700 Subject: [PATCH 3/5] fix --- storage/src/rocksdb_storage/storage_context/batch.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/src/rocksdb_storage/storage_context/batch.rs b/storage/src/rocksdb_storage/storage_context/batch.rs index bcf583725..16f665630 100644 --- a/storage/src/rocksdb_storage/storage_context/batch.rs +++ b/storage/src/rocksdb_storage/storage_context/batch.rs @@ -7,7 +7,9 @@ use integer_encoding::VarInt; use rocksdb::{ColumnFamily, WriteBatchWithTransaction}; use super::make_prefixed_key; -use crate::{rocksdb_storage::storage::SubtreePrefix, Batch, StorageBatch}; +use crate::{Batch, StorageBatch}; + +pub use crate::rocksdb_storage::storage::SubtreePrefix; /// Wrapper to RocksDB batch. /// All calls go to RocksDB batch, but wrapper handles prefixes and column From f916e0beec317f87fd43b953b9e9d8ce7d70cc84 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Tue, 14 Jan 2025 17:30:40 +0700 Subject: [PATCH 4/5] fix --- storage/src/rocksdb_storage/storage_context/batch.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/src/rocksdb_storage/storage_context/batch.rs b/storage/src/rocksdb_storage/storage_context/batch.rs index 16f665630..11657feee 100644 --- a/storage/src/rocksdb_storage/storage_context/batch.rs +++ b/storage/src/rocksdb_storage/storage_context/batch.rs @@ -7,9 +7,8 @@ use integer_encoding::VarInt; use rocksdb::{ColumnFamily, WriteBatchWithTransaction}; use super::make_prefixed_key; -use crate::{Batch, StorageBatch}; - pub use crate::rocksdb_storage::storage::SubtreePrefix; +use crate::{Batch, StorageBatch}; /// Wrapper to RocksDB batch. /// All calls go to RocksDB batch, but wrapper handles prefixes and column From 114f1309754f51e883ed079fdf2cc4cf2bfe2aca Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Tue, 14 Jan 2025 17:45:35 +0700 Subject: [PATCH 5/5] fix --- grovedb/src/replication/state_sync_session.rs | 2 +- storage/src/rocksdb_storage/storage.rs | 3 ++- storage/src/rocksdb_storage/storage_context/batch.rs | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grovedb/src/replication/state_sync_session.rs b/grovedb/src/replication/state_sync_session.rs index 59d933165..1ce41c4b8 100644 --- a/grovedb/src/replication/state_sync_session.rs +++ b/grovedb/src/replication/state_sync_session.rs @@ -22,7 +22,7 @@ use super::{ }; use crate::{replication, Element, Error, GroveDb, Transaction}; -pub(crate) type SubtreePrefix = [u8; blake3::OUT_LEN]; +pub(crate) type SubtreePrefix = [u8; 32]; /// Struct governing the state synchronization of one subtree. struct SubtreeStateSyncInfo<'db> { diff --git a/storage/src/rocksdb_storage/storage.rs b/storage/src/rocksdb_storage/storage.rs index 4dd29ca9b..f43c05e2e 100644 --- a/storage/src/rocksdb_storage/storage.rs +++ b/storage/src/rocksdb_storage/storage.rs @@ -51,12 +51,13 @@ use super::{ use crate::{ error, error::Error::{CostError, RocksDBError}, - storage::{AbstractBatchOperation, SubtreePrefix}, + storage::AbstractBatchOperation, worst_case_costs::WorstKeyLength, Storage, StorageBatch, }; const BLAKE_BLOCK_LEN: usize = 64; +pub type SubtreePrefix = [u8; 32]; fn blake_block_count(len: usize) -> usize { if len == 0 { diff --git a/storage/src/rocksdb_storage/storage_context/batch.rs b/storage/src/rocksdb_storage/storage_context/batch.rs index 11657feee..bcf583725 100644 --- a/storage/src/rocksdb_storage/storage_context/batch.rs +++ b/storage/src/rocksdb_storage/storage_context/batch.rs @@ -7,8 +7,7 @@ use integer_encoding::VarInt; use rocksdb::{ColumnFamily, WriteBatchWithTransaction}; use super::make_prefixed_key; -pub use crate::rocksdb_storage::storage::SubtreePrefix; -use crate::{Batch, StorageBatch}; +use crate::{rocksdb_storage::storage::SubtreePrefix, Batch, StorageBatch}; /// Wrapper to RocksDB batch. /// All calls go to RocksDB batch, but wrapper handles prefixes and column