Skip to content

Commit

Permalink
remove sudo
Browse files Browse the repository at this point in the history
Signed-off-by: Charles Ferrell <charlie@manta.network>
  • Loading branch information
ferrell-code committed Jan 11, 2024
1 parent 812db69 commit 9e3a92c
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 151 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions node/src/chain_specs/manta/mainnet_genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ fn genesis_config(genesis_collators: Vec<Collator>) -> GenesisConfig {
},
// empty aura authorities, collators registered with parachain staking instead
aura: Default::default(),
sudo: manta_runtime::SudoConfig {
key: Some(root_key),
},
// Sudo Pallet was removed
//sudo: manta_runtime::SudoConfig {
//key: Some(root_key),
//},
parachain_staking: ParachainStakingConfig {
candidates: genesis_collators
.iter()
Expand Down
3 changes: 0 additions & 3 deletions node/src/chain_specs/manta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ fn manta_devnet_genesis(genesis_collators: Vec<Collator>) -> GenesisConfig {
},
// empty aura authorities, collators registered with parachain staking instead
aura: Default::default(),
sudo: manta_runtime::SudoConfig {
key: Some(root_key),
},
parachain_staking: ParachainStakingConfig {
candidates: genesis_collators
.iter()
Expand Down
4 changes: 0 additions & 4 deletions runtime/integration-tests/src/integrations_mock/test_manta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ fn verify_pallet_prefixes() {
is_pallet_prefix::<Utility>("Utility");
is_pallet_prefix::<Multisig>("Multisig");

is_pallet_prefix::<manta_runtime::Sudo>("Sudo");

is_pallet_prefix::<Assets>("Assets");
is_pallet_prefix::<AssetManager>("AssetManager");

Expand Down Expand Up @@ -199,8 +197,6 @@ fn verify_manta_pallet_indices() {
is_pallet_index::<Utility>(40);
is_pallet_index::<Multisig>(41);

is_pallet_index::<manta_runtime::Sudo>(42);

is_pallet_index::<Assets>(45);
is_pallet_index::<AssetManager>(46);
}
Expand Down
4 changes: 0 additions & 4 deletions runtime/manta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pallet-multisig = { workspace = true }
pallet-preimage = { workspace = true }
pallet-scheduler = { workspace = true }
pallet-session = { workspace = true }
pallet-sudo = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
Expand Down Expand Up @@ -136,7 +135,6 @@ runtime-benchmarks = [
'nimbus-primitives/runtime-benchmarks',
'pallet-author-inherent/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
'pallet-sudo/runtime-benchmarks',
'pallet-aura-style-filter/runtime-benchmarks',
'pallet-collective/runtime-benchmarks',
'pallet-democracy/runtime-benchmarks',
Expand Down Expand Up @@ -193,7 +191,6 @@ try-runtime = [
"cumulus-pallet-dmp-queue/try-runtime",
'pallet-aura-style-filter/try-runtime',
'manta-collator-selection/try-runtime',
'pallet-sudo/try-runtime',
'cumulus-pallet-xcmp-queue/try-runtime',
'cumulus-pallet-xcm/try-runtime',
'pallet-assets/try-runtime',
Expand Down Expand Up @@ -248,7 +245,6 @@ std = [
'pallet-transaction-payment-rpc-runtime-api/std',
'pallet-timestamp/std',
'pallet-session/std',
'pallet-sudo/std',
'sp-application-crypto/std',
'pallet-xcm/std',
'pallet-transaction-payment/std',
Expand Down
3 changes: 1 addition & 2 deletions runtime/manta/src/diff_tx_fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ fn get_call_details(call: &crate::RuntimeCall) -> (DispatchInfo, u32) {
}

#[test]
#[ignore]
fn diff_tx_fees() {
const CURRENT_PATH: &str = env!("CARGO_MANIFEST_DIR");
let mut latest_version = String::new();
Expand Down Expand Up @@ -106,7 +105,7 @@ fn diff_tx_fees() {
frame_support::metadata::RuntimeMetadata::V14(metadata) => metadata.pallets,
_ => unreachable!(),
};
assert_eq!(pallets.len(), 39);
assert_eq!(pallets.len(), 37);
});

let fee_multipliers = fee_multipliers();
Expand Down
11 changes: 0 additions & 11 deletions runtime/manta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@ impl Contains<RuntimeCall> for MantaFilter {
| RuntimeCall::Lottery(_)
| RuntimeCall::Randomness(pallet_randomness::Call::set_babe_randomness_results{..})
| RuntimeCall::Scheduler(_)
// Sudo also cannot be filtered because it is used in runtime upgrade.
| RuntimeCall::Sudo(_)
| RuntimeCall::Multisig(_)
| RuntimeCall::AuthorInherent(pallet_author_inherent::Call::kick_off_authorship_validation {..}) // executes unsigned on every block
| RuntimeCall::Session(_) // User must be able to set their session key when applying for a collator
Expand Down Expand Up @@ -488,12 +486,6 @@ impl pallet_utility::Config for Runtime {
type WeightInfo = weights::pallet_utility::SubstrateWeight<Runtime>;
}

impl pallet_sudo::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type WeightInfo = weights::pallet_sudo::SubstrateWeight<Runtime>;
}

impl pallet_aura_style_filter::Config for Runtime {
/// Nimbus filter pipeline (final) step 3:
/// Choose 1 collator from PotentialAuthors as eligible
Expand Down Expand Up @@ -973,8 +965,6 @@ construct_runtime!(
// Handy utilities.
Utility: pallet_utility::{Pallet, Call, Event} = 40,
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 41,
// Temporary
Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 42,

// Assets management
Assets: pallet_assets::{Pallet, Call, Storage, Event<T>} = 45,
Expand Down Expand Up @@ -1053,7 +1043,6 @@ mod benches {
[pallet_assets, Assets]
[pallet_asset_manager, AssetManager]
[pallet_scheduler, Scheduler]
[pallet_sudo, Sudo]
// XCM
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_xcm, PolkadotXcm]
Expand Down
1 change: 0 additions & 1 deletion runtime/manta/src/weights/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ pub mod pallet_preimage;
pub mod pallet_randomness;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_sudo;
pub mod pallet_timestamp;
pub mod pallet_treasury;
pub mod pallet_tx_pause;
Expand Down
122 changes: 0 additions & 122 deletions runtime/manta/src/weights/pallet_sudo.rs

This file was deleted.

0 comments on commit 9e3a92c

Please sign in to comment.