Skip to content

Commit

Permalink
fix(vm): Do not require experimental VM config (#3270)
Browse files Browse the repository at this point in the history
## What ❔

Uses default experimental VM config when initializing the main node.

## Why ❔

Currently, the experimental VM config is required in certain cases,
which may lead to panics during node initialization.

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.
  • Loading branch information
slowli authored Nov 13, 2024
1 parent 726203b commit 54e4b00
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/bin/zksync_server/src/node_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ impl MainNodeBuilder {
latest_values_cache_size: rpc_config.latest_values_cache_size() as u64,
latest_values_max_block_lag: rpc_config.latest_values_max_block_lag(),
};
let vm_config = try_load_config!(self.configs.experimental_vm_config);
let vm_config = self
.configs
.experimental_vm_config
.clone()
.unwrap_or_default();

// On main node we always use master pool sink.
self.node.add_layer(MasterPoolSinkLayer);
Expand Down Expand Up @@ -597,7 +601,11 @@ impl MainNodeBuilder {
}

fn add_vm_playground_layer(mut self) -> anyhow::Result<Self> {
let vm_config = try_load_config!(self.configs.experimental_vm_config);
let vm_config = self
.configs
.experimental_vm_config
.clone()
.unwrap_or_default();
self.node.add_layer(VmPlaygroundLayer::new(
vm_config.playground,
self.genesis_config.l2_chain_id,
Expand Down

0 comments on commit 54e4b00

Please sign in to comment.