Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update Rococo to mirror Kusama #5617

Merged
merged 42 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
49f9eb7
upgrade to kusama base
NachoPal May 30, 2022
c9c86e2
rollback epoch and clean up
NachoPal May 31, 2022
db8b128
Substitue DOLLARS with UNITS
Jun 16, 2022
e074eb0
money constatns to mirror Kusama
Jun 16, 2022
1aa6ac0
fixing typo in test
Jun 16, 2022
8aac79d
scheduler+collective+membership+preimage
NachoPal Jun 20, 2022
97be489
Merge branch 'nacho/update-rococo-to-kusama' of github.com:paritytech…
NachoPal Jun 20, 2022
f70dc72
treasury+democracy+bounties+child_bounties+society
NachoPal Jun 20, 2022
d110c56
tips+claim+identity+elections_phragmen+vesting
NachoPal Jun 20, 2022
58498df
recovery+gilt
NachoPal Jun 20, 2022
0d8a06f
proxy+slot+auction+registar+crowdloan
NachoPal Jun 20, 2022
982d220
babe+epoch_time modificaction
NachoPal Jun 21, 2022
f1ef966
xcm_config
NachoPal Jun 21, 2022
a202cf4
xcm_config fix
NachoPal Jun 21, 2022
d565aa2
constants
NachoPal Jun 21, 2022
2a00894
fix conflicts
NachoPal Jul 11, 2022
20e75c7
fix conflicts 2
NachoPal Jul 11, 2022
78c5e0c
fmt
NachoPal Jul 11, 2022
8c5ccb5
update xcm_config
NachoPal Jul 11, 2022
761133a
revert xcm_config change
NachoPal Jul 11, 2022
a40f68f
fixing benchmarks
NachoPal Jul 14, 2022
098b63f
cargo.lock
NachoPal Jul 14, 2022
e9382cf
Revert "babe+epoch_time modificaction"
NachoPal Jul 14, 2022
79bc851
Merge branch 'master' of github.com:paritytech/polkadot into nacho/up…
NachoPal Jul 18, 2022
7ffd2d9
fix benchamrks 2
NachoPal Jul 20, 2022
128f830
fix benchmarks 3
NachoPal Jul 20, 2022
2d3ce2d
typos
NachoPal Jul 26, 2022
4b666a7
miscelaneous
NachoPal Jul 26, 2022
ee144d4
fix constants test
NachoPal Jul 26, 2022
7324ce4
fix conflicts
NachoPal Jul 26, 2022
e9d7f18
rollback comments
NachoPal Jul 26, 2022
43a7372
rollback lease period
NachoPal Jul 26, 2022
0e1a2d0
fmt
NachoPal Jul 26, 2022
f09d5ee
add ROC to spellcheck dictionary
alvicsam Jul 26, 2022
5147aa4
merge master
NachoPal Aug 11, 2022
288f3dc
fix cargo.toml + fixes
NachoPal Aug 11, 2022
f2e652f
Merge branch 'nacho/update-rococo-to-kusama' of github.com:paritytech…
NachoPal Aug 11, 2022
ac9093e
remove TODOs
NachoPal Aug 12, 2022
6688c34
nit fix
NachoPal Aug 12, 2022
a02840c
solve conflicts
NachoPal Sep 6, 2022
07e6aa9
weights 1.5
NachoPal Sep 7, 2022
b497f49
Bumping number of perm/temp slots available
Sep 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Cargo.lock

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

30 changes: 24 additions & 6 deletions node/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,26 +1048,35 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
})
.collect::<Vec<_>>(),
},
phragmen_election: Default::default(),
babe: rococo_runtime::BabeConfig {
authorities: Default::default(),
epoch_config: Some(rococo_runtime::BABE_GENESIS_EPOCH_CONFIG),
},
grandpa: Default::default(),
im_online: Default::default(),
collective: Default::default(),
membership: Default::default(),
democracy: rococo_runtime::DemocracyConfig::default(),
council: rococo::CouncilConfig { members: vec![], phantom: Default::default() },
technical_committee: rococo::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
},
technical_membership: Default::default(),
treasury: Default::default(),
authority_discovery: rococo_runtime::AuthorityDiscoveryConfig { keys: vec![] },
claims: rococo::ClaimsConfig { claims: vec![], vesting: vec![] },
vesting: rococo::VestingConfig { vesting: vec![] },
sudo: rococo_runtime::SudoConfig { key: Some(endowed_accounts[0].clone()) },
paras: rococo_runtime::ParasConfig { paras: vec![] },
hrmp: Default::default(),
configuration: rococo_runtime::ConfigurationConfig {
config: default_parachains_host_configuration(),
},
gilt: Default::default(),
registrar: rococo_runtime::RegistrarConfig {
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
},
xcm_pallet: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down Expand Up @@ -1599,8 +1608,17 @@ pub fn rococo_testnet_genesis(
},
grandpa: Default::default(),
im_online: Default::default(),
collective: Default::default(),
membership: Default::default(),
phragmen_election: Default::default(),
democracy: rococo::DemocracyConfig::default(),
council: rococo::CouncilConfig { members: vec![], phantom: Default::default() },
technical_committee: rococo::TechnicalCommitteeConfig {
members: vec![],
phantom: Default::default(),
},
technical_membership: Default::default(),
treasury: Default::default(),
claims: rococo::ClaimsConfig { claims: vec![], vesting: vec![] },
vesting: rococo::VestingConfig { vesting: vec![] },
authority_discovery: rococo_runtime::AuthorityDiscoveryConfig { keys: vec![] },
sudo: rococo_runtime::SudoConfig { key: Some(root_key.clone()) },
hrmp: Default::default(),
Expand All @@ -1610,12 +1628,12 @@ pub fn rococo_testnet_genesis(
..default_parachains_host_configuration()
},
},
gilt: Default::default(),
paras: rococo_runtime::ParasConfig { paras: vec![] },
registrar: rococo_runtime::RegistrarConfig {
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
},
xcm_pallet: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down
21 changes: 4 additions & 17 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
#![recursion_limit = "256"]

use pallet_transaction_payment::CurrencyAdapter;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use primitives::v2::{
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash,
Expand Down Expand Up @@ -63,7 +62,7 @@ use frame_system::EnsureRoot;
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use pallet_session::historical as session_historical;
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
use sp_core::OpaqueMetadata;
use sp_mmr_primitives as mmr;
use sp_runtime::{
Expand All @@ -86,7 +85,6 @@ pub use pallet_balances::Call as BalancesCall;
pub use pallet_election_provider_multi_phase::Call as EPMCall;
#[cfg(feature = "std")]
pub use pallet_staking::StakerStatus;
pub use pallet_timestamp::Call as TimestampCall;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;

Expand Down Expand Up @@ -152,11 +150,6 @@ impl Contains<Call> for BaseFilter {
}
}

type MoreThanHalfCouncil = EitherOfDiverse<
EnsureRoot<AccountId>,
pallet_collective::EnsureProportionMoreThan<AccountId, CouncilCollective, 1, 2>,
>;

parameter_types! {
pub const Version: RuntimeVersion = VERSION;
pub const SS58Prefix: u8 = 2;
Expand Down Expand Up @@ -361,11 +354,6 @@ impl pallet_authorship::Config for Runtime {
type EventHandler = (Staking, ImOnline);
}

parameter_types! {
pub const Period: BlockNumber = 10 * MINUTES;
pub const Offset: BlockNumber = 0;
}

impl_opaque_keys! {
pub struct SessionKeys {
pub grandpa: Grandpa,
Expand Down Expand Up @@ -425,6 +413,8 @@ parameter_types! {
/// ... and all of the validators as electable targets. Whilst this is the case, we cannot and
/// shall not increase the size of the validator intentions.
pub const MaxElectableTargets: u16 = u16::MAX;
pub NposSolutionPriority: TransactionPriority =
Perbill::from_percent(90) * TransactionPriority::max_value();
}

generate_solution_type!(
Expand Down Expand Up @@ -733,8 +723,6 @@ impl pallet_authority_discovery::Config for Runtime {
}

parameter_types! {
pub NposSolutionPriority: TransactionPriority =
Perbill::from_percent(90) * TransactionPriority::max_value();
pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value();
}

Expand Down Expand Up @@ -1159,7 +1147,7 @@ impl parachains_hrmp::Config for Runtime {
type Event = Event;
type Origin = Origin;
type Currency = Balances;
type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo<Self>;
type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo<Runtime>;
}

impl parachains_paras_inherent::Config for Runtime {
Expand Down Expand Up @@ -1343,7 +1331,6 @@ construct_runtime! {
TechnicalMembership: pallet_membership::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 17,
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 18,


// Claims. Usable initially.
Claims: claims::{Pallet, Call, Storage, Event<T>, Config<T>, ValidateUnsigned} = 19,

Expand Down
3 changes: 2 additions & 1 deletion runtime/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ pub type XcmRouter = (
parameter_types! {
pub const Kusama: MultiAssetFilter = Wild(AllOf { fun: WildFungible, id: Concrete(KsmLocation::get()) });
pub const Statemine: MultiLocation = Parachain(1000).into();
pub const Encointer: MultiLocation = Parachain(1001).into();
pub const KusamaForStatemine: (MultiAssetFilter, MultiLocation) = (Kusama::get(), Statemine::get());
pub const KusamaForEncointer: (MultiAssetFilter, MultiLocation) = (Kusama::get(), Parachain(1001).into());
pub const KusamaForEncointer: (MultiAssetFilter, MultiLocation) = (Kusama::get(), Encointer::get());
}
pub type TrustedTeleporters =
(xcm_builder::Case<KusamaForStatemine>, xcm_builder::Case<KusamaForEncointer>);
Expand Down
Loading