Skip to content

Commit ee57ffb

Browse files
chore: introduce protocol version 12 (#3017)
1 parent 45cc347 commit ee57ffb

File tree

3 files changed

+76
-5
lines changed

3 files changed

+76
-5
lines changed

packages/rs-platform-version/src/version/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod protocol_version;
22

3-
use crate::version::v11::PROTOCOL_VERSION_11;
3+
use crate::version::v12::PROTOCOL_VERSION_12;
44
pub use protocol_version::*;
55
use std::ops::RangeInclusive;
66

@@ -17,6 +17,7 @@ mod system_limits;
1717
pub mod v1;
1818
pub mod v10;
1919
pub mod v11;
20+
pub mod v12;
2021
pub mod v2;
2122
pub mod v3;
2223
pub mod v4;
@@ -30,5 +31,5 @@ pub type ProtocolVersion = u32;
3031

3132
pub const ALL_VERSIONS: RangeInclusive<ProtocolVersion> = 1..=LATEST_VERSION;
3233

33-
pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_11;
34+
pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_12;
3435
pub const INITIAL_PROTOCOL_VERSION: ProtocolVersion = 1;

packages/rs-platform-version/src/version/protocol_version.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ use crate::version::mocks::v3_test::TEST_PLATFORM_V3;
1010
#[cfg(feature = "mock-versions")]
1111
use crate::version::mocks::TEST_PROTOCOL_VERSION_SHIFT_BYTES;
1212
use crate::version::system_data_contract_versions::SystemDataContractVersions;
13-
use crate::version::v1::PLATFORM_V1;
1413
#[cfg(feature = "mock-versions")]
1514
use std::sync::OnceLock;
1615

1716
use crate::version::consensus_versions::ConsensusVersions;
1817
use crate::version::system_limits::SystemLimits;
18+
19+
use crate::version::v1::PLATFORM_V1;
1920
use crate::version::v10::PLATFORM_V10;
21+
use crate::version::v11::PLATFORM_V11;
22+
use crate::version::v12::PLATFORM_V12;
2023
use crate::version::v2::PLATFORM_V2;
2124
use crate::version::v3::PLATFORM_V3;
2225
use crate::version::v4::PLATFORM_V4;
@@ -26,7 +29,6 @@ use crate::version::v7::PLATFORM_V7;
2629
use crate::version::v8::PLATFORM_V8;
2730
use crate::version::v9::PLATFORM_V9;
2831

29-
use crate::version::v11::PLATFORM_V11;
3032
use crate::version::ProtocolVersion;
3133
pub use versioned_feature_core::*;
3234

@@ -54,6 +56,7 @@ pub const PLATFORM_VERSIONS: &[PlatformVersion] = &[
5456
PLATFORM_V9,
5557
PLATFORM_V10,
5658
PLATFORM_V11,
59+
PLATFORM_V12,
5760
];
5861

5962
#[cfg(feature = "mock-versions")]
@@ -62,7 +65,7 @@ pub static PLATFORM_TEST_VERSIONS: OnceLock<Vec<PlatformVersion>> = OnceLock::ne
6265
#[cfg(feature = "mock-versions")]
6366
const DEFAULT_PLATFORM_TEST_VERSIONS: &[PlatformVersion] = &[TEST_PLATFORM_V2, TEST_PLATFORM_V3];
6467

65-
pub const LATEST_PLATFORM_VERSION: &PlatformVersion = &PLATFORM_V11;
68+
pub const LATEST_PLATFORM_VERSION: &PlatformVersion = &PLATFORM_V12;
6669

6770
pub const DESIRED_PLATFORM_VERSION: &PlatformVersion = LATEST_PLATFORM_VERSION;
6871

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
use crate::version::consensus_versions::ConsensusVersions;
2+
use crate::version::dpp_versions::dpp_asset_lock_versions::v1::DPP_ASSET_LOCK_VERSIONS_V1;
3+
use crate::version::dpp_versions::dpp_contract_versions::v3::CONTRACT_VERSIONS_V3;
4+
use crate::version::dpp_versions::dpp_costs_versions::v1::DPP_COSTS_VERSIONS_V1;
5+
use crate::version::dpp_versions::dpp_document_versions::v3::DOCUMENT_VERSIONS_V3;
6+
use crate::version::dpp_versions::dpp_factory_versions::v1::DPP_FACTORY_VERSIONS_V1;
7+
use crate::version::dpp_versions::dpp_identity_versions::v1::IDENTITY_VERSIONS_V1;
8+
use crate::version::dpp_versions::dpp_method_versions::v2::DPP_METHOD_VERSIONS_V2;
9+
use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2::STATE_TRANSITION_CONVERSION_VERSIONS_V2;
10+
use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1;
11+
use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v2::STATE_TRANSITION_SERIALIZATION_VERSIONS_V2;
12+
use crate::version::dpp_versions::dpp_state_transition_versions::v3::STATE_TRANSITION_VERSIONS_V3;
13+
use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1;
14+
use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2;
15+
use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2;
16+
use crate::version::dpp_versions::DPPVersion;
17+
use crate::version::drive_abci_versions::drive_abci_checkpoint_parameters::v1::DRIVE_ABCI_CHECKPOINT_PARAMETERS_V1;
18+
use crate::version::drive_abci_versions::drive_abci_method_versions::v7::DRIVE_ABCI_METHOD_VERSIONS_V7;
19+
use crate::version::drive_abci_versions::drive_abci_query_versions::v1::DRIVE_ABCI_QUERY_VERSIONS_V1;
20+
use crate::version::drive_abci_versions::drive_abci_structure_versions::v1::DRIVE_ABCI_STRUCTURE_VERSIONS_V1;
21+
use crate::version::drive_abci_versions::drive_abci_validation_versions::v7::DRIVE_ABCI_VALIDATION_VERSIONS_V7;
22+
use crate::version::drive_abci_versions::drive_abci_withdrawal_constants::v2::DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2;
23+
use crate::version::drive_abci_versions::DriveAbciVersion;
24+
use crate::version::drive_versions::v6::DRIVE_VERSION_V6;
25+
use crate::version::fee::v2::FEE_VERSION2;
26+
use crate::version::protocol_version::PlatformVersion;
27+
use crate::version::system_data_contract_versions::v1::SYSTEM_DATA_CONTRACT_VERSIONS_V1;
28+
use crate::version::system_limits::v1::SYSTEM_LIMITS_V1;
29+
use crate::version::ProtocolVersion;
30+
31+
pub const PROTOCOL_VERSION_12: ProtocolVersion = 12;
32+
33+
/// This version was for Platform release 3.1.0
34+
pub const PLATFORM_V12: PlatformVersion = PlatformVersion {
35+
protocol_version: PROTOCOL_VERSION_12,
36+
drive: DRIVE_VERSION_V6,
37+
drive_abci: DriveAbciVersion {
38+
structs: DRIVE_ABCI_STRUCTURE_VERSIONS_V1,
39+
methods: DRIVE_ABCI_METHOD_VERSIONS_V7,
40+
validation_and_processing: DRIVE_ABCI_VALIDATION_VERSIONS_V7,
41+
withdrawal_constants: DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2,
42+
query: DRIVE_ABCI_QUERY_VERSIONS_V1,
43+
checkpoints: DRIVE_ABCI_CHECKPOINT_PARAMETERS_V1,
44+
},
45+
dpp: DPPVersion {
46+
costs: DPP_COSTS_VERSIONS_V1,
47+
validation: DPP_VALIDATION_VERSIONS_V2,
48+
state_transition_serialization_versions: STATE_TRANSITION_SERIALIZATION_VERSIONS_V2,
49+
state_transition_conversion_versions: STATE_TRANSITION_CONVERSION_VERSIONS_V2,
50+
state_transition_method_versions: STATE_TRANSITION_METHOD_VERSIONS_V1,
51+
state_transitions: STATE_TRANSITION_VERSIONS_V3,
52+
contract_versions: CONTRACT_VERSIONS_V3,
53+
document_versions: DOCUMENT_VERSIONS_V3,
54+
identity_versions: IDENTITY_VERSIONS_V1,
55+
voting_versions: VOTING_VERSION_V2,
56+
token_versions: TOKEN_VERSIONS_V1,
57+
asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1,
58+
methods: DPP_METHOD_VERSIONS_V2,
59+
factory_versions: DPP_FACTORY_VERSIONS_V1,
60+
},
61+
system_data_contracts: SYSTEM_DATA_CONTRACT_VERSIONS_V1,
62+
fee_version: FEE_VERSION2,
63+
system_limits: SYSTEM_LIMITS_V1,
64+
consensus: ConsensusVersions {
65+
tenderdash_consensus_version: 1,
66+
},
67+
};

0 commit comments

Comments
 (0)