Message transactions mortality (#1191)

* transactions mortality in message and complex relays

* logging + enable in test deployments

* spellcheck

* fmt
This commit is contained in:
Svyatoslav Nikolsky
2021-10-25 13:24:48 +03:00
committed by Bastian Köcher
parent e23266c7e6
commit 1ef41a59be
20 changed files with 253 additions and 64 deletions
@@ -18,6 +18,8 @@
#![warn(missing_docs)]
use std::time::Duration;
pub mod conversion_rate_update;
pub mod error;
pub mod finality_pipeline;
@@ -28,3 +30,12 @@ pub mod messages_lane;
pub mod messages_source;
pub mod messages_target;
pub mod on_demand_headers;
/// Default relay loop stall timeout. If transactions generated by relay are immortal, then
/// this timeout is used.
///
/// There are no any strict requirements on block time in Substrate. But we assume here that all
/// Substrate-based chains will be designed to produce relatively fast (compared to the slowest
/// blockchains) blocks. So 1 hour seems to be a good guess for (even congested) chains to mine
/// transaction, or remove it from the pool.
pub const STALL_TIMEOUT: Duration = Duration::from_secs(60 * 60);