Skip to content

Commit fc05d62

Browse files
feat(platform): introduce protocol version 13 (#4143)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent b889e05 commit fc05d62

3 files changed

Lines changed: 79 additions & 3 deletions

File tree

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::v12::PROTOCOL_VERSION_12;
3+
use crate::version::v13::PROTOCOL_VERSION_13;
44
pub use protocol_version::*;
55
use std::ops::RangeInclusive;
66

@@ -18,6 +18,7 @@ pub mod v1;
1818
pub mod v10;
1919
pub mod v11;
2020
pub mod v12;
21+
pub mod v13;
2122
pub mod v2;
2223
pub mod v3;
2324
pub mod v4;
@@ -31,5 +32,5 @@ pub type ProtocolVersion = u32;
3132

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

34-
pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_12;
35+
pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_13;
3536
pub const INITIAL_PROTOCOL_VERSION: ProtocolVersion = 1;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use crate::version::v1::PLATFORM_V1;
2020
use crate::version::v10::PLATFORM_V10;
2121
use crate::version::v11::PLATFORM_V11;
2222
use crate::version::v12::PLATFORM_V12;
23+
use crate::version::v13::PLATFORM_V13;
2324
use crate::version::v2::PLATFORM_V2;
2425
use crate::version::v3::PLATFORM_V3;
2526
use crate::version::v4::PLATFORM_V4;
@@ -57,6 +58,7 @@ pub const PLATFORM_VERSIONS: &[PlatformVersion] = &[
5758
PLATFORM_V10,
5859
PLATFORM_V11,
5960
PLATFORM_V12,
61+
PLATFORM_V13,
6062
];
6163

6264
#[cfg(feature = "mock-versions")]
@@ -65,7 +67,7 @@ pub static PLATFORM_TEST_VERSIONS: OnceLock<Vec<PlatformVersion>> = OnceLock::ne
6567
#[cfg(feature = "mock-versions")]
6668
const DEFAULT_PLATFORM_TEST_VERSIONS: &[PlatformVersion] = &[TEST_PLATFORM_V2, TEST_PLATFORM_V3];
6769

68-
pub const LATEST_PLATFORM_VERSION: &PlatformVersion = &PLATFORM_V12;
70+
pub const LATEST_PLATFORM_VERSION: &PlatformVersion = &PLATFORM_V13;
6971

7072
pub const DESIRED_PLATFORM_VERSION: &PlatformVersion = LATEST_PLATFORM_VERSION;
7173

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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::v4::CONTRACT_VERSIONS_V4;
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::v2::TOKEN_VERSIONS_V2;
14+
use crate::version::dpp_versions::dpp_validation_versions::v3::DPP_VALIDATION_VERSIONS_V3;
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::v8::DRIVE_ABCI_METHOD_VERSIONS_V8;
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::v8::DRIVE_ABCI_VALIDATION_VERSIONS_V8;
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::v7::DRIVE_VERSION_V7;
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::v2::SYSTEM_LIMITS_V2;
29+
use crate::version::ProtocolVersion;
30+
31+
pub const PROTOCOL_VERSION_13: ProtocolVersion = 13;
32+
33+
/// Introduced as the activation gate for recording shielded-spend transparent
34+
/// credits (Unshield / shield surplus / identity-create fallback) into the
35+
/// recent-address-balance-changes tree. Functionally identical to v12 at
36+
/// introduction — the same component version structs, no behavior change. The
37+
/// consensus change that consumes this gate (a bumped drive-abci methods
38+
/// struct) lands in a follow-up; keeping v13 == v12 here lets mixed-version
39+
/// validators agree until that change activates.
40+
pub const PLATFORM_V13: PlatformVersion = PlatformVersion {
41+
protocol_version: PROTOCOL_VERSION_13,
42+
drive: DRIVE_VERSION_V7,
43+
drive_abci: DriveAbciVersion {
44+
structs: DRIVE_ABCI_STRUCTURE_VERSIONS_V1,
45+
methods: DRIVE_ABCI_METHOD_VERSIONS_V8,
46+
validation_and_processing: DRIVE_ABCI_VALIDATION_VERSIONS_V8,
47+
withdrawal_constants: DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2,
48+
query: DRIVE_ABCI_QUERY_VERSIONS_V1,
49+
checkpoints: DRIVE_ABCI_CHECKPOINT_PARAMETERS_V1,
50+
},
51+
dpp: DPPVersion {
52+
costs: DPP_COSTS_VERSIONS_V1,
53+
validation: DPP_VALIDATION_VERSIONS_V3,
54+
state_transition_serialization_versions: STATE_TRANSITION_SERIALIZATION_VERSIONS_V2,
55+
state_transition_conversion_versions: STATE_TRANSITION_CONVERSION_VERSIONS_V2,
56+
state_transition_method_versions: STATE_TRANSITION_METHOD_VERSIONS_V1,
57+
state_transitions: STATE_TRANSITION_VERSIONS_V3,
58+
contract_versions: CONTRACT_VERSIONS_V4,
59+
document_versions: DOCUMENT_VERSIONS_V3,
60+
identity_versions: IDENTITY_VERSIONS_V1,
61+
voting_versions: VOTING_VERSION_V2,
62+
token_versions: TOKEN_VERSIONS_V2,
63+
asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1,
64+
methods: DPP_METHOD_VERSIONS_V2,
65+
factory_versions: DPP_FACTORY_VERSIONS_V1,
66+
},
67+
system_data_contracts: SYSTEM_DATA_CONTRACT_VERSIONS_V1,
68+
fee_version: FEE_VERSION2,
69+
system_limits: SYSTEM_LIMITS_V2,
70+
consensus: ConsensusVersions {
71+
tenderdash_consensus_version: 1,
72+
},
73+
};

0 commit comments

Comments
 (0)