Aggregate all liquidity restrictions in a single place (#1921)

* Clean up session key rotation

* Fix build

* Bump version

* Introduce feature to balances.

* Move staking locking logic over to central point

* ^^^ rest

* First part of assimilation

* More assimilation

* More assimilation

* Fix most tests

* Fix build

* Move Balances to new locking system

* :q!

* Bump runtime version

* Build runtime

* Convenience function

* Test fix.

* Whitespace

* Improve type legibility.

* Fix comment.

* More tests.

* More tests.

* Bump version

* Caps

* Whitespace

* Whitespace

* Remove unneeded function.
This commit is contained in:
Gav Wood
2019-03-06 12:46:17 +01:00
committed by GitHub
parent 46541ec73c
commit ccc11974ee
62 changed files with 795 additions and 346 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ std = [
"fees/std",
"version/std",
"node-primitives/std",
"serde/std",
"serde",
"safe-mix/std",
"client/std",
"consensus_aura/std",
+4 -5
View File
@@ -60,8 +60,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("node"),
impl_name: create_runtime_str!("substrate-node"),
authoring_version: 10,
spec_version: 33,
impl_version: 33,
spec_version: 34,
impl_version: 34,
apis: RUNTIME_API_VERSIONS,
};
@@ -101,9 +101,8 @@ impl indices::Trait for Runtime {
impl balances::Trait for Runtime {
type Balance = Balance;
type OnFreeBalanceZero = (((Staking, Contract), Democracy), Session);
type OnFreeBalanceZero = ((Staking, Contract), Session);
type OnNewAccount = Indices;
type EnsureAccountLiquid = (Staking, Democracy);
type Event = Event;
}
@@ -116,7 +115,7 @@ impl consensus::Trait for Runtime {
type Log = Log;
type SessionKey = SessionKey;
// the aura module handles offline-reports internally
// The Aura module handles offline-reports internally
// rather than using an explicit report system.
type InherentOfflineReport = ();
}
+9 -2
View File
@@ -44,6 +44,11 @@ name = "bitflags"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitmask"
version = "0.5.0"
source = "git+https://github.com/paritytech/bitmask#c2d8d196e30b018d1385be8357fdca61b978facf"
[[package]]
name = "blake2-rfc"
version = "0.2.18"
@@ -1300,7 +1305,7 @@ version = "0.1.0"
dependencies = [
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 0.1.0",
"sr-std 0.1.0",
"srml-session 0.1.0",
@@ -1513,6 +1518,7 @@ dependencies = [
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-io 0.1.0",
"sr-primitives 0.1.0",
"sr-std 0.1.0",
"srml-consensus 0.1.0",
@@ -1541,6 +1547,7 @@ dependencies = [
name = "srml-support"
version = "0.1.0"
dependencies = [
"bitmask 0.5.0 (git+https://github.com/paritytech/bitmask)",
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"once_cell 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1611,7 +1618,6 @@ dependencies = [
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
"sr-primitives 0.1.0",
"sr-std 0.1.0",
"srml-consensus 0.1.0",
"srml-support 0.1.0",
"srml-system 0.1.0",
"substrate-inherents 0.1.0",
@@ -2224,6 +2230,7 @@ dependencies = [
"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0"
"checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83"
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
"checksum bitmask 0.5.0 (git+https://github.com/paritytech/bitmask)" = "<none>"
"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
"checksum block-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1339a1042f5d9f295737ad4d9a6ab6bf81c84a933dba110b9200cd6d1448b814"
"checksum block-buffer 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49665c62e0e700857531fa5d3763e91b539ff1abeebd56808d378b495870d60d"