diff --git a/Cargo.lock b/Cargo.lock index 853974544..a46789d06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5849,7 +5849,6 @@ dependencies = [ "pallet-staking", "pallet-staking-reward-curve", "pallet-statement", - "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -7777,7 +7776,6 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "pallet-sudo", "parity-scale-codec", "scale-info", "sp-core 21.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", diff --git a/check-all-ci-tests.sh b/check-all-ci-tests.sh index a87720ae8..517a5441e 100755 --- a/check-all-ci-tests.sh +++ b/check-all-ci-tests.sh @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -cargo fmt --check --features on-chain-release-build || exit +cargo fmt --check || exit RUSTFLAGS="-D warnings" cargo build --features on-chain-release-build || exit RUSTFLAGS="-D warnings" cargo build --features try-runtime || exit cargo build --features runtime-benchmarks || exit @@ -30,5 +30,8 @@ RUSTFLAGS="-D warnings" cargo test --workspace || exit # https://forum.polkadot.network/t/polkadot-generic-ledger-app/4295/26 # https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/enable_metadata_hash/index.html # https://hackmd.io/@ePxWAFa1TbKm0U5Ym3IqgQ/rJdgmf6b0?utm_source=preview-mode&utm_medium=rec -# 0x0e63268eeeddda8e033ade1cc670411d3215fd81be44bdec564932d599d5aee8 -# https://www.notion.so/polkadex/Listing-on-Polkadex-Orderbook-3e49fcf22d52474da86dfa65135615e9#b225838c59fa4820a61365e276fd4684 \ No newline at end of file +# 0xe7770f52f5d0ee108ded585ebe7c0d0b6ec65ea22739d7608d6c75c271dbdc3a - runtime upgrade preimage +# https://www.notion.so/polkadex/Listing-on-Polkadex-Orderbook-3e49fcf22d52474da86dfa65135615e9#b225838c59fa4820a61365e276fd4684 +# https://wiki.polkadot.network/docs/learn/learn-governance +# https://substrate.stackexchange.com/questions/6423/fasttrack-proposal-execution-fails-with-proposalmissing-but-is-stored-in-democ + diff --git a/nodes/mainnet/src/chain_spec.rs b/nodes/mainnet/src/chain_spec.rs index 1ff160fc0..ff5915adb 100644 --- a/nodes/mainnet/src/chain_spec.rs +++ b/nodes/mainnet/src/chain_spec.rs @@ -23,7 +23,7 @@ use itertools::Itertools; use node_polkadex_runtime::{ constants::currency::PDEX, wasm_binary_unwrap, BabeConfig, BalancesConfig, CouncilConfig, IndicesConfig, OrmlVestingConfig, PDEXMigrationConfig, RuntimeGenesisConfig, SessionConfig, - SessionKeys, StakerStatus, StakingConfig, SudoConfig, SystemConfig, TechnicalCommitteeConfig, + SessionKeys, StakerStatus, StakingConfig, SystemConfig, TechnicalCommitteeConfig, }; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use polkadex_primitives::Block; @@ -482,7 +482,6 @@ pub fn testnet_genesis( phantom: Default::default(), }, democracy: Default::default(), - sudo: SudoConfig { key: Some(root_key) }, babe: BabeConfig { authorities: Default::default(), epoch_config: Some(node_polkadex_runtime::BABE_GENESIS_EPOCH_CONFIG), diff --git a/pallets/pdex-migration/Cargo.toml b/pallets/pdex-migration/Cargo.toml index 16edd3857..472fb77b3 100644 --- a/pallets/pdex-migration/Cargo.toml +++ b/pallets/pdex-migration/Cargo.toml @@ -18,7 +18,6 @@ frame-benchmarking = { workspace = true, default-features = false, optional = tr frame-system = { workspace = true, default-features = false } pallet-balances = { workspace = true, default-features = false } -pallet-sudo = { workspace = true, default-features = false } sp-runtime = { workspace = true, default-features = false } [dev-dependencies] @@ -27,15 +26,7 @@ sp-io = { workspace = true } [features] default = ["std"] -std = [ - "parity-scale-codec/std", - "scale-info/std", - "frame-support/std", - "frame-system/std", - "pallet-balances/std", - "pallet-sudo/std", - "sp-runtime/std", -] +std = ["parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", "pallet-balances/std", "sp-runtime/std"] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", diff --git a/pallets/pdex-migration/src/lib.rs b/pallets/pdex-migration/src/lib.rs index c678154aa..f209e010b 100644 --- a/pallets/pdex-migration/src/lib.rs +++ b/pallets/pdex-migration/src/lib.rs @@ -70,7 +70,7 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] /// Configure the pallet by specifying the parameters and types on which it depends. - pub trait Config: frame_system::Config + pallet_balances::Config + pallet_sudo::Config { + pub trait Config: frame_system::Config + pallet_balances::Config { /// Because this pallet emits events, it depends on the runtime's definition of an /// event. type RuntimeEvent: From> + IsType<::RuntimeEvent>; diff --git a/pallets/pdex-migration/src/mock.rs b/pallets/pdex-migration/src/mock.rs index 504acc089..bb204cfaa 100644 --- a/pallets/pdex-migration/src/mock.rs +++ b/pallets/pdex-migration/src/mock.rs @@ -30,7 +30,6 @@ type Balance = u128; frame_support::construct_runtime!( pub enum Test { System: frame_system, - Sudo: pallet_sudo, Balances: pallet_balances, PDEXMigration: pdex_migration, } @@ -96,22 +95,13 @@ impl pdex_migration::Config for Test { type MaxRelayers = MaxRelayers; type LockPeriod = LockPeriod; } -impl pallet_sudo::Config for Test { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type WeightInfo = (); -} // Build genesis storage according to the mock Runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let alice = 1u64; let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); pallet_balances::GenesisConfig::::default() .assimilate_storage(&mut t) .unwrap(); - pallet_sudo::GenesisConfig:: { key: Some(alice) } - .assimilate_storage(&mut t) - .unwrap(); pdex_migration::GenesisConfig::::default() .assimilate_storage(&mut t) .unwrap(); diff --git a/runtimes/mainnet/Cargo.toml b/runtimes/mainnet/Cargo.toml index 16362bb64..0a7557319 100644 --- a/runtimes/mainnet/Cargo.toml +++ b/runtimes/mainnet/Cargo.toml @@ -28,7 +28,6 @@ pallet-session = { default-features = false, workspace = true } pallet-staking = { default-features = false, workspace = true } pallet-multisig = { default-features = false, workspace = true } pallet-staking-reward-curve = { workspace = true } -pallet-sudo = { default-features = false, workspace = true } pallet-utility = { default-features = false, workspace = true } pallet-timestamp = { default-features = false, workspace = true } pallet-transaction-payment = { default-features = false, workspace = true } @@ -153,7 +152,6 @@ std = [ "pallet-session/std", "pallet-staking/std", "pallet-multisig/std", - "pallet-sudo/std", "pallet-utility/std", "pallet-timestamp/std", "pallet-transaction-payment/std", @@ -257,7 +255,6 @@ try-runtime = [ "pallet-membership/try-runtime", "pallet-grandpa/try-runtime", "pallet-treasury/try-runtime", - "pallet-sudo/try-runtime", "pallet-im-online/try-runtime", "pallet-authority-discovery/try-runtime", "pallet-offences/try-runtime", diff --git a/runtimes/mainnet/src/lib.rs b/runtimes/mainnet/src/lib.rs index b7ebb96b5..5dd7ea06e 100644 --- a/runtimes/mainnet/src/lib.rs +++ b/runtimes/mainnet/src/lib.rs @@ -1012,12 +1012,6 @@ impl pallet_democracy::Config for Runtime { type Slash = Treasury; } -impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type WeightInfo = (); -} - parameter_types! { pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::MAX; /// We prioritize im-online heartbeats over election solution submission. @@ -1481,7 +1475,6 @@ construct_runtime!( TechnicalMembership: pallet_membership:: = 14, Grandpa: pallet_grandpa = 15, Treasury: pallet_treasury = 16, - Sudo: pallet_sudo = 17, ImOnline: pallet_im_online = 18, AuthorityDiscovery: pallet_authority_discovery = 19, Offences: pallet_offences = 20, @@ -1533,7 +1526,6 @@ construct_runtime!( TechnicalMembership: pallet_membership:: = 14, Grandpa: pallet_grandpa = 15, Treasury: pallet_treasury = 16, - Sudo: pallet_sudo = 17, ImOnline: pallet_im_online = 18, AuthorityDiscovery: pallet_authority_discovery = 19, Offences: pallet_offences = 20,