File tree Expand file tree Collapse file tree 8 files changed +16
-26
lines changed
rs-dpp/src/state_transition/state_transitions/contract/data_contract_create_transition
rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create
rs-platform-version/src/version
drive_abci_versions/drive_abci_validation_versions Expand file tree Collapse file tree 8 files changed +16
-26
lines changed Original file line number Diff line number Diff line change @@ -175,18 +175,7 @@ mod test {
175175
176176 let state_transition = DataContractCreateTransition :: from_object (
177177 Value :: from ( [
178- (
179- STATE_TRANSITION_PROTOCOL_VERSION ,
180- Value :: U16 (
181- LATEST_PLATFORM_VERSION
182- . drive_abci
183- . validation_and_processing
184- . state_transitions
185- . contract_create_state_transition
186- . basic_structure
187- . unwrap ( ) ,
188- ) ,
189- ) ,
178+ ( STATE_TRANSITION_PROTOCOL_VERSION , Value :: U16 ( 0 ) ) ,
190179 (
191180 IDENTITY_NONCE ,
192181 Value :: U64 ( created_data_contract. identity_nonce ( ) ) ,
Original file line number Diff line number Diff line change @@ -84,16 +84,16 @@ impl StateTransitionAdvancedStructureValidationV0 for DataContractCreateTransiti
8484 . validation_and_processing
8585 . state_transitions
8686 . contract_create_state_transition
87- . basic_structure
87+ . advanced_structure
8888 {
8989 Some ( 0 ) => self . validate_advanced_structure_v0 ( execution_context, platform_version) ,
9090 Some ( version) => Err ( Error :: Execution ( ExecutionError :: UnknownVersionMismatch {
91- method : "data contract create transition: validate_basic_structure " . to_string ( ) ,
91+ method : "data contract create transition: validate_advanced_structure " . to_string ( ) ,
9292 known_versions : vec ! [ 0 ] ,
9393 received : version,
9494 } ) ) ,
9595 None => Err ( Error :: Execution ( ExecutionError :: VersionNotActive {
96- method : "data contract create transition: validate_basic_structure " . to_string ( ) ,
96+ method : "data contract create transition: validate_advanced_structure " . to_string ( ) ,
9797 known_versions : vec ! [ 0 ] ,
9898 } ) ) ,
9999 }
Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V1: DriveAbciValidationVersions =
8080 transform_into_action : 0 ,
8181 } ,
8282 contract_create_state_transition : DriveAbciStateTransitionValidationVersion {
83- basic_structure : Some ( 0 ) ,
84- advanced_structure : None ,
83+ basic_structure : None ,
84+ advanced_structure : Some ( 0 ) ,
8585 identity_signatures : None ,
8686 advanced_minimum_balance_pre_check : None ,
8787 nonce : Some ( 0 ) ,
Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V2: DriveAbciValidationVersions =
8080 transform_into_action : 0 ,
8181 } ,
8282 contract_create_state_transition : DriveAbciStateTransitionValidationVersion {
83- basic_structure : Some ( 0 ) ,
84- advanced_structure : None ,
83+ basic_structure : None ,
84+ advanced_structure : Some ( 0 ) ,
8585 identity_signatures : None ,
8686 advanced_minimum_balance_pre_check : None ,
8787 nonce : Some ( 0 ) ,
Original file line number Diff line number Diff line change @@ -80,8 +80,8 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V3: DriveAbciValidationVersions =
8080 transform_into_action : 0 ,
8181 } ,
8282 contract_create_state_transition : DriveAbciStateTransitionValidationVersion {
83- basic_structure : Some ( 0 ) ,
84- advanced_structure : None ,
83+ basic_structure : None ,
84+ advanced_structure : Some ( 0 ) ,
8585 identity_signatures : None ,
8686 advanced_minimum_balance_pre_check : None ,
8787 nonce : Some ( 0 ) ,
Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V4: DriveAbciValidationVersions =
8383 transform_into_action : 0 ,
8484 } ,
8585 contract_create_state_transition : DriveAbciStateTransitionValidationVersion {
86- basic_structure : Some ( 0 ) ,
87- advanced_structure : None ,
86+ basic_structure : None ,
87+ advanced_structure : Some ( 0 ) ,
8888 identity_signatures : None ,
8989 advanced_minimum_balance_pre_check : None ,
9090 nonce : Some ( 0 ) ,
Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V5: DriveAbciValidationVersions =
8484 transform_into_action : 0 ,
8585 } ,
8686 contract_create_state_transition : DriveAbciStateTransitionValidationVersion {
87- basic_structure : Some ( 0 ) ,
88- advanced_structure : None ,
87+ basic_structure : None ,
88+ advanced_structure : Some ( 0 ) ,
8989 identity_signatures : None ,
9090 advanced_minimum_balance_pre_check : None ,
9191 nonce : Some ( 0 ) ,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ use crate::version::drive_abci_versions::drive_abci_method_versions::v6::DRIVE_A
1818use crate :: version:: drive_abci_versions:: drive_abci_query_versions:: v1:: DRIVE_ABCI_QUERY_VERSIONS_V1 ;
1919use crate :: version:: drive_abci_versions:: drive_abci_structure_versions:: v1:: DRIVE_ABCI_STRUCTURE_VERSIONS_V1 ;
2020use crate :: version:: drive_abci_versions:: drive_abci_validation_versions:: v4:: DRIVE_ABCI_VALIDATION_VERSIONS_V4 ;
21+ use crate :: version:: drive_abci_versions:: drive_abci_validation_versions:: v5:: DRIVE_ABCI_VALIDATION_VERSIONS_V5 ;
2122use crate :: version:: drive_abci_versions:: drive_abci_withdrawal_constants:: v2:: DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2 ;
2223use crate :: version:: drive_abci_versions:: DriveAbciVersion ;
2324use crate :: version:: drive_versions:: v4:: DRIVE_VERSION_V4 ;
@@ -37,7 +38,7 @@ pub const PLATFORM_V9: PlatformVersion = PlatformVersion {
3738 drive_abci : DriveAbciVersion {
3839 structs : DRIVE_ABCI_STRUCTURE_VERSIONS_V1 ,
3940 methods : DRIVE_ABCI_METHOD_VERSIONS_V6 , // changed because of the genesis state
40- validation_and_processing : DRIVE_ABCI_VALIDATION_VERSIONS_V4 ,
41+ validation_and_processing : DRIVE_ABCI_VALIDATION_VERSIONS_V5 ,
4142 withdrawal_constants : DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2 ,
4243 query : DRIVE_ABCI_QUERY_VERSIONS_V1 ,
4344 } ,
You can’t perform that action at this time.
0 commit comments