platform_version/version/drive_versions/
v4.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::v1::DRIVE_DOCUMENT_METHOD_VERSIONS_V1;
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::v1::DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1;
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
25pub const DRIVE_VERSION_V4: DriveVersion = DriveVersion {
26    structure: DRIVE_STRUCTURE_V1,
27    methods: DriveMethodVersions {
28        initialization: DriveInitializationMethodVersions {
29            create_initial_state_structure: 1, // changed here to 1 to add token sum trees
30        },
31        credit_pools: CREDIT_POOL_METHOD_VERSIONS_V1,
32        protocol_upgrade: DriveProtocolUpgradeVersions {
33            clear_version_information: 0,
34            fetch_versions_with_counter: 0,
35            fetch_proved_versions_with_counter: 0,
36            fetch_validator_version_votes: 0,
37            fetch_proved_validator_version_votes: 0,
38            remove_validators_proposed_app_versions: 0,
39            update_validator_proposed_app_version: 0,
40        },
41        prove: DriveProveMethodVersions {
42            prove_elements: 0,
43            prove_multiple_state_transition_results: 0,
44            prove_state_transition: 0,
45        },
46        balances: DriveBalancesMethodVersions {
47            add_to_system_credits: 0,
48            add_to_system_credits_operations: 0,
49            remove_from_system_credits: 0,
50            remove_from_system_credits_operations: 0,
51            calculate_total_credits_balance: 0,
52        },
53        document: DRIVE_DOCUMENT_METHOD_VERSIONS_V1,
54        vote: DRIVE_VOTE_METHOD_VERSIONS_V2,
55        contract: DRIVE_CONTRACT_METHOD_VERSIONS_V2, // changed
56        fees: DriveFeesMethodVersions { calculate_fee: 0 },
57        estimated_costs: DriveEstimatedCostsMethodVersions {
58            add_estimation_costs_for_levels_up_to_contract: 0,
59            add_estimation_costs_for_levels_up_to_contract_document_type_excluded: 0,
60            add_estimation_costs_for_contested_document_tree_levels_up_to_contract: 0,
61            add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded: 0,
62        },
63        asset_lock: DriveAssetLockMethodVersions {
64            add_asset_lock_outpoint: 0,
65            add_estimation_costs_for_adding_asset_lock: 0,
66            fetch_asset_lock_outpoint_info: 0,
67        },
68        verify: DRIVE_VERIFY_METHOD_VERSIONS_V1,
69        identity: DRIVE_IDENTITY_METHOD_VERSIONS_V1,
70        token: DRIVE_TOKEN_METHOD_VERSIONS_V1,
71        platform_system: DrivePlatformSystemMethodVersions {
72            estimation_costs: DriveSystemEstimationCostsMethodVersions {
73                for_total_system_credits_update: 0,
74            },
75        },
76        operations: DriveOperationsMethodVersion {
77            rollback_transaction: 0,
78            drop_cache: 0,
79            commit_transaction: 0,
80            apply_partial_batch_low_level_drive_operations: 0,
81            apply_partial_batch_grovedb_operations: 0,
82            apply_batch_low_level_drive_operations: 0,
83            apply_batch_grovedb_operations: 0,
84        },
85        state_transitions: DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1,
86        batch_operations: DriveBatchOperationsMethodVersion {
87            convert_drive_operations_to_grove_operations: 0,
88            apply_drive_operations: 0,
89        },
90        platform_state: DrivePlatformStateMethodVersions {
91            fetch_platform_state_bytes: 0,
92            store_platform_state_bytes: 0,
93        },
94        fetch: DriveFetchMethodVersions { fetch_elements: 0 },
95        prefunded_specialized_balances: DrivePrefundedSpecializedMethodVersions {
96            fetch_single: 0,
97            prove_single: 0,
98            add_prefunded_specialized_balance: 0,
99            add_prefunded_specialized_balance_operations: 1,
100            deduct_from_prefunded_specialized_balance: 1,
101            deduct_from_prefunded_specialized_balance_operations: 0,
102            estimated_cost_for_prefunded_specialized_balance_update: 0,
103            empty_prefunded_specialized_balance: 0,
104        },
105        group: DRIVE_GROUP_METHOD_VERSIONS_V1,
106        address_funds: DRIVE_ADDRESS_FUNDS_METHOD_VERSIONS_V1,
107        shielded: DriveShieldedMethodVersions {
108            insert_note: 0,
109            insert_nullifiers: 0,
110            update_total_balance: 0,
111            record_anchor_if_changed: 0,
112            prune_anchors: 0,
113            has_anchor: 0,
114            has_nullifier: 0,
115            read_total_balance: 0,
116            notes_count: 0,
117            prove_nullifiers_trunk_query: 0,
118            prove_nullifiers_branch_query: 0,
119            nullifiers_query_min_depth: 6,
120            nullifiers_query_max_depth: 10,
121        },
122        saved_block_transactions: DriveSavedBlockTransactionsMethodVersions {
123            store_address_balances: 0,
124            fetch_address_balances: 0,
125            compact_address_balances: 0,
126            cleanup_expired_address_balances: 0,
127            max_blocks_before_compaction: 64,
128            max_addresses_before_compaction: 2048,
129            store_nullifiers: 0,
130            fetch_nullifiers: 0,
131            compact_nullifiers: 0,
132            cleanup_expired_nullifier_compactions: 0,
133            max_blocks_before_nullifier_compaction: 64,
134            max_nullifiers_before_compaction: 2048,
135        },
136    },
137    grove_methods: DRIVE_GROVE_METHOD_VERSIONS_V1,
138    grove_version: GROVE_V2,
139};