Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(state-keeper): Restore processed tx metrics in state keeper #2815

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/node/state_keeper/src/keeper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use zksync_multivm::{
},
utils::StorageWritesDeduplicator,
};
use zksync_shared_metrics::{TxStage, APP_METRICS};
use zksync_state::{OwnedStorage, ReadStorageFactory};
use zksync_types::{
block::L2BlockExecutionData, l2::TransactionType, protocol_upgrade::ProtocolUpgradeTx,
Expand Down Expand Up @@ -463,6 +464,9 @@ impl ZkSyncStateKeeper {
.with_context(|| format!("failed re-executing transaction {:?}", tx.hash()))?;
let result = TxExecutionResult::new(result, &tx);

APP_METRICS.processed_txs[&TxStage::StateKeeper].inc();
APP_METRICS.processed_l1_txs[&TxStage::StateKeeper].inc_by(tx.is_l1().into());

let TxExecutionResult::Success {
tx_result,
tx_metrics,
Expand Down Expand Up @@ -742,6 +746,9 @@ impl ZkSyncStateKeeper {
let exec_result = TxExecutionResult::new(exec_result, &tx);
latency.observe();

APP_METRICS.processed_txs[&TxStage::StateKeeper].inc();
APP_METRICS.processed_l1_txs[&TxStage::StateKeeper].inc_by(tx.is_l1().into());

let latency = KEEPER_METRICS.determine_seal_resolution.start();
// All of `TxExecutionResult::BootloaderOutOfGasForTx`,
// `Halt::NotEnoughGasProvided` correspond to out-of-gas errors but of different nature.
Expand Down
Loading