Skip to content

Commit 97de2eb

Browse files
authored
fix(en): make interop_roots optional (#4345)
## What ❔ make interop_roots optional ## Why ❔ back compatibility (en v29 works with main node v28) ## Is this a breaking change? - [ ] Yes - [x] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`.
1 parent 24b2990 commit 97de2eb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

core/lib/dal/src/models/storage_sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl SyncBlock {
130130
protocol_version: self.protocol_version,
131131
pubdata_params: Some(self.pubdata_params),
132132
pubdata_limit: self.pubdata_limit,
133-
interop_roots: self.interop_roots,
133+
interop_roots: Some(self.interop_roots),
134134
}
135135
}
136136

core/lib/types/src/api/en.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub struct SyncBlock {
4848
/// Pubdata limit for the batch.
4949
pub pubdata_limit: Option<u64>,
5050
/// Interop roots for this block
51-
pub interop_roots: Vec<InteropRoot>,
51+
pub interop_roots: Option<Vec<InteropRoot>>,
5252
}
5353

5454
/// Global configuration of the consensus served by the main node to the external nodes.

core/node/node_sync/src/fetcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl TryFrom<SyncBlock> for FetchedBlock {
109109
.collect(),
110110
pubdata_params,
111111
pubdata_limit: block.pubdata_limit,
112-
interop_roots: block.interop_roots.clone(),
112+
interop_roots: block.interop_roots.clone().unwrap_or_default(),
113113
})
114114
}
115115
}

core/node/node_sync/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl MockMainNodeClient {
6969
protocol_version: ProtocolVersionId::latest(),
7070
pubdata_params: Default::default(),
7171
pubdata_limit: Some(100_000),
72-
interop_roots: vec![],
72+
interop_roots: Some(vec![]),
7373
};
7474

7575
Self {

0 commit comments

Comments
 (0)