pub async fn keep_updated(&self) -> anyhow::Result<()> {
        // Subtracting 1 from the "latest" block number to prevent errors in case
        // the info about the latest block is not yet present on the node.
        // This sometimes happens on Infura.
        let current_block = self
            .client
            .inner
            .block_number()
            .await?
            .as_usize()
            .saturating_sub(1);

        let last_processed_block = self.base_fee_statistics.last_processed_block();

        if current_block > last_processed_block {
            let n_blocks = current_block - last_processed_block;
            let fee_data = self
                .client
                .inner
                .base_fee_history(current_block, n_blocks)
                .await?;

            // We shouldn't rely on L1 provider to return consistent results, so we check that we have at least one new sample.
            if let Some(current_base_fee_per_gas) = fee_data.last().map(|fee| fee.base_fee_per_gas)
            {
                METRICS
                    .current_base_fee_per_gas
                    .set(current_base_fee_per_gas);
            }
            self.base_fee_statistics
                .add_samples(fee_data.iter().map(|fee| fee.base_fee_per_gas));

            if let Some(current_blob_base_fee) =
                fee_data.last().map(|fee| fee.base_fee_per_blob_gas)
            {
                // Blob base fee overflows `u64` only in very extreme cases.
                // It isn't worth to observe exact value with metric because anyway values that can be used
                // are capped by `self.config.max_blob_base_fee()` of `u64` type.
                if current_blob_base_fee > U256::from(u64::MAX) {
                    tracing::error!("Failed to report current_blob_base_fee = {current_blob_base_fee}, it exceeds u64::MAX");
                } else {
                    METRICS
                        .current_blob_base_fee
                        .set(current_blob_base_fee.as_u64());
                }
            }
            self.blob_base_fee_statistics
                .add_samples(fee_data.iter().map(|fee| fee.base_fee_per_blob_gas));

            if let Some(current_l2_pubdata_price) = fee_data.last().map(|fee| fee.l2_pubdata_price)
            {
                // L2 pubdata price overflows `u64` only in very extreme cases.
                // It isn't worth to observe exact value with metric because anyway values that can be used
                // are capped by `self.config.max_blob_base_fee()` of `u64` type.
                if current_l2_pubdata_price > U256::from(u64::MAX) {
                    tracing::error!("Failed to report current_l2_pubdata_price = {current_l2_pubdata_price}, it exceeds u64::MAX");
                } else {
                    METRICS
                        .current_l2_pubdata_price
                        .set(current_l2_pubdata_price.as_u64());
                }
            }
            self.l2_pubdata_price_statistics
                .add_samples(fee_data.iter().map(|fee| fee.l2_pubdata_price));

            self.gas_per_pubdata_price_statistic
                .add_samples(fee_data.iter().map(|base_fee| base_fee.gas_per_pubdata()));
        }
        Ok(())
    }
Performs an actualization routine for `GasAdjuster`.
This method is intended to be invoked periodically.
core/node/fee_model/src/l1_gas_price/gas_adjuster/mod.rs