Skip to content

fix(drive): fix group action query target as tree in stateless execution #2608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 13, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use crate::error::Error;
use crate::fees::op::LowLevelDriveOperation;
use crate::util::grove_operations::DirectQueryType;
use crate::util::grove_operations::QueryTarget::QueryTargetValue;
use crate::util::grove_operations::QueryTarget::{QueryTargetTree, QueryTargetValue};

Check failure on line 6 in packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive) / Linting

unused import: `QueryTargetValue`

error: unused import: `QueryTargetValue` --> packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs:6:67 | 6 | use crate::util::grove_operations::QueryTarget::{QueryTargetTree, QueryTargetValue}; | ^^^^^^^^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]`

Check warning on line 6 in packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (drive-abci) / Linting

unused import: `QueryTargetValue`

warning: unused import: `QueryTargetValue` --> packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs:6:67 | 6 | use crate::util::grove_operations::QueryTarget::{QueryTargetTree, QueryTargetValue}; | ^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
use dpp::data_contract::group::GroupSumPower;
use dpp::data_contract::GroupContractPosition;
use dpp::identifier::Identifier;
Expand Down Expand Up @@ -111,7 +111,8 @@
let direct_query_type = if estimate_costs_only {
DirectQueryType::StatelessDirectQuery {
in_tree_type: TreeType::NormalTree,
query_target: QueryTargetValue(8),
// 33 because of 1 byte for epoch and 32 for owner id
query_target: QueryTargetTree(33, TreeType::SumTree),
}
} else {
DirectQueryType::StatefulDirectQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Drive {
)?)
}
_ => Err(Error::Drive(DriveError::CorruptedCodeExecution(
"can not query a non tree",
"can not query a non tree in grove_get_big_sum_tree_total_value",
))),
}?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Drive {
)?)
}
_ => Err(Error::Drive(DriveError::CorruptedCodeExecution(
"can not query a non tree",
"can not query a non tree in grove_get_optional_sum_tree_total_value",
))),
}?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Drive {
)?)
}
_ => Err(Error::Drive(DriveError::CorruptedCodeExecution(
"can not query a non tree",
"can not query a non tree in grove_get_sum_tree_total_value",
))),
}?;

Expand Down
Loading