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

chore: update deps #615

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
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
649 changes: 419 additions & 230 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ futures = "0.3.28"
futures-util = "0.3.28"
itertools = "0.12.1"
jsonrpsee = "0.20.1"
metrics = "0.21.0"
mockall = "0.11.4"
parse-display = "0.8.0"
metrics = "0.22.1"
mockall = "0.12.1"
parse-display = "0.9.0"
pin-project = "1.0.12"
prost = "0.12.0"
serde = "1.0.160"
serde_json = "1.0.64"
rand = "0.8.5"
reqwest = { version = "0.11.18", default-features = false, features = ["rustls-tls"] }
rustls = "0.21.7"
rustls = "0.22.2"
thiserror = "1.0.40"
tokio = { version = "1.27.0", default-features = false }
tokio-util = "0.7.8"
tonic = "0.10.0"
tonic-build = "0.10.0"
tonic-health = "0.10.0"
tonic-reflection = "0.10.0"
tonic-types = "0.10.0"
tonic = "0.11.0"
tonic-build = "0.11.0"
tonic-health = "0.11.0"
tonic-reflection = "0.11.0"
tonic-types = "0.11.0"
tower = "0.4.13"
tracing = "0.1.37"
strum = "0.25.0"
strum = { version = "0.26.1", features = ["derive"] }
url = "2.3.1"
12 changes: 6 additions & 6 deletions bin/rundler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ config = "0.14.0"
clap = { version = "4.4.4", features = ["derive", "env"] }
dotenv = "0.15.0"
ethers.workspace = true
itertools = "0.11.0"
metrics = "0.21.0"
metrics-exporter-prometheus = "0.12.0"
itertools = "0.12.1"
metrics = "0.22.1"
metrics-exporter-prometheus = "0.13.1"
metrics-process = "1.0.10"
metrics-util = "0.15.0"
metrics-util = "0.16.2"
paste = "1.0"
rusoto_core = { version = "0.48.0", default-features = false, features = ["rustls"] }
rusoto_s3 = { version = "0.48.0", default-features = false, features = ["rustls"] }
Expand All @@ -38,9 +38,9 @@ serde_json.workspace = true
sscanf = "0.4.0"
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal", "sync"] }
tokio-metrics = "0.3.1"
tokio-rustls = "0.24.1"
tokio-rustls = "0.25.0"
tokio-util = "0.7.8"
tracing.workspace = true
tracing-appender = "0.2.2"
tracing-log = "0.1.3"
tracing-log = "0.2.0"
tracing-subscriber = { version = "0.3.16", features = ["env-filter", "fmt", "json"] }
223 changes: 67 additions & 156 deletions bin/rundler/src/cli/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,160 +68,71 @@ fn collect_tokio(
runtime_metrics: &tokio::runtime::RuntimeMetrics,
worker_metrics: tokio_metrics::RuntimeMetrics,
) {
gauge!(
format!("{}num_workers", TOKIO_PREFIX),
runtime_metrics.num_workers() as f64
);
gauge!(
format!("{}num_blocking_threads", TOKIO_PREFIX),
runtime_metrics.num_blocking_threads() as f64
);
gauge!(
format!("{}active_tasks_count", TOKIO_PREFIX),
runtime_metrics.active_tasks_count() as f64
);
gauge!(
format!("{}num_idle_blocking_threads", TOKIO_PREFIX),
runtime_metrics.num_idle_blocking_threads() as f64
);
gauge!(
format!("{}blocking_queue_depth", TOKIO_PREFIX),
runtime_metrics.blocking_queue_depth() as f64
);
gauge!(
format!("{}total_park_count", TOKIO_PREFIX),
worker_metrics.total_park_count as f64
);
gauge!(
format!("{}max_park_count", TOKIO_PREFIX),
worker_metrics.max_park_count as f64
);
gauge!(
format!("{}min_park_count", TOKIO_PREFIX),
worker_metrics.min_park_count as f64
);
gauge!(
format!("{}mean_poll_duration", TOKIO_PREFIX),
worker_metrics.mean_poll_duration.as_secs_f64()
);
gauge!(
format!("{}mean_poll_duration_worker_min", TOKIO_PREFIX),
worker_metrics.mean_poll_duration_worker_min.as_secs_f64()
);
gauge!(
format!("{}mean_poll_duration_worker_max", TOKIO_PREFIX),
worker_metrics.mean_poll_duration_worker_max.as_secs_f64()
);
gauge!(
format!("{}total_noop_count", TOKIO_PREFIX),
worker_metrics.total_noop_count as f64,
);
gauge!(
format!("{}max_noop_count", TOKIO_PREFIX),
worker_metrics.max_noop_count as f64,
);
gauge!(
format!("{}min_noop_count", TOKIO_PREFIX),
worker_metrics.min_noop_count as f64,
);
gauge!(
format!("{}total_steal_count", TOKIO_PREFIX),
worker_metrics.total_steal_count as f64,
);
gauge!(
format!("{}max_steal_count", TOKIO_PREFIX),
worker_metrics.max_steal_count as f64,
);
gauge!(
format!("{}min_steal_count", TOKIO_PREFIX),
worker_metrics.min_steal_count as f64,
);
gauge!(
format!("{}total_steal_operations", TOKIO_PREFIX),
worker_metrics.total_steal_operations as f64,
);
gauge!(
format!("{}max_steal_operations", TOKIO_PREFIX),
worker_metrics.max_steal_operations as f64,
);
gauge!(
format!("{}min_steal_operations", TOKIO_PREFIX),
worker_metrics.min_steal_operations as f64,
);
gauge!(
format!("{}num_remote_schedules", TOKIO_PREFIX),
worker_metrics.num_remote_schedules as f64,
);
gauge!(
format!("{}total_local_schedule_count", TOKIO_PREFIX),
worker_metrics.total_local_schedule_count as f64,
);
gauge!(
format!("{}max_local_schedule_count", TOKIO_PREFIX),
worker_metrics.max_local_schedule_count as f64,
);
gauge!(
format!("{}min_local_schedule_count", TOKIO_PREFIX),
worker_metrics.min_local_schedule_count as f64,
);
gauge!(
format!("{}total_overflow_count", TOKIO_PREFIX),
worker_metrics.total_overflow_count as f64,
);
gauge!(
format!("{}max_overflow_count", TOKIO_PREFIX),
worker_metrics.max_overflow_count as f64,
);
gauge!(
format!("{}min_overflow_count", TOKIO_PREFIX),
worker_metrics.min_overflow_count as f64,
);
gauge!(
format!("{}total_polls_count", TOKIO_PREFIX),
worker_metrics.total_polls_count as f64,
);
gauge!(
format!("{}max_polls_count", TOKIO_PREFIX),
worker_metrics.max_polls_count as f64,
);
gauge!(
format!("{}min_polls_count", TOKIO_PREFIX),
worker_metrics.min_polls_count as f64,
);
gauge!(
format!("{}total_busy_duration", TOKIO_PREFIX),
worker_metrics.total_busy_duration.as_secs_f64(),
);
gauge!(
format!("{}max_busy_duration", TOKIO_PREFIX),
worker_metrics.max_busy_duration.as_secs_f64(),
);
gauge!(
format!("{}min_busy_duration", TOKIO_PREFIX),
worker_metrics.min_busy_duration.as_secs_f64(),
);
gauge!(
format!("{}injection_queue_depth", TOKIO_PREFIX),
worker_metrics.injection_queue_depth as f64,
);
gauge!(
format!("{}total_local_queue_depth", TOKIO_PREFIX),
worker_metrics.total_local_queue_depth as f64,
);
gauge!(
format!("{}max_local_queue_depth", TOKIO_PREFIX),
worker_metrics.max_local_queue_depth as f64,
);
gauge!(
format!("{}min_local_queue_depth", TOKIO_PREFIX),
worker_metrics.min_local_queue_depth as f64,
);
gauge!(
format!("{}budget_forced_yield_count", TOKIO_PREFIX),
worker_metrics.budget_forced_yield_count as f64,
);
gauge!(
format!("{}io_driver_ready_count", TOKIO_PREFIX),
worker_metrics.io_driver_ready_count as f64,
);
gauge!(format!("{}num_workers", TOKIO_PREFIX)).set(runtime_metrics.num_workers() as f64);
gauge!(format!("{}num_blocking_threads", TOKIO_PREFIX))
.set(runtime_metrics.num_blocking_threads() as f64);
gauge!(format!("{}active_tasks_count", TOKIO_PREFIX))
.set(runtime_metrics.active_tasks_count() as f64);
gauge!(format!("{}num_idle_blocking_threads", TOKIO_PREFIX))
.set(runtime_metrics.num_idle_blocking_threads() as f64);
gauge!(format!("{}blocking_queue_depth", TOKIO_PREFIX))
.set(runtime_metrics.blocking_queue_depth() as f64);
gauge!(format!("{}total_park_count", TOKIO_PREFIX)).set(worker_metrics.total_park_count as f64);
gauge!(format!("{}max_park_count", TOKIO_PREFIX)).set(worker_metrics.max_park_count as f64);
gauge!(format!("{}min_park_count", TOKIO_PREFIX)).set(worker_metrics.min_park_count as f64);
gauge!(format!("{}mean_poll_duration", TOKIO_PREFIX))
.set(worker_metrics.mean_poll_duration.as_secs_f64());
gauge!(format!("{}mean_poll_duration_worker_min", TOKIO_PREFIX))
.set(worker_metrics.mean_poll_duration_worker_min.as_secs_f64());
gauge!(format!("{}mean_poll_duration_worker_max", TOKIO_PREFIX))
.set(worker_metrics.mean_poll_duration_worker_max.as_secs_f64());
gauge!(format!("{}total_noop_count", TOKIO_PREFIX)).set(worker_metrics.total_noop_count as f64);
gauge!(format!("{}max_noop_count", TOKIO_PREFIX)).set(worker_metrics.max_noop_count as f64);
gauge!(format!("{}min_noop_count", TOKIO_PREFIX)).set(worker_metrics.min_noop_count as f64);
gauge!(format!("{}total_steal_count", TOKIO_PREFIX))
.set(worker_metrics.total_steal_count as f64);
gauge!(format!("{}max_steal_count", TOKIO_PREFIX),).set(worker_metrics.max_steal_count as f64);
gauge!(format!("{}min_steal_count", TOKIO_PREFIX),).set(worker_metrics.min_steal_count as f64);
gauge!(format!("{}total_steal_operations", TOKIO_PREFIX))
.set(worker_metrics.total_steal_operations as f64);
gauge!(format!("{}max_steal_operations", TOKIO_PREFIX))
.set(worker_metrics.max_steal_operations as f64);
gauge!(format!("{}min_steal_operations", TOKIO_PREFIX))
.set(worker_metrics.min_steal_operations as f64);
gauge!(format!("{}num_remote_schedules", TOKIO_PREFIX))
.set(worker_metrics.num_remote_schedules as f64);
gauge!(format!("{}total_local_schedule_count", TOKIO_PREFIX))
.set(worker_metrics.total_local_schedule_count as f64);
gauge!(format!("{}max_local_schedule_count", TOKIO_PREFIX),)
.set(worker_metrics.max_local_schedule_count as f64);
gauge!(format!("{}min_local_schedule_count", TOKIO_PREFIX),)
.set(worker_metrics.min_local_schedule_count as f64);
gauge!(format!("{}total_overflow_count", TOKIO_PREFIX))
.set(worker_metrics.total_overflow_count as f64);
gauge!(format!("{}max_overflow_count", TOKIO_PREFIX))
.set(worker_metrics.max_overflow_count as f64);
gauge!(format!("{}min_overflow_count", TOKIO_PREFIX),)
.set(worker_metrics.min_overflow_count as f64);
gauge!(format!("{}total_polls_count", TOKIO_PREFIX))
.set(worker_metrics.total_polls_count as f64);
gauge!(format!("{}max_polls_count", TOKIO_PREFIX)).set(worker_metrics.max_polls_count as f64);
gauge!(format!("{}min_polls_count", TOKIO_PREFIX)).set(worker_metrics.min_polls_count as f64);
gauge!(format!("{}total_busy_duration", TOKIO_PREFIX))
.set(worker_metrics.total_busy_duration.as_secs_f64());
gauge!(format!("{}max_busy_duration", TOKIO_PREFIX))
.set(worker_metrics.max_busy_duration.as_secs_f64());
gauge!(format!("{}min_busy_duration", TOKIO_PREFIX))
.set(worker_metrics.min_busy_duration.as_secs_f64());
gauge!(format!("{}injection_queue_depth", TOKIO_PREFIX))
.set(worker_metrics.injection_queue_depth as f64);
gauge!(format!("{}total_local_queue_depth", TOKIO_PREFIX))
.set(worker_metrics.total_local_queue_depth as f64);
gauge!(format!("{}max_local_queue_depth", TOKIO_PREFIX))
.set(worker_metrics.max_local_queue_depth as f64);
gauge!(format!("{}min_local_queue_depth", TOKIO_PREFIX))
.set(worker_metrics.min_local_queue_depth as f64);
gauge!(format!("{}budget_forced_yield_count", TOKIO_PREFIX))
.set(worker_metrics.budget_forced_yield_count as f64);
gauge!(format!("{}io_driver_ready_count", TOKIO_PREFIX))
.set(worker_metrics.io_driver_ready_count as f64);
}
2 changes: 1 addition & 1 deletion crates/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pin-project.workspace = true
prost.workspace = true
parse-display.workspace = true
reqwest.workspace = true
rslock = "0.2.2"
rslock = "0.3.0"
rusoto_core = { version = "0.48.0", default-features = false, features = ["rustls"] }
rusoto_kms = { version = "0.48.0", default-features = false, features = ["rustls"] }
thiserror.workspace = true
Expand Down
32 changes: 14 additions & 18 deletions crates/builder/src/bundle_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,56 +573,52 @@ struct BuilderMetrics {}

impl BuilderMetrics {
fn increment_bundle_txns_sent(builder_index: u64) {
metrics::increment_counter!("builder_bundle_txns_sent", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_txns_sent", "builder_index" => builder_index.to_string())
.increment(1);
}

fn increment_bundle_txns_success(builder_index: u64) {
metrics::increment_counter!("builder_bundle_txns_success", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_txns_success", "builder_index" => builder_index.to_string()).increment(1);
}

fn increment_bundle_txns_dropped(builder_index: u64) {
metrics::increment_counter!("builder_bundle_txns_dropped", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_txns_dropped", "builder_index" => builder_index.to_string()).increment(1);
}

// used when we decide to stop trying a transaction
fn increment_bundle_txns_abandoned(builder_index: u64) {
metrics::increment_counter!("builder_bundle_txns_abandoned", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_txns_abandoned", "builder_index" => builder_index.to_string()).increment(1);
}

// used when sending a transaction fails
fn increment_bundle_txns_failed(builder_index: u64) {
metrics::increment_counter!("builder_bundle_txns_failed", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_txns_failed", "builder_index" => builder_index.to_string()).increment(1);
}

fn increment_bundle_txns_nonce_used(builder_index: u64) {
metrics::increment_counter!("builder_bundle_txns_nonce_used", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_txns_nonce_used", "builder_index" => builder_index.to_string()).increment(1);
}

fn increment_bundle_txn_fee_increases(builder_index: u64) {
metrics::increment_counter!("builder_bundle_fee_increases", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_fee_increases", "builder_index" => builder_index.to_string()).increment(1);
}

fn increment_bundle_txn_replacement_underpriced(builder_index: u64) {
metrics::increment_counter!("builder_bundle_replacement_underpriced", "builder_index" => builder_index.to_string());
metrics::counter!("builder_bundle_replacement_underpriced", "builder_index" => builder_index.to_string()).increment(1);
}

fn set_bundle_gas_stats(gas_limit: Option<U256>, gas_used: Option<U256>) {
if let Some(limit) = gas_limit {
metrics::counter!("builder_bundle_gas_limit", limit.as_u64());
metrics::counter!("builder_bundle_gas_limit").increment(limit.as_u64());
}
if let Some(used) = gas_used {
metrics::counter!("builder_bundle_gas_used", used.as_u64());
metrics::counter!("builder_bundle_gas_used").increment(used.as_u64());
}
}

fn set_current_fees(fees: &GasFees) {
metrics::gauge!(
"builder_current_max_fee",
fees.max_fee_per_gas.as_u128() as f64
);
metrics::gauge!(
"builder_current_max_priority_fee",
fees.max_priority_fee_per_gas.as_u128() as f64
);
metrics::gauge!("builder_current_max_fee").set(fees.max_fee_per_gas.as_u128() as f64);
metrics::gauge!("builder_current_max_priority_fee")
.set(fees.max_priority_fee_per_gas.as_u128() as f64);
}
}
3 changes: 2 additions & 1 deletion crates/builder/src/signer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ pub(crate) async fn monitor_account_balance<M: Middleware>(addr: Address, provid
// converting to u64. This keeps six decimal places.
let eth_balance = (balance / 10_u64.pow(12)).as_u64() as f64 / 1e6;
tracing::info!("account {addr:?} balance: {}", eth_balance);
metrics::gauge!("bundle_builder_account_balance", eth_balance, "addr" => format!("{addr:?}"));
metrics::gauge!("bundle_builder_account_balance", "addr" => format!("{addr:?}"))
.set(eth_balance);
}
Err(err) => {
tracing::error!("Get account {addr:?} balance error {err:?}");
Expand Down
Loading
Loading