Unverified Commit 47828402 authored by Gavin Wood's avatar Gavin Wood Committed by GitHub
Browse files

Bump Substrate, add Identity module (#676)

* Bump Substrate, add Identity module

* Bump Substrate again
parent ca8d5c54
Pipeline #71401 passed with stages
in 20 minutes and 48 seconds
This diff is collapsed.
......@@ -27,7 +27,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", default-features =
sp-serializer = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
version = { package = "sp-version", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
tx-pool-api = { package = "sp-transaction-pool-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
tx-pool-api = { package = "sp-transaction-pool-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authority-discovery = { package = "pallet-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
......@@ -42,6 +42,7 @@ elections-phragmen = { package = "pallet-elections-phragmen", git = "https://git
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", default-features = false, features = ["migrate-authorities"], branch = "polkadot-master" }
identity = { package = "pallet-identity", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
membership = { package = "pallet-membership", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
......@@ -103,6 +104,7 @@ std = [
"executive/std",
"finality-tracker/std",
"grandpa/std",
"identity/std",
"im-online/std",
"indices/std",
"membership/std",
......
......@@ -97,7 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2,
spec_version: 1029,
spec_version: 1030,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
......@@ -552,6 +552,27 @@ impl nicks::Trait for Runtime {
type MaxLength = MaxLength;
}
parameter_types! {
// KUSAMA: can be probably be reduced for mainnet
// Minimum 100 bytes/KSM deposited (1 CENT/byte)
pub const BasicDeposit: Balance = 1000 * DOLLARS; // 258 bytes on-chain
pub const FieldDeposit: Balance = 250 * DOLLARS; // 66 bytes on-chain
pub const SubAccountDeposit: Balance = 200 * DOLLARS; // 53 bytes on-chain
pub const MaximumSubAccounts: u32 = 100;
}
impl identity::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type Slashed = Treasury;
type BasicDeposit = BasicDeposit;
type FieldDeposit = FieldDeposit;
type SubAccountDeposit = SubAccountDeposit;
type MaximumSubAccounts = MaximumSubAccounts;
type RegistrarOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
type ForceOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
}
construct_runtime! {
pub enum Runtime where
Block = Block,
......@@ -599,7 +620,11 @@ construct_runtime! {
Registrar: registrar::{Module, Call, Storage, Event, Config<T>},
// Simple nicknames module.
// KUSAMA: Remove before mainnet
Nicks: nicks::{Module, Call, Storage, Event<T>},
// Less simple identity module.
Identity: identity::{Module, Call, Storage, Event<T>},
}
}
......@@ -678,7 +703,7 @@ sp_api::impl_runtime_apis! {
}
}
impl tx_pool_api::TaggedTransactionQueue<Block> for Runtime {
impl tx_pool_api::runtime_api::TaggedTransactionQueue<Block> for Runtime {
fn validate_transaction(tx: <Block as BlockT>::Extrinsic) -> TransactionValidity {
Executive::validate_transaction(tx)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment