From 4dce16f8377185ad199b4582dd0ea97c98d6c5a1 Mon Sep 17 00:00:00 2001 From: Ivan Schasny Date: Tue, 22 Oct 2024 11:10:41 +0100 Subject: [PATCH 1/3] fix: update logging in cbt l1 behaviour --- .../base_token_adjuster/src/base_token_l1_behaviour.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs b/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs index 0199b06ebd6..f597d134856 100644 --- a/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs +++ b/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs @@ -6,7 +6,7 @@ use std::{ }; use anyhow::Context; -use bigdecimal::{num_bigint::ToBigInt, BigDecimal, Zero}; +use bigdecimal::{num_bigint::ToBigInt, BigDecimal, ToPrimitive, Zero}; use zksync_config::BaseTokenAdjusterConfig; use zksync_eth_client::{BoundEthInterface, CallFunctionArgs, Options}; use zksync_node_fee_model::l1_gas_price::TxParamsProvider; @@ -57,7 +57,7 @@ impl BaseTokenL1Behaviour { self.update_last_persisted_l1_ratio(prev_ratio.clone()); tracing::info!( "Fetched current base token ratio from the L1: {}", - prev_ratio.to_bigint().unwrap() + prev_ratio ); prev_ratio }; @@ -71,7 +71,7 @@ impl BaseTokenL1Behaviour { "Skipping L1 update. current_ratio {}, previous_ratio {}, deviation {}", current_ratio, prev_ratio, - deviation.to_bigint().unwrap() + deviation ); return Ok(()); } @@ -98,7 +98,7 @@ impl BaseTokenL1Behaviour { new_ratio.denominator.get(), base_fee_per_gas, priority_fee_per_gas, - deviation.to_bigint().unwrap() + deviation ); METRICS .l1_gas_used From caa88f4aaccb9ee00bd9fee1f59718ce8a967ac5 Mon Sep 17 00:00:00 2001 From: Ivan Schasny Date: Tue, 22 Oct 2024 11:18:33 +0100 Subject: [PATCH 2/3] Remove unused imports --- core/node/base_token_adjuster/src/base_token_l1_behaviour.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs b/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs index f597d134856..dab0d85d399 100644 --- a/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs +++ b/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs @@ -6,7 +6,7 @@ use std::{ }; use anyhow::Context; -use bigdecimal::{num_bigint::ToBigInt, BigDecimal, ToPrimitive, Zero}; +use bigdecimal::{BigDecimal, Zero}; use zksync_config::BaseTokenAdjusterConfig; use zksync_eth_client::{BoundEthInterface, CallFunctionArgs, Options}; use zksync_node_fee_model::l1_gas_price::TxParamsProvider; @@ -57,7 +57,7 @@ impl BaseTokenL1Behaviour { self.update_last_persisted_l1_ratio(prev_ratio.clone()); tracing::info!( "Fetched current base token ratio from the L1: {}", - prev_ratio + prev_ratio.to_bigint() ); prev_ratio }; From 7da62d52d28e9df415a4b07961187489b2af8c49 Mon Sep 17 00:00:00 2001 From: Ivan Schasny Date: Tue, 22 Oct 2024 11:32:09 +0100 Subject: [PATCH 3/3] Remove unused imports --- core/node/base_token_adjuster/src/base_token_l1_behaviour.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs b/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs index dab0d85d399..0922101e59d 100644 --- a/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs +++ b/core/node/base_token_adjuster/src/base_token_l1_behaviour.rs @@ -57,7 +57,7 @@ impl BaseTokenL1Behaviour { self.update_last_persisted_l1_ratio(prev_ratio.clone()); tracing::info!( "Fetched current base token ratio from the L1: {}", - prev_ratio.to_bigint() + prev_ratio ); prev_ratio };