difftreelog
Merge pull request #347 from UniqueNetwork/release-v920000
in: master
Release v920000
20 files changed
.envdiffbeforeafterboth--- a/.env
+++ b/.env
@@ -1,6 +1,6 @@
-RUST_TOOLCHAIN=nightly-2021-11-11
-RUST_C=1.58.0-nightly
-POLKA_VERSION=release-v0.9.18
+RUST_TOOLCHAIN=nightly-2022-04-07
+RUST_C=1.62.0-nightly
+POLKA_VERSION=release-v0.9.20
UNIQUE_BRANCH=develop
USER=***
PASS=***
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5475,7 +5475,7 @@
[[package]]
name = "opal-runtime"
-version = "0.9.18"
+version = "0.9.20"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
@@ -8682,7 +8682,7 @@
[[package]]
name = "quartz-runtime"
-version = "0.9.18"
+version = "0.9.20"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
@@ -12515,7 +12515,7 @@
[[package]]
name = "unique-node"
-version = "0.9.18"
+version = "0.9.20"
dependencies = [
"clap",
"cumulus-client-cli",
@@ -12725,7 +12725,7 @@
[[package]]
name = "unique-runtime-common"
-version = "0.9.18"
+version = "0.9.20"
dependencies = [
"fp-rpc",
"frame-support",
Dockerfile-parachaindiffbeforeafterboth--- a/Dockerfile-parachain
+++ b/Dockerfile-parachain
@@ -2,9 +2,9 @@
FROM phusion/baseimage:focal-1.1.0 as rust-builder
LABEL maintainer="Unique.Network"
-ARG RUST_TOOLCHAIN=nightly-2021-11-11
-#ARG RUST_C=1.58.0-nightly
-ARG POLKA_VERSION=release-v0.9.18
+ARG RUST_TOOLCHAIN=nightly-2022-04-07
+#ARG RUST_C=1.62.0-nightly
+ARG POLKA_VERSION=release-v0.9.20
ARG UNIQUE_BRANCH=develop
#ARG USER=***
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -51,14 +51,14 @@
3. Install install nightly 2021-11-11 and make it default:
```bash
-rustup toolchain install nightly-2021-11-11
-rustup default nightly-2021-11-11
+rustup toolchain install nightly-2022-04-07
+rustup default nightly-2022-04-07
```
4. Add wasm target for nightly toolchain:
```bash
-rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-11
+rustup target add wasm32-unknown-unknown --toolchain nightly-2022-04-07
```
5. Build:
@@ -81,7 +81,7 @@
```
git clone https://github.com/paritytech/polkadot.git
cd polkadot
-git checkout release-v0.9.18
+git checkout release-v0.9.20
cargo build --release
```
launch-config-full.jsondiffbeforeafterboth--- a/launch-config-full.json
+++ b/launch-config-full.json
@@ -1,7 +1,7 @@
{
"relaychain": {
"bin": "../polkadot/target/release/polkadot",
- "chain": "rococo-local",
+ "chain": "westend-local",
"nodes": [
{
"name": "alice",
launch-config.jsondiffbeforeafterboth--- a/launch-config.json
+++ b/launch-config.json
@@ -1,7 +1,7 @@
{
"relaychain": {
"bin": "../polkadot/target/release/polkadot",
- "chain": "rococo-local",
+ "chain": "westend-local",
"nodes": [
{
"name": "alice",
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -283,7 +283,7 @@
license = 'GPLv3'
name = 'unique-node'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.18'
+version = '0.9.20'
[[bin]]
name = 'unique-collator'
node/cli/src/chain_spec.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};18use sc_service::ChainType;19use sp_core::{sr25519, Pair, Public};20use sp_runtime::traits::{IdentifyAccount, Verify};21use std::collections::BTreeMap;2223use serde::{Deserialize, Serialize};24use serde_json::map::Map;2526use unique_runtime_common::types::*;2728#[cfg(feature = "unique-runtime")]29use unique_runtime as default_runtime;3031#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]32use quartz_runtime as default_runtime;3334#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]35use opal_runtime as default_runtime;3637/// The `ChainSpec` parameterized for the unique runtime.38#[cfg(feature = "unique-runtime")]39pub type UniqueChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;4041/// The `ChainSpec` parameterized for the quartz runtime.42#[cfg(feature = "quartz-runtime")]43pub type QuartzChainSpec = sc_service::GenericChainSpec<quartz_runtime::GenesisConfig, Extensions>;4445/// The `ChainSpec` parameterized for the opal runtime.46pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;4748#[cfg(feature = "unique-runtime")]49pub type DefaultChainSpec = UniqueChainSpec;5051#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]52pub type DefaultChainSpec = QuartzChainSpec;5354#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]55pub type DefaultChainSpec = OpalChainSpec;5657pub enum RuntimeId {58 #[cfg(feature = "unique-runtime")]59 Unique,6061 #[cfg(feature = "quartz-runtime")]62 Quartz,6364 Opal,65 Unknown(String),66}6768pub trait RuntimeIdentification {69 fn runtime_id(&self) -> RuntimeId;70}7172impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {73 fn runtime_id(&self) -> RuntimeId {74 #[cfg(feature = "unique-runtime")]75 if self.id().starts_with("unique") || self.id().starts_with("unq") {76 return RuntimeId::Unique;77 }7879 #[cfg(feature = "quartz-runtime")]80 if self.id().starts_with("quartz") || self.id().starts_with("qtz") {81 return RuntimeId::Quartz;82 }8384 if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {85 return RuntimeId::Opal;86 }8788 RuntimeId::Unknown(self.id().into())89 }90}9192pub enum ServiceId {93 Prod,94 Dev,95}9697pub trait ServiceIdentification {98 fn service_id(&self) -> ServiceId;99}100101impl ServiceIdentification for Box<dyn sc_service::ChainSpec> {102 fn service_id(&self) -> ServiceId {103 if self.id().ends_with("dev") {104 ServiceId::Dev105 } else {106 ServiceId::Prod107 }108 }109}110111/// Helper function to generate a crypto pair from seed112pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {113 TPublic::Pair::from_string(&format!("//{}", seed), None)114 .expect("static values are valid; qed")115 .public()116}117118/// The extensions for the [`ChainSpec`].119#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]120#[serde(deny_unknown_fields)]121pub struct Extensions {122 /// The relay chain of the Parachain.123 pub relay_chain: String,124 /// The id of the Parachain.125 pub para_id: u32,126}127128impl Extensions {129 /// Try to get the extension from the given `ChainSpec`.130 pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {131 sc_chain_spec::get_extension(chain_spec.extensions())132 }133}134135type AccountPublic = <Signature as Verify>::Signer;136137/// Helper function to generate an account ID from seed138pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId139where140 AccountPublic: From<<TPublic::Pair as Pair>::Public>,141{142 AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()143}144145macro_rules! testnet_genesis {146 (147 $runtime:path,148 $root_key:expr,149 $initial_authorities:expr,150 $endowed_accounts:expr,151 $id:expr152 ) => {{153 use $runtime::*;154155 GenesisConfig {156 system: SystemConfig {157 code: WASM_BINARY158 .expect("WASM binary was not build, please build it!")159 .to_vec(),160 },161 balances: BalancesConfig {162 balances: $endowed_accounts163 .iter()164 .cloned()165 // 1e13 UNQ166 .map(|k| (k, 1 << 100))167 .collect(),168 },169 treasury: Default::default(),170 sudo: SudoConfig {171 key: Some($root_key),172 },173 vesting: VestingConfig { vesting: vec![] },174 parachain_info: ParachainInfoConfig {175 parachain_id: $id.into(),176 },177 parachain_system: Default::default(),178 aura: AuraConfig {179 authorities: $initial_authorities,180 },181 aura_ext: Default::default(),182 evm: EVMConfig {183 accounts: BTreeMap::new(),184 },185 ethereum: EthereumConfig {},186 }187 }};188}189190pub fn development_config() -> OpalChainSpec {191 let mut properties = Map::new();192 properties.insert("tokenSymbol".into(), opal_runtime::TOKEN_SYMBOL.into());193 properties.insert("tokenDecimals".into(), 18.into());194 properties.insert("ss58Format".into(), opal_runtime::SS58Prefix::get().into());195196 OpalChainSpec::from_genesis(197 // Name198 "OPAL by UNIQUE",199 // ID200 "opal_dev",201 ChainType::Local,202 move || {203 testnet_genesis!(204 opal_runtime,205 // Sudo account206 get_account_id_from_seed::<sr25519::Public>("Alice"),207 vec![208 get_from_seed::<AuraId>("Alice"),209 get_from_seed::<AuraId>("Bob"),210 ],211 // Pre-funded accounts212 vec![213 get_account_id_from_seed::<sr25519::Public>("Alice"),214 get_account_id_from_seed::<sr25519::Public>("Bob"),215 get_account_id_from_seed::<sr25519::Public>("Charlie"),216 get_account_id_from_seed::<sr25519::Public>("Dave"),217 get_account_id_from_seed::<sr25519::Public>("Eve"),218 get_account_id_from_seed::<sr25519::Public>("Ferdie"),219 get_account_id_from_seed::<sr25519::Public>("Alice//stash"),220 get_account_id_from_seed::<sr25519::Public>("Bob//stash"),221 get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),222 get_account_id_from_seed::<sr25519::Public>("Dave//stash"),223 get_account_id_from_seed::<sr25519::Public>("Eve//stash"),224 get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),225 ],226 1000227 )228 },229 // Bootnodes230 vec![],231 // Telemetry232 None,233 // Protocol ID234 None,235 None,236 // Properties237 Some(properties),238 // Extensions239 Extensions {240 relay_chain: "rococo-dev".into(),241 para_id: 1000,242 },243 )244}245246pub fn local_testnet_rococo_config() -> DefaultChainSpec {247 let mut properties = Map::new();248 properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());249 properties.insert("tokenDecimals".into(), 18.into());250 properties.insert(251 "ss58Format".into(),252 default_runtime::SS58Prefix::get().into(),253 );254255 DefaultChainSpec::from_genesis(256 // Name257 format!(258 "{}{}",259 default_runtime::RUNTIME_NAME.to_uppercase(),260 if cfg!(feature = "unique-runtime") {261 ""262 } else {263 " by UNIQUE"264 }265 )266 .as_str(),267 // ID268 format!("{}_local", default_runtime::RUNTIME_NAME).as_str(),269 ChainType::Local,270 move || {271 testnet_genesis!(272 default_runtime,273 // Sudo account274 get_account_id_from_seed::<sr25519::Public>("Alice"),275 vec![276 get_from_seed::<AuraId>("Alice"),277 get_from_seed::<AuraId>("Bob"),278 ],279 // Pre-funded accounts280 vec![281 get_account_id_from_seed::<sr25519::Public>("Alice"),282 get_account_id_from_seed::<sr25519::Public>("Bob"),283 get_account_id_from_seed::<sr25519::Public>("Charlie"),284 get_account_id_from_seed::<sr25519::Public>("Dave"),285 get_account_id_from_seed::<sr25519::Public>("Eve"),286 get_account_id_from_seed::<sr25519::Public>("Ferdie"),287 get_account_id_from_seed::<sr25519::Public>("Alice//stash"),288 get_account_id_from_seed::<sr25519::Public>("Bob//stash"),289 get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),290 get_account_id_from_seed::<sr25519::Public>("Dave//stash"),291 get_account_id_from_seed::<sr25519::Public>("Eve//stash"),292 get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),293 ],294 1000295 )296 },297 // Bootnodes298 vec![],299 // Telemetry300 None,301 // Protocol ID302 None,303 None,304 // Properties305 Some(properties),306 // Extensions307 Extensions {308 relay_chain: "rococo-local".into(),309 para_id: 1000,310 },311 )312}1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};18use sc_service::ChainType;19use sp_core::{sr25519, Pair, Public};20use sp_runtime::traits::{IdentifyAccount, Verify};21use std::collections::BTreeMap;2223use serde::{Deserialize, Serialize};24use serde_json::map::Map;2526use unique_runtime_common::types::*;2728#[cfg(feature = "unique-runtime")]29use unique_runtime as default_runtime;3031#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]32use quartz_runtime as default_runtime;3334#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]35use opal_runtime as default_runtime;3637/// The `ChainSpec` parameterized for the unique runtime.38#[cfg(feature = "unique-runtime")]39pub type UniqueChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;4041/// The `ChainSpec` parameterized for the quartz runtime.42#[cfg(feature = "quartz-runtime")]43pub type QuartzChainSpec = sc_service::GenericChainSpec<quartz_runtime::GenesisConfig, Extensions>;4445/// The `ChainSpec` parameterized for the opal runtime.46pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;4748#[cfg(feature = "unique-runtime")]49pub type DefaultChainSpec = UniqueChainSpec;5051#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]52pub type DefaultChainSpec = QuartzChainSpec;5354#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]55pub type DefaultChainSpec = OpalChainSpec;5657pub enum RuntimeId {58 #[cfg(feature = "unique-runtime")]59 Unique,6061 #[cfg(feature = "quartz-runtime")]62 Quartz,6364 Opal,65 Unknown(String),66}6768pub trait RuntimeIdentification {69 fn runtime_id(&self) -> RuntimeId;70}7172impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {73 fn runtime_id(&self) -> RuntimeId {74 #[cfg(feature = "unique-runtime")]75 if self.id().starts_with("unique") || self.id().starts_with("unq") {76 return RuntimeId::Unique;77 }7879 #[cfg(feature = "quartz-runtime")]80 if self.id().starts_with("quartz") || self.id().starts_with("qtz") {81 return RuntimeId::Quartz;82 }8384 if self.id().starts_with("opal") || self.id() == "dev" || self.id() == "local_testnet" {85 return RuntimeId::Opal;86 }8788 RuntimeId::Unknown(self.id().into())89 }90}9192pub enum ServiceId {93 Prod,94 Dev,95}9697pub trait ServiceIdentification {98 fn service_id(&self) -> ServiceId;99}100101impl ServiceIdentification for Box<dyn sc_service::ChainSpec> {102 fn service_id(&self) -> ServiceId {103 if self.id().ends_with("dev") {104 ServiceId::Dev105 } else {106 ServiceId::Prod107 }108 }109}110111/// Helper function to generate a crypto pair from seed112pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {113 TPublic::Pair::from_string(&format!("//{}", seed), None)114 .expect("static values are valid; qed")115 .public()116}117118/// The extensions for the [`ChainSpec`].119#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]120#[serde(deny_unknown_fields)]121pub struct Extensions {122 /// The relay chain of the Parachain.123 pub relay_chain: String,124 /// The id of the Parachain.125 pub para_id: u32,126}127128impl Extensions {129 /// Try to get the extension from the given `ChainSpec`.130 pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {131 sc_chain_spec::get_extension(chain_spec.extensions())132 }133}134135type AccountPublic = <Signature as Verify>::Signer;136137/// Helper function to generate an account ID from seed138pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId139where140 AccountPublic: From<<TPublic::Pair as Pair>::Public>,141{142 AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()143}144145macro_rules! testnet_genesis {146 (147 $runtime:path,148 $root_key:expr,149 $initial_authorities:expr,150 $endowed_accounts:expr,151 $id:expr152 ) => {{153 use $runtime::*;154155 GenesisConfig {156 system: SystemConfig {157 code: WASM_BINARY158 .expect("WASM binary was not build, please build it!")159 .to_vec(),160 },161 balances: BalancesConfig {162 balances: $endowed_accounts163 .iter()164 .cloned()165 // 1e13 UNQ166 .map(|k| (k, 1 << 100))167 .collect(),168 },169 treasury: Default::default(),170 sudo: SudoConfig {171 key: Some($root_key),172 },173 vesting: VestingConfig { vesting: vec![] },174 parachain_info: ParachainInfoConfig {175 parachain_id: $id.into(),176 },177 parachain_system: Default::default(),178 aura: AuraConfig {179 authorities: $initial_authorities,180 },181 aura_ext: Default::default(),182 evm: EVMConfig {183 accounts: BTreeMap::new(),184 },185 ethereum: EthereumConfig {},186 }187 }};188}189190pub fn development_config() -> OpalChainSpec {191 let mut properties = Map::new();192 properties.insert("tokenSymbol".into(), opal_runtime::TOKEN_SYMBOL.into());193 properties.insert("tokenDecimals".into(), 18.into());194 properties.insert("ss58Format".into(), opal_runtime::SS58Prefix::get().into());195196 OpalChainSpec::from_genesis(197 // Name198 "OPAL by UNIQUE",199 // ID200 "opal_dev",201 ChainType::Local,202 move || {203 testnet_genesis!(204 opal_runtime,205 // Sudo account206 get_account_id_from_seed::<sr25519::Public>("Alice"),207 vec![208 get_from_seed::<AuraId>("Alice"),209 get_from_seed::<AuraId>("Bob"),210 ],211 // Pre-funded accounts212 vec![213 get_account_id_from_seed::<sr25519::Public>("Alice"),214 get_account_id_from_seed::<sr25519::Public>("Bob"),215 get_account_id_from_seed::<sr25519::Public>("Charlie"),216 get_account_id_from_seed::<sr25519::Public>("Dave"),217 get_account_id_from_seed::<sr25519::Public>("Eve"),218 get_account_id_from_seed::<sr25519::Public>("Ferdie"),219 get_account_id_from_seed::<sr25519::Public>("Alice//stash"),220 get_account_id_from_seed::<sr25519::Public>("Bob//stash"),221 get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),222 get_account_id_from_seed::<sr25519::Public>("Dave//stash"),223 get_account_id_from_seed::<sr25519::Public>("Eve//stash"),224 get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),225 ],226 1000227 )228 },229 // Bootnodes230 vec![],231 // Telemetry232 None,233 // Protocol ID234 None,235 None,236 // Properties237 Some(properties),238 // Extensions239 Extensions {240 relay_chain: "rococo-dev".into(),241 para_id: 1000,242 },243 )244}245246pub fn local_testnet_config() -> DefaultChainSpec {247 let mut properties = Map::new();248 properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());249 properties.insert("tokenDecimals".into(), 18.into());250 properties.insert(251 "ss58Format".into(),252 default_runtime::SS58Prefix::get().into(),253 );254255 DefaultChainSpec::from_genesis(256 // Name257 format!(258 "{}{}",259 default_runtime::RUNTIME_NAME.to_uppercase(),260 if cfg!(feature = "unique-runtime") {261 ""262 } else {263 " by UNIQUE"264 }265 )266 .as_str(),267 // ID268 format!("{}_local", default_runtime::RUNTIME_NAME).as_str(),269 ChainType::Local,270 move || {271 testnet_genesis!(272 default_runtime,273 // Sudo account274 get_account_id_from_seed::<sr25519::Public>("Alice"),275 vec![276 get_from_seed::<AuraId>("Alice"),277 get_from_seed::<AuraId>("Bob"),278 ],279 // Pre-funded accounts280 vec![281 get_account_id_from_seed::<sr25519::Public>("Alice"),282 get_account_id_from_seed::<sr25519::Public>("Bob"),283 get_account_id_from_seed::<sr25519::Public>("Charlie"),284 get_account_id_from_seed::<sr25519::Public>("Dave"),285 get_account_id_from_seed::<sr25519::Public>("Eve"),286 get_account_id_from_seed::<sr25519::Public>("Ferdie"),287 get_account_id_from_seed::<sr25519::Public>("Alice//stash"),288 get_account_id_from_seed::<sr25519::Public>("Bob//stash"),289 get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),290 get_account_id_from_seed::<sr25519::Public>("Dave//stash"),291 get_account_id_from_seed::<sr25519::Public>("Eve//stash"),292 get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),293 ],294 1000295 )296 },297 // Bootnodes298 vec![],299 // Telemetry300 None,301 // Protocol ID302 None,303 None,304 // Properties305 Some(properties),306 // Extensions307 Extensions {308 relay_chain: "westend-local".into(),309 para_id: 1000,310 },311 )312}node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -76,7 +76,7 @@
fn load_spec(id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
Ok(match id {
"dev" => Box::new(chain_spec::development_config()),
- "" | "local" => Box::new(chain_spec::local_testnet_rococo_config()),
+ "" | "local" => Box::new(chain_spec::local_testnet_config()),
path => {
let path = std::path::PathBuf::from(path);
let chain_spec = Box::new(chain_spec::OpalChainSpec::from_json_file(path.clone())?)
@@ -405,6 +405,7 @@
cmd.run(config, partials.client.clone(), db, storage)
}),
+ BenchmarkCmd::Machine(cmd) => runner.sync_run(|config| cmd.run(&config)),
BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()),
}
}
runtime/common/Cargo.tomldiffbeforeafterboth--- a/runtime/common/Cargo.toml
+++ b/runtime/common/Cargo.toml
@@ -6,7 +6,7 @@
license = 'All Rights Reserved'
name = 'unique-runtime-common'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.18'
+version = '0.9.20'
[features]
default = ['std']
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -10,7 +10,7 @@
license = 'GPLv3'
name = 'opal-runtime'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.18'
+version = '0.9.20'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
runtime/opal/build.rsdiffbeforeafterboth--- a/runtime/opal/build.rs
+++ b/runtime/opal/build.rs
@@ -14,10 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-use substrate_wasm_builder::WasmBuilder;
-
fn main() {
- WasmBuilder::new()
+ #[cfg(feature = "std")]
+ substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.import_memory()
.export_heap_base()
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -169,7 +169,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 918010,
+ spec_version: 920000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -10,7 +10,7 @@
license = 'GPLv3'
name = 'quartz-runtime'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.18'
+version = '0.9.20'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
runtime/quartz/build.rsdiffbeforeafterboth--- a/runtime/quartz/build.rs
+++ b/runtime/quartz/build.rs
@@ -1,7 +1,6 @@
-use substrate_wasm_builder::WasmBuilder;
-
fn main() {
- WasmBuilder::new()
+ #[cfg(feature = "std")]
+ substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.import_memory()
.export_heap_base()
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -154,7 +154,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 918010,
+ spec_version: 920000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
runtime/unique/build.rsdiffbeforeafterboth--- a/runtime/unique/build.rs
+++ b/runtime/unique/build.rs
@@ -1,7 +1,6 @@
-use substrate_wasm_builder::WasmBuilder;
-
fn main() {
- WasmBuilder::new()
+ #[cfg(feature = "std")]
+ substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.import_memory()
.export_heap_base()
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -153,7 +153,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 918010,
+ spec_version: 920000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
tests/README.mddiffbeforeafterboth--- a/tests/README.md
+++ b/tests/README.md
@@ -5,7 +5,7 @@
1. Checkout polkadot in sibling folder with this project
```bash
git clone https://github.com/paritytech/polkadot.git && cd polkadot
-git checkout release-v0.9.18
+git checkout release-v0.9.20
```
2. Build with nightly-2021-11-11
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -130,6 +130,10 @@
**/
currentTransactionStatuses: AugmentedQuery<ApiType, () => Observable<Option<Vec<FpRpcTransactionStatus>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
+ * Injected transactions should have unique nonce, here we store current
+ **/
+ injectedNonce: AugmentedQuery<ApiType, () => Observable<U256>, []> & QueryableStorageEntry<ApiType, []>;
+ /**
* Current building block's transactions and receipts.
**/
pending: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[EthereumTransactionTransactionV2, FpRpcTransactionStatus, EthereumReceiptReceiptV3]>>>, []> & QueryableStorageEntry<ApiType, []>;
@@ -434,8 +438,11 @@
/**
* Events deposited for the current block.
*
- * NOTE: This storage item is explicitly unbounded since it is never intended to be read
- * from within the runtime.
+ * NOTE: The item is unbound and should therefore never be read on chain.
+ * It could otherwise inflate the PoV size of a block.
+ *
+ * Events have a large in-memory size. Box the events to not go out-of-memory
+ * just in case someone still reads them from within the runtime.
**/
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/**