Skip to content

Commit

Permalink
Remove sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauthamastro committed Aug 20, 2024
1 parent 55cc355 commit 88e3ae5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
17 changes: 14 additions & 3 deletions check-all-ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

cargo fmt --check || exit
RUSTFLAGS="-D warnings" cargo build || exit
RUSTFLAGS="-D warnings" cargo build --features try-runtime || exit
cargo fmt --check --features on-chain-release-build || 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
./target/debug/polkadex-node benchmark pallet --pallet "*" --extrinsic "*" --steps 2 --repeat 1 || exit
cargo clippy -- -D warnings || exit
RUSTFLAGS="-D warnings" cargo test --workspace || exit


# Note while building wasm binary for runtime upgrade use the metadata-hash feature otherwise, ledger app will be broken
# References
# 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
# 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
3 changes: 1 addition & 2 deletions nodes/mainnet/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand Down
8 changes: 0 additions & 8 deletions runtimes/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -1481,7 +1475,6 @@ construct_runtime!(
TechnicalMembership: pallet_membership::<Instance1> = 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,
Expand Down Expand Up @@ -1533,7 +1526,6 @@ construct_runtime!(
TechnicalMembership: pallet_membership::<Instance1> = 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,
Expand Down

0 comments on commit 88e3ae5

Please sign in to comment.