git.delta.rocks / unique-network / refs/commits / 8da8a842a17a

difftreelog

Merge pull request #347 from UniqueNetwork/release-v920000

kozyrevdev2022-05-06parents: #b49f8c1 #000df54.patch.diff
in: master
Release v920000

20 files changed

modified.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=***
modifiedCargo.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",
modifiedDockerfile-parachaindiffbeforeafterboth
before · Dockerfile-parachain
1# ===== Rust builder =====2FROM phusion/baseimage:focal-1.1.0 as rust-builder3LABEL maintainer="Unique.Network"45ARG RUST_TOOLCHAIN=nightly-2021-11-116#ARG RUST_C=1.58.0-nightly7ARG POLKA_VERSION=release-v0.9.188ARG UNIQUE_BRANCH=develop910#ARG USER=***11#ARG PASS=***121314ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN15#ENV RUST_C $RUST_C16ENV POLKA_VERSION $POLKA_VERSION17ENV UNIQUE_BRANCH $UNIQUE_BRANCH181920#RUN echo $RUST_TOOLCHAIN21#RUN echo $RUST_C22#RUN echo $POLKA_VERSION23#RUN echo $UNIQUE_BRANCH2425ENV CARGO_HOME="/cargo-home"26ENV PATH="/cargo-home/bin:$PATH"2728RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none2930RUN apt-get update && \31    apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \32    apt-get install -y cmake pkg-config libssl-dev git clang3334RUN rustup toolchain uninstall $(rustup toolchain list) && \35    rustup toolchain install $RUST_TOOLCHAIN && \36    rustup default $RUST_TOOLCHAIN && \37    rustup target list --installed && \38    rustup show39RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN4041RUN cargo install cargo-chef4243RUN mkdir unique_parachain44WORKDIR /unique_parachain4546# ===== Chef =====47FROM rust-builder as chef4849COPY . .50RUN cargo chef prepare --recipe-path recipe.json5152# ===== BUILD ======53FROM rust-builder as builder5455RUN mkdir unique_parachain56WORKDIR /unique_parachain5758COPY --from=chef /unique_parachain/recipe.json recipe.json59ARG PROFILE=release60RUN cargo chef cook "--$PROFILE" --recipe-path recipe.json6162COPY . .63RUN cargo build "--$PROFILE"64   # && \65   # cargo test6667# ===== BUILD POLKADOT =====68FROM rust-builder as builder-polkadot6970RUN mkdir unique_parachain71WORKDIR /unique_parachain7273RUN git clone -b $POLKA_VERSION --depth 1 https://github.com/paritytech/polkadot.git && \74    cd polkadot && \75    git tag -n && \76	cargo build --release7778# ===== RUN ======7980FROM phusion/baseimage:focal-1.1.08182ARG PROFILE=release8384RUN apt-get -y update && \85      apt-get -y upgrade && \86      apt-get -y install curl git && \87      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \88      export NVM_DIR="$HOME/.nvm" && \89      [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \90      nvm install v15.5.0 && \91      nvm use v15.5.09293RUN git clone https://github.com/paritytech/polkadot-launch9495RUN export NVM_DIR="$HOME/.nvm" && \96    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \97    cd /polkadot-launch && \98    npm install --global yarn && \99    yarn100101COPY --from=builder /unique_parachain/target/$PROFILE/unique-collator /unique-chain/target/$PROFILE/102COPY --from=builder-polkadot /unique_parachain/polkadot/target/$PROFILE/polkadot /polkadot/target/$PROFILE/103104CMD export NVM_DIR="$HOME/.nvm" && \105    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \106    cd /polkadot-launch && \107    yarn start launch-config.json
after · Dockerfile-parachain
1# ===== Rust builder =====2FROM phusion/baseimage:focal-1.1.0 as rust-builder3LABEL maintainer="Unique.Network"45ARG RUST_TOOLCHAIN=nightly-2022-04-076#ARG RUST_C=1.62.0-nightly7ARG POLKA_VERSION=release-v0.9.208ARG UNIQUE_BRANCH=develop910#ARG USER=***11#ARG PASS=***121314ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN15#ENV RUST_C $RUST_C16ENV POLKA_VERSION $POLKA_VERSION17ENV UNIQUE_BRANCH $UNIQUE_BRANCH181920#RUN echo $RUST_TOOLCHAIN21#RUN echo $RUST_C22#RUN echo $POLKA_VERSION23#RUN echo $UNIQUE_BRANCH2425ENV CARGO_HOME="/cargo-home"26ENV PATH="/cargo-home/bin:$PATH"2728RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none2930RUN apt-get update && \31    apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \32    apt-get install -y cmake pkg-config libssl-dev git clang3334RUN rustup toolchain uninstall $(rustup toolchain list) && \35    rustup toolchain install $RUST_TOOLCHAIN && \36    rustup default $RUST_TOOLCHAIN && \37    rustup target list --installed && \38    rustup show39RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN4041RUN cargo install cargo-chef4243RUN mkdir unique_parachain44WORKDIR /unique_parachain4546# ===== Chef =====47FROM rust-builder as chef4849COPY . .50RUN cargo chef prepare --recipe-path recipe.json5152# ===== BUILD ======53FROM rust-builder as builder5455RUN mkdir unique_parachain56WORKDIR /unique_parachain5758COPY --from=chef /unique_parachain/recipe.json recipe.json59ARG PROFILE=release60RUN cargo chef cook "--$PROFILE" --recipe-path recipe.json6162COPY . .63RUN cargo build "--$PROFILE"64   # && \65   # cargo test6667# ===== BUILD POLKADOT =====68FROM rust-builder as builder-polkadot6970RUN mkdir unique_parachain71WORKDIR /unique_parachain7273RUN git clone -b $POLKA_VERSION --depth 1 https://github.com/paritytech/polkadot.git && \74    cd polkadot && \75    git tag -n && \76	cargo build --release7778# ===== RUN ======7980FROM phusion/baseimage:focal-1.1.08182ARG PROFILE=release8384RUN apt-get -y update && \85      apt-get -y upgrade && \86      apt-get -y install curl git && \87      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \88      export NVM_DIR="$HOME/.nvm" && \89      [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \90      nvm install v15.5.0 && \91      nvm use v15.5.09293RUN git clone https://github.com/paritytech/polkadot-launch9495RUN export NVM_DIR="$HOME/.nvm" && \96    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \97    cd /polkadot-launch && \98    npm install --global yarn && \99    yarn100101COPY --from=builder /unique_parachain/target/$PROFILE/unique-collator /unique-chain/target/$PROFILE/102COPY --from=builder-polkadot /unique_parachain/polkadot/target/$PROFILE/polkadot /polkadot/target/$PROFILE/103104CMD export NVM_DIR="$HOME/.nvm" && \105    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \106    cd /polkadot-launch && \107    yarn start launch-config.json
modifiedREADME.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
 ```
 
modifiedlaunch-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",
modifiedlaunch-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",
modifiednode/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'
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -243,7 +243,7 @@
 	)
 }
 
-pub fn local_testnet_rococo_config() -> DefaultChainSpec {
+pub fn local_testnet_config() -> DefaultChainSpec {
 	let mut properties = Map::new();
 	properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());
 	properties.insert("tokenDecimals".into(), 18.into());
@@ -305,7 +305,7 @@
 		Some(properties),
 		// Extensions
 		Extensions {
-			relay_chain: "rococo-local".into(),
+			relay_chain: "westend-local".into(),
 			para_id: 1000,
 		},
 	)
modifiednode/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()),
 			}
 		}
modifiedruntime/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']
modifiedruntime/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']
modifiedruntime/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()
modifiedruntime/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,
modifiedruntime/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']
modifiedruntime/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()
modifiedruntime/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,
modifiedruntime/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()
modifiedruntime/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,
modifiedtests/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
modifiedtests/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, []>;
       /**