From a2d2a5cc9b0ddd0083a07ad15cb8fee3ab52485b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 5 Dec 2022 16:10:14 +0100 Subject: [PATCH] Removed Sudo pallet --- Cargo.lock | 1 - .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 2 -- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 8 -------- polkadot-parachain/src/chain_spec/bridge_hubs.rs | 13 ------------- 4 files changed, 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa5f25f2bb..a12f111e27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -995,7 +995,6 @@ dependencies = [ "pallet-collator-selection", "pallet-session", "pallet-shift-session-manager", - "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index 6adb8e1c15..6b453580dd 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -28,7 +28,6 @@ pallet-aura = { git = "https://github.com/paritytech/substrate", default-feature pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } @@ -125,7 +124,6 @@ std = [ "pallet-shift-session-manager/std", "pallet-collator-selection/std", "pallet-session/std", - "pallet-sudo/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index a398e17724..b673e95fc8 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -452,11 +452,6 @@ impl pallet_collator_selection::Config for Runtime { type WeightInfo = (); } -impl pallet_sudo::Config for Runtime { - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; -} - // Add bridge pallets (GPA) /// Add granda bridge pallet to track Wococo relay chain on Rococo BridgeHub @@ -626,9 +621,6 @@ construct_runtime!( BridgeRococoGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Config} = 43, BridgeRococoParachain: pallet_bridge_parachains::::{Pallet, Call, Storage, Event} = 44, BridgeRococoMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 45, - - // Sudo - Sudo: pallet_sudo::{Pallet, Call, Config, Event, Storage} = 100, } ); diff --git a/polkadot-parachain/src/chain_spec/bridge_hubs.rs b/polkadot-parachain/src/chain_spec/bridge_hubs.rs index 96072825f0..e03fcde35d 100644 --- a/polkadot-parachain/src/chain_spec/bridge_hubs.rs +++ b/polkadot-parachain/src/chain_spec/bridge_hubs.rs @@ -73,7 +73,6 @@ impl BridgeHubRuntimeType { "rococo", ParaId::new(1013), None, - None, ))) } else { Ok(Box::new(rococo::BridgeHubChainSpec::from_json_bytes( @@ -86,7 +85,6 @@ impl BridgeHubRuntimeType { ChainType::Local, "rococo-local", ParaId::new(1013), - Some("Alice".to_string()), Some("Bob".to_string()), ))), BridgeHubRuntimeType::Wococo { default_config } => @@ -98,7 +96,6 @@ impl BridgeHubRuntimeType { "wococo", ParaId::new(1014), None, - None, ))) } else { Ok(Box::new(rococo::BridgeHubChainSpec::from_json_bytes( @@ -111,7 +108,6 @@ impl BridgeHubRuntimeType { ChainType::Local, "wococo-local", ParaId::new(1014), - Some("Alice".to_string()), Some("Bob".to_string()), ))), } @@ -166,7 +162,6 @@ pub mod rococo { chain_type: ChainType, relay_chain: &str, para_id: ParaId, - root_key_seed: Option, bridges_pallet_owner_seed: Option, ) -> BridgeHubChainSpec { let properties = sc_chain_spec::Properties::new(); @@ -209,9 +204,6 @@ pub mod rococo { get_account_id_from_seed::("Ferdie//stash"), ], para_id, - root_key_seed - .as_ref() - .map(|seed| get_account_id_from_seed::(&seed)), bridges_pallet_owner_seed .as_ref() .map(|seed| get_account_id_from_seed::(&seed)), @@ -230,7 +222,6 @@ pub mod rococo { invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, - root_key: Option, bridges_pallet_owner: Option, ) -> bridge_hub_rococo_runtime::GenesisConfig { bridge_hub_rococo_runtime::GenesisConfig { @@ -267,8 +258,6 @@ pub mod rococo { polkadot_xcm: bridge_hub_rococo_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), }, - // TODO: when go live, check it: https://github.com/paritytech/parity-bridges-common/issues/1551 - sudo: bridge_hub_rococo_runtime::SudoConfig { key: root_key }, bridge_wococo_grandpa: bridge_hub_rococo_runtime::BridgeWococoGrandpaConfig { owner: bridges_pallet_owner.clone(), ..Default::default() @@ -308,7 +297,6 @@ pub mod wococo { chain_type: ChainType, relay_chain: &str, para_id: ParaId, - root_key_seed: Option, bridges_pallet_owner_seed: Option, ) -> BridgeHubChainSpec { rococo::default_config( @@ -317,7 +305,6 @@ pub mod wococo { chain_type, relay_chain, para_id, - root_key_seed, bridges_pallet_owner_seed, ) }