Skip to content
Closed
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
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/3576-remove-load-shed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Do not load shed tower-abci info service.
([\#3576](https://github.com/anoma/namada/pull/3576))
9 changes: 1 addition & 8 deletions crates/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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! {
Expand Down
16 changes: 11 additions & 5 deletions crates/sdk/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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));
Expand Down