Remove Substrate Pallet (#866)

* Remove `pallet-substrate-bridge`

* Fix transfer call encoding test

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
Hernando Castano
2021-04-06 06:19:23 -04:00
committed by Bastian Köcher
parent cb90ea0979
commit 2f1c4c23fc
16 changed files with 5 additions and 2741 deletions
+2 -7
View File
@@ -16,8 +16,8 @@
use bp_millau::derive_account_from_rialto_id;
use millau_runtime::{
AccountId, AuraConfig, BalancesConfig, BridgeRialtoConfig, BridgeWestendGrandpaConfig, GenesisConfig,
GrandpaConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
AccountId, AuraConfig, BalancesConfig, BridgeWestendGrandpaConfig, GenesisConfig, GrandpaConfig, SessionConfig,
SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
};
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{sr25519, Pair, Public};
@@ -167,11 +167,6 @@ fn testnet_genesis(
pallet_grandpa: Some(GrandpaConfig {
authorities: Vec::new(),
}),
pallet_substrate_bridge: Some(BridgeRialtoConfig {
// We'll initialize the pallet with a dispatchable instead.
init_data: None,
owner: Some(root_key.clone()),
}),
pallet_sudo: Some(SudoConfig { key: root_key }),
pallet_session: Some(SessionConfig {
keys: initial_authorities
-2
View File
@@ -25,7 +25,6 @@ pallet-bridge-dispatch = { path = "../../../modules/dispatch", default-features
pallet-bridge-grandpa = { path = "../../../modules/grandpa", default-features = false }
pallet-bridge-messages = { path = "../../../modules/messages", default-features = false }
pallet-shift-session-manager = { path = "../../../modules/shift-session-manager", default-features = false }
pallet-substrate-bridge = { path = "../../../modules/substrate", default-features = false }
# Substrate Dependencies
@@ -83,7 +82,6 @@ std = [
"pallet-randomness-collective-flip/std",
"pallet-session/std",
"pallet-shift-session-manager/std",
"pallet-substrate-bridge/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
-29
View File
@@ -65,7 +65,6 @@ pub use pallet_balances::Call as BalancesCall;
pub use pallet_bridge_grandpa::Call as BridgeGrandpaRialtoCall;
pub use pallet_bridge_grandpa::Call as BridgeGrandpaWestendCall;
pub use pallet_bridge_messages::Call as MessagesCall;
pub use pallet_substrate_bridge::Call as BridgeRialtoCall;
pub use pallet_sudo::Call as SudoCall;
pub use pallet_timestamp::Call as TimestampCall;
@@ -301,10 +300,6 @@ impl pallet_session::Config for Runtime {
type WeightInfo = ();
}
impl pallet_substrate_bridge::Config for Runtime {
type BridgedChain = bp_rialto::Rialto;
}
parameter_types! {
// This is a pretty unscientific cap.
//
@@ -383,7 +378,6 @@ construct_runtime!(
NodeBlock = opaque::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
BridgeRialto: pallet_substrate_bridge::{Module, Call, Storage, Config<T>},
BridgeRialtoMessages: pallet_bridge_messages::{Module, Call, Storage, Event<T>},
BridgeDispatch: pallet_bridge_dispatch::{Module, Event<T>},
BridgeRialtoGrandpa: pallet_bridge_grandpa::{Module, Call, Storage},
@@ -563,29 +557,6 @@ impl_runtime_apis! {
}
}
impl bp_rialto::RialtoHeaderApi<Block> for Runtime {
fn best_blocks() -> Vec<(bp_rialto::BlockNumber, bp_rialto::Hash)> {
BridgeRialto::best_headers()
}
fn finalized_block() -> (bp_rialto::BlockNumber, bp_rialto::Hash) {
let header = BridgeRialto::best_finalized();
(header.number, header.hash())
}
fn incomplete_headers() -> Vec<(bp_rialto::BlockNumber, bp_rialto::Hash)> {
BridgeRialto::require_justifications()
}
fn is_known_block(hash: bp_rialto::Hash) -> bool {
BridgeRialto::is_known_header(hash)
}
fn is_finalized_block(hash: bp_rialto::Hash) -> bool {
BridgeRialto::is_finalized_header(hash)
}
}
impl bp_rialto::RialtoFinalityApi<Block> for Runtime {
fn best_finalized() -> (bp_rialto::BlockNumber, bp_rialto::Hash) {
let header = BridgeRialtoGrandpa::best_finalized();