mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 18:27:56 +00:00
fix session length of Rococo and Wococo (#1304)
This commit is contained in:
committed by
Bastian Köcher
parent
01ee74c949
commit
e190c35c95
@@ -32,12 +32,12 @@ pub use bp_polkadot_core::*;
|
||||
/// Rococo Chain
|
||||
pub type Rococo = PolkadotLike;
|
||||
|
||||
/// The target length of a session (how often authorities change) on Westend measured in of number
|
||||
/// The target length of a session (how often authorities change) on Rococo measured in of number
|
||||
/// of blocks.
|
||||
///
|
||||
/// Note that since this is a target sessions may change before/after this time depending on network
|
||||
/// conditions.
|
||||
pub const SESSION_LENGTH: BlockNumber = 10 * time_units::MINUTES;
|
||||
pub const SESSION_LENGTH: BlockNumber = 1 * time_units::HOURS;
|
||||
|
||||
// NOTE: This needs to be kept up to date with the Rococo runtime found in the Polkadot repo.
|
||||
pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
|
||||
@@ -25,13 +25,18 @@ use sp_std::prelude::*;
|
||||
|
||||
pub use bp_polkadot_core::*;
|
||||
// Rococo runtime = Wococo runtime
|
||||
pub use bp_rococo::{
|
||||
WeightToFee, EXISTENTIAL_DEPOSIT, PAY_INBOUND_DISPATCH_FEE_WEIGHT, SESSION_LENGTH, VERSION,
|
||||
};
|
||||
pub use bp_rococo::{WeightToFee, EXISTENTIAL_DEPOSIT, PAY_INBOUND_DISPATCH_FEE_WEIGHT, VERSION};
|
||||
|
||||
/// Wococo Chain
|
||||
pub type Wococo = PolkadotLike;
|
||||
|
||||
/// The target length of a session (how often authorities change) on Wococo measured in of number
|
||||
/// of blocks.
|
||||
///
|
||||
/// Note that since this is a target sessions may change before/after this time depending on network
|
||||
/// conditions.
|
||||
pub const SESSION_LENGTH: BlockNumber = 1 * time_units::MINUTES;
|
||||
|
||||
// We use this to get the account on Wococo (target) which is derived from Rococo's (source)
|
||||
// account.
|
||||
pub fn derive_account_from_rococo_id(id: bp_runtime::SourceAccount<AccountId>) -> AccountId {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "substrate-relay"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
|
||||
@@ -192,8 +192,25 @@ async fn background_task<P: SubstrateFinalitySyncPipeline>(
|
||||
// there are no (or we don't need to relay them) mandatory headers in the range
|
||||
// => to avoid scanning the same headers over and over again, remember that
|
||||
latest_non_mandatory_at_source = mandatory_scan_range.1;
|
||||
|
||||
log::trace!(
|
||||
target: "bridge",
|
||||
"No mandatory {} headers in the range {:?} of {} relay",
|
||||
P::SourceChain::NAME,
|
||||
mandatory_scan_range,
|
||||
relay_task_name,
|
||||
);
|
||||
},
|
||||
Err(e) =>
|
||||
Err(e) => {
|
||||
log::warn!(
|
||||
target: "bridge",
|
||||
"Failed to scan mandatory {} headers range in {} relay (range: {:?}): {:?}",
|
||||
P::SourceChain::NAME,
|
||||
relay_task_name,
|
||||
mandatory_scan_range,
|
||||
e,
|
||||
);
|
||||
|
||||
if e.is_connection_error() {
|
||||
relay_utils::relay_loop::reconnect_failed_client(
|
||||
FailedClient::Source,
|
||||
@@ -203,7 +220,8 @@ async fn background_task<P: SubstrateFinalitySyncPipeline>(
|
||||
)
|
||||
.await;
|
||||
continue
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user