Skip to content

Commit

Permalink
Fix for upgrade-test
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy committed Oct 26, 2023
1 parent b3c59d7 commit 588ceae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions core/lib/types/src/protocol_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ impl ProtocolVersionId {
}

pub fn is_pre_boojum(&self) -> bool {
// TODO: Fix for upgrade test. Remove when boojum code will be merged fully.
if std::env::var("ZKSYNC_PRE_BOOJUM").is_ok() {
return true;
}

self < &ProtocolVersionId::Version17
}
}
Expand Down
4 changes: 2 additions & 2 deletions core/tests/upgrade-test/tests/upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('Upgrade test', function () {
process.env.CHAIN_STATE_KEEPER_BLOCK_COMMIT_DEADLINE_MS = '2000';
// Run server in background.
utils.background(
'cd $ZKSYNC_HOME && cargo run --bin zksync_server --release -- --components=api,tree,eth,data_fetcher,state_keeper',
'cd $ZKSYNC_HOME && ZKSYNC_PRE_BOOJUM=true cargo run --bin zksync_server --release -- --components=api,tree,eth,data_fetcher,state_keeper',
[null, logs, logs]
);
// Server may need some time to recompile if it's a cold run, so wait for it.
Expand Down Expand Up @@ -251,7 +251,7 @@ describe('Upgrade test', function () {

// Run again.
utils.background(
'cd $ZKSYNC_HOME && cargo run --bin zksync_server --release -- --components=api,tree,eth,data_fetcher,state_keeper &>> upgrade.log',
'cd $ZKSYNC_HOME && ZKSYNC_PRE_BOOJUM=true cargo run --bin zksync_server --release -- --components=api,tree,eth,data_fetcher,state_keeper &>> upgrade.log',
[null, logs, logs]
);
await utils.sleep(10);
Expand Down

0 comments on commit 588ceae

Please sign in to comment.