Sfoglia il codice sorgente

runtime: Upgrade the runtime crate (successful compilation).

Shamil Gadelshin 4 anni fa
parent
commit
25143d23f3

File diff suppressed because it is too large
+ 770 - 2
Cargo.lock


+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [workspace]
 members = [
-#	"runtime",
+	"runtime",
 	"runtime-modules/proposals/engine",
 	"runtime-modules/proposals/codex",
 	"runtime-modules/proposals/discussion",

+ 253 - 343
runtime/Cargo.toml

@@ -4,372 +4,282 @@ edition = '2018'
 name = 'joystream-node-runtime'
 # Follow convention: https://github.com/Joystream/substrate-runtime-joystream/issues/1
 # {Authoring}.{Spec}.{Impl} of the RuntimeVersion
-version = '6.20.0'
+version = '7.0.0'
+
+[dependencies]
+serde = { version = "1.0.101", optional = true, features = ["derive"] }
+codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
+rstd = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+frame-executive = { package = 'frame-executive', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+frame-system-rpc-runtime-api = { package = 'frame-system-rpc-runtime-api', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+#node-primitives = { package = 'node-primitives', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-offchain = { package = 'sp-offchain', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-authority-discovery = { package = 'sp-authority-discovery', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-consensus-babe = { package = 'sp-consensus-babe', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-transaction-pool = { package = 'sp-transaction-pool', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-session = { package = 'sp-session', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-grandpa = { package = 'pallet-grandpa', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-block-builder = { package = 'sp-block-builder', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-api = { package = 'sp-api', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-version = { package = 'sp-version', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-staking = { package = 'sp-staking', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-staking-reward-curve = { package = 'pallet-staking-reward-curve', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-babe = { package = 'pallet-babe', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-indices = { package = 'pallet-indices', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-transaction-payment = { package = 'pallet-transaction-payment', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-authorship = { package = 'pallet-authorship', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-session = { package = 'pallet-session', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-offences = { package = 'pallet-offences', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-finality-tracker = { package = 'pallet-finality-tracker', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-randomness-collective-flip = { package = 'pallet-randomness-collective-flip', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-authority-discovery = { package = 'pallet-authority-discovery', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+
+
+system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-sudo = { package = 'pallet-sudo', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-staking = { package = 'pallet-staking', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-im-online = { package = 'pallet-im-online', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-collective = { package = 'pallet-collective', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+
+common = { package = 'pallet-common', default-features = false, path = '../runtime-modules/common'}
+memo = { package = 'pallet-memo', default-features = false, path = '../runtime-modules/memo'}
+forum = { package = 'pallet-forum', default-features = false, path = '../runtime-modules/forum'}
+membership = { package = 'pallet-membership', default-features = false, path = '../runtime-modules/membership'}
+stake = { package = 'pallet-stake', default-features = false, path = '../runtime-modules/stake'}
+governance = { package = 'pallet-governance', default-features = false, path = '../runtime-modules/governance'}
+hiring = { package = 'pallet-hiring', default-features = false, path = '../runtime-modules/hiring'}
+minting = { package = 'pallet-token-mint', default-features = false, path = '../runtime-modules/token-minting'}
+recurring-rewards = { package = 'pallet-recurring-reward', default-features = false, path = '../runtime-modules/recurring-reward'}
+working-group = { package = 'pallet-working-group', default-features = false, path = '../runtime-modules/working-group'}
+content-working-group = { package = 'pallet-content-working-group', default-features = false, path = '../runtime-modules/content-working-group'}
+versioned-store = { package = 'pallet-versioned-store', default-features = false, path = '../runtime-modules/versioned-store'}
+versioned-store-permissions = { package = 'pallet-versioned-store-permissions', default-features = false, path = '../runtime-modules/versioned-store-permissions'}
+storage = { package = 'pallet-storage', default-features = false, path = '../runtime-modules/storage'}
+service-discovery = { package = 'pallet-service-discovery', default-features = false, path = '../runtime-modules/service-discovery'}
+proposals-engine = { package = 'pallet-proposals-engine', default-features = false, path = '../runtime-modules/proposals/engine'}
+proposals-discussion = { package = 'pallet-proposals-discussion', default-features = false, path = '../runtime-modules/proposals/discussion'}
+proposals-codex = { package = 'pallet-proposals-codex', default-features = false, path = '../runtime-modules/proposals/codex'}
+
+[build-dependencies]
+wasm-builder-runner = { package = "substrate-wasm-builder-runner", git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
+
 
 [features]
 default = ['std']
 no_std = []
 std = [
-    'authority-discovery-primitives/std',
-    'authority-discovery/std',
-    'authorship/std',
-    'finality-tracker/std',
-    'im-online/std',
-    'session/std',
-    'offences/std',
-    'sr-staking-primitives/std',
-    'staking/std',
-    'codec/std',
-    'substrate-client/std',
+#    'authority-discovery-primitives/std',
+#    'authority-discovery/std',
+#    'authorship/std',
+#    'finality-tracker/std',
+#    'im-online/std',
+#    'session/std',
+#    'offences/std',
+#    'sr-staking-primitives/std',
+#    'substrate-client/std',
     'rstd/std',
-    'runtime-io/std',
-    'srml-support/std',
-    'balances/std',
-    'babe/std',
-    'babe-primitives/std',
-    'executive/std',
-    'indices/std',
-    'grandpa/std',
-    'primitives/std',
-    'sr-primitives/std',
+    'sp-io/std',
+    'sp-core/std',
+    'frame-support/std',
+    'frame-system-rpc-runtime-api/std',
+    'sp-authority-discovery/std',
+    'sp-consensus-babe/std',
+    'sp-block-builder/std',
+    'sp-transaction-pool/std',
+    'sp-offchain/std',
+ #   'node-primitives/std',
+    'pallet-grandpa/std',
+    'pallet-babe/std',
+    'pallet-im-online/std',
+    'pallet-indices/std',
+    'pallet-authority-discovery/std',
+    'pallet-collective/std',
+#    'babe/std',
+#    'babe-primitives/std',
+#    'executive/std',
+#    'indices/std',
+#    'grandpa/std',
+#    'primitives/std',
+#    'sr-primitives/std',
+#    'version/std',
+#    'safe-mix/std',
+#    'offchain-primitives/std',
+#    'substrate-session/std',
+#    'transaction-payment/std',
+#    'randomness-collective-flip/std',
+#    'system-rpc-runtime-api/std',
+
+
+    'serde',
+    'codec/std',
+
+    'pallet-staking/std',
+    'pallet-balances/std',
     'system/std',
     'timestamp/std',
-    'sudo/std',
-    'version/std',
-    'serde',
-    'safe-mix/std',
-    'offchain-primitives/std',
-    'substrate-session/std',
-    'transaction-payment/std',
-    'randomness-collective-flip/std',
-    'system-rpc-runtime-api/std',
+    'pallet-sudo/std',
+
     'forum/std',
     'minting/std',
-    'recurringrewards/std',
+    'recurring-rewards/std',
     'stake/std',
     'hiring/std',
-    'versioned_store/std',
-    'versioned_store_permissions/std',
+    'versioned-store/std',
+    'versioned-store-permissions/std',
     'common/std',
-    'content_working_group/std',
+    'content-working-group/std',
     'governance/std',
     'membership/std',
     'memo/std',
-    'service_discovery/std',
+    'service-discovery/std',
     'storage/std',
-    'proposals_engine/std',
-    'proposals_discussion/std',
-    'proposals_codex/std',
+    'proposals-engine/std',
+    'proposals-discussion/std',
+    'proposals-codex/std',
     'working-group/std',
 ]
 
-# [dependencies]
-# # https://users.rust-lang.org/t/failure-derive-compilation-error/39062
-# quote = '<=1.0.2'
-
-[dependencies.babe]
-default-features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-babe'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.babe-primitives]
-default-features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'substrate-consensus-babe-primitives'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.balances]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-balances'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.substrate-client]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'substrate-client'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.codec]
-default-features = false
-features = ['derive']
-package = 'parity-scale-codec'
-version = '1.0.0'
-
-[dependencies.executive]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-executive'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.grandpa]
-default-features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-grandpa'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.indices]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-indices'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.offchain-primitives]
-default-features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'substrate-offchain-primitives'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.primitives]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'substrate-primitives'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.rstd]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'sr-std'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.runtime-io]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'sr-io'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.safe-mix]
-default-features = false
-version = '1.0'
-
-[dependencies.serde]
-features = ['derive']
-optional = true
-version = '1.0.101'
-
-[dependencies.sr-primitives]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'sr-primitives'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.substrate-session]
-default-features = false
-git = 'https://github.com/paritytech/substrate.git'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.sudo]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-sudo'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.srml-support]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-support'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.system]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-system'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.timestamp]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-timestamp'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.version]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'sr-version'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.authority-discovery-primitives]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'substrate-authority-discovery-primitives'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.authority-discovery]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-authority-discovery'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.authorship]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-authorship'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.finality-tracker]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-finality-tracker'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.im-online]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-im-online'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.session]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-session'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.offences]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-offences'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.sr-staking-primitives]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'sr-staking-primitives'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.staking]
-default_features = false
-git = 'https://github.com/paritytech/substrate.git'
-package = 'srml-staking'
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.transaction-payment]
-package = "srml-transaction-payment"
-git = 'https://github.com/paritytech/substrate.git'
-default_features = false
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.randomness-collective-flip]
-package = "srml-randomness-collective-flip"
-git = 'https://github.com/paritytech/substrate.git'
-default_features = false
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[dependencies.system-rpc-runtime-api]
-package = "srml-system-rpc-runtime-api"
-git = 'https://github.com/paritytech/substrate.git'
-default_features = false
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-# don't rename the dependency it is causing some strange compiler error:
-# https://github.com/rust-lang/rust/issues/64450
-[dependencies.srml-staking-reward-curve]
-package = 'srml-staking-reward-curve'
-git = 'https://github.com/paritytech/substrate.git'
-default_features = false
-rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
-
-[build-dependencies.wasm-builder-runner]
-package = 'substrate-wasm-builder-runner'
-version = '1.0.5'
-
-[dependencies.forum]
-default_features = false
-package = 'substrate-forum-module'
-path = '../runtime-modules/forum'
-
-[dependencies.minting]
-default_features = false
-package = 'substrate-token-mint-module'
-path = '../runtime-modules/token-minting'
-
-[dependencies.stake]
-default_features = false
-package = 'substrate-stake-module'
-path = '../runtime-modules/stake'
-
-[dependencies.recurringrewards]
-default_features = false
-package = 'substrate-recurring-reward-module'
-path = '../runtime-modules/recurring-reward'
-
-[dependencies.hiring]
-default_features = false
-package = 'substrate-hiring-module'
-path = '../runtime-modules/hiring'
-
-[dependencies.versioned_store]
-default_features = false
-package ='substrate-versioned-store'
-path = '../runtime-modules/versioned-store'
-
-[dependencies.versioned_store_permissions]
-default_features = false
-package = 'substrate-versioned-store-permissions-module'
-path = '../runtime-modules/versioned-store-permissions'
-
-[dependencies.common]
-default_features = false
-package = 'substrate-common-module'
-path = '../runtime-modules/common'
-version = '1.0.0'
-
-[dependencies.content_working_group]
-default_features = false
-package = 'substrate-content-working-group-module'
-path = '../runtime-modules/content-working-group'
-version = '1.0.0'
-
-[dependencies.governance]
-default_features = false
-package = 'substrate-governance-module'
-path = '../runtime-modules/governance'
-version = '1.0.0'
-
-[dependencies.membership]
-default_features = false
-package = 'substrate-membership-module'
-path = '../runtime-modules/membership'
-version = '1.0.0'
-
-[dependencies.memo]
-default_features = false
-package = 'substrate-memo-module'
-path = '../runtime-modules/memo'
-version = '1.0.0'
 
-[dependencies.service_discovery]
-default_features = false
-package = 'substrate-service-discovery-module'
-path = '../runtime-modules/service-discovery'
-version = '2.0.0'
+#[dependencies.babe]
+#default-features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-babe'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.babe-primitives]
+#default-features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'substrate-consensus-babe-primitives'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.substrate-client]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'substrate-client'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.executive]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-executive'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.grandpa]
+#default-features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-grandpa'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.indices]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-indices'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.offchain-primitives]
+#default-features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'substrate-offchain-primitives'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.primitives]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'substrate-primitives'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.safe-mix]
+#default-features = false
+#version = '1.0'
+#
+#[dependencies.substrate-session]
+#default-features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+
+#
+#[dependencies.authority-discovery-primitives]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'substrate-authority-discovery-primitives'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.authority-discovery]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-authority-discovery'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.authorship]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-authorship'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.finality-tracker]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-finality-tracker'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.im-online]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-im-online'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.session]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-session'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.offences]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-offences'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.sr-staking-primitives]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'sr-staking-primitives'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.staking]
+#default_features = false
+#git = 'https://github.com/paritytech/substrate.git'
+#package = 'srml-staking'
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.transaction-payment]
+#package = "srml-transaction-payment"
+#git = 'https://github.com/paritytech/substrate.git'
+#default_features = false
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.randomness-collective-flip]
+#package = "srml-randomness-collective-flip"
+#git = 'https://github.com/paritytech/substrate.git'
+#default_features = false
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
+#[dependencies.system-rpc-runtime-api]
+#package = "srml-system-rpc-runtime-api"
+#git = 'https://github.com/paritytech/substrate.git'
+#default_features = false
+#rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'
+#
 
-[dependencies.storage]
-default_features = false
-package = 'substrate-storage-module'
-path = '../runtime-modules/storage'
-version = '2.0.0'
 
-[dependencies.proposals_engine]
-default_features = false
-package = 'substrate-proposals-engine-module'
-path = '../runtime-modules/proposals/engine'
-version = '2.0.0'
 
-[dependencies.proposals_discussion]
-default_features = false
-package = 'substrate-proposals-discussion-module'
-path = '../runtime-modules/proposals/discussion'
-version = '2.0.0'
 
-[dependencies.proposals_codex]
-default_features = false
-package = 'substrate-proposals-codex-module'
-path = '../runtime-modules/proposals/codex'
-version = '2.0.0'
 
-[dependencies.working-group]
-default_features = false
-package = 'substrate-working-group-module'
-path = '../runtime-modules/working-group'
-version = '1.0.0'

+ 7 - 7
runtime/src/integration/content_working_group.rs

@@ -1,7 +1,7 @@
 use crate::{AccountId, Credential, Runtime};
 
-use srml_support::traits::{Currency, Imbalance};
-use srml_support::{parameter_types, StorageLinkedMap, StorageMap};
+use frame_support::traits::{Currency, Imbalance};
+use frame_support::{parameter_types, IterableStorageMap, StorageMap};
 
 parameter_types! {
     pub const CurrentLeadCredential: Credential = 0;
@@ -29,7 +29,7 @@ impl versioned_store_permissions::CredentialChecker<Runtime> for ContentWorkingG
             credential if credential == AnyActiveCuratorCredential::get() => {
                 // Look for a Curator with a matching role account
                 for (_principal_id, principal) in
-                    <content_working_group::PrincipalById<Runtime>>::enumerate()
+                    <content_working_group::PrincipalById<Runtime>>::iter()
                 {
                     if let content_working_group::Principal::Curator(curator_id) = principal {
                         let curator =
@@ -48,7 +48,7 @@ impl versioned_store_permissions::CredentialChecker<Runtime> for ContentWorkingG
             credential if credential == AnyActiveChannelOwnerCredential::get() => {
                 // Look for a ChannelOwner with a matching role account
                 for (_principal_id, principal) in
-                    <content_working_group::PrincipalById<Runtime>>::enumerate()
+                    <content_working_group::PrincipalById<Runtime>>::iter()
                 {
                     if let content_working_group::Principal::ChannelOwner(channel_id) = principal {
                         let channel =
@@ -80,14 +80,14 @@ impl stake::StakingEventsHandler<Runtime> for ContentWorkingGroupStakingEventHan
         _unstaked_amount: stake::BalanceOf<Runtime>,
         remaining_imbalance: stake::NegativeImbalance<Runtime>,
     ) -> stake::NegativeImbalance<Runtime> {
-        if !hiring::ApplicationIdByStakingId::<Runtime>::exists(stake_id) {
+        if !hiring::ApplicationIdByStakingId::<Runtime>::contains_key(stake_id) {
             // Stake not related to a staked role managed by the hiring module
             return remaining_imbalance;
         }
 
         let application_id = hiring::ApplicationIdByStakingId::<Runtime>::get(stake_id);
 
-        if !content_working_group::CuratorApplicationById::<Runtime>::exists(application_id) {
+        if !content_working_group::CuratorApplicationById::<Runtime>::contains_key(application_id) {
             // Stake not for a Curator
             return remaining_imbalance;
         }
@@ -97,7 +97,7 @@ impl stake::StakingEventsHandler<Runtime> for ContentWorkingGroupStakingEventHan
         hiring::Module::<Runtime>::unstaked(*stake_id);
 
         // Only notify working group module if non instantaneous unstaking occured
-        if content_working_group::UnstakerByStakeId::<Runtime>::exists(stake_id) {
+        if content_working_group::UnstakerByStakeId::<Runtime>::contains_key(stake_id) {
             content_working_group::Module::<Runtime>::unstaked(*stake_id);
         }
 

+ 4 - 4
runtime/src/integration/proposals/proposal_encoder.rs

@@ -4,10 +4,10 @@ use proposals_codex::{ProposalDetails, ProposalDetailsOf, ProposalEncoder};
 use working_group::OpeningType;
 
 use codec::Encode;
+use frame_support::print;
 use rstd::collections::btree_set::BTreeSet;
 use rstd::marker::PhantomData;
 use rstd::vec::Vec;
-use srml_support::print;
 
 // The macro binds working group outer-level Call with the provided inner-level working group
 // extrinsic call. Outer-call is defined by the provided WorkingGroup param expression.
@@ -46,9 +46,9 @@ impl ProposalEncoder<Runtime> for ExtrinsicProposalEncoder {
             ProposalDetails::SetLead(new_lead) => {
                 Call::ContentWorkingGroup(content_working_group::Call::replace_lead(new_lead))
             }
-            ProposalDetails::SetValidatorCount(new_validator_count) => {
-                Call::Staking(staking::Call::set_validator_count(new_validator_count))
-            }
+            ProposalDetails::SetValidatorCount(new_validator_count) => Call::Staking(
+                pallet_staking::Call::set_validator_count(new_validator_count),
+            ),
             ProposalDetails::RuntimeUpgrade(wasm_code) => Call::ProposalsCodex(
                 proposals_codex::Call::execute_runtime_upgrade_proposal(wasm_code),
             ),

+ 3 - 3
runtime/src/integration/proposals/staking_events_handler.rs

@@ -1,8 +1,8 @@
 #![warn(missing_docs)]
 
+use frame_support::traits::{Currency, Imbalance};
+use frame_support::StorageMap;
 use rstd::marker::PhantomData;
-use srml_support::traits::{Currency, Imbalance};
-use srml_support::StorageMap;
 
 // Balance alias
 type BalanceOf<T> =
@@ -27,7 +27,7 @@ impl<T: stake::Trait + proposals_engine::Trait> stake::StakingEventsHandler<T>
         _unstaked_amount: BalanceOf<T>,
         remaining_imbalance: NegativeImbalance<T>,
     ) -> NegativeImbalance<T> {
-        if <proposals_engine::StakesProposals<T>>::exists(id) {
+        if <proposals_engine::StakesProposals<T>>::contains_key(id) {
             <proposals_engine::Module<T>>::refund_proposal_stake(*id, remaining_imbalance);
 
             return <NegativeImbalance<T>>::zero(); // imbalance was consumed

+ 1 - 1
runtime/src/integration/storage.rs

@@ -1,5 +1,5 @@
+use frame_support::traits::Randomness;
 use rstd::vec::Vec;
-use srml_support::traits::Randomness;
 
 use crate::{ActorId, Runtime};
 

+ 3 - 3
runtime/src/integration/working_group.rs

@@ -1,5 +1,5 @@
+use frame_support::StorageMap;
 use rstd::marker::PhantomData;
-use srml_support::{StorageLinkedMap, StorageMap};
 
 use crate::StorageWorkingGroupInstance;
 use stake::{BalanceOf, NegativeImbalance};
@@ -18,13 +18,13 @@ impl<T: stake::Trait + working_group::Trait<StorageWorkingGroupInstance>>
         remaining_imbalance: NegativeImbalance<T>,
     ) -> NegativeImbalance<T> {
         // Stake not related to a staked role managed by the hiring module.
-        if !hiring::ApplicationIdByStakingId::<T>::exists(*stake_id) {
+        if !hiring::ApplicationIdByStakingId::<T>::contains_key(*stake_id) {
             return remaining_imbalance;
         }
 
         let hiring_application_id = hiring::ApplicationIdByStakingId::<T>::get(*stake_id);
 
-        if working_group::MemberIdByHiringApplicationId::<T, StorageWorkingGroupInstance>::exists(
+        if working_group::MemberIdByHiringApplicationId::<T, StorageWorkingGroupInstance>::contains_key(
             hiring_application_id,
         ) {
             return <working_group::Module<T, StorageWorkingGroupInstance>>::refund_working_group_stake(

+ 344 - 169
runtime/src/lib.rs

@@ -3,12 +3,9 @@
 #![cfg_attr(not(feature = "std"), no_std)]
 // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
 #![recursion_limit = "256"]
-// srml_staking_reward_curve::build! - substrate macro produces a warning.
-// TODO: remove after post-Rome substrate upgrade
-#![allow(array_into_iter)]
-
-// Runtime integration tests
-mod tests;
+//Substrate internal issues.
+#![allow(clippy::large_enum_variant)]
+#![allow(clippy::unnecessary_mut_passed)]
 
 // Make the WASM binary available.
 // This is required only by the node build.
@@ -17,65 +14,46 @@ mod tests;
 include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
 
 mod integration;
-
-use authority_discovery_primitives::{
-    AuthorityId as EncodedAuthorityId, Signature as EncodedSignature,
+mod migration;
+#[cfg(test)]
+mod tests; // Runtime integration tests
+
+use frame_support::inherent::{CheckInherentsResult, InherentData};
+use frame_support::traits::KeyOwnerProofSystem;
+use frame_support::weights::{IdentityFee, Weight};
+use frame_support::{
+    construct_runtime, parameter_types, traits::Randomness, StorageMap, StorageValue,
 };
-use babe_primitives::{AuthorityId as BabeId, AuthoritySignature as BabeSignature};
-use codec::{Decode, Encode};
-use grandpa::fg_primitives;
-use grandpa::{AuthorityId as GrandpaId, AuthorityWeight as GrandpaWeight};
-use im_online::sr25519::AuthorityId as ImOnlineId;
-use primitives::OpaqueMetadata;
-use rstd::prelude::*;
-use sr_primitives::curve::PiecewiseLinear;
-use sr_primitives::traits::{
+use pallet_grandpa::fg_primitives;
+use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList};
+use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
+use sp_api::impl_runtime_apis;
+use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
+use sp_core::crypto::KeyTypeId;
+use sp_core::OpaqueMetadata;
+use sp_runtime::curve::PiecewiseLinear;
+use sp_runtime::traits::{
     BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, StaticLookup, Verify,
 };
-use sr_primitives::weights::Weight;
-use sr_primitives::{
+use sp_runtime::transaction_validity::TransactionSource;
+#[cfg(any(feature = "std", test))]
+use sp_runtime::Perbill;
+use sp_runtime::{
     create_runtime_str, generic, impl_opaque_keys, transaction_validity::TransactionValidity,
-    ApplyResult, MultiSignature,
-};
-use substrate_client::{
-    block_builder::api::{self as block_builder_api, CheckInherentsResult, InherentData},
-    impl_runtime_apis, runtime_api as client_api,
+    ApplyExtrinsicResult, MultiSignature,
 };
-use system::offchain::TransactionSubmitter;
 #[cfg(feature = "std")]
-use version::NativeVersion;
-use version::RuntimeVersion;
-
-// A few exports that help ease life for downstream crates.
-pub use balances::Call as BalancesCall;
-#[cfg(any(feature = "std", test))]
-pub use sr_primitives::BuildStorage;
-pub use sr_primitives::{Perbill, Permill};
-
-pub use srml_support::{
-    construct_runtime, parameter_types, traits::Currency, traits::Imbalance, traits::Randomness,
-    StorageLinkedMap, StorageMap, StorageValue,
-};
-pub use staking::StakerStatus;
-pub use timestamp::Call as TimestampCall;
+use sp_version::{NativeVersion, RuntimeVersion};
+use system::EnsureRoot;
 
 use integration::proposals::{CouncilManager, ExtrinsicProposalEncoder, MembershipOriginValidator};
-pub use proposals_codex::ProposalsConfigParameters;
 
-pub use common;
-pub use forum;
-pub use working_group;
-
-pub use governance::election_params::ElectionParameters;
+use content_working_group as content_wg;
 use governance::{council, election};
 use storage::{data_directory, data_object_storage_registry, data_object_type_registry};
-pub use versioned_store;
-
-pub use content_working_group as content_wg;
-mod migration;
 
 /// Alias for ContentId, used in various places.
-pub type ContentId = primitives::H256;
+pub type ContentId = sp_core::H256;
 
 /// An index to a block.
 pub type BlockNumber = u32;
@@ -98,7 +76,7 @@ pub type Balance = u128;
 pub type Index = u32;
 
 /// A hash of some data used by the chain.
-pub type Hash = primitives::H256;
+pub type Hash = sp_core::H256;
 
 /// Digest item type.
 pub type DigestItem = generic::DigestItem<Hash>;
@@ -135,7 +113,7 @@ pub type ActorId = u64;
 pub mod opaque {
     use super::*;
 
-    pub use sr_primitives::OpaqueExtrinsic as UncheckedExtrinsic;
+    pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
 
     /// Opaque block header type.
     pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
@@ -163,6 +141,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
     spec_version: 20,
     impl_version: 0,
     apis: RUNTIME_API_VERSIONS,
+    transaction_version: 0, //TODO ??
 };
 
 /// Constants for Babe.
@@ -246,32 +225,111 @@ impl system::Trait for Runtime {
     /// Portion of the block weight that is available to all normal transactions.
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = Version;
+    //TODO
+    type BaseCallFilter = ();
+    type DbWeight = ();
+    type BlockExecutionWeight = ();
+    type ExtrinsicBaseWeight = ();
+    type MaximumExtrinsicWeight = ();
+    type ModuleToIndex = ();
+    type AccountData = pallet_balances::AccountData<Balance>;
+    type OnNewAccount = ();
+    type OnKilledAccount = ();
 }
 
+/*
+    type BaseCallFilter = ();
+    type Origin = Origin;
+    type Call = Call;
+    type Index = Index;
+    type BlockNumber = BlockNumber;
+    type Hash = Hash;
+    type Hashing = BlakeTwo256;
+    type AccountId = AccountId;
+    type Lookup = Indices;
+    type Header = generic::Header<BlockNumber, BlakeTwo256>;
+    type Event = Event;
+    type BlockHashCount = BlockHashCount;
+    type MaximumBlockWeight = MaximumBlockWeight;
+    type DbWeight = RocksDbWeight;
+    type BlockExecutionWeight = BlockExecutionWeight;
+    type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
+    type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
+    type MaximumBlockLength = MaximumBlockLength;
+    type AvailableBlockRatio = AvailableBlockRatio;
+    type Version = Version;
+    type ModuleToIndex = ModuleToIndex;
+    type AccountData = pallet_balances::AccountData<Balance>;
+    type OnNewAccount = ();
+    type OnKilledAccount = ();
+*/
+
 parameter_types! {
     pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64;
     pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
 }
 
-impl babe::Trait for Runtime {
+impl pallet_babe::Trait for Runtime {
     type EpochDuration = EpochDuration;
     type ExpectedBlockTime = ExpectedBlockTime;
-    type EpochChangeTrigger = babe::ExternalTrigger;
+    type EpochChangeTrigger = pallet_babe::ExternalTrigger;
 }
 
-impl grandpa::Trait for Runtime {
+impl pallet_grandpa::Trait for Runtime {
     type Event = Event;
+
+    //toDO
+    type Call = Call;
+    type KeyOwnerProofSystem = ();
+
+    type KeyOwnerProof =
+        <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
+
+    type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
+        KeyTypeId,
+        GrandpaId,
+    )>>::IdentificationTuple;
+
+    type HandleEquivocation = ();
+}
+
+/*
+    type KeyOwnerProofSystem = Historical;
+
+    type KeyOwnerProof =
+        <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
+
+    type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
+        KeyTypeId,
+        GrandpaId,
+    )>>::IdentificationTuple;
+
+    type HandleEquivocation = pallet_grandpa::EquivocationHandler<
+        Self::KeyOwnerIdentification,
+        node_primitives::report::ReporterAppCrypto,
+        Runtime,
+        Offences,
+    >;
+
+*/
+
+impl<C> system::offchain::SendTransactionTypes<C> for Runtime
+where
+    Call: From<C>,
+{
+    type Extrinsic = UncheckedExtrinsic;
+    type OverarchingCall = Call;
 }
 
-impl indices::Trait for Runtime {
+impl pallet_indices::Trait for Runtime {
     /// The type for recording indexing into the account enumeration. If this ever overflows, there
     /// will be problems!
     type AccountIndex = u32;
     /// Use the standard means of resolving an index hint from an id.
-    type ResolveHint = indices::SimpleResolveHint<Self::AccountId, Self::AccountIndex>;
-    /// Determine whether an account is dead.
-    type IsDeadAccount = Balances;
-    /// The ubiquitous event type.
+    //type ResolveHint = pallet_indices::SimpleResolveHint<Self::AccountId, Self::AccountIndex>;
+    type Currency = Balances;
+    //toDO
+    type Deposit = ();
     type Event = Event;
 }
 
@@ -295,43 +353,44 @@ parameter_types! {
     pub const InitialMembersBalance: u32 = 2000;
 }
 
-impl balances::Trait for Runtime {
+impl pallet_balances::Trait for Runtime {
     /// The type for recording an account's balance.
     type Balance = Balance;
-    /// What to do if an account's free balance gets zeroed.
-    type OnFreeBalanceZero = (Staking, Session);
-    /// What to do if a new account is created.
-    type OnNewAccount = (); // Indices; // disable use of Indices feature
-    /// The ubiquitous event type.
+    // /// What to do if an account's free balance gets zeroed.
+    // type OnFreeBalanceZero = (Staking, Session);
+    // /// What to do if a new account is created.
+    // type OnNewAccount = (); // Indices; // disable use of Indices feature
+    // /// The ubiquitous event type.
     type Event = Event;
 
     type DustRemoval = ();
-    type TransferPayment = ();
+    //type TransferPayment = ();
     type ExistentialDeposit = ExistentialDeposit;
-    type TransferFee = TransferFee;
-    type CreationFee = CreationFee;
+    // type TransferFee = TransferFee;
+    // type CreationFee = CreationFee;
+    type AccountStore = System;
 }
 
-impl transaction_payment::Trait for Runtime {
+impl pallet_transaction_payment::Trait for Runtime {
     type Currency = Balances;
     type OnTransactionPayment = ();
-    type TransactionBaseFee = TransactionBaseFee;
+    //    type TransactionBaseFee = TransactionBaseFee;
     type TransactionByteFee = TransactionByteFee;
-    type WeightToFee = ();
+    type WeightToFee = IdentityFee<Balance>;
     type FeeMultiplierUpdate = ();
 }
 
-impl sudo::Trait for Runtime {
+impl pallet_sudo::Trait for Runtime {
     type Event = Event;
-    type Proposal = Call;
+    type Call = Call;
 }
 
 parameter_types! {
     pub const UncleGenerations: BlockNumber = 5;
 }
 
-impl authorship::Trait for Runtime {
-    type FindAuthor = session::FindAccountFromAuthorIndex<Self, Babe>;
+impl pallet_authorship::Trait for Runtime {
+    type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
     type UncleGenerations = UncleGenerations;
     type FilterUncle = ();
     type EventHandler = Staking;
@@ -356,24 +415,38 @@ parameter_types! {
     pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17);
 }
 
-impl session::Trait for Runtime {
-    type OnSessionEnding = Staking;
+/*
+type Event = Event;
+type ValidatorId = <Self as frame_system::Trait>::AccountId;
+type ValidatorIdOf = pallet_staking::StashOf<Self>;
+type ShouldEndSession = Babe;
+type NextSessionRotation = Babe;
+type SessionManager = pallet_session::historical::NoteHistoricalRoot<Self, Staking>;
+type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
+type Keys = SessionKeys;
+type DisabledValidatorsThreshold = DisabledValidatorsThreshold;*/
+
+impl pallet_session::Trait for Runtime {
+    //    type OnSessionEnding = Staking;
     type SessionHandler = SessionHandlers;
     type ShouldEndSession = Babe;
     type Event = Event;
     type Keys = SessionKeys;
     type ValidatorId = AccountId;
-    type ValidatorIdOf = staking::StashOf<Self>;
-    type SelectInitialValidators = Staking;
+    type ValidatorIdOf = pallet_staking::StashOf<Self>;
+    //    type SelectInitialValidators = Staking;
     type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
+    //TODO
+    type NextSessionRotation = ();
+    type SessionManager = ();
 }
 
-impl session::historical::Trait for Runtime {
-    type FullIdentification = staking::Exposure<AccountId, Balance>;
-    type FullIdentificationOf = staking::ExposureOf<Runtime>;
+impl pallet_session::historical::Trait for Runtime {
+    type FullIdentification = pallet_staking::Exposure<AccountId, Balance>;
+    type FullIdentificationOf = pallet_staking::ExposureOf<Runtime>;
 }
 
-srml_staking_reward_curve::build! {
+pallet_staking_reward_curve::build! {
     const REWARD_CURVE: PiecewiseLinear<'static> = curve!(
         min_inflation: 0_025_000,
         max_inflation: 0_300_000,
@@ -385,14 +458,41 @@ srml_staking_reward_curve::build! {
 }
 
 parameter_types! {
-    pub const SessionsPerEra: sr_staking_primitives::SessionIndex = 6;
-    pub const BondingDuration: staking::EraIndex = 24;
+    pub const SessionsPerEra: sp_staking::SessionIndex = 6;
+    pub const BondingDuration: pallet_staking::EraIndex = 24;
     pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
 }
 
-impl staking::Trait for Runtime {
+/*
     type Currency = Balances;
-    type Time = Timestamp;
+    type UnixTime = Timestamp;
+    type CurrencyToVote = CurrencyToVoteHandler;
+    type RewardRemainder = Treasury;
+    type Event = Event;
+    type Slash = Treasury; // send the slashed funds to the treasury.
+    type Reward = (); // rewards are minted from the void
+    type SessionsPerEra = SessionsPerEra;
+    type BondingDuration = BondingDuration;
+    type SlashDeferDuration = SlashDeferDuration;
+    /// A super-majority of the council can cancel the slash.
+    type SlashCancelOrigin = EnsureOneOf<
+        AccountId,
+        EnsureRoot<AccountId>,
+        pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>
+    >;
+    type SessionInterface = Self;
+    type RewardCurve = RewardCurve;
+    type NextNewSession = Session;
+    type ElectionLookahead = ElectionLookahead;
+    type Call = Call;
+    type MaxIterations = MaxIterations;
+    type MinSolutionScoreBump = MinSolutionScoreBump;
+    type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
+    type UnsignedPriority = StakingUnsignedPriority;
+*/
+impl pallet_staking::Trait for Runtime {
+    type Currency = Balances;
+    type UnixTime = Timestamp;
     type CurrencyToVote = common::currency::CurrencyToVoteHandler;
     type RewardRemainder = ();
     type Event = Event;
@@ -400,41 +500,56 @@ impl staking::Trait for Runtime {
     type Reward = (); // rewards are minted from the void
     type SessionsPerEra = SessionsPerEra;
     type BondingDuration = BondingDuration;
+    // TODO
+    type SlashDeferDuration = ();
+    type SlashCancelOrigin = EnsureRoot<AccountId>;
     type SessionInterface = Self;
     type RewardCurve = RewardCurve;
+    type NextNewSession = ();
+    type ElectionLookahead = ();
+    type Call = Call;
+    type MaxIterations = ();
+    type MinSolutionScoreBump = ();
+    type MaxNominatorRewardedPerValidator = ();
+    type UnsignedPriority = ();
 }
 
-type SubmitTransaction = TransactionSubmitter<ImOnlineId, Runtime, UncheckedExtrinsic>;
+//type SubmitTransaction = TransactionSubmitter<ImOnlineId, Runtime, UncheckedExtrinsic>;
 
 parameter_types! {
     pub const SessionDuration: BlockNumber = EPOCH_DURATION_IN_SLOTS as _;
 }
 
-impl im_online::Trait for Runtime {
+/*
+    type AuthorityId = ImOnlineId;
+    type Event = Event;
+    type SessionDuration = SessionDuration;
+    type ReportUnresponsiveness = Offences;
+    type UnsignedPriority = ImOnlineUnsignedPriority;
+*/
+impl pallet_im_online::Trait for Runtime {
     type AuthorityId = ImOnlineId;
-    type Call = Call;
     type Event = Event;
-    type SubmitTransaction = SubmitTransaction;
     type ReportUnresponsiveness = Offences;
     type SessionDuration = SessionDuration;
+    type UnsignedPriority = (); //ImOnlineUnsignedPriority;
 }
 
-impl offences::Trait for Runtime {
+impl pallet_offences::Trait for Runtime {
     type Event = Event;
-    type IdentificationTuple = session::historical::IdentificationTuple<Self>;
+    type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
     type OnOffenceHandler = Staking;
+    type WeightSoftLimit = (); //OffencesWeightSoftLimit;
 }
 
-impl authority_discovery::Trait for Runtime {
-    type AuthorityId = BabeId;
-}
+impl pallet_authority_discovery::Trait for Runtime {}
 
 parameter_types! {
     pub const WindowSize: BlockNumber = 101;
     pub const ReportLatency: BlockNumber = 1000;
 }
 
-impl finality_tracker::Trait for Runtime {
+impl pallet_finality_tracker::Trait for Runtime {
     type OnFinalizationStalled = Grandpa;
     type WindowSize = WindowSize;
     type ReportLatency = ReportLatency;
@@ -460,7 +575,7 @@ impl versioned_store_permissions::CredentialChecker<Runtime> for SudoKeyHasAllCr
         account: &AccountId,
         _credential: <Runtime as versioned_store_permissions::Trait>::Credential,
     ) -> bool {
-        <sudo::Module<Runtime>>::key() == *account
+        <pallet_sudo::Module<Runtime>>::key() == *account
     }
 }
 
@@ -470,7 +585,7 @@ impl versioned_store_permissions::CreateClassPermissionsChecker<Runtime>
     for SudoKeyCanCreateClasses
 {
     fn account_can_create_class_permissions(account: &AccountId) -> bool {
-        <sudo::Module<Runtime>>::key() == *account
+        <pallet_sudo::Module<Runtime>>::key() == *account
     }
 }
 
@@ -513,7 +628,7 @@ impl minting::Trait for Runtime {
     type MintId = u64;
 }
 
-impl recurringrewards::Trait for Runtime {
+impl recurring_rewards::Trait for Runtime {
     type PayoutStatusHandler = (); // TODO - deal with successful and failed payouts
     type RecipientId = u64;
     type RewardRelationshipId = u64;
@@ -542,7 +657,7 @@ impl content_wg::Trait for Runtime {
 }
 
 impl common::currency::GovernanceCurrency for Runtime {
-    type Currency = balances::Module<Self>;
+    type Currency = pallet_balances::Module<Self>;
 }
 
 impl governance::election::Trait for Runtime {
@@ -712,22 +827,22 @@ construct_runtime!(
         UncheckedExtrinsic = UncheckedExtrinsic
     {
         // Substrate
-        System: system::{Module, Call, Storage, Config, Event},
-        Babe: babe::{Module, Call, Storage, Config, Inherent(Timestamp)},
+        System: system::{Module, Call, Storage, Config, Event<T>},
+        Babe: pallet_babe::{Module, Call, Storage, Config, Inherent(Timestamp)},
         Timestamp: timestamp::{Module, Call, Storage, Inherent},
-        Authorship: authorship::{Module, Call, Storage, Inherent},
-        Indices: indices,
-        Balances: balances,
-        TransactionPayment: transaction_payment::{Module, Storage},
-        Staking: staking::{default, OfflineWorker},
-        Session: session::{Module, Call, Storage, Event, Config<T>},
-        FinalityTracker: finality_tracker::{Module, Call, Inherent},
-        Grandpa: grandpa::{Module, Call, Storage, Config, Event},
-        ImOnline: im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
-        AuthorityDiscovery: authority_discovery::{Module, Call, Config<T>},
-        Offences: offences::{Module, Call, Storage, Event},
-        RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
-        Sudo: sudo,
+        Authorship: pallet_authorship::{Module, Call, Storage, Inherent},
+        Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>},
+        Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
+        TransactionPayment: pallet_transaction_payment::{Module, Storage},
+        Staking: pallet_staking::{Module, Call, Config<T>, Storage, Event<T>, ValidateUnsigned},
+        Session: pallet_session::{Module, Call, Storage, Event, Config<T>},
+        FinalityTracker: pallet_finality_tracker::{Module, Call, Inherent},
+        Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
+        ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
+        AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config},
+        Offences: pallet_offences::{Module, Call, Storage, Event},
+        RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
+        Sudo: pallet_sudo::{Module, Call, Config<T>, Storage, Event<T>},
         // Joystream
         Migration: migration::{Module, Call, Storage, Event<T>, Config},
         CouncilElection: election::{Module, Call, Storage, Event<T>, Config<T>},
@@ -739,7 +854,7 @@ construct_runtime!(
         VersionedStorePermissions: versioned_store_permissions::{Module, Call, Storage},
         Stake: stake::{Module, Call, Storage},
         Minting: minting::{Module, Call, Storage},
-        RecurringRewards: recurringrewards::{Module, Call, Storage},
+        RecurringRewards: recurring_rewards::{Module, Call, Storage},
         Hiring: hiring::{Module, Call, Storage},
         ContentWorkingGroup: content_wg::{Module, Call, Storage, Event<T>, Config<T>},
         // --- Storage
@@ -750,10 +865,10 @@ construct_runtime!(
         // --- Proposals
         ProposalsEngine: proposals_engine::{Module, Call, Storage, Event<T>},
         ProposalsDiscussion: proposals_discussion::{Module, Call, Storage, Event<T>},
-        ProposalsCodex: proposals_codex::{Module, Call, Storage, Error, Config<T>},
+        ProposalsCodex: proposals_codex::{Module, Call, Storage, Config<T>},
         // --- Working groups
         // reserved for the future use: ForumWorkingGroup: working_group::<Instance1>::{Module, Call, Storage, Event<T>},
-        StorageWorkingGroup: working_group::<Instance2>::{Module, Call, Storage, Config<T>, Error, Event<T>},
+        StorageWorkingGroup: working_group::<Instance2>::{Module, Call, Storage, Config<T>, Event<T>},
     }
 );
 
@@ -769,23 +884,35 @@ pub type SignedBlock = generic::SignedBlock<Block>;
 pub type BlockId = generic::BlockId<Block>;
 /// The SignedExtension to the basic transaction logic.
 pub type SignedExtra = (
-    system::CheckVersion<Runtime>,
+    system::CheckSpecVersion<Runtime>,
+    system::CheckTxVersion<Runtime>,
     system::CheckGenesis<Runtime>,
     system::CheckEra<Runtime>,
     system::CheckNonce<Runtime>,
     system::CheckWeight<Runtime>,
-    transaction_payment::ChargeTransactionPayment<Runtime>,
+    pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
 );
+
+/*
+    frame_system::CheckSpecVersion<Runtime>,
+    frame_system::CheckTxVersion<Runtime>,
+    frame_system::CheckGenesis<Runtime>,
+    frame_system::CheckEra<Runtime>,
+    frame_system::CheckNonce<Runtime>,
+    frame_system::CheckWeight<Runtime>,
+    pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
+    pallet_grandpa::ValidateEquivocationReport<Runtime>,
+*/
 /// Unchecked extrinsic type as expected by this runtime.
 pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
 /// Extrinsic type that has already been checked.
 pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExtra>;
 /// Executive: handles dispatch to the various modules.
 pub type Executive =
-    executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Runtime, AllModules>;
+    frame_executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Runtime, AllModules>;
 
 impl_runtime_apis! {
-    impl client_api::Core<Block> for Runtime {
+    impl sp_api::Core<Block> for Runtime {
         fn version() -> RuntimeVersion {
             VERSION
         }
@@ -799,14 +926,14 @@ impl_runtime_apis! {
         }
     }
 
-    impl client_api::Metadata<Block> for Runtime {
+    impl sp_api::Metadata<Block> for Runtime {
         fn metadata() -> OpaqueMetadata {
             Runtime::metadata().into()
         }
     }
 
-    impl block_builder_api::BlockBuilder<Block> for Runtime {
-        fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyResult {
+    impl sp_block_builder::BlockBuilder<Block> for Runtime {
+        fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
             Executive::apply_extrinsic(extrinsic)
         }
 
@@ -827,81 +954,129 @@ impl_runtime_apis! {
         }
     }
 
-    impl client_api::TaggedTransactionQueue<Block> for Runtime {
-        fn validate_transaction(tx: <Block as BlockT>::Extrinsic) -> TransactionValidity {
-            Executive::validate_transaction(tx)
+    impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
+        fn validate_transaction(
+            source: TransactionSource,
+            tx: <Block as BlockT>::Extrinsic,
+        ) -> TransactionValidity {
+            Executive::validate_transaction(source, tx)
         }
     }
 
-    impl offchain_primitives::OffchainWorkerApi<Block> for Runtime {
-        fn offchain_worker(number: NumberFor<Block>) {
-            Executive::offchain_worker(number)
+    impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
+        fn offchain_worker(header: &<Block as BlockT>::Header) {
+            Executive::offchain_worker(header)
         }
     }
-
+//TODO
     impl fg_primitives::GrandpaApi<Block> for Runtime {
-        fn grandpa_authorities() -> Vec<(GrandpaId, GrandpaWeight)> {
+        fn grandpa_authorities() -> GrandpaAuthorityList {
             Grandpa::grandpa_authorities()
         }
+
+        fn submit_report_equivocation_extrinsic(
+            _equivocation_proof: fg_primitives::EquivocationProof<
+                <Block as BlockT>::Hash,
+                NumberFor<Block>,
+            >,
+            _key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof,
+        ) -> Option<()> {
+            None
+        }
+
+        fn generate_key_ownership_proof(
+            _set_id: fg_primitives::SetId,
+            _authority_id: GrandpaId,
+        ) -> Option<fg_primitives::OpaqueKeyOwnershipProof> {
+            // NOTE: this is the only implementation possible since we've
+            // defined our key owner proof type as a bottom type (i.e. a type
+            // with no values).
+            None
+        }
     }
 
-    impl babe_primitives::BabeApi<Block> for Runtime {
-        fn configuration() -> babe_primitives::BabeConfiguration {
+    impl sp_consensus_babe::BabeApi<Block> for Runtime {
+        fn configuration() -> sp_consensus_babe::BabeGenesisConfiguration {
             // The choice of `c` parameter (where `1 - c` represents the
             // probability of a slot being empty), is done in accordance to the
             // slot duration and expected target block time, for safely
             // resisting network delays of maximum two seconds.
             // <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
-            babe_primitives::BabeConfiguration {
+            sp_consensus_babe::BabeGenesisConfiguration {
                 slot_duration: Babe::slot_duration(),
                 epoch_length: EpochDuration::get(),
                 c: PRIMARY_PROBABILITY,
                 genesis_authorities: Babe::authorities(),
                 randomness: Babe::randomness(),
-                secondary_slots: true,
+                allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,
+                //secondary_slots: true, //TODO
+                /*
+                                slot_duration: Babe::slot_duration(),
+                epoch_length: EpochDuration::get(),
+                c: PRIMARY_PROBABILITY,
+                genesis_authorities: Babe::authorities(),
+                randomness: Babe::randomness(),
+                allowed_slots: sp_consensus_babe::AllowedSlots::PrimaryAndSecondaryPlainSlots,
+                */
             }
         }
-    }
 
-    impl authority_discovery_primitives::AuthorityDiscoveryApi<Block> for Runtime {
-        fn authorities() -> Vec<EncodedAuthorityId> {
-            AuthorityDiscovery::authorities().into_iter()
-                .map(|id| id.encode())
-                .map(EncodedAuthorityId)
-                .collect()
+        fn current_epoch_start() -> sp_consensus_babe::SlotNumber {
+            Babe::current_epoch_start()
         }
+    }
 
-        fn sign(payload: &Vec<u8>) -> Option<(EncodedSignature, EncodedAuthorityId)> {
-              AuthorityDiscovery::sign(payload).map(|(sig, id)| {
-            (EncodedSignature(sig.encode()), EncodedAuthorityId(id.encode()))
-        })
+    impl sp_authority_discovery::AuthorityDiscoveryApi<Block> for Runtime {
+        // fn authorities() -> Vec<EncodedAuthorityId> {
+        //     AuthorityDiscovery::authorities().into_iter()
+        //         .map(|id| id.encode())
+        //         .map(EncodedAuthorityId)
+        //         .collect()
+        // }
+        fn authorities() -> Vec<AuthorityDiscoveryId> {
+            AuthorityDiscovery::authorities()
         }
 
-        fn verify(payload: &Vec<u8>, signature: &EncodedSignature, authority_id: &EncodedAuthorityId) -> bool {
-            let signature = match BabeSignature::decode(&mut &signature.0[..]) {
-                Ok(s) => s,
-                _ => return false,
-            };
-
-            let authority_id = match BabeId::decode(&mut &authority_id.0[..]) {
-                Ok(id) => id,
-                _ => return false,
-            };
-
-            AuthorityDiscovery::verify(payload, signature, authority_id)
-        }
+        // fn sign(payload: &Vec<u8>) -> Option<(EncodedSignature, EncodedAuthorityId)> {
+        //       AuthorityDiscovery::sign(payload).map(|(sig, id)| {
+        //     (EncodedSignature(sig.encode()), EncodedAuthorityId(id.encode()))
+        // })
+        // }
+
+        // fn verify(payload: &Vec<u8>, signature: &EncodedSignature, authority_id: &EncodedAuthorityId) -> bool {
+        //     let signature = match BabeSignature::decode(&mut &signature.0[..]) {
+        //         Ok(s) => s,
+        //         _ => return false,
+        //     };
+        //
+        //     let authority_id = match BabeId::decode(&mut &authority_id.0[..]) {
+        //         Ok(id) => id,
+        //         _ => return false,
+        //     };
+        //
+        //     AuthorityDiscovery::verify(payload, signature, authority_id)
+        // }
     }
 
-    impl system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
+    impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
         fn account_nonce(account: AccountId) -> Index {
             System::account_nonce(account)
         }
     }
 
-    impl substrate_session::SessionKeys<Block> for Runtime {
+    impl sp_session::SessionKeys<Block> for Runtime {
         fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
-            let seed = seed.as_ref().map(|s| rstd::str::from_utf8(&s).expect("Seed is an utf8 string"));
-            opaque::SessionKeys::generate(seed)
+            SessionKeys::generate(seed)
+        }
+        // fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
+        //     let seed = seed.as_ref().map(|s| rstd::str::from_utf8(&s).expect("Seed is an utf8 string"));
+        //     opaque::SessionKeys::generate(seed)
+        // }
+
+      fn decode_session_keys(
+            encoded: Vec<u8>,
+        ) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {
+            SessionKeys::decode_into_raw_public_keys(&encoded)
         }
     }
 }

+ 8 - 63
runtime/src/migration.rs

@@ -2,12 +2,8 @@
 #![allow(clippy::redundant_closure_call)] // disable it because of the substrate lib design
 
 use crate::VERSION;
-use rstd::prelude::*;
-use sr_primitives::{
-    print,
-    traits::{One, Zero},
-};
-use srml_support::{debug, decl_event, decl_module, decl_storage};
+use frame_support::weights::Weight;
+use frame_support::{debug, decl_event, decl_module, decl_storage};
 
 impl<T: Trait> Module<T> {
     /// This method is called from on_initialize() when a runtime upgrade is detected. This
@@ -21,12 +17,6 @@ impl<T: Trait> Module<T> {
         // would be any new storage values that need an initial value which would not
         // have been initialized with config() or build() chainspec construction mechanism.
         // Other tasks like resetting values, migrating values etc.
-
-        Self::initialize_storage_working_group_mint();
-        Self::initialize_storage_working_group_text_constraints();
-        Self::clear_storage_data();
-
-        proposals_codex::Module::<T>::set_default_config_values();
     }
 }
 
@@ -47,8 +37,8 @@ decl_storage! {
         /// initialized to Some(VERSION.spec_version). It is an Option because the first time the module
         /// was introduced was as a runtime upgrade and type was never changed.
         /// When the runtime is upgraded the spec version be updated.
-        pub SpecVersion get(spec_version) build(|_config: &GenesisConfig| {
-            VERSION.spec_version
+        pub SpecVersion get(fn spec_version) build(|_config: &GenesisConfig| {
+            Some(VERSION.spec_version)
         }) : Option<u32>;
     }
 }
@@ -63,7 +53,7 @@ decl_module! {
     pub struct Module<T: Trait> for enum Call where origin: T::Origin {
         fn deposit_event() = default;
 
-        fn on_initialize(_now: T::BlockNumber) {
+        fn on_initialize(_now: T::BlockNumber) -> Weight {
             if Self::spec_version().map_or(true, |spec_version| VERSION.spec_version > spec_version) {
                 // Mark store version with current version of the runtime
                 SpecVersion::put(VERSION.spec_version);
@@ -76,55 +66,10 @@ decl_module! {
                     VERSION.spec_version,
                 ));
             }
-        }
-    }
-}
-
-impl<T: Trait> Module<T> {
-    fn initialize_storage_working_group_mint() {
-        let mint_id_result = <minting::Module<T>>::add_mint(<minting::BalanceOf<T>>::zero(), None);
-
-        if let Ok(mint_id) = mint_id_result {
-            <working_group::Mint<T, working_group::Instance2>>::put(mint_id);
-        } else {
-            print("Failed to create a mint for the storage working group");
-        }
-    }
 
-    fn initialize_storage_working_group_text_constraints() {
-        <working_group::OpeningHumanReadableText<working_group::Instance2>>::put(
-            working_group::default_text_constraint(),
-        );
-        <working_group::WorkerApplicationHumanReadableText<working_group::Instance2>>::put(
-            working_group::default_text_constraint(),
-        );
-        <working_group::WorkerExitRationaleText<working_group::Instance2>>::put(
-            working_group::default_text_constraint(),
-        );
-    }
-
-    fn clear_storage_data() {
-        // Clear storage data object registry data.
-        for id in <storage::data_directory::Module<T>>::known_content_ids() {
-            <storage::data_object_storage_registry::RelationshipsByContentId<T>>::remove(id);
-        }
-
-        let mut potential_id = <T as storage::data_object_storage_registry::Trait>::DataObjectStorageRelationshipId::zero();
-        while potential_id
-            < storage::data_object_storage_registry::Module::<T>::next_relationship_id()
-        {
-            <storage::data_object_storage_registry::Relationships<T>>::remove(&potential_id);
-
-            potential_id += <T as storage::data_object_storage_registry::Trait>::DataObjectStorageRelationshipId::one();
+            10_000_000 // TODO adjust weight
         }
-
-        storage::data_object_storage_registry::NextRelationshipId::<T>::kill();
-
-        // Clear storage data directory data.
-        for id in <storage::data_directory::Module<T>>::known_content_ids() {
-            <storage::data_directory::DataObjectByContentId<T>>::remove(id);
-        }
-
-        <storage::data_directory::KnownContentIds<T>>::kill();
     }
 }
+
+impl<T: Trait> Module<T> {}

Some files were not shown because too many files changed in this diff