From 36a43955c16327df0007921652b84933db2ce0b9 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Mon, 5 Sep 2022 10:25:38 -0400 Subject: [PATCH 01/13] updated Cargo to include all pallets to evaluate for configuration in the runtime --- parachain-runtime/Cargo.toml | 177 ++++++++++++++++++++++++----------- 1 file changed, 121 insertions(+), 56 deletions(-) diff --git a/parachain-runtime/Cargo.toml b/parachain-runtime/Cargo.toml index e951caf7..13ea9e2e 100644 --- a/parachain-runtime/Cargo.toml +++ b/parachain-runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "hashed-parachain-runtime" -version = "0.1.0" -authors = ["Hashed "] +version = "0.1.1" +authors = ["Hashed Systems "] description = "Cumulus FRAME-based Substrate Collator for the Hashed Network" license = "MIT" homepage = "https://hashed.io" @@ -15,6 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } [dependencies] +# General codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } hex-literal = { version = "0.3.4", optional = true } log = { version = "0.4.17", default-features = false } @@ -22,52 +23,6 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive" serde = { version = "1.0.140", optional = true, features = ["derive"] } smallvec = "1.9.0" -# Local -pallet-template = { path = "../pallets/template", default-features = false } -pallet-bitcoin-vaults = { path = "../pallets/bitcoin-vaults", default-features = false } -pallet-fruniques = { path = "../pallets/fruniques", default-features = false } -pallet-gated-marketplace = { path = "../pallets/gated-marketplace", default-features = false } -pallet-rbac = { version = "4.0.0-dev", default-features = false, path = "../pallets/rbac" } - -# Substrate -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } -frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } -pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -# pallet-collective = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-offchain = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } -sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.27" } - -# Polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } - # Cumulus cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } @@ -78,9 +33,88 @@ cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", bra cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } + +# Substrate +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } + +# Local Pallets +pallet-bitcoin-vaults = { path = "../pallets/bitcoin-vaults", default-features = false } +pallet-fruniques = { path = "../pallets/fruniques", default-features = false } +pallet-gated-marketplace = { path = "../pallets/gated-marketplace", default-features = false } +pallet-rbac = { path = "../pallets/rbac", default-features = false } +pallet-confidential-docs = { path = "../pallets/confidential-docs", default-features = false } + +# Prebuilt Pallets +pallet-alliance = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-atomic-swap = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-conviction-voting = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-gilt = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-indices = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-lottery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-remark = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-scored-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-storage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-whitelist = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } + parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +# Polkadot +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } + +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } + +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } + [features] default = [ "std", @@ -102,23 +136,55 @@ std = [ "frame-support/std", "frame-system-rpc-runtime-api/std", "frame-system/std", + + # Local Pallets + "pallet-bitcoin-vaults/std", + "pallet-confidential-docs/std", + "pallet-fruniques/std", + "pallet-gated-marketplace/std", + "pallet-rbac/std", + + # Prebuilt Pallets + "pallet-alliance/std", + "pallet-assets/std", + "pallet-asset-tx-payment/std", + "pallet-atomic-swap/std", "pallet-aura/std", "pallet-authorship/std", "pallet-balances/std", - "pallet-bitcoin-vaults/std", + "pallet-bounties/std", + "pallet-child-bounties/std", "pallet-collator-selection/std", - # "pallet-collective/std", - "pallet-fruniques/std", - "pallet-gated-marketplace/std", + "pallet-collective/std", + "pallet-conviction-voting/std", + "pallet-democracy/std", + "pallet-elections-phragmen/std", + "pallet-gilt/std", + "pallet-identity/std", + "pallet-im-online/std", + "pallet-indices/std", + "pallet-lottery/std", + "pallet-membership/std", + "pallet-multisig/std", + "pallet-proxy/std", + "pallet-recovery/std", + "pallet-referenda/std", + "pallet-remark/std", + "pallet-scheduler/std", + "pallet-scored-pool/std", + "pallet-society/std", "pallet-session/std", "pallet-sudo/std", - "pallet-template/std", "pallet-timestamp/std", + "pallet-tips/std", "pallet-transaction-payment-rpc-runtime-api/std", "pallet-transaction-payment/std", - "pallet-sudo/std", + "pallet-treasury/std", "pallet-uniques/std", - "pallet-rbac/std", + "pallet-vesting/std", + "pallet-whitelist/std", + "pallet-xcm/std", + "parachain-info/std", "polkadot-parachain/std", "polkadot-runtime-common/std", @@ -147,7 +213,6 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-selection/runtime-benchmarks", - "pallet-template/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", From b120779d080db5d5c6193bfd0451bff4123c494d Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Tue, 6 Sep 2022 15:39:05 -0400 Subject: [PATCH 02/13] added child bounties and other prebuilt pallets and confidential docs --- Cargo.lock | 192 ++++++++++++++++- collator/src/chain_spec/hashed.rs | 2 + collator/src/chain_spec/luhn.rs | 2 + collator/src/chain_spec/md5.rs | 12 +- collator/src/chain_spec/mod.rs | 2 + parachain-runtime/Cargo.toml | 2 + parachain-runtime/src/lib.rs | 348 +++++++++++++++++++++++++----- 7 files changed, 509 insertions(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d08201b1..54aaf195 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2987,7 +2987,7 @@ dependencies = [ [[package]] name = "hashed-parachain-runtime" -version = "0.1.0" +version = "0.1.1" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -3007,21 +3007,51 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "pallet-alliance", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-atomic-swap", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-bitcoin-vaults", + "pallet-bounties", + "pallet-child-bounties", "pallet-collator-selection", + "pallet-collective", + "pallet-confidential-docs", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-elections-phragmen", "pallet-fruniques", "pallet-gated-marketplace", + "pallet-gilt", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-lottery", + "pallet-membership", + "pallet-multisig", + "pallet-proxy", + "pallet-randomness-collective-flip", "pallet-rbac", + "pallet-recovery", + "pallet-referenda", + "pallet-remark", + "pallet-scheduler", + "pallet-scored-pool", "pallet-session", + "pallet-society", "pallet-sudo", - "pallet-template", "pallet-timestamp", + "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-transaction-storage", + "pallet-treasury", "pallet-uniques", + "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "parachain-info", "parity-scale-codec", @@ -5079,6 +5109,40 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "pallet-alliance" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-identity", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-assets" version = "4.0.0-dev" @@ -5093,6 +5157,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-atomic-swap" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-aura" version = "4.0.0-dev" @@ -5346,6 +5425,23 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-democracy" version = "4.0.0-dev" @@ -5545,6 +5641,19 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-lottery" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-membership" version = "4.0.0-dev" @@ -5787,6 +5896,39 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-referenda" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-remark" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-scheduler" version = "4.0.0-dev" @@ -5803,6 +5945,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-scored-pool" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-session" version = "4.0.0-dev" @@ -6004,6 +6160,24 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-transaction-storage" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-transaction-storage-proof", +] + [[package]] name = "pallet-treasury" version = "4.0.0-dev" @@ -6067,6 +6241,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-whitelist" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-xcm" version = "0.9.27" diff --git a/collator/src/chain_spec/hashed.rs b/collator/src/chain_spec/hashed.rs index bba5a1ac..edd928f8 100644 --- a/collator/src/chain_spec/hashed.rs +++ b/collator/src/chain_spec/hashed.rs @@ -82,6 +82,8 @@ fn hashed_genesis( balances: hashed_parachain_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, + council: Default::default(), + treasury: Default::default(), parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, collator_selection: hashed_parachain_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), diff --git a/collator/src/chain_spec/luhn.rs b/collator/src/chain_spec/luhn.rs index 82097660..ac3ebaec 100644 --- a/collator/src/chain_spec/luhn.rs +++ b/collator/src/chain_spec/luhn.rs @@ -82,6 +82,8 @@ fn luhn_genesis( balances: hashed_parachain_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, + council: Default::default(), + treasury: Default::default(), parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, collator_selection: hashed_parachain_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), diff --git a/collator/src/chain_spec/md5.rs b/collator/src/chain_spec/md5.rs index 0ebb42ad..a7193004 100644 --- a/collator/src/chain_spec/md5.rs +++ b/collator/src/chain_spec/md5.rs @@ -7,7 +7,7 @@ use super::{ }; use cumulus_primitives_core::ParaId; -use hashed_parachain_runtime::{AccountId, AuraId, EXISTENTIAL_DEPOSIT}; +use hashed_parachain_runtime::{AccountId, AuraId, CouncilConfig, EXISTENTIAL_DEPOSIT}; /// Specialized `ChainSpec` for MD5 Network. pub type Md5ChainSpec = @@ -87,6 +87,16 @@ fn md5_genesis( balances: hashed_parachain_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, + // indices: Default::default(), + // membership: Default::default(), + treasury: Default::default(), + council: CouncilConfig { + members: vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + ], + phantom: Default::default(), + }, parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, collator_selection: hashed_parachain_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), diff --git a/collator/src/chain_spec/mod.rs b/collator/src/chain_spec/mod.rs index df57a2a2..750384f3 100644 --- a/collator/src/chain_spec/mod.rs +++ b/collator/src/chain_spec/mod.rs @@ -206,6 +206,8 @@ fn testnet_genesis( balances: hashed_parachain_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, + council: Default::default(), + treasury: Default::default(), parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, collator_selection: hashed_parachain_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), diff --git a/parachain-runtime/Cargo.toml b/parachain-runtime/Cargo.toml index 13ea9e2e..c9625e9a 100644 --- a/parachain-runtime/Cargo.toml +++ b/parachain-runtime/Cargo.toml @@ -73,6 +73,7 @@ pallet-lottery = { git = "https://github.com/paritytech/substrate.git", branch = pallet-membership = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } pallet-proxy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } pallet-recovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } pallet-referenda = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } pallet-remark = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } @@ -167,6 +168,7 @@ std = [ "pallet-membership/std", "pallet-multisig/std", "pallet-proxy/std", + "pallet-randomness-collective-flip/std", "pallet-recovery/std", "pallet-referenda/std", "pallet-remark/std", diff --git a/parachain-runtime/src/lib.rs b/parachain-runtime/src/lib.rs index 00d081a0..e7b3b958 100644 --- a/parachain-runtime/src/lib.rs +++ b/parachain-runtime/src/lib.rs @@ -29,7 +29,7 @@ use sp_version::RuntimeVersion; use frame_support::{ construct_runtime, parameter_types, - traits::{Everything, AsEnsureOriginWithArg}, + traits::{Everything, AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU128, EitherOfDiverse}, weights::{ constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, @@ -41,7 +41,7 @@ use frame_system::{ EnsureRoot, EnsureSigned, }; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; -pub use sp_runtime::{MultiAddress, Perbill, Permill}; +pub use sp_runtime::{MultiAddress, Perbill, Percent, Permill}; use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; #[cfg(any(feature = "std", test))] @@ -56,9 +56,6 @@ use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}; use xcm::latest::prelude::BodyId; use xcm_executor::XcmExecutor; -/// Import the template pallet. -pub use pallet_template; - /// Alias to 512-bit hash when used in the context of a transaction signature on the chain. pub type Signature = MultiSignature; @@ -69,6 +66,8 @@ pub type AccountId = <::Signer as IdentifyAccount>::Account /// Balance of an account. pub type Balance = u128; +pub type AccountIndex = u32; + /// Index of a transaction in the chain. pub type Index = u32; @@ -364,6 +363,278 @@ impl pallet_transaction_payment::Config for Runtime { type OperationalFeeMultiplier = OperationalFeeMultiplier; } +parameter_types! { + // Minimum 100 bytes/KSM deposited (1 CENT/byte) + pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain + pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain + pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain + pub const MaxSubAccounts: u32 = 100; + pub const MaxAdditionalFields: u32 = 100; + pub const MaxRegistrars: u32 = 20; +} + +impl pallet_identity::Config 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 = EnsureRoot; + type RegistrarOrigin = EnsureRoot; + type WeightInfo = (); +} + +parameter_types! { + pub const ConfigDepositBase: Balance = 500 * CENTS; + pub const FriendDepositFactor: Balance = 50 * CENTS; + pub const MaxFriends: u16 = 9; + pub const RecoveryDeposit: Balance = 500 * CENTS; +} + +impl pallet_recovery::Config for Runtime { + type Event = Event; + type WeightInfo = pallet_recovery::weights::SubstrateWeight; + type Call = Call; + type Currency = Balances; + type ConfigDepositBase = ConfigDepositBase; + type FriendDepositFactor = FriendDepositFactor; + type MaxFriends = MaxFriends; + type RecoveryDeposit = RecoveryDeposit; +} + +parameter_types! { + pub const IndexDeposit: Balance = 100 * CENTS; +} + +impl pallet_indices::Config for Runtime { + type AccountIndex = AccountIndex; + type Currency = Balances; + type Deposit = IndexDeposit; + type Event = Event; + type WeightInfo = (); +} + +parameter_types! { + pub const MembershipMaxMembers: u32 = 100_000; +} + +impl pallet_membership::Config for Runtime { + type Event = Event; + type AddOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type SwapOrigin = EnsureRoot; + type ResetOrigin = EnsureRoot; + type PrimeOrigin = EnsureRoot; + type MembershipInitialized = Council; + type MembershipChanged = Council; + type MaxMembers = MembershipMaxMembers; + type WeightInfo = (); +} + +parameter_types! { + pub CouncilMotionDuration: BlockNumber = 3 * DAYS; + pub const CouncilMaxProposals: u32 = 100; + pub const CouncilMaxMembers: u32 = 100; +} + +type CouncilCollective = pallet_collective::Instance1; +impl pallet_collective::Config for Runtime { + type Origin = Origin; + type Proposal = Call; + type Event = Event; + type MotionDuration = CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = (); +} + +impl pallet_randomness_collective_flip::Config for Runtime {} + +parameter_types! { + pub const CandidateDeposit: Balance = 1000 * CENTS; + pub const WrongSideDeduction: Balance = 200 * CENTS; + pub const MaxStrikes: u32 = 10; + pub const RotationPeriod: BlockNumber = 7 * DAYS; + pub const PeriodSpend: Balance = 50000 * CENTS; + pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS; + pub const ChallengePeriod: BlockNumber = 7 * DAYS; + pub const MaxCandidateIntake: u32 = 1; + pub const SocietyPalletId: PalletId = PalletId(*b"py/socie"); +} + +impl pallet_society::Config for Runtime { + type Event = Event; + type Currency = Balances; + type Randomness = RandomnessCollectiveFlip; + type CandidateDeposit = CandidateDeposit; + type WrongSideDeduction = WrongSideDeduction; + type MaxStrikes = MaxStrikes; + type PeriodSpend = PeriodSpend; + type MembershipChanged = (); + type RotationPeriod = RotationPeriod; + type MaxLockDuration = MaxLockDuration; + type FounderSetOrigin = EnsureRoot; + type SuspensionJudgementOrigin = pallet_society::EnsureFounder; + type ChallengePeriod = ChallengePeriod; + type MaxCandidateIntake = MaxCandidateIntake; + type PalletId = SocietyPalletId; +} + +parameter_types! { + pub const ProposalBond: Permill = Permill::from_percent(5); + pub const ProposalBondMinimum: Balance = 2000 * CENTS; + pub const ProposalBondMaximum: Balance = 1 * GRAND; + pub const SpendPeriod: BlockNumber = 6 * DAYS; + pub const Burn: Permill = Permill::from_perthousand(2); + pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); + pub const TipCountdown: BlockNumber = 1 * DAYS; + pub const TipFindersFee: Percent = Percent::from_percent(20); + pub const TipReportDepositBase: Balance = 100 * CENTS; + pub const DataDepositPerByte: Balance = 1 * CENTS; + pub const MaximumReasonLength: u32 = 16384; + pub const MaxApprovals: u32 = 100; + pub const MaxKeys: u32 = 10_000; + pub const MaxPeerInHeartbeats: u32 = 10_000; + pub const MaxPeerDataEncodingSize: u32 = 1_000; +} + +impl pallet_treasury::Config for Runtime { + type PalletId = TreasuryPalletId; + type Currency = Balances; + type ApproveOrigin = EnsureRoot; + type RejectOrigin = EnsureRoot; + type Event = Event; + type OnSlash = Treasury; + type ProposalBond = ProposalBond; + type ProposalBondMinimum = ProposalBondMinimum; + type ProposalBondMaximum = ProposalBondMaximum; //set to () on the substrate repo + type SpendPeriod = SpendPeriod; + type SpendOrigin = frame_support::traits::NeverEnsureOrigin; + type Burn = Burn; + type BurnDestination = Treasury; + type MaxApprovals = MaxApprovals; + type WeightInfo = (); + type SpendFunds = Bounties; +} + +parameter_types! { + pub const BountyCuratorDeposit: Permill = Permill::from_percent(50); + pub const BountyValueMinimum: Balance = 200 * CENTS; + pub const BountyDepositBase: Balance = 100 * CENTS; + pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); + pub const CuratorDepositMin: Balance = 1 * DOLLARS; + pub const CuratorDepositMax: Balance = 100 * DOLLARS; + pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; + pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; +} + +impl pallet_bounties::Config for Runtime { + type Event = Event; + type BountyDepositBase = BountyDepositBase; + type BountyDepositPayoutDelay = BountyDepositPayoutDelay; + type BountyUpdatePeriod = BountyUpdatePeriod; + type CuratorDepositMultiplier = CuratorDepositMultiplier; + type CuratorDepositMin = CuratorDepositMin; + type CuratorDepositMax = CuratorDepositMax; + type BountyValueMinimum = BountyValueMinimum; + type DataDepositPerByte = DataDepositPerByte; + type MaximumReasonLength = MaximumReasonLength; + type WeightInfo = pallet_bounties::weights::SubstrateWeight; + type ChildBountyManager = ChildBounties; +} + +parameter_types! { + pub const ChildBountyValueMinimum: Balance = 1 * DOLLARS; +} + +impl pallet_child_bounties::Config for Runtime { + type Event = Event; + type MaxActiveChildBountyCount = ConstU32<200>; + type ChildBountyValueMinimum = ChildBountyValueMinimum; + type WeightInfo = (); +} + +parameter_types! { + pub const AssetDeposit: Balance = 100 * DOLLARS; + pub const ApprovalDeposit: Balance = 1 * DOLLARS; + pub const StringLimit: u32 = 50; + pub const MetadataDepositBase: Balance = 10 * DOLLARS; + pub const MetadataDepositPerByte: Balance = 1 * DOLLARS; +} + +impl pallet_assets::Config for Runtime { + type Event = Event; + type Balance = u128; + type AssetId = u32; + type Currency = Balances; + type ForceOrigin = EnsureRoot; + type AssetDeposit = AssetDeposit; + type AssetAccountDeposit = ConstU128; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = StringLimit; + type Freezer = (); + type Extra = (); + type WeightInfo = (); +} + +parameter_types! { + pub const XPubLen: u32 = XPUB_LEN; + pub const PSBTMaxLen: u32 = 2048; + pub const MaxVaultsPerUser: u32 = 10; + pub const MaxCosignersPerVault: u32 = 7; + pub const VaultDescriptionMaxLen: u32 = 200; + pub const OutputDescriptorMaxLen: u32 = 2048; + pub const MaxProposalsPerVault: u32 = 5; +} + +impl pallet_bitcoin_vaults::Config for Runtime { + type AuthorityId = pallet_bitcoin_vaults::types::crypto::TestAuthId; + type Event = Event; + type ChangeBDKOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + type XPubLen = XPubLen; + type PSBTMaxLen = PSBTMaxLen; + type MaxVaultsPerUser = MaxVaultsPerUser; + type MaxCosignersPerVault = MaxCosignersPerVault; + type VaultDescriptionMaxLen =VaultDescriptionMaxLen; + type OutputDescriptorMaxLen = OutputDescriptorMaxLen; + type MaxProposalsPerVault = MaxProposalsPerVault; +} + +parameter_types! { + pub const MaxOwnedDocs: u32 = 100; + pub const MaxSharedFromDocs: u32 = 100; + pub const MaxSharedToDocs: u32 = 100; + pub const DocNameMinLen: u32 = 3; + pub const DocNameMaxLen: u32 = 50; + pub const DocDescMinLen: u32 = 5; + pub const DocDescMaxLen: u32 = 100; +} + +impl pallet_confidential_docs::Config for Runtime { + type Event = Event; + type RemoveOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; + type MaxOwnedDocs = MaxOwnedDocs; + type MaxSharedFromDocs = MaxSharedFromDocs; + type MaxSharedToDocs = MaxSharedToDocs; + type DocNameMinLen = DocNameMinLen; + type DocNameMaxLen = DocNameMaxLen; + type DocDescMinLen = DocDescMinLen; + type DocDescMaxLen = DocDescMaxLen; +} + parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; @@ -456,33 +727,7 @@ impl pallet_collator_selection::Config for Runtime { type WeightInfo = (); } -/// Configure the pallet template in pallets/template. -impl pallet_template::Config for Runtime { - type Event = Event; -} - -parameter_types! { - pub const XPubLen: u32 = 166; - pub const PSBTMaxLen: u32 = 2048; - pub const MaxVaultsPerUser: u32 = 10; - pub const MaxCosignersPerVault: u32 = 7; - pub const VaultDescriptionMaxLen: u32 = 200; - pub const OutputDescriptorMaxLen: u32 = 2048; - pub const MaxProposalsPerVault: u32 = 5; -} -impl pallet_bitcoin_vaults::Config for Runtime { - type AuthorityId = pallet_bitcoin_vaults::types::crypto::TestAuthId; - type Event = Event; - type ChangeBDKOrigin = EnsureRoot; - type XPubLen = XPubLen; - type PSBTMaxLen = PSBTMaxLen; - type MaxVaultsPerUser = MaxVaultsPerUser; - type MaxCosignersPerVault = MaxCosignersPerVault; - type VaultDescriptionMaxLen =VaultDescriptionMaxLen; - type OutputDescriptorMaxLen = OutputDescriptorMaxLen; - type MaxProposalsPerVault = MaxProposalsPerVault; -} /// The payload being signed in transactions. pub type SignedPayload = sp_runtime::generic::SignedPayload; @@ -540,15 +785,6 @@ impl frame_system::offchain::SigningTypes for Runtime { type Public = ::Signer; type Signature = Signature; } - -parameter_types! { - pub const AssetDeposit: Balance = 100 * DOLLARS; - pub const ApprovalDeposit: Balance = 1 * DOLLARS; - pub const StringLimit: u32 = 50; - pub const MetadataDepositBase: Balance = 10 * DOLLARS; - pub const MetadataDepositPerByte: Balance = 1 * DOLLARS; -} - parameter_types! { pub const CollectionDeposit: Balance = 100 * DOLLARS; pub const ItemDeposit: Balance = 1 * DOLLARS; @@ -597,7 +833,10 @@ parameter_types! { impl pallet_gated_marketplace::Config for Runtime { type Event = Event; - type RemoveOrigin = EnsureRoot; + type RemoveOrigin = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, + >; type MaxAuthsPerMarket = MaxAuthsPerMarket; type MaxRolesPerAuth = MaxRolesPerAuth; type MaxApplicants = MaxApplicants; @@ -652,6 +891,10 @@ construct_runtime!( // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 12, + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 13, + ChildBounties: pallet_child_bounties::{Pallet, Call, Storage, Event} = 14, + Assets: pallet_assets::{Pallet, Call, Storage, Event} = 15, // Collator support. The order of these 4 are important and shall not change. Authorship: pallet_authorship::{Pallet, Call, Storage} = 20, @@ -666,13 +909,22 @@ construct_runtime!( CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, - // Template - TemplatePallet: pallet_template::{Pallet, Call, Storage, Event} = 40, - BitcoinVaults: pallet_bitcoin_vaults::{Pallet, Call, Storage, Event, ValidateUnsigned} = 41, - Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 42, - Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event} = 43, - GatedMarketplace: pallet_gated_marketplace::{Pallet, Call, Storage, Event} = 44, - RBAC: pallet_rbac::{Pallet, Call, Storage, Event} = 45, + // Governance Related + Council: pallet_collective:: = 41, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 42, + Society: pallet_society::{Pallet, Call, Storage, Event} = 43, + Identity: pallet_identity::{Pallet, Call, Storage, Event} = 44, + Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 45, + Indices: pallet_indices::{Pallet, Call, Storage, Event} = 46, + Membership: pallet_membership::{Pallet, Call, Storage, Event} = 47, + + // Custom Pallets + BitcoinVaults: pallet_bitcoin_vaults::{Pallet, Call, Storage, Event, ValidateUnsigned} = 51, + Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 52, + Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event} = 53, + GatedMarketplace: pallet_gated_marketplace::{Pallet, Call, Storage, Event} = 54, + RBAC: pallet_rbac::{Pallet, Call, Storage, Event} = 55, + ConfidentialDocs: pallet_confidential_docs::{Pallet, Call, Storage, Event} = 56, } ); From f744f46b693e69f390ab7dd2d7180ed4c82d1bdf Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Tue, 6 Sep 2022 16:09:29 -0400 Subject: [PATCH 03/13] configured more pallets on parachain runtime --- parachain-runtime/src/lib.rs | 217 ++++++++++++++++++++++++++--------- 1 file changed, 161 insertions(+), 56 deletions(-) diff --git a/parachain-runtime/src/lib.rs b/parachain-runtime/src/lib.rs index e7b3b958..82bc70b1 100644 --- a/parachain-runtime/src/lib.rs +++ b/parachain-runtime/src/lib.rs @@ -6,9 +6,9 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +pub mod constants; mod weights; pub mod xcm_config; -pub mod constants; use constants::*; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; @@ -29,7 +29,10 @@ use sp_version::RuntimeVersion; use frame_support::{ construct_runtime, parameter_types, - traits::{Everything, AsEnsureOriginWithArg, ConstU32, ConstU64, ConstU128, EitherOfDiverse}, + traits::{ + AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, EitherOfDiverse, + Everything + }, weights::{ constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, @@ -119,6 +122,11 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; +pub type RootOrThreeFifthsOfCouncil = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, +>; + /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the /// node's balance type. /// @@ -388,6 +396,105 @@ impl pallet_identity::Config for Runtime { type WeightInfo = (); } +parameter_types! { + // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. + pub const DepositBase: Balance = deposit(1, 88); + // Additional storage item size of 32 bytes. + pub const DepositFactor: Balance = deposit(0, 32); +} + +impl pallet_multisig::Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Balances; + type DepositBase = DepositBase; + type DepositFactor = DepositFactor; + type MaxSignatories = ConstU16<100>; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; +} + +// parameter_types! { +// // One storage item; key size 32, value size 8; . +// pub const ProxyDepositBase: Balance = deposit(1, 8); +// // Additional storage item size of 33 bytes. +// pub const ProxyDepositFactor: Balance = deposit(0, 33); +// pub const AnnouncementDepositBase: Balance = deposit(1, 8); +// pub const AnnouncementDepositFactor: Balance = deposit(0, 66); +// } + +// /// The type used to represent the kinds of proxying allowed. +// #[derive( +// Copy, +// Clone, +// Eq, +// PartialEq, +// Ord, +// PartialOrd, +// Encode, +// Decode, +// RuntimeDebug, +// MaxEncodedLen, +// scale_info::TypeInfo, +// )] +// pub enum ProxyType { +// Any, +// NonTransfer, +// Governance, +// Staking, +// } +// impl Default for ProxyType { +// fn default() -> Self { +// Self::Any +// } +// } +// impl InstanceFilter for ProxyType { +// fn filter(&self, c: &Call) -> bool { +// match self { +// ProxyType::Any => true, +// ProxyType::NonTransfer => !matches!( +// c, +// Call::Balances(..) +// | Call::Assets(..) | Call::Uniques(..) +// | Call::Vesting(pallet_vesting::Call::vested_transfer { .. }) +// | Call::Indices(pallet_indices::Call::transfer { .. }) +// ), +// ProxyType::Governance => matches!( +// c, +// Call::Democracy(..) +// | Call::Council(..) | Call::Society(..) +// | Call::TechnicalCommittee(..) +// | Call::Elections(..) +// | Call::Treasury(..) +// ), +// ProxyType::Staking => matches!(c, Call::Staking(..)), +// } +// } +// fn is_superset(&self, o: &Self) -> bool { +// match (self, o) { +// (x, y) if x == y => true, +// (ProxyType::Any, _) => true, +// (_, ProxyType::Any) => false, +// (ProxyType::NonTransfer, _) => true, +// _ => false, +// } +// } +// } + +// impl pallet_proxy::Config for Runtime { +// type Event = Event; +// type Call = Call; +// type Currency = Balances; +// type ProxyType = ProxyType; +// type ProxyDepositBase = ProxyDepositBase; +// type ProxyDepositFactor = ProxyDepositFactor; +// type MaxProxies = ConstU32<32>; +// type WeightInfo = pallet_proxy::weights::SubstrateWeight; +// type MaxPending = ConstU32<32>; +// type CallHasher = BlakeTwo256; +// type AnnouncementDepositBase = AnnouncementDepositBase; +// type AnnouncementDepositFactor = AnnouncementDepositFactor; +// } + parameter_types! { pub const ConfigDepositBase: Balance = 500 * CENTS; pub const FriendDepositFactor: Balance = 50 * CENTS; @@ -442,7 +549,7 @@ parameter_types! { } type CouncilCollective = pallet_collective::Instance1; -impl pallet_collective::Config for Runtime { +impl pallet_collective::Config for Runtime { type Origin = Origin; type Proposal = Call; type Event = Event; @@ -597,15 +704,12 @@ parameter_types! { impl pallet_bitcoin_vaults::Config for Runtime { type AuthorityId = pallet_bitcoin_vaults::types::crypto::TestAuthId; type Event = Event; - type ChangeBDKOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; + type ChangeBDKOrigin = RootOrThreeFifthsOfCouncil; type XPubLen = XPubLen; type PSBTMaxLen = PSBTMaxLen; type MaxVaultsPerUser = MaxVaultsPerUser; type MaxCosignersPerVault = MaxCosignersPerVault; - type VaultDescriptionMaxLen =VaultDescriptionMaxLen; + type VaultDescriptionMaxLen = VaultDescriptionMaxLen; type OutputDescriptorMaxLen = OutputDescriptorMaxLen; type MaxProposalsPerVault = MaxProposalsPerVault; } @@ -622,10 +726,7 @@ parameter_types! { impl pallet_confidential_docs::Config for Runtime { type Event = Event; - type RemoveOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; + type RemoveOrigin = RootOrThreeFifthsOfCouncil; type MaxOwnedDocs = MaxOwnedDocs; type MaxSharedFromDocs = MaxSharedFromDocs; type MaxSharedToDocs = MaxSharedToDocs; @@ -727,13 +828,11 @@ impl pallet_collator_selection::Config for Runtime { type WeightInfo = (); } - - /// The payload being signed in transactions. pub type SignedPayload = sp_runtime::generic::SignedPayload; -use sp_runtime::SaturatedConversion; use codec::Encode; +use sp_runtime::SaturatedConversion; impl frame_system::offchain::SendTransactionTypes for Runtime where @@ -745,45 +844,43 @@ where impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + Call: From, { - fn create_transaction>( - call: Call, - public: ::Signer, - account: AccountId, - index: Index, - ) -> Option<(Call, ::SignaturePayload)> { - let period = BlockHashCount::get() as u64; - let current_block = System::block_number() - .saturated_into::() - .saturating_sub(1); - let tip = 0; - let extra: SignedExtra = ( + fn create_transaction>( + call: Call, + public: ::Signer, + account: AccountId, + index: Index, + ) -> Option<(Call, ::SignaturePayload)> { + let period = BlockHashCount::get() as u64; + let current_block = System::block_number().saturated_into::().saturating_sub(1); + let tip = 0; + let extra: SignedExtra = ( frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckEra::::from(generic::Era::mortal(period, current_block)), - frame_system::CheckNonce::::from(index), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(tip), - ); - - let raw_payload = SignedPayload::new(call, extra) - .map_err(|e| { - log::warn!("Unable to create signed payload: {:?}", e); - }) - .ok()?; - let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; - let address = account; - let (call, extra, _) = raw_payload.deconstruct(); - Some((call, (sp_runtime::MultiAddress::Id(address), signature.into(), extra))) - } + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(generic::Era::mortal(period, current_block)), + frame_system::CheckNonce::::from(index), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(tip), + ); + + let raw_payload = SignedPayload::new(call, extra) + .map_err(|e| { + log::warn!("Unable to create signed payload: {:?}", e); + }) + .ok()?; + let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; + let address = account; + let (call, extra, _) = raw_payload.deconstruct(); + Some((call, (sp_runtime::MultiAddress::Id(address), signature.into(), extra))) + } } impl frame_system::offchain::SigningTypes for Runtime { - type Public = ::Signer; - type Signature = Signature; + type Public = ::Signer; + type Signature = Signature; } parameter_types! { pub const CollectionDeposit: Balance = 100 * DOLLARS; @@ -823,7 +920,7 @@ parameter_types! { pub const MaxRolesPerAuth: u32 = 2; pub const MaxApplicants: u32 = 10; pub const NotesMaxLen: u32 = 256; - pub const MaxFeedbackLen: u32 = 256; + pub const MaxFeedbackLen: u32 = 256; pub const NameMaxLen: u32 = 100; pub const MaxFiles: u32 = 10; pub const MaxApplicationsPerCustodian: u32 = 10; @@ -833,23 +930,20 @@ parameter_types! { impl pallet_gated_marketplace::Config for Runtime { type Event = Event; - type RemoveOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; + type RemoveOrigin = RootOrThreeFifthsOfCouncil; type MaxAuthsPerMarket = MaxAuthsPerMarket; type MaxRolesPerAuth = MaxRolesPerAuth; type MaxApplicants = MaxApplicants; type LabelMaxLen = LabelMaxLen; type NotesMaxLen = NotesMaxLen; type MaxFeedbackLen = MaxFeedbackLen; - type NameMaxLen= NameMaxLen; + type NameMaxLen = NameMaxLen; type MaxFiles = MaxFiles; type MaxApplicationsPerCustodian = MaxApplicationsPerCustodian; type MaxMarketsPerItem = MaxMarketsPerItem; type MaxOffersPerMarket = MaxOffersPerMarket; type Timestamp = Timestamp; - type Moment = Moment; + type Moment = Moment; type Rbac = RBAC; } @@ -895,6 +989,7 @@ construct_runtime!( Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 13, ChildBounties: pallet_child_bounties::{Pallet, Call, Storage, Event} = 14, Assets: pallet_assets::{Pallet, Call, Storage, Event} = 15, + // AssetTxPayment: pallet_asset_tx_payment::{Pallet, Call, Storage, Event} = 16, // Collator support. The order of these 4 are important and shall not change. Authorship: pallet_authorship::{Pallet, Call, Storage} = 20, @@ -917,6 +1012,16 @@ construct_runtime!( Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 45, Indices: pallet_indices::{Pallet, Call, Storage, Event} = 46, Membership: pallet_membership::{Pallet, Call, Storage, Event} = 47, + Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 48, + // Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 49, + // Democracy: pallet_democracy::{Pallet, Call, Storage, Event} = 50, + // Gilt: pallet_gilt::{Pallet, Call, Storage, Event} = 51, + // ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 51, + // Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 51, + // Gilt: pallet_gilt::{Pallet, Call, Storage, Event} = 51, + // TechnicalCommittee: pallet_collective::, + // Elections: pallet_elections_phragmen::{Pallet, Call, Storage, Event} = 51, + // TechnicalMembership: pallet_membership::, // Custom Pallets BitcoinVaults: pallet_bitcoin_vaults::{Pallet, Call, Storage, Event, ValidateUnsigned} = 51, From 5a23ed64d32030e68c41d4640c30e3b02e569a2e Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Wed, 7 Sep 2022 14:23:50 -0400 Subject: [PATCH 04/13] upgraded most pallets, parachain runtime and collator --- collator/Cargo.toml | 108 ++++++++--------- pallets/bitcoin-vaults/Cargo.toml | 21 ++-- pallets/confidential-docs/Cargo.toml | 14 +-- pallets/gated-marketplace/Cargo.toml | 30 ++--- pallets/gated-marketplace/src/lib.rs | 2 +- pallets/gated-marketplace/src/mock.rs | 2 +- pallets/rbac/Cargo.toml | 18 +-- pallets/template/Cargo.toml | 14 +-- parachain-runtime/Cargo.toml | 164 +++++++++++++------------- parachain-runtime/src/lib.rs | 54 +++++---- 10 files changed, 215 insertions(+), 212 deletions(-) diff --git a/collator/Cargo.toml b/collator/Cargo.toml index 07b8b7fa..0500fbff 100644 --- a/collator/Cargo.toml +++ b/collator/Cargo.toml @@ -5,14 +5,14 @@ authors = ["Hashed "] description = "Cumulus FRAME-based Substrate Node for the Hashed Network" license = "MIT" homepage = "https://hashed.io" -repository = "https://github.com/hashed-io/hashed-parachain" +repository = "https://github.com/hashed-io/hashed-substrate" edition = "2021" build = "build.rs" [dependencies] clap = { version = "3.2.15", features = ["derive"] } derive_more = "0.99.2" -log = "0.4.17" +log = "0.4" codec = { package = "parity-scale-codec", version = "3.0.0" } serde = { version = "1.0.140", features = ["derive"] } hex-literal = "0.3.4" @@ -22,64 +22,64 @@ jsonrpsee = { version = "0.14.0", features = ["server"] } hashed-parachain-runtime = { path = "../parachain-runtime" } # Substrate -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.27" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-executor = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.27" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.27" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.28" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-executor = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.28" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.28" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } # Polkadot -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } +polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.28" } # Cumulus -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } [features] default = [] diff --git a/pallets/bitcoin-vaults/Cargo.toml b/pallets/bitcoin-vaults/Cargo.toml index aa548346..a418945e 100644 --- a/pallets/bitcoin-vaults/Cargo.toml +++ b/pallets/bitcoin-vaults/Cargo.toml @@ -17,23 +17,22 @@ log = "0.4" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive", ] } -serde = { version = "1.0.111", default-features = false, features = ["derive"] } +serde = { version = "1.0.140", default-features = false, features = ["derive"] } lite-json = { version = "0.1", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } -sp-core = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-std = { default-features = false, version = "4.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-keystore = { default-features = false, version = "0.12.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } [dev-dependencies] -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } [features] default = ["std"] diff --git a/pallets/confidential-docs/Cargo.toml b/pallets/confidential-docs/Cargo.toml index 7e3b946e..4ec4fe50 100644 --- a/pallets/confidential-docs/Cargo.toml +++ b/pallets/confidential-docs/Cargo.toml @@ -16,15 +16,15 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive", ] } -scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } +scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } [dev-dependencies] -sp-core = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } [features] default = ["std"] diff --git a/pallets/gated-marketplace/Cargo.toml b/pallets/gated-marketplace/Cargo.toml index acdfc213..34892647 100644 --- a/pallets/gated-marketplace/Cargo.toml +++ b/pallets/gated-marketplace/Cargo.toml @@ -17,24 +17,24 @@ log = "0.4" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive", ] } -serde = { version = "1.0.111", default-features = false, features = ["derive"] } -scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } -sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +serde = { version = "1.0.140", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-balances = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-uniques = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-timestamp = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-fruniques = {path = "../fruniques", default-features = false, version = "0.1.0-dev"} -pallet-rbac = { default-features = false, version = "4.0.0-dev", path="../rbac/"} +# pallet-fruniques = {path = "../fruniques", default-features = false, version = "0.1.0-dev"} +pallet-rbac = { path="../rbac/", default-features = false, version = "4.0.0-dev"} [dev-dependencies] -sp-core = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } [features] default = ["std"] @@ -47,7 +47,7 @@ std = [ "frame-benchmarking/std", "pallet-balances/std", "pallet-uniques/std", - "pallet-fruniques/std", + # "pallet-fruniques/std", "pallet-timestamp/std", "pallet-rbac/std" ] diff --git a/pallets/gated-marketplace/src/lib.rs b/pallets/gated-marketplace/src/lib.rs index b60103b8..c8ed8c47 100644 --- a/pallets/gated-marketplace/src/lib.rs +++ b/pallets/gated-marketplace/src/lib.rs @@ -27,7 +27,7 @@ pub mod pallet { pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; #[pallet::config] - pub trait Config: frame_system::Config + pallet_fruniques::Config{ + pub trait Config: frame_system::Config + pallet_uniques::Config{ type Event: From> + IsType<::Event>; diff --git a/pallets/gated-marketplace/src/mock.rs b/pallets/gated-marketplace/src/mock.rs index 91e481d1..1e072d8a 100644 --- a/pallets/gated-marketplace/src/mock.rs +++ b/pallets/gated-marketplace/src/mock.rs @@ -21,7 +21,7 @@ frame_support::construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event}, GatedMarketplace: pallet_gated_marketplace::{Pallet, Call, Storage, Event}, Uniques: pallet_uniques::{Pallet, Call, Storage, Event}, - Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event}, + // Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, RBAC: pallet_rbac::{Pallet, Call, Storage, Event}, diff --git a/pallets/rbac/Cargo.toml b/pallets/rbac/Cargo.toml index 3dd50e1b..a81aa5ba 100644 --- a/pallets/rbac/Cargo.toml +++ b/pallets/rbac/Cargo.toml @@ -5,9 +5,9 @@ description = "FRAME pallet template for defining custom runtime logic." authors = ["Substrate DevHub "] homepage = "https://substrate.io/" edition = "2021" -license = "Unlicense" +license = "MIT" publish = false -repository = "https://github.com/substrate-developer-hub/substrate-node-template/" +repository = "https://github.com/hashed-io/hashed-substrate" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -17,15 +17,15 @@ log = "0.4" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive", ] } -scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } -sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } [dev-dependencies] -sp-core = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-io = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } [features] default = ["std"] diff --git a/pallets/template/Cargo.toml b/pallets/template/Cargo.toml index 1ed753a9..2622f350 100644 --- a/pallets/template/Cargo.toml +++ b/pallets/template/Cargo.toml @@ -16,15 +16,15 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive", ] } -scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } +scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28"} +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", optional = true } [dev-dependencies] -sp-core = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-runtime = { default-features = false, version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } [features] default = ["std"] diff --git a/parachain-runtime/Cargo.toml b/parachain-runtime/Cargo.toml index c9625e9a..dfa1360a 100644 --- a/parachain-runtime/Cargo.toml +++ b/parachain-runtime/Cargo.toml @@ -12,109 +12,109 @@ edition = "2021" targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } [dependencies] # General codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } hex-literal = { version = "0.3.4", optional = true } -log = { version = "0.4.17", default-features = false } +log = { version = "0.4", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } serde = { version = "1.0.140", optional = true, features = ["derive"] } smallvec = "1.9.0" # Cumulus -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -cumulus-pallet-session-benchmarking = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false, version = "3.0.0"} -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-pallet-session-benchmarking = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false, version = "3.0.0"} +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } # Substrate -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.28" } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.28" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.28" } # Local Pallets pallet-bitcoin-vaults = { path = "../pallets/bitcoin-vaults", default-features = false } -pallet-fruniques = { path = "../pallets/fruniques", default-features = false } +# pallet-fruniques = { path = "../pallets/fruniques", default-features = false } pallet-gated-marketplace = { path = "../pallets/gated-marketplace", default-features = false } pallet-rbac = { path = "../pallets/rbac", default-features = false } pallet-confidential-docs = { path = "../pallets/confidential-docs", default-features = false } # Prebuilt Pallets -pallet-alliance = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-atomic-swap = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-conviction-voting = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-gilt = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-indices = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-lottery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-referenda = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-remark = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-scored-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-transaction-storage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", default-features = false } -pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-whitelist = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } - -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +pallet-alliance = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-atomic-swap = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-lottery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-remark = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-scored-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-transaction-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-whitelist = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } + +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } # Polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } - -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } - -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } + +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } + +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } [features] default = [ @@ -141,7 +141,7 @@ std = [ # Local Pallets "pallet-bitcoin-vaults/std", "pallet-confidential-docs/std", - "pallet-fruniques/std", + # "pallet-fruniques/std", "pallet-gated-marketplace/std", "pallet-rbac/std", diff --git a/parachain-runtime/src/lib.rs b/parachain-runtime/src/lib.rs index 82bc70b1..f966c4ae 100644 --- a/parachain-runtime/src/lib.rs +++ b/parachain-runtime/src/lib.rs @@ -181,7 +181,7 @@ impl_opaque_keys! { pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("hashed"), impl_name: create_runtime_str!("hashed"), - authoring_version: 1, + authoring_version: 2, spec_version: 1, impl_version: 0, apis: RUNTIME_API_VERSIONS, @@ -737,8 +737,8 @@ impl pallet_confidential_docs::Config for Runtime { } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { @@ -910,9 +910,9 @@ impl pallet_uniques::Config for Runtime { type Locker = (); } -impl pallet_fruniques::Config for Runtime { - type Event = Event; -} +// impl pallet_fruniques::Config for Runtime { +// type Event = Event; +// } parameter_types! { pub const LabelMaxLen:u32 = 32; @@ -974,6 +974,7 @@ construct_runtime!( NodeBlock = opaque::Block, UncheckedExtrinsic = UncheckedExtrinsic, { + // Start of - Provided by Cumulus Template // System support stuff. System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, ParachainSystem: cumulus_pallet_parachain_system::{ @@ -985,11 +986,6 @@ construct_runtime!( // Monetary stuff. Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 12, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 13, - ChildBounties: pallet_child_bounties::{Pallet, Call, Storage, Event} = 14, - Assets: pallet_assets::{Pallet, Call, Storage, Event} = 15, - // AssetTxPayment: pallet_asset_tx_payment::{Pallet, Call, Storage, Event} = 16, // Collator support. The order of these 4 are important and shall not change. Authorship: pallet_authorship::{Pallet, Call, Storage} = 20, @@ -1003,16 +999,24 @@ construct_runtime!( PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin, Config} = 31, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 33, + // End of - Provided by Cumulus Template + + // Additional pallets + Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 61, + Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 62, + ChildBounties: pallet_child_bounties::{Pallet, Call, Storage, Event} = 63, + Assets: pallet_assets::{Pallet, Call, Storage, Event} = 64, + // AssetTxPayment: pallet_asset_tx_payment::{Pallet, Call, Storage, Event} = 16, // Governance Related - Council: pallet_collective:: = 41, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 42, - Society: pallet_society::{Pallet, Call, Storage, Event} = 43, - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 44, - Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 45, - Indices: pallet_indices::{Pallet, Call, Storage, Event} = 46, - Membership: pallet_membership::{Pallet, Call, Storage, Event} = 47, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 48, + Council: pallet_collective:: = 81, + RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 82, + Society: pallet_society::{Pallet, Call, Storage, Event} = 83, + Identity: pallet_identity::{Pallet, Call, Storage, Event} = 84, + Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 85, + Indices: pallet_indices::{Pallet, Call, Storage, Event} = 86, + Membership: pallet_membership::{Pallet, Call, Storage, Event} = 87, + Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 88, // Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 49, // Democracy: pallet_democracy::{Pallet, Call, Storage, Event} = 50, // Gilt: pallet_gilt::{Pallet, Call, Storage, Event} = 51, @@ -1024,12 +1028,12 @@ construct_runtime!( // TechnicalMembership: pallet_membership::, // Custom Pallets - BitcoinVaults: pallet_bitcoin_vaults::{Pallet, Call, Storage, Event, ValidateUnsigned} = 51, - Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 52, - Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event} = 53, - GatedMarketplace: pallet_gated_marketplace::{Pallet, Call, Storage, Event} = 54, - RBAC: pallet_rbac::{Pallet, Call, Storage, Event} = 55, - ConfidentialDocs: pallet_confidential_docs::{Pallet, Call, Storage, Event} = 56, + BitcoinVaults: pallet_bitcoin_vaults::{Pallet, Call, Storage, Event, ValidateUnsigned} = 151, + Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 152, + // Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event} = 153, + GatedMarketplace: pallet_gated_marketplace::{Pallet, Call, Storage, Event} = 154, + RBAC: pallet_rbac::{Pallet, Call, Storage, Event} = 155, + ConfidentialDocs: pallet_confidential_docs::{Pallet, Call, Storage, Event} = 156, } ); From 3b098c63a2fee9029fbd502788844788bc4d2356 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Fri, 9 Sep 2022 12:38:25 -0400 Subject: [PATCH 05/13] collator compiling on 9.27 sans fruniques --- collator/Cargo.toml | 104 +++++++++--------- node/Cargo.toml | 72 ------------ pallets/bitcoin-vaults/Cargo.toml | 18 +-- pallets/confidential-docs/Cargo.toml | 12 +- pallets/gated-marketplace/Cargo.toml | 20 ++-- pallets/rbac/Cargo.toml | 12 +- pallets/template/Cargo.toml | 12 +- parachain-runtime/Cargo.toml | 158 +++++++++++++-------------- parachain-runtime/src/xcm_config.rs | 13 +-- 9 files changed, 174 insertions(+), 247 deletions(-) delete mode 100644 node/Cargo.toml diff --git a/collator/Cargo.toml b/collator/Cargo.toml index 0500fbff..70c47239 100644 --- a/collator/Cargo.toml +++ b/collator/Cargo.toml @@ -22,64 +22,64 @@ jsonrpsee = { version = "0.14.0", features = ["server"] } hashed-parachain-runtime = { path = "../parachain-runtime" } # Substrate -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.28" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-executor = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.28" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.28" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-cli = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.27" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-executor = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.27" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-service = { git = "https://github.com/paritytech/substrate", features = ["wasmtime"], branch = "polkadot-v0.9.27" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } # Polkadot -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.28" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } +polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.27" } # Cumulus -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27" } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } [features] default = [] diff --git a/node/Cargo.toml b/node/Cargo.toml deleted file mode 100644 index b5f4f3b9..00000000 --- a/node/Cargo.toml +++ /dev/null @@ -1,72 +0,0 @@ -[package] -name = "hashed" -version = "0.1.0-dev" -description = "Hashed Solochain Node" -authors = ["Hashed "] -homepage = "https://hashed.io" -edition = "2021" -license = "MIT" -publish = false -repository = "https://github.com/hashed-io/hashed-substrate" -build = "build.rs" - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] - -[[bin]] -name = "hashed" - -[dependencies] -# structopt = "0.3.25" -clap = { version = "3.0", features = ["derive"] } -bs58 = "0.4.0" - -sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", features = ["wasmtime"] } -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", features = ["wasmtime"]} -sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", features = ["wasmtime"] } -sc-telemetry = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-finality-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-keyring = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } - -# These dependencies are used for the node template's RPCs -jsonrpsee = { version = "0.14.0", features = ["server"] } -sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } - -# These dependencies are used for runtime benchmarking -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } - -# Local Dependencies -hashed-runtime = { version = "0.1.0-dev", path = "../runtime" } - -[build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } - -[features] -default = [] -runtime-benchmarks = [ - "hashed-runtime/runtime-benchmarks", -] diff --git a/pallets/bitcoin-vaults/Cargo.toml b/pallets/bitcoin-vaults/Cargo.toml index a418945e..3c28d04c 100644 --- a/pallets/bitcoin-vaults/Cargo.toml +++ b/pallets/bitcoin-vaults/Cargo.toml @@ -22,17 +22,17 @@ serde = { version = "1.0.140", default-features = false, features = ["derive"] } lite-json = { version = "0.1", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false, optional = true } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false, optional = true } [dev-dependencies] -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } [features] default = ["std"] diff --git a/pallets/confidential-docs/Cargo.toml b/pallets/confidential-docs/Cargo.toml index 4ec4fe50..d175fa49 100644 --- a/pallets/confidential-docs/Cargo.toml +++ b/pallets/confidential-docs/Cargo.toml @@ -17,14 +17,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = "derive", ] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false, optional = true } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } [features] default = ["std"] diff --git a/pallets/gated-marketplace/Cargo.toml b/pallets/gated-marketplace/Cargo.toml index 34892647..efa9975d 100644 --- a/pallets/gated-marketplace/Cargo.toml +++ b/pallets/gated-marketplace/Cargo.toml @@ -19,22 +19,22 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = ] } serde = { version = "1.0.140", default-features = false, features = ["derive"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } # pallet-fruniques = {path = "../fruniques", default-features = false, version = "0.1.0-dev"} pallet-rbac = { path="../rbac/", default-features = false, version = "4.0.0-dev"} [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } [features] default = ["std"] diff --git a/pallets/rbac/Cargo.toml b/pallets/rbac/Cargo.toml index a81aa5ba..f5ce5dfc 100644 --- a/pallets/rbac/Cargo.toml +++ b/pallets/rbac/Cargo.toml @@ -18,14 +18,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = "derive", ] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false, optional = true } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } [features] default = ["std"] diff --git a/pallets/template/Cargo.toml b/pallets/template/Cargo.toml index 2622f350..a219ae6b 100644 --- a/pallets/template/Cargo.toml +++ b/pallets/template/Cargo.toml @@ -17,14 +17,14 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = "derive", ] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28"} -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27"} +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", optional = true } [dev-dependencies] -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } [features] default = ["std"] diff --git a/parachain-runtime/Cargo.toml b/parachain-runtime/Cargo.toml index dfa1360a..b031716a 100644 --- a/parachain-runtime/Cargo.toml +++ b/parachain-runtime/Cargo.toml @@ -12,7 +12,7 @@ edition = "2021" targets = ["x86_64-unknown-linux-gnu"] [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } [dependencies] # General @@ -24,24 +24,24 @@ serde = { version = "1.0.140", optional = true, features = ["derive"] } smallvec = "1.9.0" # Cumulus -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -cumulus-pallet-session-benchmarking = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false, version = "3.0.0"} -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-pallet-session-benchmarking = {git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false, version = "3.0.0"} +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } # Substrate -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.28" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.28" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.27" } # Local Pallets pallet-bitcoin-vaults = { path = "../pallets/bitcoin-vaults", default-features = false } @@ -51,70 +51,70 @@ pallet-rbac = { path = "../pallets/rbac", default-features = false } pallet-confidential-docs = { path = "../pallets/confidential-docs", default-features = false } # Prebuilt Pallets -pallet-alliance = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-atomic-swap = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-lottery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-referenda = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-remark = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-scored-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-transaction-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-whitelist = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } - -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false } +pallet-alliance = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-atomic-swap = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-child-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-conviction-voting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-lottery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-referenda = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-remark = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-scored-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-tips = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-whitelist = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } + +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.27", default-features = false } # Polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } - -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } - -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } + +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } + +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.27", default-features = false } [features] default = [ diff --git a/parachain-runtime/src/xcm_config.rs b/parachain-runtime/src/xcm_config.rs index 2ec84d18..f01b7166 100644 --- a/parachain-runtime/src/xcm_config.rs +++ b/parachain-runtime/src/xcm_config.rs @@ -6,12 +6,11 @@ use core::marker::PhantomData; use frame_support::{ log, match_types, parameter_types, traits::{Everything, Nothing}, - weights::Weight, }; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::impls::ToAuthor; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight as XCMWeight}; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentIsPreset, @@ -77,7 +76,7 @@ pub type XcmOriginToTransactDispatchOrigin = ( parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. - pub UnitWeightCost: Weight = 1_000_000_000; + pub UnitWeightCost: u64 = 1_000_000_000; pub const MaxInstructions: u32 = 100; } @@ -104,8 +103,8 @@ where fn should_execute( origin: &MultiLocation, message: &mut Xcm, - max_weight: Weight, - weight_credit: &mut Weight, + max_weight: XCMWeight, + weight_credit: &mut XCMWeight, ) -> Result<(), ()> { Deny::should_execute(origin, message, max_weight, weight_credit)?; Allow::should_execute(origin, message, max_weight, weight_credit) @@ -118,8 +117,8 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { fn should_execute( origin: &MultiLocation, message: &mut Xcm, - _max_weight: Weight, - _weight_credit: &mut Weight, + _max_weight: XCMWeight, + _weight_credit: &mut XCMWeight, ) -> Result<(), ()> { if message.0.iter().any(|inst| { matches!( From 78d443d9d99df1327fc099dae5ce0f80bbb33ff4 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Fri, 9 Sep 2022 12:57:36 -0400 Subject: [PATCH 06/13] with fruniques added --- Cargo.lock | 165 +++++++++++++------------- Cargo.toml | 6 +- node/Cargo.toml | 72 +++++++++++ pallets/gated-marketplace/Cargo.toml | 4 +- pallets/gated-marketplace/src/mock.rs | 2 +- parachain-runtime/Cargo.toml | 4 +- parachain-runtime/src/lib.rs | 8 +- runtime/Cargo.toml | 86 +++++++------- 8 files changed, 211 insertions(+), 136 deletions(-) create mode 100644 node/Cargo.toml diff --git a/Cargo.lock b/Cargo.lock index 54aaf195..923290d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ "memchr", ] @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305" +checksum = "b9a8f622bcf6ff3df478e9deba3e03e4e04b300f8e6a139e192c05fa3490afc7" [[package]] name = "approx" @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "async-io" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab006897723d9352f63e2b13047177c3982d8d79709d713ce7747a8f19fd1b0" +checksum = "83e21f3a490c72b3b0cf44962180e60045de2925d8dff97918f7ee43c8f637c7" dependencies = [ "autocfg", "concurrent-queue", @@ -623,9 +623,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ "generic-array 0.14.6", ] @@ -890,9 +890,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.19" +version = "3.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68d43934757334b5c0519ff882e1ab9647ac0258b47c24c4f490d78e42697fd5" +checksum = "23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd" dependencies = [ "atty", "bitflags", @@ -1022,9 +1022,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc948ebb96241bb40ab73effeb80d9f93afaad49359d159a5e61be51619fe813" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] @@ -1846,7 +1846,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "block-buffer 0.10.2", + "block-buffer 0.10.3", "crypto-common", "subtle", ] @@ -2271,11 +2271,10 @@ dependencies = [ [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] @@ -2289,7 +2288,7 @@ dependencies = [ "linregress", "log", "parity-scale-codec", - "paste 1.0.8", + "paste 1.0.9", "scale-info", "serde", "sp-api", @@ -2420,7 +2419,7 @@ dependencies = [ "log", "once_cell", "parity-scale-codec", - "paste 1.0.8", + "paste 1.0.9", "scale-info", "serde", "smallvec", @@ -3310,6 +3309,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "if-addrs" version = "0.7.0" @@ -3920,7 +3929,7 @@ dependencies = [ "rand 0.8.5", "ring", "rw-stream-sink", - "sha2 0.10.3", + "sha2 0.10.5", "smallvec", "thiserror", "unsigned-varint", @@ -3994,7 +4003,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "regex", - "sha2 0.10.3", + "sha2 0.10.5", "smallvec", "unsigned-varint", "wasm-timer", @@ -4041,7 +4050,7 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "sha2 0.10.3", + "sha2 0.10.5", "smallvec", "thiserror", "uint", @@ -4119,7 +4128,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.5", - "sha2 0.10.3", + "sha2 0.10.5", "snow", "static_assertions", "x25519-dalek", @@ -4216,7 +4225,7 @@ dependencies = [ "prost", "prost-build", "rand 0.8.5", - "sha2 0.10.3", + "sha2 0.10.5", "thiserror", "unsigned-varint", "void", @@ -4595,15 +4604,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memmap2" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.5.7" @@ -4679,9 +4679,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", ] @@ -4745,8 +4745,8 @@ dependencies = [ "core2", "digest 0.10.3", "multihash-derive", - "sha2 0.10.3", - "sha3 0.10.2", + "sha2 0.10.5", + "sha3 0.10.4", "unsigned-varint", ] @@ -4862,7 +4862,7 @@ checksum = "25af9cf0dc55498b7bd94a1508af7a78706aa0ab715a73c5169273e03c84845e" dependencies = [ "anyhow", "byteorder", - "paste 1.0.8", + "paste 1.0.9", "thiserror", ] @@ -5033,9 +5033,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" +checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" [[package]] name = "opaque-debug" @@ -6305,9 +6305,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb474d0ed0836e185cb998a6b140ed1073d1fbf27d690ecf9ede8030289382c" +checksum = "2c8fdb726a43661fa54b43e7114e6b88b2289cae388eb3ad766d9d1754d83fce" dependencies = [ "blake2-rfc", "crc32fast", @@ -6316,8 +6316,8 @@ dependencies = [ "libc", "log", "lz4", - "memmap2 0.2.3", - "parking_lot 0.11.2", + "memmap2", + "parking_lot 0.12.1", "rand 0.8.5", "snap", ] @@ -6462,9 +6462,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9423e2b32f7a043629287a536f21951e8c6a82482d0acb1eeebfc90bc2225b22" +checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" [[package]] name = "paste-impl" @@ -6501,9 +6501,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" @@ -7850,9 +7850,9 @@ dependencies = [ [[package]] name = "prometheus" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cface98dfa6d645ea4c789839f176e4b072265d085bfcc48eaa8d137f58d3c39" +checksum = "45c8babc29389186697fe5a2a4859d697825496b83db5d0b65271cdc0488e88c" dependencies = [ "cfg-if 1.0.0", "fnv", @@ -8641,7 +8641,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05" dependencies = [ "impl-trait-for-tuples", - "memmap2 0.5.7", + "memmap2", "parity-scale-codec", "sc-chain-spec-derive", "sc-network", @@ -9830,9 +9830,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" +checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -9853,9 +9853,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a31480366ec990f395a61b7c08122d99bd40544fdb5abcfc1b06bb29994312c" +checksum = "eaedf34ed289ea47c2b741bb72e5357a209512d67bcd4bda44359e5bf0470f56" dependencies = [ "digest 0.10.3", "keccak", @@ -9914,7 +9914,7 @@ dependencies = [ "approx", "num-complex", "num-traits", - "paste 1.0.8", + "paste 1.0.9", ] [[package]] @@ -9939,7 +9939,7 @@ source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.27#b017 dependencies = [ "enumn", "parity-scale-codec", - "paste 1.0.8", + "paste 1.0.9", "sp-runtime", "sp-std", ] @@ -9978,15 +9978,15 @@ dependencies = [ "rand_core 0.6.3", "ring", "rustc_version 0.4.0", - "sha2 0.10.3", + "sha2 0.10.5", "subtle", ] [[package]] name = "socket2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c98bba371b9b22a71a9414e420f92ddeb2369239af08200816169d5e2dd7aa" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi", @@ -10261,8 +10261,8 @@ dependencies = [ "blake2", "byteorder", "digest 0.10.3", - "sha2 0.10.3", - "sha3 0.10.2", + "sha2 0.10.5", + "sha3 0.10.4", "sp-std", "twox-hash", ] @@ -10472,7 +10472,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "paste 1.0.8", + "paste 1.0.9", "rand 0.7.3", "scale-info", "serde", @@ -10731,9 +10731,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.28.0" +version = "1.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c8a1e645fa0bd3e81a90e592a677f7ada3182ac338c4a71cd9ec0ba911f6abb" +checksum = "b0837b5d62f42082c9d56cd946495ae273a3c68083b637b9153341d5e465146d" dependencies = [ "Inflector", "num-format", @@ -11008,18 +11008,18 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "8c1b05ca9d106ba7d2e31a9dab4a64e7be2cce415321966ea3132c49a656e252" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "e8f2591983642de85c921015f3f070c665a197ed69e417af436115e3a1407487" dependencies = [ "proc-macro2", "quote", @@ -11121,9 +11121,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.20.1" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" +checksum = "89797afd69d206ccd11fb0ea560a44bbb87731d020670e79416d442919257d42" dependencies = [ "autocfg", "bytes", @@ -11175,9 +11175,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", @@ -11348,7 +11348,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna", + "idna 0.2.3", "ipnet", "lazy_static", "log", @@ -11435,9 +11435,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "ucd-trie" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "uint" @@ -11523,13 +11523,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", - "idna", - "matches", + "idna 0.3.0", "percent-encoding", ] @@ -11763,7 +11762,7 @@ dependencies = [ "log", "object 0.28.4", "once_cell", - "paste 1.0.8", + "paste 1.0.9", "psm", "rayon", "region", @@ -12056,13 +12055,13 @@ dependencies = [ [[package]] name = "which" -version = "4.2.5" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ "either", - "lazy_static", "libc", + "once_cell", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 955915f4..4d0da7a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,11 @@ members = [ 'collator', 'node', - 'pallets/*', + 'pallets/bitcoin-vaults', + 'pallets/confidential-docs', + 'pallets/rbac', + 'pallets/fruniques', + 'pallets/gated-marketplace', 'parachain-runtime', 'runtime', ] diff --git a/node/Cargo.toml b/node/Cargo.toml new file mode 100644 index 00000000..5940a7c3 --- /dev/null +++ b/node/Cargo.toml @@ -0,0 +1,72 @@ +[package] +name = "hashed" +version = "0.1.0-dev" +description = "Hashed Solochain Node" +authors = ["Hashed "] +homepage = "https://hashed.io" +edition = "2021" +license = "MIT" +publish = false +repository = "https://github.com/hashed-io/hashed-substrate" +build = "build.rs" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[[bin]] +name = "hashed" + +[dependencies] +# structopt = "0.3.25" +clap = { version = "3.0", features = ["derive"] } +bs58 = "0.4.0" + +sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", features = ["wasmtime"] } +sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", features = ["wasmtime"]} +sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", features = ["wasmtime"] } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-finality-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-keyring = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } + +# These dependencies are used for the node template's RPCs +jsonrpsee = { version = "0.14.0", features = ["server"] } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } + +# These dependencies are used for runtime benchmarking +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } + +# Local Dependencies +hashed-runtime = { version = "0.1.0-dev", path = "../runtime" } + +[build-dependencies] +substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } + +[features] +default = [] +runtime-benchmarks = [ + "hashed-runtime/runtime-benchmarks", +] diff --git a/pallets/gated-marketplace/Cargo.toml b/pallets/gated-marketplace/Cargo.toml index efa9975d..683a70b3 100644 --- a/pallets/gated-marketplace/Cargo.toml +++ b/pallets/gated-marketplace/Cargo.toml @@ -28,7 +28,7 @@ pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "po pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -# pallet-fruniques = {path = "../fruniques", default-features = false, version = "0.1.0-dev"} +pallet-fruniques = {path = "../fruniques", default-features = false, version = "0.1.0-dev"} pallet-rbac = { path="../rbac/", default-features = false, version = "4.0.0-dev"} [dev-dependencies] @@ -47,7 +47,7 @@ std = [ "frame-benchmarking/std", "pallet-balances/std", "pallet-uniques/std", - # "pallet-fruniques/std", + "pallet-fruniques/std", "pallet-timestamp/std", "pallet-rbac/std" ] diff --git a/pallets/gated-marketplace/src/mock.rs b/pallets/gated-marketplace/src/mock.rs index 1e072d8a..91e481d1 100644 --- a/pallets/gated-marketplace/src/mock.rs +++ b/pallets/gated-marketplace/src/mock.rs @@ -21,7 +21,7 @@ frame_support::construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event}, GatedMarketplace: pallet_gated_marketplace::{Pallet, Call, Storage, Event}, Uniques: pallet_uniques::{Pallet, Call, Storage, Event}, - // Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event}, + Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, RBAC: pallet_rbac::{Pallet, Call, Storage, Event}, diff --git a/parachain-runtime/Cargo.toml b/parachain-runtime/Cargo.toml index b031716a..29e37c5f 100644 --- a/parachain-runtime/Cargo.toml +++ b/parachain-runtime/Cargo.toml @@ -45,7 +45,7 @@ frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-f # Local Pallets pallet-bitcoin-vaults = { path = "../pallets/bitcoin-vaults", default-features = false } -# pallet-fruniques = { path = "../pallets/fruniques", default-features = false } +pallet-fruniques = { path = "../pallets/fruniques", default-features = false } pallet-gated-marketplace = { path = "../pallets/gated-marketplace", default-features = false } pallet-rbac = { path = "../pallets/rbac", default-features = false } pallet-confidential-docs = { path = "../pallets/confidential-docs", default-features = false } @@ -141,7 +141,7 @@ std = [ # Local Pallets "pallet-bitcoin-vaults/std", "pallet-confidential-docs/std", - # "pallet-fruniques/std", + "pallet-fruniques/std", "pallet-gated-marketplace/std", "pallet-rbac/std", diff --git a/parachain-runtime/src/lib.rs b/parachain-runtime/src/lib.rs index f966c4ae..d5fc7f76 100644 --- a/parachain-runtime/src/lib.rs +++ b/parachain-runtime/src/lib.rs @@ -910,9 +910,9 @@ impl pallet_uniques::Config for Runtime { type Locker = (); } -// impl pallet_fruniques::Config for Runtime { -// type Event = Event; -// } +impl pallet_fruniques::Config for Runtime { + type Event = Event; +} parameter_types! { pub const LabelMaxLen:u32 = 32; @@ -1030,7 +1030,7 @@ construct_runtime!( // Custom Pallets BitcoinVaults: pallet_bitcoin_vaults::{Pallet, Call, Storage, Event, ValidateUnsigned} = 151, Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 152, - // Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event} = 153, + Fruniques: pallet_fruniques::{Pallet, Call, Storage, Event} = 153, GatedMarketplace: pallet_gated_marketplace::{Pallet, Call, Storage, Event} = 154, RBAC: pallet_rbac::{Pallet, Call, Storage, Event} = 155, ConfidentialDocs: pallet_confidential_docs::{Pallet, Call, Storage, Event} = 156, diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index dcd3dcfc..0f8fd8cc 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -14,62 +14,62 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } log = "0.4" -pallet-indices = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-aura = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-grandpa = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-randomness-collective-flip = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-treasury = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-identity = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-recovery = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-collective = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -pallet-society = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -pallet-membership = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-node-authorization = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-bounties = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -pallet-uniques = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-assets = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-node-authorization = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } -frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-block-builder = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -sp-consensus-aura = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27"} -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false} +sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } # Used for the node template's RPCs -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } # Used for runtime benchmarking -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } -frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27", optional = true } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false, optional = true } hex-literal = { version = "0.3.4", optional = true } # Local Dependencies -pallet-template = { version = "4.0.0-dev", default-features = false, path = "../pallets/template" } +pallet-template = { default-features = false, path = "../pallets/template" } pallet-fruniques = { version = "0.1.0-dev", default-features = false, path = "../pallets/fruniques" } -pallet-bitcoin-vaults = { version = "4.0.0-dev", default-features = false, path = "../pallets/bitcoin-vaults" } -pallet-gated-marketplace = { version = "4.0.0-dev", default-features = false, path = "../pallets/gated-marketplace" } -pallet-rbac = { version = "4.0.0-dev", default-features = false, path = "../pallets/rbac" } -pallet-confidential-docs = { version = "4.0.0-dev", default-features = false, path = "../pallets/confidential-docs" } +pallet-bitcoin-vaults = { default-features = false, path = "../pallets/bitcoin-vaults" } +pallet-gated-marketplace = { default-features = false, path = "../pallets/gated-marketplace" } +pallet-rbac = { default-features = false, path = "../pallets/rbac" } +pallet-confidential-docs = { default-features = false, path = "../pallets/confidential-docs" } [build-dependencies] -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.27" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27" } [features] default = ["std"] From bee30d068f37f7ac52a4897daf9b2d2e1234eb05 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Fri, 9 Sep 2022 14:12:52 -0400 Subject: [PATCH 07/13] adding more pallets, vesting, sudo, proxy, remark, preimage, whitelist --- Cargo.lock | 1 + parachain-runtime/Cargo.toml | 2 + parachain-runtime/src/lib.rs | 245 +++++++++++++++++++++-------------- 3 files changed, 153 insertions(+), 95 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 923290d8..c21a3b15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3031,6 +3031,7 @@ dependencies = [ "pallet-lottery", "pallet-membership", "pallet-multisig", + "pallet-preimage", "pallet-proxy", "pallet-randomness-collective-flip", "pallet-rbac", diff --git a/parachain-runtime/Cargo.toml b/parachain-runtime/Cargo.toml index 29e37c5f..72ce0fc6 100644 --- a/parachain-runtime/Cargo.toml +++ b/parachain-runtime/Cargo.toml @@ -72,6 +72,7 @@ pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "po pallet-lottery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.27", default-features = false } @@ -167,6 +168,7 @@ std = [ "pallet-lottery/std", "pallet-membership/std", "pallet-multisig/std", + "pallet-preimage/std", "pallet-proxy/std", "pallet-randomness-collective-flip/std", "pallet-recovery/std", diff --git a/parachain-runtime/src/lib.rs b/parachain-runtime/src/lib.rs index d5fc7f76..fc97c449 100644 --- a/parachain-runtime/src/lib.rs +++ b/parachain-runtime/src/lib.rs @@ -17,7 +17,7 @@ use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, IdentifyAccount, Verify}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, MultiSignature, }; @@ -31,13 +31,13 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, EitherOfDiverse, - Everything + Everything, InstanceFilter, }, weights::{ constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, }, - PalletId, + PalletId, RuntimeDebug, }; use frame_system::{ limits::{BlockLength, BlockWeights}, @@ -47,6 +47,8 @@ pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Percent, Permill}; use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; +pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment}; + #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -413,87 +415,98 @@ impl pallet_multisig::Config for Runtime { type WeightInfo = pallet_multisig::weights::SubstrateWeight; } -// parameter_types! { -// // One storage item; key size 32, value size 8; . -// pub const ProxyDepositBase: Balance = deposit(1, 8); -// // Additional storage item size of 33 bytes. -// pub const ProxyDepositFactor: Balance = deposit(0, 33); -// pub const AnnouncementDepositBase: Balance = deposit(1, 8); -// pub const AnnouncementDepositFactor: Balance = deposit(0, 66); -// } - -// /// The type used to represent the kinds of proxying allowed. -// #[derive( -// Copy, -// Clone, -// Eq, -// PartialEq, -// Ord, -// PartialOrd, -// Encode, -// Decode, -// RuntimeDebug, -// MaxEncodedLen, -// scale_info::TypeInfo, -// )] -// pub enum ProxyType { -// Any, -// NonTransfer, -// Governance, -// Staking, -// } -// impl Default for ProxyType { -// fn default() -> Self { -// Self::Any -// } -// } -// impl InstanceFilter for ProxyType { -// fn filter(&self, c: &Call) -> bool { -// match self { -// ProxyType::Any => true, -// ProxyType::NonTransfer => !matches!( -// c, -// Call::Balances(..) -// | Call::Assets(..) | Call::Uniques(..) -// | Call::Vesting(pallet_vesting::Call::vested_transfer { .. }) -// | Call::Indices(pallet_indices::Call::transfer { .. }) -// ), -// ProxyType::Governance => matches!( -// c, -// Call::Democracy(..) -// | Call::Council(..) | Call::Society(..) -// | Call::TechnicalCommittee(..) -// | Call::Elections(..) -// | Call::Treasury(..) -// ), -// ProxyType::Staking => matches!(c, Call::Staking(..)), -// } -// } -// fn is_superset(&self, o: &Self) -> bool { -// match (self, o) { -// (x, y) if x == y => true, -// (ProxyType::Any, _) => true, -// (_, ProxyType::Any) => false, -// (ProxyType::NonTransfer, _) => true, -// _ => false, -// } -// } -// } - -// impl pallet_proxy::Config for Runtime { -// type Event = Event; -// type Call = Call; -// type Currency = Balances; -// type ProxyType = ProxyType; -// type ProxyDepositBase = ProxyDepositBase; -// type ProxyDepositFactor = ProxyDepositFactor; -// type MaxProxies = ConstU32<32>; -// type WeightInfo = pallet_proxy::weights::SubstrateWeight; -// type MaxPending = ConstU32<32>; -// type CallHasher = BlakeTwo256; -// type AnnouncementDepositBase = AnnouncementDepositBase; -// type AnnouncementDepositFactor = AnnouncementDepositFactor; -// } +impl pallet_sudo::Config for Runtime { + type Event = Event; + type Call = Call; +} + +parameter_types! { + // One storage item; key size 32, value size 8; . + pub const ProxyDepositBase: Balance = deposit(1, 8); + // Additional storage item size of 33 bytes. + pub const ProxyDepositFactor: Balance = deposit(0, 33); + pub const AnnouncementDepositBase: Balance = deposit(1, 8); + pub const AnnouncementDepositFactor: Balance = deposit(0, 66); +} + +/// The type used to represent the kinds of proxying allowed. +#[derive( + Copy, + Clone, + Eq, + PartialEq, + Ord, + PartialOrd, + Encode, + Decode, + RuntimeDebug, + MaxEncodedLen, + scale_info::TypeInfo, +)] +pub enum ProxyType { + Any, + NonTransfer, + Governance, + Marketplaces, +} +impl Default for ProxyType { + fn default() -> Self { + Self::Any + } +} +impl InstanceFilter for ProxyType { + fn filter(&self, c: &Call) -> bool { + match self { + ProxyType::Any => true, + ProxyType::NonTransfer => !matches!( + c, + Call::Balances(..) + | Call::Assets(..) + | Call::Uniques(..) + | Call::Vesting(pallet_vesting::Call::vested_transfer { .. }) + | Call::Indices(pallet_indices::Call::transfer { .. }) + ), + ProxyType::Governance => matches!( + c, + Call::Bounties(..) + | Call::ChildBounties(..) + | Call::Council(..) + | Call::Society(..) + // | Call::TechnicalCommittee(..) + // | Call::Elections(..) + | Call::Treasury(..) + ), + ProxyType::Marketplaces => matches!( + c, + Call::GatedMarketplace(..) + ), + } + } + fn is_superset(&self, o: &Self) -> bool { + match (self, o) { + (x, y) if x == y => true, + (ProxyType::Any, _) => true, + (_, ProxyType::Any) => false, + (ProxyType::NonTransfer, _) => true, + _ => false, + } + } +} + +impl pallet_proxy::Config for Runtime { + type Event = Event; + type Call = Call; + type Currency = Balances; + type ProxyType = ProxyType; + type ProxyDepositBase = ProxyDepositBase; + type ProxyDepositFactor = ProxyDepositFactor; + type MaxProxies = ConstU32<32>; + type WeightInfo = pallet_proxy::weights::SubstrateWeight; + type MaxPending = ConstU32<32>; + type CallHasher = BlakeTwo256; + type AnnouncementDepositBase = AnnouncementDepositBase; + type AnnouncementDepositFactor = AnnouncementDepositFactor; +} parameter_types! { pub const ConfigDepositBase: Balance = 500 * CENTS; @@ -592,6 +605,21 @@ impl pallet_society::Config for Runtime { type PalletId = SocietyPalletId; } +parameter_types! { + pub const MinVestedTransfer: Balance = 100 * DOLLARS; +} + +impl pallet_vesting::Config for Runtime { + type Event = Event; + type Currency = Balances; + type BlockNumberToBalance = ConvertInto; + type MinVestedTransfer = MinVestedTransfer; + type WeightInfo = pallet_vesting::weights::SubstrateWeight; + // `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the + // highest number of schedules that encodes less than 2^10. + const MAX_VESTING_SCHEDULES: u32 = 28; +} + parameter_types! { pub const ProposalBond: Permill = Permill::from_percent(5); pub const ProposalBondMinimum: Balance = 2000 * CENTS; @@ -691,6 +719,31 @@ impl pallet_assets::Config for Runtime { type WeightInfo = (); } +parameter_types! { + pub const PreimageMaxSize: u32 = 4096 * 1024; + pub const PreimageBaseDeposit: Balance = 1 * DOLLARS; + pub const PreimageByteDeposit: Balance = 1 * CENTS; +} + +impl pallet_preimage::Config for Runtime { + type WeightInfo = pallet_preimage::weights::SubstrateWeight; + type Event = Event; + type Currency = Balances; + type ManagerOrigin = EnsureRoot; + type MaxSize = PreimageMaxSize; + type BaseDeposit = PreimageBaseDeposit; + type ByteDeposit = PreimageByteDeposit; +} + +impl pallet_whitelist::Config for Runtime { + type Event = Event; + type Call = Call; + type WhitelistOrigin = EnsureRoot; + type DispatchWhitelistedOrigin = EnsureRoot; + type PreimageProvider = Preimage; + type WeightInfo = pallet_whitelist::weights::SubstrateWeight; +} + parameter_types! { pub const XPubLen: u32 = XPUB_LEN; pub const PSBTMaxLen: u32 = 2048; @@ -736,6 +789,11 @@ impl pallet_confidential_docs::Config for Runtime { type DocDescMaxLen = DocDescMaxLen; } +impl pallet_remark::Config for Runtime { + type WeightInfo = pallet_remark::weights::SubstrateWeight; + type Event = Event; +} + parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); @@ -831,7 +889,7 @@ impl pallet_collator_selection::Config for Runtime { /// The payload being signed in transactions. pub type SignedPayload = sp_runtime::generic::SignedPayload; -use codec::Encode; +use codec::{Decode, Encode, MaxEncodedLen}; use sp_runtime::SaturatedConversion; impl frame_system::offchain::SendTransactionTypes for Runtime @@ -1017,16 +1075,13 @@ construct_runtime!( Indices: pallet_indices::{Pallet, Call, Storage, Event} = 86, Membership: pallet_membership::{Pallet, Call, Storage, Event} = 87, Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 88, - // Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 49, - // Democracy: pallet_democracy::{Pallet, Call, Storage, Event} = 50, - // Gilt: pallet_gilt::{Pallet, Call, Storage, Event} = 51, - // ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 51, - // Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 51, - // Gilt: pallet_gilt::{Pallet, Call, Storage, Event} = 51, - // TechnicalCommittee: pallet_collective::, - // Elections: pallet_elections_phragmen::{Pallet, Call, Storage, Event} = 51, - // TechnicalMembership: pallet_membership::, - + Vesting: pallet_vesting::{Pallet, Call, Storage, Event} = 89, + Sudo: pallet_sudo::{Pallet, Call, Storage, Event} = 90, + Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 91, + Remark: pallet_remark::{Pallet, Call, Storage, Event} = 52, + Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 100, + Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 101, + // Custom Pallets BitcoinVaults: pallet_bitcoin_vaults::{Pallet, Call, Storage, Event, ValidateUnsigned} = 151, Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 152, From 0c957c9688ddb2b268cf97f9147497059084eb64 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Fri, 9 Sep 2022 14:45:53 -0400 Subject: [PATCH 08/13] added sudo pallet --- collator/src/chain_spec/md5.rs | 14 +++++++++++--- parachain-runtime/src/lib.rs | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/collator/src/chain_spec/md5.rs b/collator/src/chain_spec/md5.rs index a7193004..0e28c6f3 100644 --- a/collator/src/chain_spec/md5.rs +++ b/collator/src/chain_spec/md5.rs @@ -7,7 +7,7 @@ use super::{ }; use cumulus_primitives_core::ParaId; -use hashed_parachain_runtime::{AccountId, AuraId, CouncilConfig, EXISTENTIAL_DEPOSIT}; +use hashed_parachain_runtime::{AccountId, AuraId, Balance, CouncilConfig, SudoConfig, EXISTENTIAL_DEPOSIT, constants::DOLLARS}; /// Specialized `ChainSpec` for MD5 Network. pub type Md5ChainSpec = @@ -58,6 +58,8 @@ pub fn get_chain_spec() -> Md5ChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], + // 5HgAxuAcEybo448w5BZdoceCuHMAbEW9AetBKsj9s5GEBZT3 + hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), 4088.into(), ) }, @@ -76,8 +78,15 @@ pub fn get_chain_spec() -> Md5ChainSpec { fn md5_genesis( invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, + root_key: AccountId, id: ParaId, ) -> hashed_parachain_runtime::GenesisConfig { + + let num_endowed_accounts = endowed_accounts.len(); + + const ENDOWMENT: Balance = 10_000_000 * DOLLARS; + const STASH: Balance = ENDOWMENT / 1000; + hashed_parachain_runtime::GenesisConfig { system: hashed_parachain_runtime::SystemConfig { code: hashed_parachain_runtime::WASM_BINARY @@ -87,8 +96,7 @@ fn md5_genesis( balances: hashed_parachain_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, - // indices: Default::default(), - // membership: Default::default(), + sudo: SudoConfig { key: Some(root_key) }, treasury: Default::default(), council: CouncilConfig { members: vec![ diff --git a/parachain-runtime/src/lib.rs b/parachain-runtime/src/lib.rs index fc97c449..5b81be8b 100644 --- a/parachain-runtime/src/lib.rs +++ b/parachain-runtime/src/lib.rs @@ -1076,7 +1076,7 @@ construct_runtime!( Membership: pallet_membership::{Pallet, Call, Storage, Event} = 87, Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 88, Vesting: pallet_vesting::{Pallet, Call, Storage, Event} = 89, - Sudo: pallet_sudo::{Pallet, Call, Storage, Event} = 90, + Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 90, Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 91, Remark: pallet_remark::{Pallet, Call, Storage, Event} = 52, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 100, From 98896db2075d3b4b122297fb8a12dad443db8b71 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Fri, 9 Sep 2022 15:07:39 -0400 Subject: [PATCH 09/13] updates to chain spec and github action --- .github/workflows/check.yml | 12 ++-- collator/src/chain_spec/hashed.rs | 6 +- collator/src/chain_spec/luhn.rs | 115 ------------------------------ collator/src/chain_spec/md5.rs | 11 +-- collator/src/chain_spec/mod.rs | 7 +- collator/src/command.rs | 2 +- 6 files changed, 20 insertions(+), 133 deletions(-) delete mode 100644 collator/src/chain_spec/luhn.rs diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 219cfebc..c5dd17bc 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -4,9 +4,9 @@ name: Check Set-Up & Build on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ master ] + branches: [ master, develop ] pull_request: - branches: [ master ] + branches: [ master, develop ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -38,7 +38,7 @@ jobs: run: | SKIP_WASM_BUILD=1 cargo check --release - - name: Check Build for Benchmarking - run: > - pushd node && - cargo check --features=runtime-benchmarks --release + # - name: Check Build for Benchmarking + # run: > + # pushd node && + # cargo check --features=runtime-benchmarks --release diff --git a/collator/src/chain_spec/hashed.rs b/collator/src/chain_spec/hashed.rs index edd928f8..1b8cd53c 100644 --- a/collator/src/chain_spec/hashed.rs +++ b/collator/src/chain_spec/hashed.rs @@ -1,12 +1,13 @@ use sc_service::ChainType; use sp_core::sr25519; +use hex_literal::hex; use super::{ get_account_id_from_seed, get_collator_keys_from_seed, session_keys, SAFE_XCM_VERSION, Extensions, }; use cumulus_primitives_core::ParaId; -use hashed_parachain_runtime::{AccountId, AuraId, EXISTENTIAL_DEPOSIT}; +use hashed_parachain_runtime::{AccountId, AuraId, SudoConfig, EXISTENTIAL_DEPOSIT}; /// Specialized `ChainSpec` for Hashed Network pub type HashedChainSpec = @@ -53,6 +54,7 @@ pub fn get_chain_spec() -> HashedChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], + hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), 1000.into(), ) }, @@ -71,6 +73,7 @@ pub fn get_chain_spec() -> HashedChainSpec { fn hashed_genesis( invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, + root_key: AccountId, id: ParaId, ) -> hashed_parachain_runtime::GenesisConfig { hashed_parachain_runtime::GenesisConfig { @@ -82,6 +85,7 @@ fn hashed_genesis( balances: hashed_parachain_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, + sudo: SudoConfig { key: Some(root_key) }, council: Default::default(), treasury: Default::default(), parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, diff --git a/collator/src/chain_spec/luhn.rs b/collator/src/chain_spec/luhn.rs deleted file mode 100644 index ac3ebaec..00000000 --- a/collator/src/chain_spec/luhn.rs +++ /dev/null @@ -1,115 +0,0 @@ -use sc_service::ChainType; -use sp_core::sr25519; - -use super::{ - get_account_id_from_seed, get_collator_keys_from_seed, session_keys, SAFE_XCM_VERSION, Extensions, -}; - -use cumulus_primitives_core::ParaId; -use hashed_parachain_runtime::{AccountId, AuraId, EXISTENTIAL_DEPOSIT}; - -/// Specialized `ChainSpec` for Luhn Network -pub type LuhnChainSpec = - sc_service::GenericChainSpec; - -/// Gen LUHN chain specification -pub fn get_chain_spec() -> LuhnChainSpec { - - let mut properties = sc_chain_spec::Properties::new(); - properties.insert("tokenSymbol".into(), "LUHN".into()); - properties.insert("tokenDecimals".into(), 18.into()); - properties.insert("ss58Format".into(), 4000.into()); - - // REVIEW: this is where the Luhn genesis is customized, for now, - // it is just a duplicate of the development configuration - LuhnChainSpec::from_genesis( - "Luhn Network", - "luhn", - ChainType::Live, - move || { - luhn_genesis( - // initial collators. - vec![ - ( - get_account_id_from_seed::("Alice"), - get_collator_keys_from_seed("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_collator_keys_from_seed("Bob"), - ), - ], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - ], - 1000.into(), - ) - }, - Vec::new(), - None, - None, - None, - Some(properties), - Extensions { - relay_chain: "rococo-local".into(), // You MUST set this to the correct network! - para_id: 1000, - }, - ) -} - -fn luhn_genesis( - invulnerables: Vec<(AccountId, AuraId)>, - endowed_accounts: Vec, - id: ParaId, -) -> hashed_parachain_runtime::GenesisConfig { - hashed_parachain_runtime::GenesisConfig { - system: hashed_parachain_runtime::SystemConfig { - code: hashed_parachain_runtime::WASM_BINARY - .expect("WASM binary was not build, please build it!") - .to_vec(), - }, - balances: hashed_parachain_runtime::BalancesConfig { - balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), - }, - council: Default::default(), - treasury: Default::default(), - parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, - collator_selection: hashed_parachain_runtime::CollatorSelectionConfig { - invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), - candidacy_bond: EXISTENTIAL_DEPOSIT * 16, - ..Default::default() - }, - session: hashed_parachain_runtime::SessionConfig { - keys: invulnerables - .into_iter() - .map(|(acc, aura)| { - ( - acc.clone(), // account id - acc, // validator id - session_keys(aura), // session keys - ) - }) - .collect(), - }, - // no need to pass anything to aura, in fact it will panic if we do. Session will take care - // of this. - aura: Default::default(), - aura_ext: Default::default(), - parachain_system: Default::default(), - polkadot_xcm: hashed_parachain_runtime::PolkadotXcmConfig { - safe_xcm_version: Some(SAFE_XCM_VERSION), - }, - } -} - diff --git a/collator/src/chain_spec/md5.rs b/collator/src/chain_spec/md5.rs index 0e28c6f3..c89d2158 100644 --- a/collator/src/chain_spec/md5.rs +++ b/collator/src/chain_spec/md5.rs @@ -7,7 +7,7 @@ use super::{ }; use cumulus_primitives_core::ParaId; -use hashed_parachain_runtime::{AccountId, AuraId, Balance, CouncilConfig, SudoConfig, EXISTENTIAL_DEPOSIT, constants::DOLLARS}; +use hashed_parachain_runtime::{AccountId, AuraId, CouncilConfig, SudoConfig, EXISTENTIAL_DEPOSIT}; /// Specialized `ChainSpec` for MD5 Network. pub type Md5ChainSpec = @@ -82,11 +82,6 @@ fn md5_genesis( id: ParaId, ) -> hashed_parachain_runtime::GenesisConfig { - let num_endowed_accounts = endowed_accounts.len(); - - const ENDOWMENT: Balance = 10_000_000 * DOLLARS; - const STASH: Balance = ENDOWMENT / 1000; - hashed_parachain_runtime::GenesisConfig { system: hashed_parachain_runtime::SystemConfig { code: hashed_parachain_runtime::WASM_BINARY @@ -100,8 +95,8 @@ fn md5_genesis( treasury: Default::default(), council: CouncilConfig { members: vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), + hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), + hex!["4a70d789b0f0897e0880e8d3d532187ac77cbda04228cfadf8bededdd0b1005e"].into(), ], phantom: Default::default(), }, diff --git a/collator/src/chain_spec/mod.rs b/collator/src/chain_spec/mod.rs index 750384f3..98e026dc 100644 --- a/collator/src/chain_spec/mod.rs +++ b/collator/src/chain_spec/mod.rs @@ -2,13 +2,12 @@ use cumulus_primitives_core::ParaId; use serde::{Deserialize, Serialize}; use sp_core::{sr25519, Pair, Public}; -use hashed_parachain_runtime::{AccountId, AuraId, Signature, EXISTENTIAL_DEPOSIT}; +use hashed_parachain_runtime::{AccountId, AuraId, Signature, SudoConfig, EXISTENTIAL_DEPOSIT}; use sc_chain_spec::{ChainSpecExtension}; use sc_service::ChainType; use sp_runtime::traits::{IdentifyAccount, Verify}; pub mod hashed; -pub mod luhn; pub mod md5; /// Specialized `ChainSpec` for the normal parachain runtime. @@ -116,6 +115,7 @@ pub fn development_config() -> ChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], + get_account_id_from_seed::("Alice"), 1000.into(), ) }, @@ -171,6 +171,7 @@ pub fn local_testnet_config() -> ChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], + get_account_id_from_seed::("Alice"), 1000.into(), ) }, @@ -195,6 +196,7 @@ pub fn local_testnet_config() -> ChainSpec { fn testnet_genesis( invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, + root_key: AccountId, id: ParaId, ) -> hashed_parachain_runtime::GenesisConfig { hashed_parachain_runtime::GenesisConfig { @@ -206,6 +208,7 @@ fn testnet_genesis( balances: hashed_parachain_runtime::BalancesConfig { balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(), }, + sudo: SudoConfig { key: Some(root_key) }, council: Default::default(), treasury: Default::default(), parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, diff --git a/collator/src/command.rs b/collator/src/command.rs index 0996f968..727ff4d9 100644 --- a/collator/src/command.rs +++ b/collator/src/command.rs @@ -27,7 +27,7 @@ fn load_spec(id: &str) -> std::result::Result, String> { Ok(match id { "dev" => Box::new(chain_spec::development_config()), "hashed" => Box::new(chain_spec::hashed::get_chain_spec()), - "luhn" => Box::new(chain_spec::luhn::get_chain_spec()), + // "luhn" => Box::new(chain_spec::luhn::get_chain_spec()), "md5" => Box::new(chain_spec::md5::get_chain_spec()), "" | "local" => Box::new(chain_spec::local_testnet_config()), path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?), From fda175a2a6ff256e2408cbff5d4218f643a9a4b3 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Fri, 9 Sep 2022 15:53:23 -0400 Subject: [PATCH 10/13] coupled gated marketplaces back to fruniques, changed para_id, and increases MaxProposalsPerVault --- collator/src/chain_spec/md5.rs | 4 ++-- collator/src/chain_spec/mod.rs | 2 +- pallets/gated-marketplace/src/lib.rs | 2 +- parachain-runtime/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collator/src/chain_spec/md5.rs b/collator/src/chain_spec/md5.rs index c89d2158..ddbc9440 100644 --- a/collator/src/chain_spec/md5.rs +++ b/collator/src/chain_spec/md5.rs @@ -60,7 +60,7 @@ pub fn get_chain_spec() -> Md5ChainSpec { ], // 5HgAxuAcEybo448w5BZdoceCuHMAbEW9AetBKsj9s5GEBZT3 hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), - 4088.into(), + 2089.into(), ) }, Vec::new(), @@ -70,7 +70,7 @@ pub fn get_chain_spec() -> Md5ChainSpec { Some(properties), Extensions { relay_chain: "rococo".into(), // You MUST set this to the correct network! - para_id: 4088, + para_id: 2089, }, ) } diff --git a/collator/src/chain_spec/mod.rs b/collator/src/chain_spec/mod.rs index 98e026dc..c3f633cb 100644 --- a/collator/src/chain_spec/mod.rs +++ b/collator/src/chain_spec/mod.rs @@ -29,7 +29,7 @@ pub fn get_public_from_seed(seed: &str) -> = <::Currency as Currency<::AccountId>>::Balance; #[pallet::config] - pub trait Config: frame_system::Config + pallet_uniques::Config{ + pub trait Config: frame_system::Config + pallet_fruniques::Config{ type Event: From> + IsType<::Event>; diff --git a/parachain-runtime/src/lib.rs b/parachain-runtime/src/lib.rs index 5b81be8b..a8da2a5f 100644 --- a/parachain-runtime/src/lib.rs +++ b/parachain-runtime/src/lib.rs @@ -751,7 +751,7 @@ parameter_types! { pub const MaxCosignersPerVault: u32 = 7; pub const VaultDescriptionMaxLen: u32 = 200; pub const OutputDescriptorMaxLen: u32 = 2048; - pub const MaxProposalsPerVault: u32 = 5; + pub const MaxProposalsPerVault: u32 = 100; } impl pallet_bitcoin_vaults::Config for Runtime { From 09f373782a74c03a41dd15fe2e2329b84e3507fb Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Mon, 12 Sep 2022 10:56:21 -0400 Subject: [PATCH 11/13] updated genesis with team members --- collator/src/chain_spec/md5.rs | 56 ++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/collator/src/chain_spec/md5.rs b/collator/src/chain_spec/md5.rs index ddbc9440..d35d3d75 100644 --- a/collator/src/chain_spec/md5.rs +++ b/collator/src/chain_spec/md5.rs @@ -39,24 +39,47 @@ pub fn get_chain_spec() -> Md5ChainSpec { hex!["4a70d789b0f0897e0880e8d3d532187ac77cbda04228cfadf8bededdd0b1005e"].into(), hex!["4a70d789b0f0897e0880e8d3d532187ac77cbda04228cfadf8bededdd0b1005e"].unchecked_into(), ), + ( + // 5Dw5KkHeoh6umBurwqh4CHoXYBY6rpxtQampp8bFkuLgFz4L + hex!["52a6c480ff5cff0a2b889016e71de5fd8c3ab6d7d7220e543e8d0f8d60142517"].into(), + hex!["52a6c480ff5cff0a2b889016e71de5fd8c3ab6d7d7220e543e8d0f8d60142517"].unchecked_into(), + ), + ( + // 5GwwAKFomhgd4AHXZLUBVK3B792DvgQUnoHTtQNkwmt5h17k + hex!["d8033c4d04a502901d24a789da32940085c62eba881c4701a73411288445cc46"].into(), + hex!["d8033c4d04a502901d24a789da32940085c62eba881c4701a73411288445cc46"].unchecked_into(), + ), + ( + // 5DU84E1JYAhftyimxYd1MUaQ82GBKxNVFhDJSUSGU1ULpg1C + hex!["3e1856f529530d07ec86f8ba00d9ef6a05520e9317d8025c8380b94670f90022"].into(), + hex!["3e1856f529530d07ec86f8ba00d9ef6a05520e9317d8025c8380b94670f90022"].unchecked_into(), + ), + ( + // 5HBZ2CSDcRAjE6AKMKzuJ1w5c5iB6XaSn9h5eeAcGwcykKnz + hex!["e266243731bf69fff27133f3cbb8def28c6fd26d688d14fee34ab6950351aa0f"].into(), + hex!["e266243731bf69fff27133f3cbb8def28c6fd26d688d14fee34ab6950351aa0f"].unchecked_into(), + ), + ( + // 5Ft1pwMVeLRdRFiZNTtfxvnn1W8vPp71u215uoU4eDWixCok + hex!["a8c9ba30f906cb94594c4d884e708064d5e173f5ee84eca771166542cb74f06c"].into(), + hex!["a8c9ba30f906cb94594c4d884e708064d5e173f5ee84eca771166542cb74f06c"].unchecked_into(), + ), ], vec![ // 5HgAxuAcEybo448w5BZdoceCuHMAbEW9AetBKsj9s5GEBZT3 hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), // 5DkJvQp2gqHraWZU1BNCDxEKTQHezn2Qy7z5hLPksUdjtEG9 hex!["4a70d789b0f0897e0880e8d3d532187ac77cbda04228cfadf8bededdd0b1005e"].into(), - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), + // 5Dw5KkHeoh6umBurwqh4CHoXYBY6rpxtQampp8bFkuLgFz4L + hex!["52a6c480ff5cff0a2b889016e71de5fd8c3ab6d7d7220e543e8d0f8d60142517"].into(), + // 5GwwAKFomhgd4AHXZLUBVK3B792DvgQUnoHTtQNkwmt5h17k + hex!["d8033c4d04a502901d24a789da32940085c62eba881c4701a73411288445cc46"].into(), + // 5DU84E1JYAhftyimxYd1MUaQ82GBKxNVFhDJSUSGU1ULpg1C + hex!["3e1856f529530d07ec86f8ba00d9ef6a05520e9317d8025c8380b94670f90022"].into(), + // 5HBZ2CSDcRAjE6AKMKzuJ1w5c5iB6XaSn9h5eeAcGwcykKnz + hex!["e266243731bf69fff27133f3cbb8def28c6fd26d688d14fee34ab6950351aa0f"].into(), + // 5Ft1pwMVeLRdRFiZNTtfxvnn1W8vPp71u215uoU4eDWixCok + hex!["a8c9ba30f906cb94594c4d884e708064d5e173f5ee84eca771166542cb74f06c"].into(), ], // 5HgAxuAcEybo448w5BZdoceCuHMAbEW9AetBKsj9s5GEBZT3 hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), @@ -94,10 +117,11 @@ fn md5_genesis( sudo: SudoConfig { key: Some(root_key) }, treasury: Default::default(), council: CouncilConfig { - members: vec![ - hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), - hex!["4a70d789b0f0897e0880e8d3d532187ac77cbda04228cfadf8bededdd0b1005e"].into(), - ], + members: endowed_accounts, + // vec![ + // hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(), + // hex!["4a70d789b0f0897e0880e8d3d532187ac77cbda04228cfadf8bededdd0b1005e"].into(), + // ], phantom: Default::default(), }, parachain_info: hashed_parachain_runtime::ParachainInfoConfig { parachain_id: id }, From b058cf06e68e6a053cf1924b5efee489486b6fa5 Mon Sep 17 00:00:00 2001 From: amatsonkali Date: Mon, 12 Sep 2022 16:18:40 -0500 Subject: [PATCH 12/13] Adds collator dockerfile for zombienet --- collator.Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 collator.Dockerfile diff --git a/collator.Dockerfile b/collator.Dockerfile new file mode 100644 index 00000000..45292be9 --- /dev/null +++ b/collator.Dockerfile @@ -0,0 +1,21 @@ +FROM paritytech/ci-linux:production + +WORKDIR /var/www +# TODO: have this dockerfile pull the hashed-substrate repo +COPY . ./hashed-substrate + +WORKDIR /var/www/hashed-substrate +# this dir doesnt exists but zombienet script tries to create a file within +RUN mkdir /cfg + +RUN cargo build --release + +EXPOSE 30333 40333 9933 9944 9946 + +# add binary to docker image +RUN mv /var/www/hashed-substrate/target/release/hashed-parachain /usr/local/bin + +# check if executable works in this container +RUN /usr/local/bin/hashed-parachain --version + +ENTRYPOINT [ "hashed-parachain" ] \ No newline at end of file From e6591a74f80b10f7a15c4870a7e6037790ff8a36 Mon Sep 17 00:00:00 2001 From: Max Gravitt Date: Tue, 13 Sep 2022 10:28:11 -0400 Subject: [PATCH 13/13] added additional genesis accounts --- collator/src/chain_spec/md5.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/collator/src/chain_spec/md5.rs b/collator/src/chain_spec/md5.rs index d35d3d75..4638522d 100644 --- a/collator/src/chain_spec/md5.rs +++ b/collator/src/chain_spec/md5.rs @@ -1,9 +1,9 @@ use sc_service::ChainType; -use sp_core::{crypto::UncheckedInto, sr25519}; +use sp_core::{crypto::UncheckedInto}; use hex_literal::hex; use super::{ - get_account_id_from_seed, session_keys, SAFE_XCM_VERSION, Extensions, + session_keys, SAFE_XCM_VERSION, Extensions, }; use cumulus_primitives_core::ParaId; @@ -64,6 +64,16 @@ pub fn get_chain_spec() -> Md5ChainSpec { hex!["a8c9ba30f906cb94594c4d884e708064d5e173f5ee84eca771166542cb74f06c"].into(), hex!["a8c9ba30f906cb94594c4d884e708064d5e173f5ee84eca771166542cb74f06c"].unchecked_into(), ), + ( + // 5HGzzBkFVArUvCgRp7KAhHa71xBnRqdYxXaGi61EVutvvaS1 + hex!["e68dc6889d7541a5b5bcd6925b8e4a89ebb9ae27b0b1266ec4205a902538883e"].into(), + hex!["e68dc6889d7541a5b5bcd6925b8e4a89ebb9ae27b0b1266ec4205a902538883e"].unchecked_into(), + ), + ( + // 5CmFmVadzNQFaeiyXXNugRXT1MuaoocUyogtYHEQeWjGp7pX + hex!["1eed3cc6fde968d5fe9c64c12241a5178577e07c707065026f476e868df0264b"].into(), + hex!["1eed3cc6fde968d5fe9c64c12241a5178577e07c707065026f476e868df0264b"].unchecked_into(), + ), ], vec![ // 5HgAxuAcEybo448w5BZdoceCuHMAbEW9AetBKsj9s5GEBZT3 @@ -80,6 +90,10 @@ pub fn get_chain_spec() -> Md5ChainSpec { hex!["e266243731bf69fff27133f3cbb8def28c6fd26d688d14fee34ab6950351aa0f"].into(), // 5Ft1pwMVeLRdRFiZNTtfxvnn1W8vPp71u215uoU4eDWixCok hex!["a8c9ba30f906cb94594c4d884e708064d5e173f5ee84eca771166542cb74f06c"].into(), + // 5HGzzBkFVArUvCgRp7KAhHa71xBnRqdYxXaGi61EVutvvaS1 + hex!["e68dc6889d7541a5b5bcd6925b8e4a89ebb9ae27b0b1266ec4205a902538883e"].into(), + // 5CmFmVadzNQFaeiyXXNugRXT1MuaoocUyogtYHEQeWjGp7pX + hex!["1eed3cc6fde968d5fe9c64c12241a5178577e07c707065026f476e868df0264b"].into(), ], // 5HgAxuAcEybo448w5BZdoceCuHMAbEW9AetBKsj9s5GEBZT3 hex!["f83a0218e100ce3ede12c5d403116ef034124c62b181fff6935403cea9396d2f"].into(),