mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Message transactions mortality (#1191)
* transactions mortality in message and complex relays * logging + enable in test deployments * spellcheck * fmt
This commit is contained in:
committed by
Bastian Köcher
parent
e23266c7e6
commit
1ef41a59be
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Substrate-to-Substrate headers sync entrypoint.
|
||||
|
||||
use crate::finality_target::SubstrateFinalityTarget;
|
||||
use crate::{finality_target::SubstrateFinalityTarget, STALL_TIMEOUT};
|
||||
|
||||
use bp_header_chain::justification::GrandpaJustification;
|
||||
use bp_runtime::AccountIdOf;
|
||||
@@ -26,16 +26,8 @@ use relay_substrate_client::{
|
||||
};
|
||||
use relay_utils::{metrics::MetricsParams, BlockNumberBase};
|
||||
use sp_core::Bytes;
|
||||
use std::{fmt::Debug, marker::PhantomData, time::Duration};
|
||||
use std::{fmt::Debug, marker::PhantomData};
|
||||
|
||||
/// Default synchronization loop 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(crate) const STALL_TIMEOUT: Duration = Duration::from_secs(60 * 60);
|
||||
/// Default limit of recent finality proofs.
|
||||
///
|
||||
/// Finality delay of 4096 blocks is unlikely to happen in practice in
|
||||
@@ -165,8 +157,8 @@ where
|
||||
stall_timeout: relay_substrate_client::transaction_stall_timeout(
|
||||
transactions_mortality,
|
||||
TargetChain::AVERAGE_BLOCK_INTERVAL,
|
||||
)
|
||||
.unwrap_or(STALL_TIMEOUT),
|
||||
STALL_TIMEOUT,
|
||||
),
|
||||
only_mandatory_headers,
|
||||
},
|
||||
metrics_params,
|
||||
|
||||
Reference in New Issue
Block a user