Skip to content

Commit 58dbac8

Browse files
committed
fix protocol version
1 parent c9025c5 commit 58dbac8

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

core/lib/basic_types/src/protocol_version.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,19 @@ pub enum ProtocolVersionId {
7373
Version27,
7474
Version28,
7575
Version29,
76+
// Version `30` was skipped as an Era upgrade due to version clash with ZKsync OS.
7677
Version30,
7778
Version31,
79+
Version32,
7880
}
7981

8082
impl ProtocolVersionId {
8183
pub const fn latest() -> Self {
82-
Self::Version30
84+
Self::Version31
8385
}
8486

8587
pub const fn next() -> Self {
86-
Self::Version31
88+
Self::Version32
8789
}
8890

8991
pub fn try_from_packed_semver(packed_semver: U256) -> Result<Self, String> {
@@ -132,8 +134,9 @@ impl ProtocolVersionId {
132134
ProtocolVersionId::Version28 => VmVersion::VmEcPrecompiles,
133135
ProtocolVersionId::Version29 => VmVersion::VmInterop,
134136
ProtocolVersionId::Version30 => VmVersion::VmMediumInterop,
135-
// Speculative VM version for the next protocol version to be used in the upgrade integration test etc.
136137
ProtocolVersionId::Version31 => VmVersion::VmMediumInterop,
138+
// Speculative VM version for the next protocol version to be used in the upgrade integration test etc.
139+
ProtocolVersionId::Version32 => VmVersion::VmMediumInterop,
137140
}
138141
}
139142

@@ -172,7 +175,7 @@ impl ProtocolVersionId {
172175
}
173176

174177
pub fn is_pre_medium_interop(&self) -> bool {
175-
self < &Self::Version30
178+
self < &Self::Version31
176179
}
177180

178181
pub fn is_1_4_0(&self) -> bool {
@@ -323,8 +326,9 @@ impl From<ProtocolVersionId> for VmVersion {
323326
ProtocolVersionId::Version28 => VmVersion::VmEcPrecompiles,
324327
ProtocolVersionId::Version29 => VmVersion::VmInterop,
325328
ProtocolVersionId::Version30 => VmVersion::VmMediumInterop,
326-
// Speculative VM version for the next protocol version to be used in the upgrade integration test etc.
327329
ProtocolVersionId::Version31 => VmVersion::VmMediumInterop,
330+
// Speculative VM version for the next protocol version to be used in the upgrade integration test etc.
331+
ProtocolVersionId::Version32 => VmVersion::VmMediumInterop,
328332
}
329333
}
330334
}

core/lib/multivm/src/pubdata_builders/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn test_full_pubdata_building() {
103103
));
104104

105105
let actual =
106-
full_pubdata_builder.settlement_layer_pubdata(&input, ProtocolVersionId::Version30);
106+
full_pubdata_builder.settlement_layer_pubdata(&input, ProtocolVersionId::Version31);
107107
let expected = "00000001000000000000000000000000000000000000000000008001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000100000004deadbeef0000000100000060bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb0100002a040001000000000000000000000000000000000000000000000000000000000000007e090e0000000c0901";
108108
assert_eq!(
109109
&hex::encode(actual),
@@ -141,7 +141,7 @@ fn test_hashed_pubdata_building() {
141141
L2DACommitmentScheme::BlobsAndPubdataKeccak256,
142142
));
143143
let actual =
144-
hashed_pubdata_builder.settlement_layer_pubdata(&input, ProtocolVersionId::Version30);
144+
hashed_pubdata_builder.settlement_layer_pubdata(&input, ProtocolVersionId::Version31);
145145
let expected = "fa96e2436e6fb4d668f5a06681a7c53fcb199b2747ee624ee52a13e85aac5f1e";
146146
assert_eq!(
147147
&hex::encode(actual),

core/lib/vm_executor/src/oneshot/contracts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ impl<C: ContractsKind> MultiVmBaseSystemContracts<C> {
115115
ProtocolVersionId::Version27 => &self.vm_evm_emulator,
116116
ProtocolVersionId::Version28 => &self.vm_precompiles,
117117
ProtocolVersionId::Version29 => &self.interop,
118-
ProtocolVersionId::Version30 => &self.medium_interop,
118+
ProtocolVersionId::Version30 | ProtocolVersionId::Version31 => &self.medium_interop,
119119
// Speculative base system contracts for the next protocol version to be used in the upgrade integration test etc.
120-
ProtocolVersionId::Version31 => &self.medium_interop,
120+
ProtocolVersionId::Version32 => &self.medium_interop,
121121
};
122122
base.clone()
123123
}

etc/env/file_based/genesis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
genesis_protocol_semantic_version: 0.30.0
1+
genesis_protocol_semantic_version: 0.31.0
22
genesis_protocol_version: null
33
genesis_root: 0xaa7eaa4388da7ec71007aeac9c7af0fbde8ed0621b8f64c43894737f7a0b4ace
44
genesis_rollup_leaf_index: 104

prover/crates/lib/prover_fri_types/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub mod keys;
2323
pub const MAX_COMPRESSION_CIRCUITS: u8 = 5;
2424

2525
// THESE VALUES SHOULD BE UPDATED ON ANY PROTOCOL UPGRADE OF PROVERS
26-
pub const PROVER_PROTOCOL_VERSION: ProtocolVersionId = ProtocolVersionId::Version30;
26+
pub const PROVER_PROTOCOL_VERSION: ProtocolVersionId = ProtocolVersionId::Version31;
2727
pub const PROVER_PROTOCOL_PATCH: VersionPatch = VersionPatch(0);
2828
pub const PROVER_PROTOCOL_SEMANTIC_VERSION: ProtocolSemanticVersion = ProtocolSemanticVersion {
2929
minor: PROVER_PROTOCOL_VERSION,

0 commit comments

Comments
 (0)