Skip to content

Commit

Permalink
fix: zk_inception port offset for new chains
Browse files Browse the repository at this point in the history
  • Loading branch information
sanekmelnikov committed Sep 4, 2024
1 parent b2dd9a5 commit 86557c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zk_toolbox/crates/config/src/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub fn update_ports(config: &mut GeneralConfig, ports_config: &PortsConfig) -> a
let prometheus = config
.prometheus_config
.as_mut()
.context("Contract Verifier config is not presented")?;
.context("Prometheus config is not presented")?;

api.web3_json_rpc.http_port = ports_config.web3_json_rpc_http_port;
update_port_in_url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct PortOffset(u16);

impl PortOffset {
pub fn from_chain_id(chain_id: u16) -> Self {
Self(chain_id * 100)
Self((chain_id - 1) * 100)
}
}

Expand Down Expand Up @@ -88,7 +88,7 @@ impl InitArgs {
l1_rpc_url,
port_offset: self
.port_offset
.unwrap_or(PortOffset::from_chain_id(config.chain_id.as_u64() as u16))
.unwrap_or(PortOffset::from_chain_id(config.id as u16))
.into(),
}
}
Expand Down

0 comments on commit 86557c4

Please sign in to comment.