diff --git a/.changelog/unreleased/bug-fixes/3576-remove-load-shed.md b/.changelog/unreleased/bug-fixes/3576-remove-load-shed.md new file mode 100644 index 00000000000..5d21be56867 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/3576-remove-load-shed.md @@ -0,0 +1,2 @@ +- Do not load shed tower-abci info service. + ([\#3576](https://github.com/anoma/namada/pull/3576)) \ No newline at end of file diff --git a/crates/node/src/lib.rs b/crates/node/src/lib.rs index a7c0e73b0a2..c90b803a044 100644 --- a/crates/node/src/lib.rs +++ b/crates/node/src/lib.rs @@ -51,7 +51,6 @@ use once_cell::unsync::Lazy; use sysinfo::{RefreshKind, System, SystemExt}; use tokio::sync::mpsc; use tokio::task; -use tower::ServiceBuilder; use self::abortable::AbortableSpawner; use self::ethereum_oracle::last_processed_block; @@ -746,13 +745,7 @@ async fn run_abci( .consensus(consensus) .snapshot(snapshot) .mempool(mempool) // don't load_shed, it will make CometBFT crash - .info( - ServiceBuilder::new() - .load_shed() - .buffer(100) - .rate_limit(50, std::time::Duration::from_secs(1)) - .service(info), - ) + .info(info) // don't load_shed, it will make tower-abci crash .finish() .unwrap(); tokio::select! { diff --git a/crates/sdk/src/tx.rs b/crates/sdk/src/tx.rs index c0446e6e982..48e1bd9c9a9 100644 --- a/crates/sdk/src/tx.rs +++ b/crates/sdk/src/tx.rs @@ -3548,10 +3548,15 @@ pub async fn build_update_account( let threshold = *threshold; let invalid_threshold = threshold.is_zero(); - let invalid_threshold_updated = !public_keys.is_empty() && public_keys.len() < threshold as usize; - let invalid_threshold_current = public_keys.is_empty() && account.get_all_public_keys().len() < threshold as usize; - - if invalid_threshold || invalid_threshold_updated || invalid_threshold_current { + let invalid_threshold_updated = + !public_keys.is_empty() && public_keys.len() < threshold as usize; + let invalid_threshold_current = public_keys.is_empty() + && account.get_all_public_keys().len() < threshold as usize; + + if invalid_threshold + || invalid_threshold_updated + || invalid_threshold_current + { edisplay_line!( context.io(), "Invalid account threshold: either the provided threshold is \ @@ -3566,7 +3571,8 @@ pub async fn build_update_account( Some(threshold) } else { - let invalid_too_few_pks = !public_keys.is_empty() && public_keys.len() < account.threshold as usize; + let invalid_too_few_pks = !public_keys.is_empty() + && public_keys.len() < account.threshold as usize; if invalid_too_few_pks { return Err(Error::from(TxSubmitError::InvalidAccountThreshold));