difftreelog
feat(CollatorSelection) inclusion + migration + genesis
in: master
10 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -108,9 +108,9 @@
[[package]]
name = "anyhow"
-version = "1.0.61"
+version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8"
+checksum = "1485d4d2cc45e7b201ee3767015c96faa5904387c9d87c6efdd0fb511f12d305"
[[package]]
name = "approx"
@@ -213,10 +213,11 @@
[[package]]
name = "async-io"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07"
+checksum = "0ab006897723d9352f63e2b13047177c3982d8d79709d713ce7747a8f19fd1b0"
dependencies = [
+ "autocfg",
"concurrent-queue",
"futures-lite",
"libc",
@@ -241,11 +242,12 @@
[[package]]
name = "async-process"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c"
+checksum = "02111fd8655a613c25069ea89fc8d9bb89331fa77486eb3bc059ee757cfa481c"
dependencies = [
"async-io",
+ "autocfg",
"blocking",
"cfg-if 1.0.0",
"event-listener",
@@ -717,9 +719,9 @@
[[package]]
name = "bumpalo"
-version = "3.10.0"
+version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3"
+checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d"
[[package]]
name = "byte-slice-cast"
@@ -1045,9 +1047,9 @@
[[package]]
name = "cpufeatures"
-version = "0.2.2"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
+checksum = "dc948ebb96241bb40ab73effeb80d9f93afaad49359d159a5e61be51619fe813"
dependencies = [
"libc",
]
@@ -2021,9 +2023,9 @@
[[package]]
name = "either"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be"
+checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]]
name = "elliptic-curve"
@@ -2345,7 +2347,7 @@
[[package]]
name = "fc-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"async-trait",
"fc-db",
@@ -2364,7 +2366,7 @@
[[package]]
name = "fc-db"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"fp-storage",
"kvdb-rocksdb",
@@ -2380,7 +2382,7 @@
[[package]]
name = "fc-mapping-sync"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"fc-db",
"fp-consensus",
@@ -2397,7 +2399,7 @@
[[package]]
name = "fc-rpc"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2437,7 +2439,7 @@
[[package]]
name = "fc-rpc-core"
version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2578,7 +2580,7 @@
[[package]]
name = "fp-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"ethereum",
"parity-scale-codec 3.1.5",
@@ -2590,7 +2592,7 @@
[[package]]
name = "fp-evm"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"evm",
"frame-support",
@@ -2604,7 +2606,7 @@
[[package]]
name = "fp-evm-mapping"
version = "0.1.0"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"frame-support",
"sp-core",
@@ -2613,7 +2615,7 @@
[[package]]
name = "fp-rpc"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2630,7 +2632,7 @@
[[package]]
name = "fp-self-contained"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"ethereum",
"frame-support",
@@ -2646,7 +2648,7 @@
[[package]]
name = "fp-storage"
version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"parity-scale-codec 3.1.5",
]
@@ -2897,9 +2899,9 @@
[[package]]
name = "fs-err"
-version = "2.7.0"
+version = "2.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bd79fa345a495d3ae89fb7165fec01c0e72f41821d642dda363a1e97975652e"
+checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50"
[[package]]
name = "fs-swap"
@@ -3197,9 +3199,9 @@
[[package]]
name = "h2"
-version = "0.3.13"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
+checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be"
dependencies = [
"bytes",
"fnv",
@@ -3417,9 +3419,9 @@
[[package]]
name = "iana-time-zone"
-version = "0.1.45"
+version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef5528d9c2817db4e10cc78f8d4c8228906e5854f389ff6b076cee3572a09d35"
+checksum = "ad2bfd338099682614d3ee3fe0cd72e0b6a41ca6a87f6a74a3bd593c91650501"
dependencies = [
"android_system_properties",
"core-foundation-sys",
@@ -3554,9 +3556,9 @@
[[package]]
name = "io-lifetimes"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24c3f4eff5495aee4c0399d7b6a0dc2b6e81be84242ffbfcf253ebacccc1d0cb"
+checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06"
[[package]]
name = "ip_network"
@@ -3936,9 +3938,9 @@
[[package]]
name = "libc"
-version = "0.2.131"
+version = "0.2.132"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04c3b4822ccebfa39c02fc03d1534441b22ead323fa0f48bb7ddd8e6ba076a40"
+checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
[[package]]
name = "libloading"
@@ -5160,9 +5162,9 @@
[[package]]
name = "once_cell"
-version = "1.13.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
+checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"
[[package]]
name = "opal-runtime"
@@ -5192,8 +5194,10 @@
"log",
"orml-vesting",
"pallet-aura",
+ "pallet-authorship",
"pallet-balances",
"pallet-base-fee",
+ "pallet-collator-selection",
"pallet-common",
"pallet-configuration",
"pallet-ethereum",
@@ -5209,6 +5213,7 @@
"pallet-refungible",
"pallet-rmrk-core",
"pallet-rmrk-equip",
+ "pallet-session",
"pallet-structure",
"pallet-sudo",
"pallet-template-transaction-payment",
@@ -5445,7 +5450,7 @@
[[package]]
name = "pallet-base-fee"
version = "1.0.0"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"fp-evm",
"frame-support",
@@ -5534,6 +5539,26 @@
]
[[package]]
+name = "pallet-collator-selection"
+version = "3.0.0"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.27#66b684f88eba6c755651b8c47dccad2c2d9ac3db"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "log",
+ "pallet-authorship",
+ "pallet-session",
+ "parity-scale-codec 3.1.5",
+ "rand 0.8.5",
+ "scale-info",
+ "serde",
+ "sp-runtime",
+ "sp-staking",
+ "sp-std",
+]
+
+[[package]]
name = "pallet-collective"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.27#8eff668a42325aeb4433eace1604f4d286a6ec05"
@@ -5660,7 +5685,7 @@
[[package]]
name = "pallet-ethereum"
version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"ethereum",
"ethereum-types",
@@ -5689,7 +5714,7 @@
[[package]]
name = "pallet-evm"
version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#64915c0986fcf2bbe942794b838c0cf359c93c21"
+source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.27#69945f20e8dc06ab9e0dd636848a8db6a408c71c"
dependencies = [
"evm",
"fp-evm",
@@ -6806,9 +6831,9 @@
[[package]]
name = "pest"
-version = "2.2.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69486e2b8c2d2aeb9762db7b4e00b0331156393555cff467f4163ff06821eef8"
+checksum = "4b0560d531d1febc25a3c9398a62a71256c0178f2e3443baedd9ad4bb8c9deb4"
dependencies = [
"thiserror",
"ucd-trie",
@@ -6816,9 +6841,9 @@
[[package]]
name = "pest_derive"
-version = "2.2.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b13570633aff33c6d22ce47dd566b10a3b9122c2fe9d8e7501895905be532b91"
+checksum = "905708f7f674518498c1f8d644481440f476d39ca6ecae83319bba7c6c12da91"
dependencies = [
"pest",
"pest_generator",
@@ -6826,9 +6851,9 @@
[[package]]
name = "pest_generator"
-version = "2.2.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3c567e5702efdc79fb18859ea74c3eb36e14c43da7b8c1f098a4ed6514ec7a0"
+checksum = "5803d8284a629cc999094ecd630f55e91b561a1d1ba75e233b00ae13b91a69ad"
dependencies = [
"pest",
"pest_meta",
@@ -6839,9 +6864,9 @@
[[package]]
name = "pest_meta"
-version = "2.2.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5eb32be5ee3bbdafa8c7a18b0a8a8d962b66cfa2ceee4037f49267a50ee821fe"
+checksum = "1538eb784f07615c6d9a8ab061089c6c54a344c5b4301db51990ca1c241e8c04"
dependencies = [
"once_cell",
"pest",
@@ -8142,10 +8167,11 @@
[[package]]
name = "polling"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259"
+checksum = "899b00b9c8ab553c743b3e11e87c5c7d423b2a2de229ba95b24a756344748011"
dependencies = [
+ "autocfg",
"cfg-if 1.0.0",
"libc",
"log",
@@ -8397,8 +8423,10 @@
"log",
"orml-vesting",
"pallet-aura",
+ "pallet-authorship",
"pallet-balances",
"pallet-base-fee",
+ "pallet-collator-selection",
"pallet-common",
"pallet-configuration",
"pallet-ethereum",
@@ -8414,6 +8442,7 @@
"pallet-refungible",
"pallet-rmrk-core",
"pallet-rmrk-equip",
+ "pallet-session",
"pallet-structure",
"pallet-sudo",
"pallet-template-transaction-payment",
@@ -9004,13 +9033,13 @@
[[package]]
name = "rustix"
-version = "0.35.7"
+version = "0.35.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d51cc38aa10f6bbb377ed28197aa052aa4e2b762c22be9d3153d01822587e787"
+checksum = "72c825b8aa8010eb9ee99b75f05e10180b9278d161583034d7574c9d617aeada"
dependencies = [
"bitflags",
"errno",
- "io-lifetimes 0.7.2",
+ "io-lifetimes 0.7.3",
"libc",
"linux-raw-sys 0.0.46",
"windows-sys",
@@ -9567,7 +9596,7 @@
"once_cell",
"parity-scale-codec 3.1.5",
"parity-wasm 0.42.2",
- "rustix 0.35.7",
+ "rustix 0.35.9",
"sc-allocator",
"sc-executor-common",
"sp-runtime-interface",
@@ -10260,9 +10289,9 @@
[[package]]
name = "security-framework"
-version = "2.6.1"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc"
+checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c"
dependencies = [
"bitflags",
"core-foundation",
@@ -10316,18 +10345,18 @@
[[package]]
name = "serde"
-version = "1.0.143"
+version = "1.0.144"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553"
+checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.143"
+version = "1.0.144"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391"
+checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00"
dependencies = [
"proc-macro2",
"quote",
@@ -10336,9 +10365,9 @@
[[package]]
name = "serde_json"
-version = "1.0.83"
+version = "1.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7"
+checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
dependencies = [
"itoa 1.0.3",
"ryu",
@@ -11306,9 +11335,9 @@
[[package]]
name = "ss58-registry"
-version = "1.25.0"
+version = "1.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a039906277e0d8db996cd9d1ef19278c10209d994ecfc1025ced16342873a17c"
+checksum = "1c8a1e645fa0bd3e81a90e592a677f7ada3182ac338c4a71cd9ec0ba911f6abb"
dependencies = [
"Inflector",
"num-format",
@@ -12386,8 +12415,10 @@
"log",
"orml-vesting",
"pallet-aura",
+ "pallet-authorship",
"pallet-balances",
"pallet-base-fee",
+ "pallet-collator-selection",
"pallet-common",
"pallet-configuration",
"pallet-ethereum",
@@ -12403,6 +12434,7 @@
"pallet-refungible",
"pallet-rmrk-core",
"pallet-rmrk-equip",
+ "pallet-session",
"pallet-structure",
"pallet-sudo",
"pallet-template-transaction-payment",
@@ -12473,7 +12505,7 @@
[[package]]
name = "up-common"
-version = "0.9.25"
+version = "0.9.27"
dependencies = [
"fp-rpc",
"frame-support",
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -24,6 +24,7 @@
use serde_json::map::Map;
use up_common::types::opaque::*;
+use up_common::constants::EXISTENTIAL_DEPOSIT;
#[cfg(feature = "unique-runtime")]
pub use unique_runtime as default_runtime;
@@ -146,7 +147,7 @@
(
$runtime:path,
$root_key:expr,
- $initial_authorities:expr,
+ $initial_invulnerables:expr,
$endowed_accounts:expr,
$id:expr
) => {{
@@ -175,9 +176,31 @@
parachain_id: $id.into(),
},
parachain_system: Default::default(),
- aura: AuraConfig {
- authorities: $initial_authorities,
+ collator_selection: CollatorSelectionConfig {
+ invulnerables: $initial_invulnerables
+ .iter()
+ .cloned()
+ .map(|(acc, _)| acc)
+ .collect(),
+ candidacy_bond: EXISTENTIAL_DEPOSIT * 16,
+ ..Default::default()
+ },
+ session: SessionConfig {
+ keys: $initial_invulnerables
+ .into_iter()
+ .map(|(acc, aura)| {
+ (
+ acc.clone(), // account id
+ acc, // validator id
+ SessionKeys { aura }, // session keys
+ )
+ })
+ .collect(),
},
+ aura: Default::default(),
+ /*aura: AuraConfig {
+ authorities: $initial_authorities,
+ },*/
aura_ext: Default::default(),
evm: EVMConfig {
accounts: BTreeMap::new(),
@@ -217,8 +240,14 @@
// Sudo account
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
- get_from_seed::<AuraId>("Alice"),
- get_from_seed::<AuraId>("Bob"),
+ (
+ get_account_id_from_seed::<sr25519::Public>("Alice"),
+ get_from_seed::<AuraId>("Alice"),
+ ),
+ (
+ get_account_id_from_seed::<sr25519::Public>("Bob"),
+ get_from_seed::<AuraId>("Bob"),
+ ),
],
// Pre-funded accounts
vec![
@@ -285,8 +314,14 @@
// Sudo account
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
- get_from_seed::<AuraId>("Alice"),
- get_from_seed::<AuraId>("Bob"),
+ (
+ get_account_id_from_seed::<sr25519::Public>("Alice"),
+ get_from_seed::<AuraId>("Alice"),
+ ),
+ (
+ get_account_id_from_seed::<sr25519::Public>("Bob"),
+ get_from_seed::<AuraId>("Bob"),
+ ),
],
// Pre-funded accounts
vec![
primitives/common/src/constants.rsdiffbeforeafterboth--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -35,6 +35,8 @@
pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;
pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
+pub const EXISTENTIAL_DEPOSIT: u128 = 0;
+
// Targeting 0.1 UNQ per transfer
pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_163_598/*</weight2fee>*/;
runtime/common/config/substrate.rsdiffbeforeafterboth--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -33,8 +33,9 @@
};
use crate::{
runtime_common::DealWithFees, Runtime, Event, Call, Origin, PalletInfo, System, Balances,
- Treasury, SS58Prefix, Version,
+ Treasury, SS58Prefix, Aura, Session, SessionKeys, CollatorSelection, Version,
};
+use xcm::v1::BodyId;
use up_common::{types::*, constants::*};
parameter_types! {
@@ -128,7 +129,7 @@
parameter_types! {
// pub const ExistentialDeposit: u128 = 500;
- pub const ExistentialDeposit: u128 = 0;
+ pub const ExistentialDeposit: u128 = EXISTENTIAL_DEPOSIT;
pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
}
@@ -215,3 +216,62 @@
type DisabledValidators = ();
type MaxAuthorities = MaxAuthorities;
}
+
+parameter_types! {
+ pub const Period: u32 = 6 * HOURS;
+ pub const Offset: u32 = 0;
+ //pub const MaxAuthorities: u32 = 100_000;
+}
+
+impl pallet_session::Config for Runtime {
+ type Event = Event;
+ type ValidatorId = <Self as frame_system::Config>::AccountId;
+ // we don't have stash and controller, thus we don't need the convert as well.
+ type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
+ type ShouldEndSession = pallet_session::PeriodicSessions<Period, Offset>;
+ type NextSessionRotation = pallet_session::PeriodicSessions<Period, Offset>;
+ type SessionManager = CollatorSelection;
+ // Essentially just Aura, but lets be pedantic.
+ type SessionHandler = <SessionKeys as sp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
+ type Keys = SessionKeys;
+ type WeightInfo = ();
+}
+
+parameter_types! {
+ pub const UncleGenerations: u32 = 0;
+}
+
+impl pallet_authorship::Config for Runtime {
+ type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
+ type UncleGenerations = UncleGenerations;
+ type FilterUncle = ();
+ type EventHandler = (CollatorSelection,);
+}
+
+parameter_types! {
+ pub const PotId: PalletId = PalletId(*b"PotStake");
+ pub const MaxCandidates: u32 = 1000;
+ pub const MinCandidates: u32 = 5;
+ pub const SessionLength: BlockNumber = 6 * HOURS;
+ pub const MaxInvulnerables: u32 = 100;
+ pub const ExecutiveBody: BodyId = BodyId::Executive;
+}
+
+// We allow root only to execute privileged collator selection operations.
+pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
+
+impl pallet_collator_selection::Config for Runtime {
+ type Event = Event;
+ type Currency = Balances;
+ type UpdateOrigin = CollatorSelectionUpdateOrigin;
+ type PotId = PotId;
+ type MaxCandidates = MaxCandidates;
+ type MinCandidates = MinCandidates;
+ type MaxInvulnerables = MaxInvulnerables;
+ // should be a multiple of session or things will get inconsistent
+ type KickThreshold = Period;
+ type ValidatorId = <Self as frame_system::Config>::AccountId;
+ type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
+ type ValidatorRegistration = Session;
+ type WeightInfo = ();
+}
runtime/common/construct_runtime/mod.rsdiffbeforeafterboth--- a/runtime/common/construct_runtime/mod.rs
+++ b/runtime/common/construct_runtime/mod.rs
@@ -32,8 +32,11 @@
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,
- Aura: pallet_aura::{Pallet, Config<T>} = 22,
- AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 23,
+ Authorship: pallet_authorship::{Pallet, Call, Storage} = 22,
+ CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 23,
+ Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 24,
+ Aura: pallet_aura::{Pallet, Config<T>} = 25,
+ AuraExt: cumulus_pallet_aura_ext::{Pallet, Config} = 26,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,
runtime/common/mod.rsdiffbeforeafterboth--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -25,7 +25,10 @@
pub mod weights;
use sp_core::H160;
-use frame_support::traits::{Currency, OnUnbalanced, Imbalance};
+use frame_support::{
+ traits::{Currency, OnUnbalanced, Imbalance},
+ weights::Weight,
+};
use sp_runtime::{
generic,
traits::{BlakeTwo256, BlockNumberProvider},
@@ -103,6 +106,7 @@
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsReversedWithSystemFirst,
+ AuraToCollatorSelection,
>;
type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;
@@ -165,3 +169,158 @@
/// Transfer tokens to the given account from the Parachain account.
TransferToken(XAccountId, XBalance),
}
+
+pub struct AuraToCollatorSelection;
+impl frame_support::traits::OnRuntimeUpgrade for AuraToCollatorSelection {
+ fn on_runtime_upgrade() -> Weight {
+ use frame_support::{BoundedVec, storage::migration};
+ use sp_runtime::{
+ traits::{OpaqueKeys, Saturating},
+ RuntimeAppPublic,
+ };
+ use pallet_session::SessionManager;
+ use up_common::constants::EXISTENTIAL_DEPOSIT;
+ use crate::config::substrate::MaxInvulnerables;
+
+ let mut weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);
+
+ let version =
+ migration::get_storage_value::<()>(b"AuraToCollatorSelection", b"StorageVersion", &[]);
+
+ let should_upgrade = match version {
+ None => true,
+ Some(_) => false,
+ };
+
+ if should_upgrade {
+ log::info!(
+ target: "runtime::aura_to_collator_selection",
+ "Running migration of Aura authorities to Collator Selection invulnerables"
+ );
+
+ let invulnerables = pallet_aura::Pallet::<Runtime>::authorities()
+ .iter()
+ .cloned()
+ .filter_map(|authority_id| {
+ weight.saturating_accrue(<Runtime as frame_system::Config>::DbWeight::get().reads_writes(1, 1));
+ let vec = authority_id.clone().to_raw_vec();
+ let slice = vec.as_slice();
+ let array: Option<[u8; 32]> = match slice.try_into() {
+ Ok(a) => Some(a),
+ Err(_) => {
+ log::error!("Failed to convert an Aura authority to a Collator Selection invulnerable: {:?}", authority_id);
+ None
+ },
+ };
+ array.map(|a| (AccountId::from(a), authority_id))
+ })
+ .collect::<Vec<_>>();
+
+ let bounded_invulnerables = BoundedVec::<_, MaxInvulnerables>::try_from(
+ invulnerables
+ .iter()
+ .cloned()
+ .map(|(acc, _)| acc)
+ .collect::<Vec<_>>(),
+ )
+ .expect("Existing collators/invulnerables are more than MaxInvulnerables");
+
+ <pallet_collator_selection::Invulnerables<Runtime>>::put(bounded_invulnerables);
+ <pallet_collator_selection::DesiredCandidates<Runtime>>::put(0);
+ <pallet_collator_selection::CandidacyBond<Runtime>>::put(EXISTENTIAL_DEPOSIT * 16);
+
+ let keys = invulnerables
+ .into_iter()
+ .map(|(acc, aura)| {
+ (
+ acc.clone(), // account id
+ acc, // validator id
+ SessionKeys { aura: aura.clone() }, // session keys
+ )
+ })
+ .collect::<Vec<_>>();
+
+ for (account, val, keys) in keys.iter().cloned() {
+ for id in <Runtime as pallet_session::Config>::Keys::key_ids() {
+ <pallet_session::KeyOwner<Runtime>>::insert((*id, keys.get_raw(*id)), &val)
+ }
+ <pallet_session::NextKeys<Runtime>>::insert(&val, &keys);
+ // todo exercise caution, the following is taken from genesis
+ if frame_system::Pallet::<Runtime>::inc_consumers_without_limit(&account).is_err() {
+ log::warn!(
+ "We have entered an error with incrementing consumers without limit"
+ );
+ // This will leak a provider reference, however it only happens once (at
+ // genesis) so it's really not a big deal and we assume that the user wants to
+ // do this since it's the only way a non-endowed account can contain a session
+ // key.
+ frame_system::Pallet::<Runtime>::inc_providers(&account);
+ }
+ }
+
+ let initial_validators_0 =
+ <Runtime as pallet_session::Config>::SessionManager::new_session(0).unwrap_or_else(
+ || {
+ frame_support::print(
+ "No initial validator provided by `SessionManager`, use \
+ session config keys to generate initial validator set.",
+ );
+ keys.iter().map(|x| x.1.clone()).collect()
+ },
+ );
+ /*assert!(
+ !initial_validators_0.is_empty(),
+ "Empty validator set for session 0 in (pseudo) genesis block!"
+ );*/
+
+ let initial_validators_1 =
+ <Runtime as pallet_session::Config>::SessionManager::new_session(1)
+ .unwrap_or_else(|| initial_validators_0.clone());
+ /*assert!(
+ !initial_validators_1.is_empty(),
+ "Empty validator set for session 1 in (pseudo) genesis block!"
+ );*/
+
+ let queued_keys: Vec<_> = initial_validators_1
+ .iter()
+ .cloned()
+ .map(|v| {
+ (
+ v.clone(),
+ <pallet_session::NextKeys<Runtime>>::get(&v)
+ .expect("Validator in session 1 missing keys!"),
+ )
+ })
+ .collect();
+
+ // Tell everyone about the genesis session keys -- Aura must've already initialized it
+ //<Runtime as pallet_session::Config>::SessionHandler::on_genesis_session::<<Runtime as pallet_session::Config>::Keys>(&queued_keys);
+
+ <pallet_session::Validators<Runtime>>::put(initial_validators_0);
+ <pallet_session::QueuedKeys<Runtime>>::put(queued_keys);
+
+ <Runtime as pallet_session::Config>::SessionManager::start_session(0);
+
+ log::info!(
+ target: "runtime::aura_to_collator_selection",
+ "Migration of Aura authorities to Collator Selection invulnerables is complete."
+ );
+
+ migration::put_storage_value::<()>(
+ b"AuraToCollatorSelection",
+ b"StorageVersion",
+ &[],
+ (),
+ );
+
+ weight += <Runtime as frame_system::Config>::DbWeight::get().writes(1)
+ } else {
+ log::info!(
+ target: "runtime::aura_to_collator_selection",
+ "The storage migration has already been flagged as complete. No migration needs to be done.",
+ );
+ }
+
+ weight
+ }
+}
runtime/opal/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = "0.9.27"1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'opal-runtime']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-ethereum/runtime-benchmarks',27 'pallet-evm-migration/runtime-benchmarks',28 'pallet-evm-coder-substrate/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 'pallet-timestamp/runtime-benchmarks',31 'pallet-common/runtime-benchmarks',32 'pallet-structure/runtime-benchmarks',33 'pallet-fungible/runtime-benchmarks',34 'pallet-refungible/runtime-benchmarks',35 'pallet-nonfungible/runtime-benchmarks',36 'pallet-proxy-rmrk-core/runtime-benchmarks',37 'pallet-proxy-rmrk-equip/runtime-benchmarks',38 'pallet-unique/runtime-benchmarks',39 'pallet-inflation/runtime-benchmarks',40 'pallet-unique-scheduler/runtime-benchmarks',41 'pallet-xcm/runtime-benchmarks',42 'sp-runtime/runtime-benchmarks',43 'xcm-builder/runtime-benchmarks',44]45try-runtime = [46 'frame-try-runtime',47 'frame-executive/try-runtime',48 'frame-system/try-runtime',49]50std = [51 'codec/std',52 'cumulus-pallet-aura-ext/std',53 'cumulus-pallet-parachain-system/std',54 'cumulus-pallet-xcm/std',55 'cumulus-pallet-xcmp-queue/std',56 'cumulus-primitives-core/std',57 'cumulus-primitives-utility/std',58 'frame-try-runtime/std',59 'frame-executive/std',60 'frame-support/std',61 'frame-system/std',62 'frame-system-rpc-runtime-api/std',63 'pallet-aura/std',64 'pallet-balances/std',65 # 'pallet-contracts/std',66 # 'pallet-contracts-primitives/std',67 # 'pallet-contracts-rpc-runtime-api/std',68 # 'pallet-contract-helpers/std',69 'pallet-randomness-collective-flip/std',70 'pallet-sudo/std',71 'pallet-timestamp/std',72 'pallet-transaction-payment/std',73 'pallet-transaction-payment-rpc-runtime-api/std',74 'pallet-treasury/std',75 # 'pallet-vesting/std',76 'pallet-evm/std',77 'pallet-evm-migration/std',78 'pallet-evm-contract-helpers/std',79 'pallet-evm-transaction-payment/std',80 'pallet-evm-coder-substrate/std',81 'pallet-ethereum/std',82 'pallet-base-fee/std',83 'fp-rpc/std',84 'up-rpc/std',85 'fp-evm-mapping/std',86 'fp-self-contained/std',87 'parachain-info/std',88 'serde',89 'pallet-inflation/std',90 'pallet-configuration/std',91 'pallet-common/std',92 'pallet-structure/std',93 'pallet-fungible/std',94 'pallet-refungible/std',95 'pallet-nonfungible/std',96 'pallet-proxy-rmrk-core/std',97 'pallet-proxy-rmrk-equip/std',98 'pallet-unique/std',99 'pallet-unique-scheduler/std',100 'pallet-charge-transaction/std',101 'up-data-structs/std',102 'sp-api/std',103 'sp-block-builder/std',104 "sp-consensus-aura/std",105 'sp-core/std',106 'sp-inherents/std',107 'sp-io/std',108 'sp-offchain/std',109 'sp-runtime/std',110 'sp-session/std',111 'sp-std/std',112 'sp-transaction-pool/std',113 'sp-version/std',114 'xcm/std',115 'xcm-builder/std',116 'xcm-executor/std',117 'up-common/std',118 'rmrk-rpc/std',119 'evm-coder/std',120 'up-sponsorship/std',121122 "orml-vesting/std",123]124limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']125opal-runtime = ['refungible', 'scheduler', 'rmrk']126127refungible = []128scheduler = []129rmrk = []130131################################################################################132# Substrate Dependencies133134[dependencies.codec]135default-features = false136features = ['derive']137package = 'parity-scale-codec'138version = '3.1.2'139140[dependencies.frame-benchmarking]141default-features = false142git = "https://github.com/paritytech/substrate"143optional = true144branch = "polkadot-v0.9.27"145146[dependencies.frame-try-runtime]147default-features = false148git = "https://github.com/paritytech/substrate"149optional = true150branch = "polkadot-v0.9.27"151152[dependencies.frame-executive]153default-features = false154git = "https://github.com/paritytech/substrate"155branch = "polkadot-v0.9.27"156157[dependencies.frame-support]158default-features = false159git = "https://github.com/paritytech/substrate"160branch = "polkadot-v0.9.27"161162[dependencies.frame-system]163default-features = false164git = "https://github.com/paritytech/substrate"165branch = "polkadot-v0.9.27"166167[dependencies.frame-system-benchmarking]168default-features = false169git = "https://github.com/paritytech/substrate"170optional = true171branch = "polkadot-v0.9.27"172173[dependencies.frame-system-rpc-runtime-api]174default-features = false175git = "https://github.com/paritytech/substrate"176branch = "polkadot-v0.9.27"177178[dependencies.hex-literal]179optional = true180version = '0.3.3'181182[dependencies.serde]183default-features = false184features = ['derive']185optional = true186version = '1.0.130'187188[dependencies.pallet-aura]189default-features = false190git = "https://github.com/paritytech/substrate"191branch = "polkadot-v0.9.27"192193[dependencies.pallet-balances]194default-features = false195git = "https://github.com/paritytech/substrate"196branch = "polkadot-v0.9.27"197198# Contracts specific packages199# [dependencies.pallet-contracts]200# git = 'https://github.com/paritytech/substrate'201# default-features = false202# branch = 'master'203# version = '4.0.0-dev'204205# [dependencies.pallet-contracts-primitives]206# git = 'https://github.com/paritytech/substrate'207# default-features = false208# branch = 'master'209# version = '4.0.0-dev'210211# [dependencies.pallet-contracts-rpc-runtime-api]212# git = 'https://github.com/paritytech/substrate'213# default-features = false214# branch = 'master'215# version = '4.0.0-dev'216217[dependencies.pallet-randomness-collective-flip]218default-features = false219git = "https://github.com/paritytech/substrate"220branch = "polkadot-v0.9.27"221222[dependencies.pallet-sudo]223default-features = false224git = "https://github.com/paritytech/substrate"225branch = "polkadot-v0.9.27"226227[dependencies.pallet-timestamp]228default-features = false229git = "https://github.com/paritytech/substrate"230branch = "polkadot-v0.9.27"231232[dependencies.pallet-transaction-payment]233default-features = false234git = "https://github.com/paritytech/substrate"235branch = "polkadot-v0.9.27"236237[dependencies.pallet-transaction-payment-rpc-runtime-api]238default-features = false239git = "https://github.com/paritytech/substrate"240branch = "polkadot-v0.9.27"241242[dependencies.pallet-treasury]243default-features = false244git = "https://github.com/paritytech/substrate"245branch = "polkadot-v0.9.27"246247# [dependencies.pallet-vesting]248# default-features = false249# git = 'https://github.com/paritytech/substrate'250# branch = 'master'251252[dependencies.sp-arithmetic]253default-features = false254git = "https://github.com/paritytech/substrate"255branch = "polkadot-v0.9.27"256257[dependencies.sp-api]258default-features = false259git = "https://github.com/paritytech/substrate"260branch = "polkadot-v0.9.27"261262[dependencies.sp-block-builder]263default-features = false264git = "https://github.com/paritytech/substrate"265branch = "polkadot-v0.9.27"266267[dependencies.sp-core]268default-features = false269git = "https://github.com/paritytech/substrate"270branch = "polkadot-v0.9.27"271272[dependencies.sp-consensus-aura]273default-features = false274git = "https://github.com/paritytech/substrate"275branch = "polkadot-v0.9.27"276277[dependencies.sp-inherents]278default-features = false279git = "https://github.com/paritytech/substrate"280branch = "polkadot-v0.9.27"281282[dependencies.sp-io]283default-features = false284git = "https://github.com/paritytech/substrate"285branch = "polkadot-v0.9.27"286287[dependencies.sp-offchain]288default-features = false289git = "https://github.com/paritytech/substrate"290branch = "polkadot-v0.9.27"291292[dependencies.sp-runtime]293default-features = false294git = "https://github.com/paritytech/substrate"295branch = "polkadot-v0.9.27"296297[dependencies.sp-session]298default-features = false299git = "https://github.com/paritytech/substrate"300branch = "polkadot-v0.9.27"301302[dependencies.sp-std]303default-features = false304git = "https://github.com/paritytech/substrate"305branch = "polkadot-v0.9.27"306307[dependencies.sp-transaction-pool]308default-features = false309git = "https://github.com/paritytech/substrate"310branch = "polkadot-v0.9.27"311312[dependencies.sp-version]313default-features = false314git = "https://github.com/paritytech/substrate"315branch = "polkadot-v0.9.27"316317[dependencies.smallvec]318version = '1.6.1'319320################################################################################321# Cumulus dependencies322323[dependencies.parachain-info]324default-features = false325git = "https://github.com/paritytech/cumulus"326branch = "polkadot-v0.9.27"327328[dependencies.cumulus-pallet-aura-ext]329git = "https://github.com/paritytech/cumulus"330branch = "polkadot-v0.9.27"331default-features = false332333[dependencies.cumulus-pallet-parachain-system]334git = "https://github.com/paritytech/cumulus"335branch = "polkadot-v0.9.27"336default-features = false337338[dependencies.cumulus-primitives-core]339git = "https://github.com/paritytech/cumulus"340branch = "polkadot-v0.9.27"341default-features = false342343[dependencies.cumulus-pallet-xcm]344git = "https://github.com/paritytech/cumulus"345branch = "polkadot-v0.9.27"346default-features = false347348[dependencies.cumulus-pallet-dmp-queue]349git = "https://github.com/paritytech/cumulus"350branch = "polkadot-v0.9.27"351default-features = false352353[dependencies.cumulus-pallet-xcmp-queue]354git = "https://github.com/paritytech/cumulus"355branch = "polkadot-v0.9.27"356default-features = false357358[dependencies.cumulus-primitives-utility]359git = "https://github.com/paritytech/cumulus"360branch = "polkadot-v0.9.27"361default-features = false362363[dependencies.cumulus-primitives-timestamp]364git = "https://github.com/paritytech/cumulus"365branch = "polkadot-v0.9.27"366default-features = false367368################################################################################369# Polkadot dependencies370371[dependencies.polkadot-parachain]372git = "https://github.com/paritytech/polkadot"373branch = "release-v0.9.27"374default-features = false375376[dependencies.xcm]377git = "https://github.com/paritytech/polkadot"378branch = "release-v0.9.27"379default-features = false380381[dependencies.xcm-builder]382git = "https://github.com/paritytech/polkadot"383branch = "release-v0.9.27"384default-features = false385386[dependencies.xcm-executor]387git = "https://github.com/paritytech/polkadot"388branch = "release-v0.9.27"389default-features = false390391[dependencies.pallet-xcm]392git = "https://github.com/paritytech/polkadot"393branch = "release-v0.9.27"394default-features = false395396[dependencies.orml-vesting]397git = "https://github.com/open-web3-stack/open-runtime-module-library"398branch = "polkadot-v0.9.27"399version = "0.4.1-dev"400default-features = false401402################################################################################403# local dependencies404405[dependencies]406log = { version = "0.4.16", default-features = false }407up-common = { path = "../../primitives/common", default-features = false }408scale-info = { version = "2.0.1", default-features = false, features = [409 "derive",410] }411derivative = "2.2.0"412pallet-unique = { path = '../../pallets/unique', default-features = false }413up-rpc = { path = "../../primitives/rpc", default-features = false }414rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }415fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }416pallet-inflation = { path = '../../pallets/inflation', default-features = false }417up-data-structs = { path = '../../primitives/data-structs', default-features = false }418pallet-configuration = { default-features = false, path = "../../pallets/configuration" }419pallet-common = { default-features = false, path = "../../pallets/common" }420pallet-structure = { default-features = false, path = "../../pallets/structure" }421pallet-fungible = { default-features = false, path = "../../pallets/fungible" }422pallet-refungible = { default-features = false, path = "../../pallets/refungible" }423pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }424pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }425pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }426pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }427# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }428pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.27", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }429pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }430pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }431pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }432pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }433pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }434pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }435pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }436fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }437fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }438evm-coder = { default-features = false, path = '../../crates/evm-coder' }439up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }440441################################################################################442# Build Dependencies443444[build-dependencies.substrate-wasm-builder]445git = "https://github.com/paritytech/substrate"446branch = "polkadot-v0.9.27"1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = "0.9.27"1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'opal-runtime']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-ethereum/runtime-benchmarks',27 'pallet-evm-migration/runtime-benchmarks',28 'pallet-evm-coder-substrate/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 "pallet-collator-selection/runtime-benchmarks",31 'pallet-timestamp/runtime-benchmarks',32 'pallet-common/runtime-benchmarks',33 'pallet-structure/runtime-benchmarks',34 'pallet-fungible/runtime-benchmarks',35 'pallet-refungible/runtime-benchmarks',36 'pallet-nonfungible/runtime-benchmarks',37 'pallet-proxy-rmrk-core/runtime-benchmarks',38 'pallet-proxy-rmrk-equip/runtime-benchmarks',39 'pallet-unique/runtime-benchmarks',40 'pallet-inflation/runtime-benchmarks',41 'pallet-unique-scheduler/runtime-benchmarks',42 'pallet-xcm/runtime-benchmarks',43 'sp-runtime/runtime-benchmarks',44 'xcm-builder/runtime-benchmarks',45]46try-runtime = [47 'frame-try-runtime',48 'frame-executive/try-runtime',49 'frame-system/try-runtime',50]51std = [52 'codec/std',53 'cumulus-pallet-aura-ext/std',54 'cumulus-pallet-parachain-system/std',55 'cumulus-pallet-xcm/std',56 'cumulus-pallet-xcmp-queue/std',57 'cumulus-primitives-core/std',58 'cumulus-primitives-utility/std',59 'frame-try-runtime/std',60 'frame-executive/std',61 'frame-support/std',62 'frame-system/std',63 'frame-system-rpc-runtime-api/std',64 'pallet-aura/std',65 'pallet-balances/std',66 # 'pallet-contracts/std',67 # 'pallet-contracts-primitives/std',68 # 'pallet-contracts-rpc-runtime-api/std',69 # 'pallet-contract-helpers/std',70 "pallet-authorship/std",71 'pallet-collator-selection/std',72 "pallet-session/std",73 'pallet-randomness-collective-flip/std',74 'pallet-sudo/std',75 'pallet-timestamp/std',76 'pallet-transaction-payment/std',77 'pallet-transaction-payment-rpc-runtime-api/std',78 'pallet-treasury/std',79 # 'pallet-vesting/std',80 'pallet-evm/std',81 'pallet-evm-migration/std',82 'pallet-evm-contract-helpers/std',83 'pallet-evm-transaction-payment/std',84 'pallet-evm-coder-substrate/std',85 'pallet-ethereum/std',86 'pallet-base-fee/std',87 'fp-rpc/std',88 'up-rpc/std',89 'fp-evm-mapping/std',90 'fp-self-contained/std',91 'parachain-info/std',92 'serde',93 'pallet-inflation/std',94 'pallet-configuration/std',95 'pallet-common/std',96 'pallet-structure/std',97 'pallet-fungible/std',98 'pallet-refungible/std',99 'pallet-nonfungible/std',100 'pallet-proxy-rmrk-core/std',101 'pallet-proxy-rmrk-equip/std',102 'pallet-unique/std',103 'pallet-unique-scheduler/std',104 'pallet-charge-transaction/std',105 'up-data-structs/std',106 'sp-api/std',107 'sp-block-builder/std',108 "sp-consensus-aura/std",109 'sp-core/std',110 'sp-inherents/std',111 'sp-io/std',112 'sp-offchain/std',113 'sp-runtime/std',114 'sp-session/std',115 'sp-std/std',116 'sp-transaction-pool/std',117 'sp-version/std',118 'xcm/std',119 'xcm-builder/std',120 'xcm-executor/std',121 'up-common/std',122 'rmrk-rpc/std',123 'evm-coder/std',124 'up-sponsorship/std',125126 "orml-vesting/std",127]128limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']129opal-runtime = ['refungible', 'scheduler', 'rmrk']130131refungible = []132scheduler = []133rmrk = []134135################################################################################136# Substrate Dependencies137138[dependencies.codec]139default-features = false140features = ['derive']141package = 'parity-scale-codec'142version = '3.1.2'143144[dependencies.frame-benchmarking]145default-features = false146git = "https://github.com/paritytech/substrate"147optional = true148branch = "polkadot-v0.9.27"149150[dependencies.frame-try-runtime]151default-features = false152git = "https://github.com/paritytech/substrate"153optional = true154branch = "polkadot-v0.9.27"155156[dependencies.frame-executive]157default-features = false158git = "https://github.com/paritytech/substrate"159branch = "polkadot-v0.9.27"160161[dependencies.frame-support]162default-features = false163git = "https://github.com/paritytech/substrate"164branch = "polkadot-v0.9.27"165166[dependencies.frame-system]167default-features = false168git = "https://github.com/paritytech/substrate"169branch = "polkadot-v0.9.27"170171[dependencies.frame-system-benchmarking]172default-features = false173git = "https://github.com/paritytech/substrate"174optional = true175branch = "polkadot-v0.9.27"176177[dependencies.frame-system-rpc-runtime-api]178default-features = false179git = "https://github.com/paritytech/substrate"180branch = "polkadot-v0.9.27"181182[dependencies.hex-literal]183optional = true184version = '0.3.3'185186[dependencies.serde]187default-features = false188features = ['derive']189optional = true190version = '1.0.130'191192[dependencies.pallet-aura]193default-features = false194git = "https://github.com/paritytech/substrate"195branch = "polkadot-v0.9.27"196197[dependencies.pallet-collator-selection]198default-features = false199git = 'https://github.com/paritytech/cumulus'200branch = 'polkadot-v0.9.27'201202[dependencies.pallet-authorship]203default-features = false204git = 'https://github.com/paritytech/substrate'205branch = 'polkadot-v0.9.27'206207[dependencies.pallet-session]208default-features = false209git = 'https://github.com/paritytech/substrate'210branch = 'polkadot-v0.9.27'211212[dependencies.pallet-balances]213default-features = false214git = "https://github.com/paritytech/substrate"215branch = "polkadot-v0.9.27"216217# Contracts specific packages218# [dependencies.pallet-contracts]219# git = 'https://github.com/paritytech/substrate'220# default-features = false221# branch = 'master'222# version = '4.0.0-dev'223224# [dependencies.pallet-contracts-primitives]225# git = 'https://github.com/paritytech/substrate'226# default-features = false227# branch = 'master'228# version = '4.0.0-dev'229230# [dependencies.pallet-contracts-rpc-runtime-api]231# git = 'https://github.com/paritytech/substrate'232# default-features = false233# branch = 'master'234# version = '4.0.0-dev'235236[dependencies.pallet-randomness-collective-flip]237default-features = false238git = "https://github.com/paritytech/substrate"239branch = "polkadot-v0.9.27"240241[dependencies.pallet-sudo]242default-features = false243git = "https://github.com/paritytech/substrate"244branch = "polkadot-v0.9.27"245246[dependencies.pallet-timestamp]247default-features = false248git = "https://github.com/paritytech/substrate"249branch = "polkadot-v0.9.27"250251[dependencies.pallet-transaction-payment]252default-features = false253git = "https://github.com/paritytech/substrate"254branch = "polkadot-v0.9.27"255256[dependencies.pallet-transaction-payment-rpc-runtime-api]257default-features = false258git = "https://github.com/paritytech/substrate"259branch = "polkadot-v0.9.27"260261[dependencies.pallet-treasury]262default-features = false263git = "https://github.com/paritytech/substrate"264branch = "polkadot-v0.9.27"265266# [dependencies.pallet-vesting]267# default-features = false268# git = 'https://github.com/paritytech/substrate'269# branch = 'master'270271[dependencies.sp-arithmetic]272default-features = false273git = "https://github.com/paritytech/substrate"274branch = "polkadot-v0.9.27"275276[dependencies.sp-api]277default-features = false278git = "https://github.com/paritytech/substrate"279branch = "polkadot-v0.9.27"280281[dependencies.sp-block-builder]282default-features = false283git = "https://github.com/paritytech/substrate"284branch = "polkadot-v0.9.27"285286[dependencies.sp-core]287default-features = false288git = "https://github.com/paritytech/substrate"289branch = "polkadot-v0.9.27"290291[dependencies.sp-consensus-aura]292default-features = false293git = "https://github.com/paritytech/substrate"294branch = "polkadot-v0.9.27"295296[dependencies.sp-inherents]297default-features = false298git = "https://github.com/paritytech/substrate"299branch = "polkadot-v0.9.27"300301[dependencies.sp-io]302default-features = false303git = "https://github.com/paritytech/substrate"304branch = "polkadot-v0.9.27"305306[dependencies.sp-offchain]307default-features = false308git = "https://github.com/paritytech/substrate"309branch = "polkadot-v0.9.27"310311[dependencies.sp-runtime]312default-features = false313git = "https://github.com/paritytech/substrate"314branch = "polkadot-v0.9.27"315316[dependencies.sp-session]317default-features = false318git = "https://github.com/paritytech/substrate"319branch = "polkadot-v0.9.27"320321[dependencies.sp-std]322default-features = false323git = "https://github.com/paritytech/substrate"324branch = "polkadot-v0.9.27"325326[dependencies.sp-transaction-pool]327default-features = false328git = "https://github.com/paritytech/substrate"329branch = "polkadot-v0.9.27"330331[dependencies.sp-version]332default-features = false333git = "https://github.com/paritytech/substrate"334branch = "polkadot-v0.9.27"335336[dependencies.smallvec]337version = '1.6.1'338339################################################################################340# Cumulus dependencies341342[dependencies.parachain-info]343default-features = false344git = "https://github.com/paritytech/cumulus"345branch = "polkadot-v0.9.27"346347[dependencies.cumulus-pallet-aura-ext]348git = "https://github.com/paritytech/cumulus"349branch = "polkadot-v0.9.27"350default-features = false351352[dependencies.cumulus-pallet-parachain-system]353git = "https://github.com/paritytech/cumulus"354branch = "polkadot-v0.9.27"355default-features = false356357[dependencies.cumulus-primitives-core]358git = "https://github.com/paritytech/cumulus"359branch = "polkadot-v0.9.27"360default-features = false361362[dependencies.cumulus-pallet-xcm]363git = "https://github.com/paritytech/cumulus"364branch = "polkadot-v0.9.27"365default-features = false366367[dependencies.cumulus-pallet-dmp-queue]368git = "https://github.com/paritytech/cumulus"369branch = "polkadot-v0.9.27"370default-features = false371372[dependencies.cumulus-pallet-xcmp-queue]373git = "https://github.com/paritytech/cumulus"374branch = "polkadot-v0.9.27"375default-features = false376377[dependencies.cumulus-primitives-utility]378git = "https://github.com/paritytech/cumulus"379branch = "polkadot-v0.9.27"380default-features = false381382[dependencies.cumulus-primitives-timestamp]383git = "https://github.com/paritytech/cumulus"384branch = "polkadot-v0.9.27"385default-features = false386387################################################################################388# Polkadot dependencies389390[dependencies.polkadot-parachain]391git = "https://github.com/paritytech/polkadot"392branch = "release-v0.9.27"393default-features = false394395[dependencies.xcm]396git = "https://github.com/paritytech/polkadot"397branch = "release-v0.9.27"398default-features = false399400[dependencies.xcm-builder]401git = "https://github.com/paritytech/polkadot"402branch = "release-v0.9.27"403default-features = false404405[dependencies.xcm-executor]406git = "https://github.com/paritytech/polkadot"407branch = "release-v0.9.27"408default-features = false409410[dependencies.pallet-xcm]411git = "https://github.com/paritytech/polkadot"412branch = "release-v0.9.27"413default-features = false414415[dependencies.orml-vesting]416git = "https://github.com/open-web3-stack/open-runtime-module-library"417branch = "polkadot-v0.9.27"418version = "0.4.1-dev"419default-features = false420421################################################################################422# local dependencies423424[dependencies]425log = { version = "0.4.16", default-features = false }426up-common = { path = "../../primitives/common", default-features = false }427scale-info = { version = "2.0.1", default-features = false, features = [428 "derive",429] }430derivative = "2.2.0"431pallet-unique = { path = '../../pallets/unique', default-features = false }432up-rpc = { path = "../../primitives/rpc", default-features = false }433rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }434fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }435pallet-inflation = { path = '../../pallets/inflation', default-features = false }436up-data-structs = { path = '../../primitives/data-structs', default-features = false }437pallet-configuration = { default-features = false, path = "../../pallets/configuration" }438pallet-common = { default-features = false, path = "../../pallets/common" }439pallet-structure = { default-features = false, path = "../../pallets/structure" }440pallet-fungible = { default-features = false, path = "../../pallets/fungible" }441pallet-refungible = { default-features = false, path = "../../pallets/refungible" }442pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }443pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }444pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }445pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }446# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }447pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.27", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }448pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }449pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }450pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }451pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }452pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }453pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }454pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }455fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }456fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.27" }457evm-coder = { default-features = false, path = '../../crates/evm-coder' }458up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.27' }459460################################################################################461# Build Dependencies462463[build-dependencies.substrate-wasm-builder]464git = "https://github.com/paritytech/substrate"465branch = "polkadot-v0.9.27"runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -27,6 +27,7 @@
'pallet-evm-migration/runtime-benchmarks',
'pallet-evm-coder-substrate/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
+ "pallet-collator-selection/runtime-benchmarks",
'pallet-timestamp/runtime-benchmarks',
'pallet-common/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
@@ -66,6 +67,9 @@
# 'pallet-contracts-primitives/std',
# 'pallet-contracts-rpc-runtime-api/std',
# 'pallet-contract-helpers/std',
+ "pallet-authorship/std",
+ 'pallet-collator-selection/std',
+ "pallet-session/std",
'pallet-randomness-collective-flip/std',
'pallet-sudo/std',
'pallet-timestamp/std',
@@ -187,6 +191,21 @@
git = "https://github.com/paritytech/substrate"
branch = "polkadot-v0.9.27"
+[dependencies.pallet-collator-selection]
+default-features = false
+git = 'https://github.com/paritytech/cumulus'
+branch = 'polkadot-v0.9.27'
+
+[dependencies.pallet-authorship]
+default-features = false
+git = 'https://github.com/paritytech/substrate'
+branch = 'polkadot-v0.9.27'
+
+[dependencies.pallet-session]
+default-features = false
+git = 'https://github.com/paritytech/substrate'
+branch = 'polkadot-v0.9.27'
+
[dependencies.pallet-balances]
default-features = false
git = "https://github.com/paritytech/substrate"
runtime/tests/src/lib.rsdiffbeforeafterboth--- a/runtime/tests/src/lib.rs
+++ b/runtime/tests/src/lib.rs
@@ -189,6 +189,9 @@
fn conv_eq(&self, other: &Self) -> bool {
self.as_sub() == other.as_sub()
}
+ fn is_canonical_substrate(&self) -> bool {
+ todo!()
+ }
}
impl Default for TestCrossAccountId {
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -27,6 +27,7 @@
'pallet-evm-migration/runtime-benchmarks',
'pallet-evm-coder-substrate/runtime-benchmarks',
'pallet-balances/runtime-benchmarks',
+ "pallet-collator-selection/runtime-benchmarks",
'pallet-timestamp/runtime-benchmarks',
'pallet-common/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
@@ -67,6 +68,9 @@
# 'pallet-contracts-primitives/std',
# 'pallet-contracts-rpc-runtime-api/std',
# 'pallet-contract-helpers/std',
+ "pallet-authorship/std",
+ 'pallet-collator-selection/std',
+ "pallet-session/std",
'pallet-randomness-collective-flip/std',
'pallet-sudo/std',
'pallet-timestamp/std',
@@ -188,6 +192,21 @@
git = "https://github.com/paritytech/substrate"
branch = "polkadot-v0.9.27"
+[dependencies.pallet-collator-selection]
+default-features = false
+git = 'https://github.com/paritytech/cumulus'
+branch = 'polkadot-v0.9.27'
+
+[dependencies.pallet-authorship]
+default-features = false
+git = 'https://github.com/paritytech/substrate'
+branch = 'polkadot-v0.9.27'
+
+[dependencies.pallet-session]
+default-features = false
+git = 'https://github.com/paritytech/substrate'
+branch = 'polkadot-v0.9.27'
+
[dependencies.pallet-balances]
default-features = false
git = "https://github.com/paritytech/substrate"