Skip to content
Closed
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
2 changes: 1 addition & 1 deletion packages/rs-drive-abci/src/query/document_query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl<C> Platform<C> {
) -> Result<QueryValidationResult<GetDocumentsResponse>, Error> {
let Some(version) = version else {
return Ok(QueryValidationResult::new_with_error(
QueryError::DecodingError("could not decode data contracts query".to_string()),
QueryError::DecodingError("could not decode documents query".to_string()),
));
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod v0;
pub mod v1;

use versioned_feature_core::{FeatureVersion, FeatureVersionBounds};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,339 @@
use crate::version::drive_abci_versions::drive_abci_query_versions::{
DriveAbciDocumentQueryHelperVersions, DriveAbciQueryAddressFundsVersions,
DriveAbciQueryDataContractVersions, DriveAbciQueryGroupVersions,
DriveAbciQueryIdentityVersions, DriveAbciQueryPrefundedSpecializedBalancesVersions,
DriveAbciQueryShieldedVersions, DriveAbciQuerySystemVersions, DriveAbciQueryTokenVersions,
DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions,
};
use versioned_feature_core::FeatureVersionBounds;

/// `DRIVE_ABCI_QUERY_VERSIONS_V0` — query feature-version state before
/// `getDocuments` advanced to V1 (#3633). All fields IDENTICAL to V1 except
/// `document_query`, which pins both `max_version` and `default_current_version`
/// to 0 so clients pinned to a PV using this module emit V0 wire bytes (CBOR
/// `where` / `order_by`, plain `uint32 limit`). This is the version testnet
/// v3.0 HPMNs deserialize.
pub const DRIVE_ABCI_QUERY_VERSIONS_V0: DriveAbciQueryVersions = DriveAbciQueryVersions {
max_returned_elements: 100,
response_metadata: 0,
proofs_query: 0,
document_query: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
document_query_helpers: DriveAbciDocumentQueryHelperVersions {
compute_aggregate_mode_and_check_limit: 0,
},
prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions {
balance: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
identity_based_queries: DriveAbciQueryIdentityVersions {
identity: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
keys: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identities_contract_keys: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identity_nonce: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identity_contract_nonce: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
balance: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identities_balances: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
balance_and_revision: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identity_by_unique_public_key_hash: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identity_by_non_unique_public_key_hash: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
token_queries: DriveAbciQueryTokenVersions {
identity_token_balances: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identities_token_balances: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identities_token_infos: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
identity_token_infos: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
token_statuses: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
token_total_supply: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
token_direct_purchase_prices: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
token_pre_programmed_distributions: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
token_perpetual_distribution_last_claim: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
token_contract_info: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
validator_queries: DriveAbciQueryValidatorVersions {
proposed_block_counts_by_evonode_ids: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
proposed_block_counts_by_range: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
data_contract_based_queries: DriveAbciQueryDataContractVersions {
data_contract: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
data_contract_history: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
data_contracts: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
voting_based_queries: DriveAbciQueryVotingVersions {
vote_polls_by_end_date_query: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
contested_resource_vote_state: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
contested_resource_voters_for_identity: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
contested_resource_identity_vote_status: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
contested_resources: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
system: DriveAbciQuerySystemVersions {
version_upgrade_state: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
version_upgrade_vote_status: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
epoch_infos: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
current_quorums_info: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
partial_status: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
path_elements: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
total_credits_in_platform: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
finalized_epoch_infos: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
group_queries: DriveAbciQueryGroupVersions {
group_info: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
group_infos: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
group_actions: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
group_action_signers: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
shielded_queries: DriveAbciQueryShieldedVersions {
encrypted_notes: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
anchors: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
most_recent_anchor: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
pool_state: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
nullifiers: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
nullifiers_trunk_state: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
nullifiers_branch_state: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
recent_nullifier_changes: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
recent_compacted_nullifier_changes: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
max_encrypted_notes_per_query: 2048,
},
address_funds_queries: DriveAbciQueryAddressFundsVersions {
addresses_infos: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
address_info: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
addresses_trunk_state: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
addresses_branch_state: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
recent_address_balance_changes: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
recent_compacted_address_balance_changes: FeatureVersionBounds {
min_version: 0,
max_version: 0,
default_current_version: 0,
},
},
};
4 changes: 2 additions & 2 deletions packages/rs-platform-version/src/version/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::version::dpp_versions::dpp_voting_versions::v1::VOTING_VERSION_V1;
use crate::version::dpp_versions::DPPVersion;
use crate::version::drive_abci_versions::drive_abci_checkpoint_parameters::v1::DRIVE_ABCI_CHECKPOINT_PARAMETERS_V1;
use crate::version::drive_abci_versions::drive_abci_method_versions::v1::DRIVE_ABCI_METHOD_VERSIONS_V1;
use crate::version::drive_abci_versions::drive_abci_query_versions::v1::DRIVE_ABCI_QUERY_VERSIONS_V1;
use crate::version::drive_abci_versions::drive_abci_query_versions::v0::DRIVE_ABCI_QUERY_VERSIONS_V0;
use crate::version::drive_abci_versions::drive_abci_structure_versions::v1::DRIVE_ABCI_STRUCTURE_VERSIONS_V1;
use crate::version::drive_abci_versions::drive_abci_validation_versions::v1::DRIVE_ABCI_VALIDATION_VERSIONS_V1;
use crate::version::drive_abci_versions::drive_abci_withdrawal_constants::v1::DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V1;
Expand All @@ -38,7 +38,7 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion {
methods: DRIVE_ABCI_METHOD_VERSIONS_V1,
validation_and_processing: DRIVE_ABCI_VALIDATION_VERSIONS_V1,
withdrawal_constants: DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V1,
query: DRIVE_ABCI_QUERY_VERSIONS_V1,
query: DRIVE_ABCI_QUERY_VERSIONS_V0,
checkpoints: DRIVE_ABCI_CHECKPOINT_PARAMETERS_V1,
},
dpp: DPPVersion {
Expand Down
4 changes: 2 additions & 2 deletions packages/rs-platform-version/src/version/v10.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2;
use crate::version::dpp_versions::DPPVersion;
use crate::version::drive_abci_versions::drive_abci_checkpoint_parameters::v1::DRIVE_ABCI_CHECKPOINT_PARAMETERS_V1;
use crate::version::drive_abci_versions::drive_abci_method_versions::v6::DRIVE_ABCI_METHOD_VERSIONS_V6;
use crate::version::drive_abci_versions::drive_abci_query_versions::v1::DRIVE_ABCI_QUERY_VERSIONS_V1;
use crate::version::drive_abci_versions::drive_abci_query_versions::v0::DRIVE_ABCI_QUERY_VERSIONS_V0;
use crate::version::drive_abci_versions::drive_abci_structure_versions::v1::DRIVE_ABCI_STRUCTURE_VERSIONS_V1;
use crate::version::drive_abci_versions::drive_abci_validation_versions::v6::DRIVE_ABCI_VALIDATION_VERSIONS_V6;
use crate::version::drive_abci_versions::drive_abci_withdrawal_constants::v2::DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2;
Expand All @@ -39,7 +39,7 @@ pub const PLATFORM_V10: PlatformVersion = PlatformVersion {
methods: DRIVE_ABCI_METHOD_VERSIONS_V6,
validation_and_processing: DRIVE_ABCI_VALIDATION_VERSIONS_V6,
withdrawal_constants: DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2,
query: DRIVE_ABCI_QUERY_VERSIONS_V1,
query: DRIVE_ABCI_QUERY_VERSIONS_V0,
checkpoints: DRIVE_ABCI_CHECKPOINT_PARAMETERS_V1,
},
dpp: DPPVersion {
Expand Down
Loading
Loading