From 79d58285fb2aa98286724d4928a25275ab35798a Mon Sep 17 00:00:00 2001 From: Janito Vaqueiro Ferreira Filho Date: Wed, 4 May 2022 21:01:12 -0300 Subject: [PATCH] Increase block validation timeouts (#4156) * Increase UTXO lookup timeout Avoid block validation failures because UTXOs aren't available on time. * Increase the block verification timeout Attempt to reduce the synchronization restarts and consequently improve performance. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- zebra-consensus/src/transaction.rs | 2 +- zebrad/src/components/sync.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zebra-consensus/src/transaction.rs b/zebra-consensus/src/transaction.rs index 1ff6e16e..3f19389f 100644 --- a/zebra-consensus/src/transaction.rs +++ b/zebra-consensus/src/transaction.rs @@ -51,7 +51,7 @@ mod tests; /// to download, because a peer sent Zebra a bad list of block hashes. (The /// UTXO verification failure will restart the sync, and re-download the /// chain in the correct order.) -const UTXO_LOOKUP_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(3 * 60); +const UTXO_LOOKUP_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(6 * 60); /// Asynchronous transaction verification. /// diff --git a/zebrad/src/components/sync.rs b/zebrad/src/components/sync.rs index 85c47c9b..400786af 100644 --- a/zebrad/src/components/sync.rs +++ b/zebrad/src/components/sync.rs @@ -141,7 +141,7 @@ pub(super) const BLOCK_DOWNLOAD_TIMEOUT: Duration = Duration::from_secs(15); /// /// If this timeout is set too low, the syncer will sometimes get stuck in a /// failure loop. -pub(super) const BLOCK_VERIFY_TIMEOUT: Duration = Duration::from_secs(180); +pub(super) const BLOCK_VERIFY_TIMEOUT: Duration = Duration::from_secs(6 * 60); /// Controls how long we wait to restart syncing after finishing a sync run. ///