Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/rs-dpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ strum = { version = "0.26", features = ["derive"] }
json-schema-compatibility-validator = { path = '../rs-json-schema-compatibility-validator', optional = true }
once_cell = "1.19.0"
tracing = { version = "0.1.41" }
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3", optional = true }
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc", optional = true }

[dev-dependencies]
tokio = { version = "1.40", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions packages/rs-drive-abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ derive_more = { version = "1.0", features = ["from", "deref", "deref_mut"] }
async-trait = "0.1.77"
console-subscriber = { version = "0.4", optional = true }
bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f", optional = true }
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3" }
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc" }
nonempty = "0.11"

[dev-dependencies]
Expand All @@ -103,7 +103,7 @@ dpp = { path = "../rs-dpp", default-features = false, features = [
drive = { path = "../rs-drive", features = ["fixtures-and-mocks"] }
drive-proof-verifier = { path = "../rs-drive-proof-verifier" }
strategy-tests = { path = "../strategy-tests" }
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3", features = ["client"] }
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc", features = ["client"] }
assert_matches = "1.5.0"
drive-abci = { path = ".", features = ["testing-config", "mocks"] }
bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f" }
Expand Down
12 changes: 6 additions & 6 deletions packages/rs-drive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ enum-map = { version = "2.0.3", optional = true }
intmap = { version = "3.0.1", features = ["serde"], optional = true }
chrono = { version = "0.4.35", optional = true }
itertools = { version = "0.13", optional = true }
grovedb = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3", optional = true, default-features = false }
grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3", optional = true }
grovedb-path = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3" }
grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3", optional = true }
grovedb-version = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3" }
grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3" }
grovedb = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc", optional = true, default-features = false }
grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc", optional = true }
grovedb-path = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc" }
grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc", optional = true }
grovedb-version = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc" }
grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc" }

[dev-dependencies]
criterion = "0.5"
Expand Down
31 changes: 31 additions & 0 deletions packages/rs-drive/src/fees/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,10 @@ impl LowLevelDriveOperation {
reference_path_type,
max_reference_hop,
flags,
// Drive only refreshes plain (counted) references; the
// non-counted/`ReferenceWithSumItem` variants added in grovedb
// are not used by platform.
false,
trust_refresh_reference,
))
}
Expand Down Expand Up @@ -691,6 +695,7 @@ impl LowLevelDriveOperationTreeTypeConverter for TreeType {
TreeType::ProvableCountSumTree => {
Element::empty_provable_count_sum_tree_with_flags(element_flags)
}
TreeType::ProvableSumTree => Element::empty_provable_sum_tree_with_flags(element_flags),
TreeType::CommitmentTree(chunk_power) => {
Element::empty_commitment_tree_with_flags(*chunk_power, element_flags)?
}
Expand Down Expand Up @@ -1547,6 +1552,32 @@ mod tests {
);
}

/// Covers the `TreeType::ProvableSumTree` arm of
/// `LowLevelDriveOperationTreeTypeConverter::empty_tree_operation_for_known_path_key`
/// added by the grovedb#661 bump. Drive doesn't currently construct
/// `ProvableSumTree` anywhere else, so without this test the new arm is
/// uncovered.
#[test]
fn empty_tree_operation_for_known_path_key_provable_sum_tree() {
use grovedb::batch::GroveOp;

let op = TreeType::ProvableSumTree
.empty_tree_operation_for_known_path_key(vec![b"root".to_vec()], b"k".to_vec(), None)
.expect("empty_tree_operation_for_known_path_key");

match op {
LowLevelDriveOperation::GroveOperation(grove_op) => match grove_op.op {
GroveOp::InsertOrReplace { element } => assert!(
matches!(element, Element::ProvableSumTree(..)),
"expected ProvableSumTree element, got: {:?}",
element
),
other => panic!("expected GroveOp::InsertOrReplace, got: {:?}", other),
},
other => panic!("expected GroveOperation, got: {:?}", other),
}
}

#[test]
fn ephemeral_cost_overflow_in_addition_chain() {
// Use values that individually do not overflow but whose sum does.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ impl Drive {
TreeType::CountSumTree => Element::empty_count_sum_tree(),
TreeType::ProvableCountTree => Element::empty_provable_count_tree(),
TreeType::ProvableCountSumTree => Element::empty_provable_count_sum_tree(),
TreeType::ProvableSumTree => Element::empty_provable_sum_tree(),
TreeType::CommitmentTree(chunk_power) => Element::empty_commitment_tree(chunk_power)?,
TreeType::MmrTree => Element::empty_mmr_tree(),
TreeType::BulkAppendTree(chunk_power) => Element::empty_bulk_append_tree(chunk_power)?,
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-platform-version/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "MIT"
thiserror = { version = "2.0.12" }
bincode = { version = "=2.0.1" }
versioned-feature-core = { git = "https://github.com/dashpay/versioned-feature-core", version = "1.0.0" }
grovedb-version = { git = "https://github.com/dashpay/grovedb", rev = "7a649386ac8a06a608a614385a2333e03cd931c3" }
grovedb-version = { git = "https://github.com/dashpay/grovedb", rev = "352c2f5504fba8795e8ed1056753bfd73c13b4cc" }

[features]
mock-versions = []
Loading
Loading