diff --git a/polkadot/Cargo.lock b/polkadot/Cargo.lock index ba5926fe8e..c79794cc68 100644 --- a/polkadot/Cargo.lock +++ b/polkadot/Cargo.lock @@ -2324,7 +2324,7 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bitvec", "frame-benchmarking", @@ -4165,7 +4165,7 @@ checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e" [[package]] name = "polkadot" -version = "0.8.1" +version = "0.8.2" dependencies = [ "assert_cmd", "futures 0.3.5", @@ -4178,7 +4178,7 @@ dependencies = [ [[package]] name = "polkadot-availability-store" -version = "0.8.1" +version = "0.8.2" dependencies = [ "derive_more 0.99.7", "exit-future", @@ -4204,7 +4204,7 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.8.1" +version = "0.8.2" dependencies = [ "frame-benchmarking-cli", "futures 0.3.5", @@ -4228,7 +4228,7 @@ dependencies = [ [[package]] name = "polkadot-collator" -version = "0.8.1" +version = "0.8.2" dependencies = [ "futures 0.3.5", "futures-timer 2.0.2", @@ -4255,7 +4255,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.8.1" +version = "0.8.2" dependencies = [ "derive_more 0.15.0", "parity-scale-codec", @@ -4267,7 +4267,7 @@ dependencies = [ [[package]] name = "polkadot-network" -version = "0.8.1" +version = "0.8.2" dependencies = [ "arrayvec 0.4.12", "bytes 0.5.4", @@ -4295,7 +4295,7 @@ dependencies = [ [[package]] name = "polkadot-network-test" -version = "0.8.1" +version = "0.8.2" dependencies = [ "futures 0.3.5", "log 0.4.8", @@ -4316,7 +4316,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.8.1" +version = "0.8.2" dependencies = [ "derive_more 0.99.7", "log 0.4.8", @@ -4335,7 +4335,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bitvec", "frame-system", @@ -4357,7 +4357,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.8.1" +version = "0.8.2" dependencies = [ "jsonrpc-core", "pallet-transaction-payment-rpc", @@ -4382,7 +4382,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bitvec", "frame-benchmarking", @@ -4454,7 +4454,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bitvec", "frame-benchmarking", @@ -4497,7 +4497,7 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.8.1" +version = "0.8.2" dependencies = [ "env_logger", "frame-benchmarking", @@ -4556,7 +4556,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.8.1" +version = "0.8.2" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -4565,7 +4565,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bitvec", "frame-executive", @@ -4642,7 +4642,7 @@ dependencies = [ [[package]] name = "polkadot-validation" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bitvec", "derive_more 0.14.1", @@ -7709,7 +7709,7 @@ dependencies = [ [[package]] name = "test-parachain-adder" -version = "0.8.1" +version = "0.8.2" dependencies = [ "dlmalloc", "parity-scale-codec", @@ -7748,7 +7748,7 @@ dependencies = [ [[package]] name = "test-parachain-halt" -version = "0.8.1" +version = "0.8.2" dependencies = [ "substrate-wasm-builder-runner 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -8625,7 +8625,7 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.8.1" +version = "0.8.2" dependencies = [ "bitvec", "frame-benchmarking", diff --git a/polkadot/Cargo.toml b/polkadot/Cargo.toml index 9374f80d31..435a1b7fc2 100644 --- a/polkadot/Cargo.toml +++ b/polkadot/Cargo.toml @@ -4,7 +4,7 @@ path = "src/main.rs" [package] name = "polkadot" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/availability-store/Cargo.toml b/polkadot/availability-store/Cargo.toml index 2140562e9f..8d838a38e9 100644 --- a/polkadot/availability-store/Cargo.toml +++ b/polkadot/availability-store/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-availability-store" description = "Persistent database for parachain data" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/cli/Cargo.toml b/polkadot/cli/Cargo.toml index 45be8ec340..8b59524406 100644 --- a/polkadot/cli/Cargo.toml +++ b/polkadot/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-cli" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] description = "Polkadot Relay-chain Client Node" edition = "2018" diff --git a/polkadot/collator/Cargo.toml b/polkadot/collator/Cargo.toml index 996eaae14e..f446bde120 100644 --- a/polkadot/collator/Cargo.toml +++ b/polkadot/collator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-collator" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] description = "Collator node implementation" edition = "2018" diff --git a/polkadot/erasure-coding/Cargo.toml b/polkadot/erasure-coding/Cargo.toml index 5568478f45..f50b3fdf08 100644 --- a/polkadot/erasure-coding/Cargo.toml +++ b/polkadot/erasure-coding/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-erasure-coding" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/network/Cargo.toml b/polkadot/network/Cargo.toml index 5e975b03e3..35456f3365 100644 --- a/polkadot/network/Cargo.toml +++ b/polkadot/network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-network" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] description = "Polkadot-specific networking protocol" edition = "2018" diff --git a/polkadot/network/test/Cargo.toml b/polkadot/network/test/Cargo.toml index 45365b5764..b222eee462 100644 --- a/polkadot/network/test/Cargo.toml +++ b/polkadot/network/test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-network-test" -version = "0.8.1" +version = "0.8.2" license = "GPL-3.0" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/parachain/Cargo.toml b/polkadot/parachain/Cargo.toml index a70e6a96e2..39ff0589d7 100644 --- a/polkadot/parachain/Cargo.toml +++ b/polkadot/parachain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-parachain" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] description = "Types and utilities for creating and working with parachains" edition = "2018" diff --git a/polkadot/parachain/test-parachains/adder/Cargo.toml b/polkadot/parachain/test-parachains/adder/Cargo.toml index 2805e81ccf..a75f369631 100644 --- a/polkadot/parachain/test-parachains/adder/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachain-adder" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] description = "Test parachain which adds to a number as its state transition" edition = "2018" diff --git a/polkadot/parachain/test-parachains/halt/Cargo.toml b/polkadot/parachain/test-parachains/halt/Cargo.toml index b07cc8229d..caca58d22a 100644 --- a/polkadot/parachain/test-parachains/halt/Cargo.toml +++ b/polkadot/parachain/test-parachains/halt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "test-parachain-halt" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] description = "Test parachain which executes forever" edition = "2018" diff --git a/polkadot/primitives/Cargo.toml b/polkadot/primitives/Cargo.toml index 2bc2dc3e37..2bfc34babf 100644 --- a/polkadot/primitives/Cargo.toml +++ b/polkadot/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-primitives" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/rpc/Cargo.toml b/polkadot/rpc/Cargo.toml index 36490ef7e5..3cb1e55d78 100644 --- a/polkadot/rpc/Cargo.toml +++ b/polkadot/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-rpc" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/runtime/common/Cargo.toml b/polkadot/runtime/common/Cargo.toml index b692882997..61a18064ff 100644 --- a/polkadot/runtime/common/Cargo.toml +++ b/polkadot/runtime/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-common" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/runtime/kusama/Cargo.toml b/polkadot/runtime/kusama/Cargo.toml index 8af487aace..899ff208be 100644 --- a/polkadot/runtime/kusama/Cargo.toml +++ b/polkadot/runtime/kusama/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kusama-runtime" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" diff --git a/polkadot/runtime/polkadot/Cargo.toml b/polkadot/runtime/polkadot/Cargo.toml index 3ba8c7212b..e1668a5624 100644 --- a/polkadot/runtime/polkadot/Cargo.toml +++ b/polkadot/runtime/polkadot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index 14357db853..bcca43b602 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -124,7 +124,8 @@ impl Filter for IsCallable { Call::Authorship(_) | Call::Staking(_) | Call::Offences(_) | Call::Session(_) | Call::FinalityTracker(_) | Call::Grandpa(_) | Call::ImOnline(_) | Call::AuthorityDiscovery(_) | - Call::Utility(_) | Call::Claims(_) | Call::Vesting(_) | Call::Sudo(_) => + Call::Utility(_) | Call::Claims(_) | Call::Vesting(_) | Call::Sudo(_) | + Call::Identity(_) => true, } } @@ -205,8 +206,8 @@ pub type DealWithFees = SplitTwoWays< impl balances::Trait for Runtime { type Balance = Balance; - type Event = Event; type DustRemoval = (); + type Event = Event; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; } @@ -252,11 +253,6 @@ impl authorship::Trait 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, @@ -335,6 +331,34 @@ impl staking::Trait for Runtime { type MaxIterations = MaxIterations; } +const fn deposit(items: u32, bytes: u32) -> Balance { + items as Balance * 15 * CENTS + (bytes as Balance) * 6 * CENTS +} + +parameter_types! { + // Minimum 4 CENTS/byte + pub const BasicDeposit: Balance = deposit(1, 258); + pub const FieldDeposit: Balance = deposit(0, 66); + pub const SubAccountDeposit: Balance = deposit(1, 53); + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; +} + +impl identity::Trait for Runtime { + type Event = Event; + type Currency = Balances; + type BasicDeposit = BasicDeposit; + type FieldDeposit = FieldDeposit; + type SubAccountDeposit = SubAccountDeposit; + type MaxSubAccounts = MaxSubAccounts; + type MaxAdditionalFields = MaxAdditionalFields; + type MaxRegistrars = MaxRegistrars; + type Slashed = Treasury; + type ForceOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; + type RegistrarOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; +} + parameter_types! { pub const LaunchPeriod: BlockNumber = 28 * DAYS; pub const VotingPeriod: BlockNumber = 28 * DAYS; @@ -376,10 +400,10 @@ impl democracy::Trait for Runtime { type VetoOrigin = collective::EnsureMember; type CooloffPeriod = CooloffPeriod; type PreimageByteDeposit = PreimageByteDeposit; + type OperationalPreimageOrigin = collective::EnsureMember; type Slash = Treasury; type Scheduler = Scheduler; type MaxVotes = MaxVotes; - type OperationalPreimageOrigin = collective::EnsureMember; } parameter_types! { @@ -411,6 +435,7 @@ const_assert!(DesiredMembers::get() <= collective::MAX_MEMBERS); impl elections_phragmen::Trait for Runtime { type Event = Event; + type ModuleId = ElectionsPhragmenModuleId; type Currency = Balances; type ChangeMembers = Council; type InitializeMembers = Council; @@ -423,7 +448,6 @@ impl elections_phragmen::Trait for Runtime { type DesiredMembers = DesiredMembers; type DesiredRunnersUp = DesiredRunnersUp; type TermDuration = TermDuration; - type ModuleId = ElectionsPhragmenModuleId; } parameter_types! { @@ -465,6 +489,7 @@ parameter_types! { } impl treasury::Trait for Runtime { + type ModuleId = TreasuryModuleId; type Currency = Balances; type ApproveOrigin = collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>; type RejectOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>; @@ -479,7 +504,6 @@ impl treasury::Trait for Runtime { type ProposalBondMinimum = ProposalBondMinimum; type SpendPeriod = SpendPeriod; type Burn = Burn; - type ModuleId = TreasuryModuleId; } parameter_types! { @@ -516,8 +540,6 @@ impl grandpa::Trait for Runtime { type Event = Event; type Call = Call; - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = >::Proof; @@ -526,6 +548,8 @@ impl grandpa::Trait for Runtime { GrandpaId, )>>::IdentificationTuple; + type KeyOwnerProofSystem = Historical; + type HandleEquivocation = grandpa::EquivocationHandler< Self::KeyOwnerIdentification, primitives::fisherman::FishermanAppCrypto, @@ -640,11 +664,9 @@ impl system::offchain::SigningTypes for Runtime { type Signature = Signature; } -impl system::offchain::SendTransactionTypes for Runtime where - Call: From, -{ - type OverarchingCall = Call; +impl system::offchain::SendTransactionTypes for Runtime where Call: From { type Extrinsic = UncheckedExtrinsic; + type OverarchingCall = Call; } parameter_types! { @@ -777,6 +799,9 @@ construct_runtime! { // Sudo. Last module. Usable initially, but removed once governance enabled. Sudo: sudo::{Module, Call, Storage, Config, Event}, + + // Identity. Late addition. + Identity: identity::{Module, Call, Storage, Event}, } } diff --git a/polkadot/runtime/test-runtime/Cargo.toml b/polkadot/runtime/test-runtime/Cargo.toml index 820b748c80..2432dc6781 100644 --- a/polkadot/runtime/test-runtime/Cargo.toml +++ b/polkadot/runtime/test-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-test-runtime" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" diff --git a/polkadot/runtime/westend/Cargo.toml b/polkadot/runtime/westend/Cargo.toml index 2a0ac68fd7..38dbbfffbe 100644 --- a/polkadot/runtime/westend/Cargo.toml +++ b/polkadot/runtime/westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "westend-runtime" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" build = "build.rs" diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 176462a06e..99e0710095 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -82,7 +82,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("westend"), impl_name: create_runtime_str!("parity-westend"), authoring_version: 2, - spec_version: 2000, + spec_version: 20, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/polkadot/service/Cargo.toml b/polkadot/service/Cargo.toml index a5128472d6..3032dd7fca 100644 --- a/polkadot/service/Cargo.toml +++ b/polkadot/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-service" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/statement-table/Cargo.toml b/polkadot/statement-table/Cargo.toml index 10b302567e..bd5978f618 100644 --- a/polkadot/statement-table/Cargo.toml +++ b/polkadot/statement-table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-statement-table" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018" diff --git a/polkadot/validation/Cargo.toml b/polkadot/validation/Cargo.toml index 9f6a3240c4..8d91e68a11 100644 --- a/polkadot/validation/Cargo.toml +++ b/polkadot/validation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-validation" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018"