platform_version/version/drive_versions/
v6.rs

1use crate::version::drive_versions::drive_address_funds_method_versions::v1::DRIVE_ADDRESS_FUNDS_METHOD_VERSIONS_V1;
2use crate::version::drive_versions::drive_contract_method_versions::v2::DRIVE_CONTRACT_METHOD_VERSIONS_V2;
3use crate::version::drive_versions::drive_credit_pool_method_versions::v1::CREDIT_POOL_METHOD_VERSIONS_V1;
4use crate::version::drive_versions::drive_document_method_versions::v2::DRIVE_DOCUMENT_METHOD_VERSIONS_V2;
5use crate::version::drive_versions::drive_group_method_versions::v1::DRIVE_GROUP_METHOD_VERSIONS_V1;
6use crate::version::drive_versions::drive_group_method_versions::DriveShieldedMethodVersions;
7use crate::version::drive_versions::drive_grove_method_versions::v1::DRIVE_GROVE_METHOD_VERSIONS_V1;
8use crate::version::drive_versions::drive_identity_method_versions::v1::DRIVE_IDENTITY_METHOD_VERSIONS_V1;
9use crate::version::drive_versions::drive_state_transition_method_versions::v2::DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V2;
10use crate::version::drive_versions::drive_structure_version::v1::DRIVE_STRUCTURE_V1;
11use crate::version::drive_versions::drive_token_method_versions::v1::DRIVE_TOKEN_METHOD_VERSIONS_V1;
12use crate::version::drive_versions::drive_verify_method_versions::v1::DRIVE_VERIFY_METHOD_VERSIONS_V1;
13use crate::version::drive_versions::drive_vote_method_versions::v2::DRIVE_VOTE_METHOD_VERSIONS_V2;
14use crate::version::drive_versions::{
15    DriveAssetLockMethodVersions, DriveBalancesMethodVersions, DriveBatchOperationsMethodVersion,
16    DriveEstimatedCostsMethodVersions, DriveFeesMethodVersions, DriveFetchMethodVersions,
17    DriveInitializationMethodVersions, DriveMethodVersions, DriveOperationsMethodVersion,
18    DrivePlatformStateMethodVersions, DrivePlatformSystemMethodVersions,
19    DrivePrefundedSpecializedMethodVersions, DriveProtocolUpgradeVersions,
20    DriveProveMethodVersions, DriveSavedBlockTransactionsMethodVersions,
21    DriveSystemEstimationCostsMethodVersions, DriveVersion,
22};
23use grovedb_version::version::v2::GROVE_V2;
24
25/// This was introduced in protocol v11 (2.2).
26/// v11 was done for 2 reasons
27///     * platform addresses
28///     * identity update conversion
29pub const DRIVE_VERSION_V6: DriveVersion = DriveVersion {
30    structure: DRIVE_STRUCTURE_V1,
31    methods: DriveMethodVersions {
32        initialization: DriveInitializationMethodVersions {
33            create_initial_state_structure: 2,
34        },
35        credit_pools: CREDIT_POOL_METHOD_VERSIONS_V1,
36        protocol_upgrade: DriveProtocolUpgradeVersions {
37            clear_version_information: 0,
38            fetch_versions_with_counter: 0,
39            fetch_proved_versions_with_counter: 0,
40            fetch_validator_version_votes: 0,
41            fetch_proved_validator_version_votes: 0,
42            remove_validators_proposed_app_versions: 0,
43            update_validator_proposed_app_version: 0,
44        },
45        prove: DriveProveMethodVersions {
46            prove_elements: 0,
47            prove_multiple_state_transition_results: 0,
48            prove_state_transition: 0,
49        },
50        balances: DriveBalancesMethodVersions {
51            add_to_system_credits: 0,
52            add_to_system_credits_operations: 0,
53            remove_from_system_credits: 0,
54            remove_from_system_credits_operations: 0,
55            calculate_total_credits_balance: 1, // Changed because we now add the address trees
56        },
57        document: DRIVE_DOCUMENT_METHOD_VERSIONS_V2, // Changed
58        vote: DRIVE_VOTE_METHOD_VERSIONS_V2,
59        contract: DRIVE_CONTRACT_METHOD_VERSIONS_V2,
60        fees: DriveFeesMethodVersions { calculate_fee: 0 },
61        estimated_costs: DriveEstimatedCostsMethodVersions {
62            add_estimation_costs_for_levels_up_to_contract: 0,
63            add_estimation_costs_for_levels_up_to_contract_document_type_excluded: 0,
64            add_estimation_costs_for_contested_document_tree_levels_up_to_contract: 0,
65            add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded: 0,
66        },
67        asset_lock: DriveAssetLockMethodVersions {
68            add_asset_lock_outpoint: 0,
69            add_estimation_costs_for_adding_asset_lock: 0,
70            fetch_asset_lock_outpoint_info: 0,
71        },
72        verify: DRIVE_VERIFY_METHOD_VERSIONS_V1,
73        identity: DRIVE_IDENTITY_METHOD_VERSIONS_V1,
74        token: DRIVE_TOKEN_METHOD_VERSIONS_V1,
75        platform_system: DrivePlatformSystemMethodVersions {
76            estimation_costs: DriveSystemEstimationCostsMethodVersions {
77                for_total_system_credits_update: 0,
78            },
79        },
80        operations: DriveOperationsMethodVersion {
81            rollback_transaction: 0,
82            drop_cache: 0,
83            commit_transaction: 0,
84            apply_partial_batch_low_level_drive_operations: 0,
85            apply_partial_batch_grovedb_operations: 0,
86            apply_batch_low_level_drive_operations: 0,
87            apply_batch_grovedb_operations: 0,
88        },
89        state_transitions: DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V2, //changed
90        batch_operations: DriveBatchOperationsMethodVersion {
91            convert_drive_operations_to_grove_operations: 0,
92            apply_drive_operations: 0,
93        },
94        platform_state: DrivePlatformStateMethodVersions {
95            fetch_platform_state_bytes: 0,
96            store_platform_state_bytes: 0,
97        },
98        fetch: DriveFetchMethodVersions { fetch_elements: 0 },
99        prefunded_specialized_balances: DrivePrefundedSpecializedMethodVersions {
100            fetch_single: 0,
101            prove_single: 0,
102            add_prefunded_specialized_balance: 0,
103            add_prefunded_specialized_balance_operations: 1,
104            deduct_from_prefunded_specialized_balance: 1,
105            deduct_from_prefunded_specialized_balance_operations: 0,
106            estimated_cost_for_prefunded_specialized_balance_update: 0,
107            empty_prefunded_specialized_balance: 0,
108        },
109        group: DRIVE_GROUP_METHOD_VERSIONS_V1,
110        address_funds: DRIVE_ADDRESS_FUNDS_METHOD_VERSIONS_V1,
111        shielded: DriveShieldedMethodVersions {
112            insert_note: 0,
113            insert_nullifiers: 0,
114            update_total_balance: 0,
115            record_anchor_if_changed: 0,
116            prune_anchors: 0,
117            has_anchor: 0,
118            has_nullifier: 0,
119            read_total_balance: 0,
120            notes_count: 0,
121            prove_nullifiers_trunk_query: 0,
122            prove_nullifiers_branch_query: 0,
123            nullifiers_query_min_depth: 6,
124            nullifiers_query_max_depth: 10,
125        },
126        saved_block_transactions: DriveSavedBlockTransactionsMethodVersions {
127            store_address_balances: 0,
128            fetch_address_balances: 0,
129            compact_address_balances: 0,
130            cleanup_expired_address_balances: 0,
131            max_blocks_before_compaction: 64,
132            max_addresses_before_compaction: 2048,
133            store_nullifiers: 0,
134            fetch_nullifiers: 0,
135            compact_nullifiers: 0,
136            cleanup_expired_nullifier_compactions: 0,
137            max_blocks_before_nullifier_compaction: 64,
138            max_nullifiers_before_compaction: 2048,
139        },
140    },
141    grove_methods: DRIVE_GROVE_METHOD_VERSIONS_V1,
142    grove_version: GROVE_V2,
143};