mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 07:31:02 +00:00
Westend->Millau headers relay in deployments (#831)
* reorganize monitoring * Westend->Millau bridge * support multiple bridges * initialize Westend -> Millau bridge byMillau.George * fix intersecting ports * ignore dashboards * single bridged network * deal with multple --env-file args * fix chain name * use images from docker hub * update show_help * updated comment * mount whole dashboards directory * removed unneeded network * reverted reverse-proxy changes * prometheus -> targets * separate Grafana.Dockerfile with builtin /etc/grafana * Revert "separate Grafana.Dockerfile with builtin /etc/grafana" This reverts commit 53e04c4556f882d19e3af0fac581a926b8e0c167. * read dashboards from /etc/grafana/dashboards * stop comment
This commit is contained in:
committed by
Bastian Köcher
parent
1c7b5d1b30
commit
647eb80165
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
use bp_millau::derive_account_from_rialto_id;
|
use bp_millau::derive_account_from_rialto_id;
|
||||||
use millau_runtime::{
|
use millau_runtime::{
|
||||||
AccountId, AuraConfig, BalancesConfig, BridgeRialtoConfig, GenesisConfig, GrandpaConfig, SessionConfig,
|
AccountId, AuraConfig, BalancesConfig, BridgeRialtoConfig, BridgeWestendFinalityVerifierConfig, GenesisConfig,
|
||||||
SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
GrandpaConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||||
};
|
};
|
||||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||||
use sp_core::{sr25519, Pair, Public};
|
use sp_core::{sr25519, Pair, Public};
|
||||||
@@ -179,6 +179,13 @@ fn testnet_genesis(
|
|||||||
.map(|x| (x.0.clone(), x.0.clone(), session_keys(x.1.clone(), x.2.clone())))
|
.map(|x| (x.0.clone(), x.0.clone(), session_keys(x.1.clone(), x.2.clone())))
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
}),
|
}),
|
||||||
|
pallet_finality_verifier_Instance1: Some(BridgeWestendFinalityVerifierConfig {
|
||||||
|
// for our deployments to avoid multiple same-nonces transactions:
|
||||||
|
// //Alice is already used to initialize Rialto<->Millau bridge
|
||||||
|
// => let's use //George to initialize Westend->Millau bridge
|
||||||
|
owner: Some(get_account_id_from_seed::<sr25519::Public>("George")),
|
||||||
|
..Default::default()
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ construct_runtime!(
|
|||||||
BridgeRialtoMessages: pallet_bridge_messages::{Module, Call, Storage, Event<T>},
|
BridgeRialtoMessages: pallet_bridge_messages::{Module, Call, Storage, Event<T>},
|
||||||
BridgeCallDispatch: pallet_bridge_call_dispatch::{Module, Event<T>},
|
BridgeCallDispatch: pallet_bridge_call_dispatch::{Module, Event<T>},
|
||||||
BridgeRialtoFinalityVerifier: pallet_finality_verifier::{Module, Call},
|
BridgeRialtoFinalityVerifier: pallet_finality_verifier::{Module, Call},
|
||||||
BridgeWestendFinalityVerifier: pallet_finality_verifier::<Instance1>::{Module, Call},
|
BridgeWestendFinalityVerifier: pallet_finality_verifier::<Instance1>::{Module, Call, Config<T>},
|
||||||
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
||||||
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
||||||
|
|||||||
@@ -256,8 +256,10 @@ pub mod pallet {
|
|||||||
|
|
||||||
#[pallet::genesis_config]
|
#[pallet::genesis_config]
|
||||||
pub struct GenesisConfig<T: Config<I>, I: 'static = ()> {
|
pub struct GenesisConfig<T: Config<I>, I: 'static = ()> {
|
||||||
owner: Option<T::AccountId>,
|
/// Optional module owner account.
|
||||||
init_data: Option<super::InitializationData<BridgedHeader<T, I>>>,
|
pub owner: Option<T::AccountId>,
|
||||||
|
/// Optional module initialization data.
|
||||||
|
pub init_data: Option<super::InitializationData<BridgedHeader<T, I>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
|
|||||||
@@ -115,6 +115,9 @@ async fn run_init_bridge(command: cli::InitBridge) -> Result<(), String> {
|
|||||||
.next_account_index(millau_sign.signer.public().into())
|
.next_account_index(millau_sign.signer.public().into())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
// at Westend -> Millau initialization we're not using sudo, because otherwise our deployments
|
||||||
|
// may fail, because we need to initialize both Rialto -> Millau and Westend -> Millau bridge.
|
||||||
|
// => since there's single possible sudo account, one of transaction may fail with duplicate nonce error
|
||||||
crate::headers_initialize::initialize(westend_client, millau_client.clone(), move |initialization_data| {
|
crate::headers_initialize::initialize(westend_client, millau_client.clone(), move |initialization_data| {
|
||||||
let initialize_call = millau_runtime::FinalityBridgeWestendCall::<
|
let initialize_call = millau_runtime::FinalityBridgeWestendCall::<
|
||||||
millau_runtime::Runtime,
|
millau_runtime::Runtime,
|
||||||
@@ -126,7 +129,7 @@ async fn run_init_bridge(command: cli::InitBridge) -> Result<(), String> {
|
|||||||
*millau_client.genesis_hash(),
|
*millau_client.genesis_hash(),
|
||||||
&millau_sign.signer,
|
&millau_sign.signer,
|
||||||
millau_signer_next_index,
|
millau_signer_next_index,
|
||||||
millau_runtime::SudoCall::sudo(Box::new(initialize_call.into())).into(),
|
initialize_call.into(),
|
||||||
)
|
)
|
||||||
.encode(),
|
.encode(),
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user