diff --git a/Cargo.lock b/Cargo.lock index ba5926fe8eae..c79794cc687c 100644 --- a/Cargo.lock +++ b/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/Cargo.toml b/Cargo.toml index 9374f80d3120..435a1b7fc2ed 100644 --- a/Cargo.toml +++ b/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/availability-store/Cargo.toml b/availability-store/Cargo.toml index 2140562e9f78..8d838a38e920 100644 --- a/availability-store/Cargo.toml +++ b/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/cli/Cargo.toml b/cli/Cargo.toml index 45be8ec34090..8b595244061b 100644 --- a/cli/Cargo.toml +++ b/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/collator/Cargo.toml b/collator/Cargo.toml index 996eaae14e12..f446bde12019 100644 --- a/collator/Cargo.toml +++ b/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/erasure-coding/Cargo.toml b/erasure-coding/Cargo.toml index 5568478f4582..f50b3fdf08e2 100644 --- a/erasure-coding/Cargo.toml +++ b/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/network/Cargo.toml b/network/Cargo.toml index 5e975b03e385..35456f3365e7 100644 --- a/network/Cargo.toml +++ b/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/network/test/Cargo.toml b/network/test/Cargo.toml index 45365b57641c..b222eee462d9 100644 --- a/network/test/Cargo.toml +++ b/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/parachain/Cargo.toml b/parachain/Cargo.toml index a70e6a96e2ae..39ff0589d730 100644 --- a/parachain/Cargo.toml +++ b/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/parachain/test-parachains/adder/Cargo.toml b/parachain/test-parachains/adder/Cargo.toml index 2805e81ccf88..a75f369631d6 100644 --- a/parachain/test-parachains/adder/Cargo.toml +++ b/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/parachain/test-parachains/halt/Cargo.toml b/parachain/test-parachains/halt/Cargo.toml index b07cc8229daf..caca58d22ab9 100644 --- a/parachain/test-parachains/halt/Cargo.toml +++ b/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/primitives/Cargo.toml b/primitives/Cargo.toml index 2bc2dc3e3701..2bfc34babfdb 100644 --- a/primitives/Cargo.toml +++ b/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/rpc/Cargo.toml b/rpc/Cargo.toml index 36490ef7e5f7..3cb1e55d785b 100644 --- a/rpc/Cargo.toml +++ b/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/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index b69288299770..61a18064ff9a 100644 --- a/runtime/common/Cargo.toml +++ b/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/runtime/kusama/Cargo.toml b/runtime/kusama/Cargo.toml index 8af487aaced3..899ff208bed0 100644 --- a/runtime/kusama/Cargo.toml +++ b/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/runtime/polkadot/Cargo.toml b/runtime/polkadot/Cargo.toml index 3ba8c7212b88..e1668a5624f4 100644 --- a/runtime/polkadot/Cargo.toml +++ b/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/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 14357db8535a..bcca43b60280 100644 --- a/runtime/polkadot/src/lib.rs +++ b/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/runtime/test-runtime/Cargo.toml b/runtime/test-runtime/Cargo.toml index 820b748c80f4..2432dc6781a6 100644 --- a/runtime/test-runtime/Cargo.toml +++ b/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/runtime/westend/Cargo.toml b/runtime/westend/Cargo.toml index 2a0ac68fd7a3..38dbbfffbe19 100644 --- a/runtime/westend/Cargo.toml +++ b/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/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 176462a06e29..99e071009552 100644 --- a/runtime/westend/src/lib.rs +++ b/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/service/Cargo.toml b/service/Cargo.toml index a5128472d68e..3032dd7fca80 100644 --- a/service/Cargo.toml +++ b/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/statement-table/Cargo.toml b/statement-table/Cargo.toml index 10b302567edc..bd5978f6183b 100644 --- a/statement-table/Cargo.toml +++ b/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/validation/Cargo.toml b/validation/Cargo.toml index 9f6a3240c40f..8d91e68a1147 100644 --- a/validation/Cargo.toml +++ b/validation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-validation" -version = "0.8.1" +version = "0.8.2" authors = ["Parity Technologies "] edition = "2018"