From 980f568761f041b51206c46397103ecdc6f439f6 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Mon, 1 Apr 2024 12:14:04 +0200 Subject: [PATCH 01/19] feat: use frontier-plus --- Cargo.lock | 36 ++++++++++++++++++------------------ Cargo.toml | 28 ++++++++++++++-------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 62e79b387c..999c10a11d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3342,7 +3342,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "async-trait", "fp-storage", @@ -3354,7 +3354,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "async-trait", "fp-consensus", @@ -3370,7 +3370,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "async-trait", "fc-api", @@ -3391,7 +3391,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "fc-db", "fc-storage", @@ -3412,7 +3412,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "ethereum", "ethereum-types", @@ -3466,7 +3466,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "ethereum", "ethereum-types", @@ -3479,7 +3479,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "ethereum", "ethereum-types", @@ -3632,7 +3632,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "hex", "impl-serde", @@ -3651,7 +3651,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "ethereum", "parity-scale-codec", @@ -3663,7 +3663,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "ethereum", "ethereum-types", @@ -3676,7 +3676,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "evm", "frame-support", @@ -3692,7 +3692,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "ethereum", "ethereum-types", @@ -3709,7 +3709,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "frame-support", "parity-scale-codec", @@ -3721,7 +3721,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "parity-scale-codec", "serde", @@ -6988,7 +6988,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "fp-evm", "frame-support", @@ -7272,7 +7272,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "ethereum", "ethereum-types", @@ -7295,7 +7295,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "environmental", "evm", @@ -7377,7 +7377,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.3.0#2b684850edc955bcd3c3943216e451364ff0afa3" +source = "git+ssh://git@github.com/uniquenetwork/unique-frontier-plus?branch=unique-polkadot-v1.3.0#5e66cb5b1fb225d2947d86307c1b27d838fe3e16" dependencies = [ "fp-evm", "ripemd", diff --git a/Cargo.toml b/Cargo.toml index c7bb61f678..ec1b0d0166 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,22 +69,22 @@ quartz-runtime = { path = "runtime/quartz" } unique-runtime = { path = "runtime/unique" } # Frontier (Unique patches over the Parity version) -fc-api = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } +fc-api = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fc-consensus = { git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fc-db = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fc-mapping-sync = { git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fc-rpc = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fc-rpc-core = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fp-evm = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fp-rpc = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } fp-self-contained = { default-features = false, features = [ "serde", -], git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v1.3.0" } +], git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +fp-storage = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +pallet-base-fee = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +pallet-ethereum = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +pallet-evm = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } +pallet-evm-precompile-simple = { default-features = false, git = "ssh://git@github.com/uniquenetwork/unique-frontier-plus", branch = "unique-polkadot-v1.3.0" } # Parity codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = "3.6.5" } From dea010c27497f6a02416a2aae09b582c34d1f9bf Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Mon, 1 Apr 2024 12:14:31 +0200 Subject: [PATCH 02/19] chore: bump spec_version --- runtime/opal/src/lib.rs | 2 +- runtime/quartz/src/lib.rs | 2 +- runtime/unique/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/opal/src/lib.rs b/runtime/opal/src/lib.rs index 79d644e18e..9558ed8372 100644 --- a/runtime/opal/src/lib.rs +++ b/runtime/opal/src/lib.rs @@ -49,7 +49,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("opal"), impl_name: create_runtime_str!("opal"), authoring_version: 1, - spec_version: 10030070, + spec_version: 10030071, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, diff --git a/runtime/quartz/src/lib.rs b/runtime/quartz/src/lib.rs index a4b896e01e..90dc1c02b6 100644 --- a/runtime/quartz/src/lib.rs +++ b/runtime/quartz/src/lib.rs @@ -51,7 +51,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_name: create_runtime_str!("quartz"), authoring_version: 1, - spec_version: 10030070, + spec_version: 10030071, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, diff --git a/runtime/unique/src/lib.rs b/runtime/unique/src/lib.rs index af4690f808..db3b7cff27 100644 --- a/runtime/unique/src/lib.rs +++ b/runtime/unique/src/lib.rs @@ -49,7 +49,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("unique"), impl_name: create_runtime_str!("unique"), authoring_version: 1, - spec_version: 10030070, + spec_version: 10030071, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, From 327c95d8407f29cb65029325e964af99b7dae2c3 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 18:56:20 +0700 Subject: [PATCH 03/19] try build node-only-update with private frontier --- .cargo/config.toml | 2 ++ .docker/Dockerfile-unique | 18 +++++------------- .github/workflows/node-only-update.yml | 1 + .gitignore | 1 - 4 files changed, 8 insertions(+), 14 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000000..656e08b011 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[net] +git-fetch-with-cli = true \ No newline at end of file diff --git a/.docker/Dockerfile-unique b/.docker/Dockerfile-unique index 06aded347e..ca2642ba41 100644 --- a/.docker/Dockerfile-unique +++ b/.docker/Dockerfile-unique @@ -1,19 +1,7 @@ # ===== Rust builder ===== -FROM ubuntu:22.04 as rust-builder +FROM uniquenetwork/services:latest as rust-builder LABEL maintainer="Unique.Network" -ENV CARGO_HOME="/cargo-home" -ENV PATH="/cargo-home/bin:$PATH" -ENV TZ=UTC -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update && \ - apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ - apt-get clean && \ - rm -r /var/lib/apt/lists/* - -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none - ARG RUST_TOOLCHAIN RUN echo "Using Rust '$RUST_TOOLCHAIN'" && \ rustup toolchain install $RUST_TOOLCHAIN && \ @@ -32,6 +20,10 @@ WORKDIR /unique_parachain COPY . unique-chain/ +ARG GIT_PRIVATE_CREDENTIALS + +RUN git config --global url."https://${{ GIT_PRIVATE_CREDENTIALS }}@github.com".insteadOf ssh://git@github.com + ARG RUNTIME_FEATURES # registry for Updating registry. It is safe to cache it, because it only contains references to the dependency files, # and the caches for the files themselves are set in Cargo.lock, which won't be updated because of --locked flag diff --git a/.github/workflows/node-only-update.yml b/.github/workflows/node-only-update.yml index 8724ba6350..48c231b4cb 100644 --- a/.github/workflows/node-only-update.yml +++ b/.github/workflows/node-only-update.yml @@ -131,6 +131,7 @@ jobs: args: | --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 4e3edc65ed..b58a77bf55 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ einstein_key_file *store_key*.json /.idea/ -/.cargo/ /.vscode/ .envrc-dev From c21c848fb1bb1466065291a4dcf8142068cab488 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 19:19:05 +0700 Subject: [PATCH 04/19] fix workflows for build with private frontier --- .docker/Dockerfile-unique | 2 +- .github/workflows/collator-selection.yml | 1 + .github/workflows/forkless-update-data.yml | 1 + .github/workflows/forkless-update-nodata.yml | 1 + .github/workflows/xcm.yml | 1 + .github/workflows/xnft.yml | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.docker/Dockerfile-unique b/.docker/Dockerfile-unique index ca2642ba41..deadfe9b1f 100644 --- a/.docker/Dockerfile-unique +++ b/.docker/Dockerfile-unique @@ -22,7 +22,7 @@ COPY . unique-chain/ ARG GIT_PRIVATE_CREDENTIALS -RUN git config --global url."https://${{ GIT_PRIVATE_CREDENTIALS }}@github.com".insteadOf ssh://git@github.com +RUN git config --global url."https://$GIT_PRIVATE_CREDENTIALS@github.com".insteadOf ssh://git@github.com ARG RUNTIME_FEATURES # registry for Updating registry. It is safe to cache it, because it only contains references to the dependency files, diff --git a/.github/workflows/collator-selection.yml b/.github/workflows/collator-selection.yml index 3603290fb0..76f949825b 100644 --- a/.github/workflows/collator-selection.yml +++ b/.github/workflows/collator-selection.yml @@ -141,6 +141,7 @@ jobs: args: | --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }},session-test-timings --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} diff --git a/.github/workflows/forkless-update-data.yml b/.github/workflows/forkless-update-data.yml index b15aaf9ea4..9cbc37d369 100644 --- a/.github/workflows/forkless-update-data.yml +++ b/.github/workflows/forkless-update-data.yml @@ -110,6 +110,7 @@ jobs: args: | --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} diff --git a/.github/workflows/forkless-update-nodata.yml b/.github/workflows/forkless-update-nodata.yml index 7408ee4c28..16c7d17c3a 100644 --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -125,6 +125,7 @@ jobs: args: | --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} diff --git a/.github/workflows/xcm.yml b/.github/workflows/xcm.yml index f21933d620..c5630ff976 100644 --- a/.github/workflows/xcm.yml +++ b/.github/workflows/xcm.yml @@ -285,6 +285,7 @@ jobs: docker build --file .docker/Dockerfile-unique \ --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \ --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \ + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} \ --tag uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} \ . diff --git a/.github/workflows/xnft.yml b/.github/workflows/xnft.yml index 4d2752e580..b7ba84c29f 100644 --- a/.github/workflows/xnft.yml +++ b/.github/workflows/xnft.yml @@ -151,6 +151,7 @@ jobs: docker build --file .docker/Dockerfile-unique \ --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \ --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \ + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} \ --tag uniquenetwork/ci-xnft-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} \ . From 129720800c3853ac87a75e02fbcce5b99b0bdc47 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 19:36:21 +0700 Subject: [PATCH 05/19] fix for private frontier --- .docker/Dockerfile-chain-dev | 4 ++++ .docker/Dockerfile-chain-dev-unit | 4 ++++ .docker/Dockerfile-try-runtime.j2 | 4 ++++ .github/workflows/try-runtime.yml | 1 + .github/workflows/unit-test.yml | 1 + .github/workflows/yarn-dev.yml | 1 + 6 files changed, 15 insertions(+) diff --git a/.docker/Dockerfile-chain-dev b/.docker/Dockerfile-chain-dev index a19bf8c885..f2d2b80c79 100644 --- a/.docker/Dockerfile-chain-dev +++ b/.docker/Dockerfile-chain-dev @@ -21,6 +21,10 @@ COPY . /dev_chain WORKDIR /dev_chain +ARG GIT_PRIVATE_CREDENTIALS + +RUN git config --global url."https://$GIT_PRIVATE_CREDENTIALS@github.com".insteadOf ssh://git@github.com + RUN cargo build --profile integration-tests --features=${NETWORK}-runtime,fast-inflation RUN echo "$NETWORK" diff --git a/.docker/Dockerfile-chain-dev-unit b/.docker/Dockerfile-chain-dev-unit index 5ea2305bbe..b52245316f 100644 --- a/.docker/Dockerfile-chain-dev-unit +++ b/.docker/Dockerfile-chain-dev-unit @@ -17,4 +17,8 @@ COPY . /dev_chain WORKDIR /dev_chain +ARG GIT_PRIVATE_CREDENTIALS + +RUN git config --global url."https://$GIT_PRIVATE_CREDENTIALS@github.com".insteadOf ssh://git@github.com + CMD cargo test --features=limit-testing,tests --workspace diff --git a/.docker/Dockerfile-try-runtime.j2 b/.docker/Dockerfile-try-runtime.j2 index 9d6c24307f..7cbe4d1825 100644 --- a/.docker/Dockerfile-try-runtime.j2 +++ b/.docker/Dockerfile-try-runtime.j2 @@ -25,6 +25,10 @@ ARG PROFILE=release COPY . /unique_parachain WORKDIR /unique_parachain +ARG GIT_PRIVATE_CREDENTIALS + +RUN git config --global url."https://$GIT_PRIVATE_CREDENTIALS@github.com".insteadOf ssh://git@github.com + RUN echo "Requested features: {{ NETWORK }}-runtime\n" && \ echo "Fork from: {{ REPLICA_FROM }}\n" && \ cargo build --features=try-runtime,{{ NETWORK }}-runtime --release diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index 4cbebc2b92..88b0c75dc9 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -169,6 +169,7 @@ jobs: variables: | NETWORK=${{ matrix.network }} BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA + GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - name: Show build configuration run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6a399fb1df..8f9e3e230d 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -39,6 +39,7 @@ jobs: output_file: .docker/docker-compose.unit.yml variables: | RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - name: Show build configuration diff --git a/.github/workflows/yarn-dev.yml b/.github/workflows/yarn-dev.yml index bde90bd0d8..9e393eab16 100644 --- a/.github/workflows/yarn-dev.yml +++ b/.github/workflows/yarn-dev.yml @@ -49,6 +49,7 @@ jobs: variables: | RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} NETWORK=${{ matrix.network }} + GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - name: Show build configuration From 8f1d8b153a52fe24de71260249759bbdd5887e79 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 20:06:48 +0700 Subject: [PATCH 06/19] fix --- .docker/docker-compose.gov.j2 | 1 + .docker/docker-compose.tmp-dev.j2 | 1 + .docker/docker-compose.tmp-unit.j2 | 1 + .github/workflows/codestyle.yml | 2 ++ .github/workflows/governance.yml | 1 + .github/workflows/polkadot-types.yml | 1 + .github/workflows/try-runtime.yml | 2 +- 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.docker/docker-compose.gov.j2 b/.docker/docker-compose.gov.j2 index b411da8672..edabc3fb27 100644 --- a/.docker/docker-compose.gov.j2 +++ b/.docker/docker-compose.gov.j2 @@ -7,6 +7,7 @@ services: - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}" - "NETWORK={{ NETWORK }}" - "WASM_NAME={{ WASM_NAME }}" + - "GIT_PRIVATE_CREDENTIALS"={{ GIT_PRIVATE_CREDENTIALS }} context: ../ dockerfile: .docker/Dockerfile-chain-dev image: node-dev diff --git a/.docker/docker-compose.tmp-dev.j2 b/.docker/docker-compose.tmp-dev.j2 index bfac7fa28a..d4b4352752 100644 --- a/.docker/docker-compose.tmp-dev.j2 +++ b/.docker/docker-compose.tmp-dev.j2 @@ -6,6 +6,7 @@ services: args: - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}" - "NETWORK={{ NETWORK }}" + - "GIT_PRIVATE_CREDENTIALS"={{ GIT_PRIVATE_CREDENTIALS }} context: ../ dockerfile: .docker/Dockerfile-chain-dev image: node-dev diff --git a/.docker/docker-compose.tmp-unit.j2 b/.docker/docker-compose.tmp-unit.j2 index 831ddffb5e..180e7b41bf 100644 --- a/.docker/docker-compose.tmp-unit.j2 +++ b/.docker/docker-compose.tmp-unit.j2 @@ -8,6 +8,7 @@ services: args: - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}" - "NETWORK={{ NETWORK }}" + - "GIT_PRIVATE_CREDENTIALS"={{ GIT_PRIVATE_CREDENTIALS }} image: node-dev container_name: node-dev logging: diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index da2407ba3a..42e2c9c5d4 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -61,6 +61,8 @@ jobs: toolchain: ${{ env.RUST_TOOLCHAIN }} targets: wasm32-unknown-unknown components: rustfmt, clippy + - name: set git configuration + run: git config --global url."https://${{ secrets.GIT_PRIVATE_CREDENTIALS }}@github.com".insteadOf ssh://git@github.com - name: Run cargo check run: cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests -- -Dwarnings env: diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml index dc0ce2d210..026fb17c9f 100644 --- a/.github/workflows/governance.yml +++ b/.github/workflows/governance.yml @@ -70,6 +70,7 @@ jobs: RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} NETWORK=${{ matrix.network }} WASM_NAME=${{ matrix.wasm_name }} + GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - name: Show build configuration run: cat .docker/docker-compose.${{ matrix.network }}.yml diff --git a/.github/workflows/polkadot-types.yml b/.github/workflows/polkadot-types.yml index ec29dd9ef0..5f9442c065 100644 --- a/.github/workflows/polkadot-types.yml +++ b/.github/workflows/polkadot-types.yml @@ -59,6 +59,7 @@ jobs: variables: | RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} NETWORK=${{ matrix.network }} + GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - name: Show build configuration run: cat .docker/docker-compose.${{ matrix.network }}.yml diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index 88b0c75dc9..6815d2917f 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -84,6 +84,7 @@ jobs: NETWORK=${{ matrix.network }} WASM_NAME=${{ matrix.wasm_name }} REPLICA_FROM=${{ matrix.replica_from_address }} + GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - name: Show build Dockerfile run: cat .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml @@ -169,7 +170,6 @@ jobs: variables: | NETWORK=${{ matrix.network }} BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA - GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - name: Show build configuration run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml From 3c17d10bdb29487e2311826fe7ddd5985693ff3c Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 23:04:37 +0700 Subject: [PATCH 07/19] fix & update nodejs --- .docker/Dockerfile-try-runtime.j2 | 2 +- .docker/docker-compose.tmp-dev.j2 | 2 +- .docker/docker-compose.tmp-unit.j2 | 2 +- .env | 10 ++++------ .github/workflows/codestyle.yml | 2 +- .github/workflows/collator-selection.yml | 2 +- .github/workflows/forkless-update-data.yml | 2 +- .github/workflows/forkless-update-nodata.yml | 2 +- .github/workflows/governance.yml | 2 +- .github/workflows/make-bench.yml | 2 +- .github/workflows/market-test.yml | 2 +- .github/workflows/node-only-update.yml | 2 +- .github/workflows/polkadot-types.yml | 2 +- .github/workflows/try-runtime.yml | 2 +- .github/workflows/xcm.yml | 4 ++-- .github/workflows/xnft.yml | 2 +- .github/workflows/yarn-dev.yml | 2 +- 17 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.docker/Dockerfile-try-runtime.j2 b/.docker/Dockerfile-try-runtime.j2 index 7cbe4d1825..225cca4140 100644 --- a/.docker/Dockerfile-try-runtime.j2 +++ b/.docker/Dockerfile-try-runtime.j2 @@ -1,7 +1,7 @@ # ===== Rust builder ===== FROM uniquenetwork/services:latest as rust-builder -ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN +ENV RUST_TOOLCHAIN {{ RUST_TOOLCHAIN }} ENV CARGO_HOME="/cargo-home" ENV PATH="/cargo-home/bin:$PATH" ENV TZ=UTC diff --git a/.docker/docker-compose.tmp-dev.j2 b/.docker/docker-compose.tmp-dev.j2 index d4b4352752..9cafc051c8 100644 --- a/.docker/docker-compose.tmp-dev.j2 +++ b/.docker/docker-compose.tmp-dev.j2 @@ -6,7 +6,7 @@ services: args: - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}" - "NETWORK={{ NETWORK }}" - - "GIT_PRIVATE_CREDENTIALS"={{ GIT_PRIVATE_CREDENTIALS }} + - "GIT_PRIVATE_CREDENTIALS={{ GIT_PRIVATE_CREDENTIALS }}" context: ../ dockerfile: .docker/Dockerfile-chain-dev image: node-dev diff --git a/.docker/docker-compose.tmp-unit.j2 b/.docker/docker-compose.tmp-unit.j2 index 180e7b41bf..681fb2a6cd 100644 --- a/.docker/docker-compose.tmp-unit.j2 +++ b/.docker/docker-compose.tmp-unit.j2 @@ -8,7 +8,7 @@ services: args: - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}" - "NETWORK={{ NETWORK }}" - - "GIT_PRIVATE_CREDENTIALS"={{ GIT_PRIVATE_CREDENTIALS }} + - "GIT_PRIVATE_CREDENTIALS={{ GIT_PRIVATE_CREDENTIALS }}" image: node-dev container_name: node-dev logging: diff --git a/.env b/.env index aa7bc4b705..766916f78d 100644 --- a/.env +++ b/.env @@ -1,5 +1,4 @@ RUST_TOOLCHAIN=nightly-2023-05-22 -POLKADOT_LAUNCH_BRANCH=unique-network RELAY_CHAIN_TYPE=westend CHAINQL=v0.4.1 DESTINATION_SPEC_VERSION=v942057 @@ -9,25 +8,24 @@ STATEMINT_BUILD_BRANCH=release-parachains-v9430 ACALA_BUILD_BRANCH=2.21.0 MOONBEAM_BUILD_BRANCH=runtime-2500 ASTAR_BUILD_BRANCH=v5.18.0 -UNIQUE_MAINNET_BRANCH=release-v10010063 +UNIQUE_MAINNET_BRANCH=release-v10010070 UNIQUE_REPLICA_FROM=wss://ws.unique.network:443 POLKADEX_BUILD_BRANCH=v1.1.0 - KUSAMA_MAINNET_BRANCH=release-v1.0.0 STATEMINE_BUILD_BRANCH=release-parachains-v9430 KARURA_BUILD_BRANCH=xnft-poc MOONRIVER_BUILD_BRANCH=runtime-2500 SHIDEN_BUILD_BRANCH=v5.18.0 -QUARTZ_MAINNET_BRANCH=release-v10010063 +QUARTZ_MAINNET_BRANCH=release-v10010070 QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443 UNIQUEWEST_MAINNET_BRANCH=release-v1.0.0 WESTMINT_BUILD_BRANCH=parachains-v9430 -OPAL_MAINNET_BRANCH=release-v10010063 +OPAL_MAINNET_BRANCH=release-v10010070 OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443 UNIQUEEAST_MAINNET_BRANCH=release-v1.0.0 -SAPPHIRE_MAINNET_BRANCH=release-v10010063 +SAPPHIRE_MAINNET_BRANCH=release-v10010070 SAPPHIRE_REPLICA_FROM=wss://ws-sapphire.unique.network:443 diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 42e2c9c5d4..10ca086d5d 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -40,7 +40,7 @@ jobs: ref: ${{ github.head_ref }} - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Install modules run: cd js-packages && yarn - name: Run ESLint diff --git a/.github/workflows/collator-selection.yml b/.github/workflows/collator-selection.yml index 76f949825b..4d4fe82b81 100644 --- a/.github/workflows/collator-selection.yml +++ b/.github/workflows/collator-selection.yml @@ -147,7 +147,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Install baedeker uses: UniqueNetwork/baedeker-action/setup@built diff --git a/.github/workflows/forkless-update-data.yml b/.github/workflows/forkless-update-data.yml index 9cbc37d369..f0b321a653 100644 --- a/.github/workflows/forkless-update-data.yml +++ b/.github/workflows/forkless-update-data.yml @@ -123,7 +123,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Install baedeker uses: UniqueNetwork/baedeker-action/setup@built diff --git a/.github/workflows/forkless-update-nodata.yml b/.github/workflows/forkless-update-nodata.yml index 16c7d17c3a..f6add01dbb 100644 --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -138,7 +138,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Install baedeker uses: UniqueNetwork/baedeker-action/setup@built diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml index 026fb17c9f..afb873db8b 100644 --- a/.github/workflows/governance.yml +++ b/.github/workflows/governance.yml @@ -80,7 +80,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Run tests working-directory: js-packages/tests diff --git a/.github/workflows/make-bench.yml b/.github/workflows/make-bench.yml index dc6485a2df..4b52fa362e 100644 --- a/.github/workflows/make-bench.yml +++ b/.github/workflows/make-bench.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - name: RUN benchmarking run: | diff --git a/.github/workflows/market-test.yml b/.github/workflows/market-test.yml index 1661935024..09de459c30 100644 --- a/.github/workflows/market-test.yml +++ b/.github/workflows/market-test.yml @@ -103,7 +103,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Setup TypeScript working-directory: qa-tests diff --git a/.github/workflows/node-only-update.yml b/.github/workflows/node-only-update.yml index 48c231b4cb..0783e56981 100644 --- a/.github/workflows/node-only-update.yml +++ b/.github/workflows/node-only-update.yml @@ -144,7 +144,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Install baedeker uses: UniqueNetwork/baedeker-action/setup@built diff --git a/.github/workflows/polkadot-types.yml b/.github/workflows/polkadot-types.yml index 5f9442c065..26f73482e8 100644 --- a/.github/workflows/polkadot-types.yml +++ b/.github/workflows/polkadot-types.yml @@ -69,7 +69,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 # - name: Install jq # run: sudo apt install jq -y diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index 6815d2917f..23d5c10c16 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -176,7 +176,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Log in to Docker Hub uses: docker/login-action@v2.1.0 diff --git a/.github/workflows/xcm.yml b/.github/workflows/xcm.yml index c5630ff976..600c387ef0 100644 --- a/.github/workflows/xcm.yml +++ b/.github/workflows/xcm.yml @@ -285,7 +285,7 @@ jobs: docker build --file .docker/Dockerfile-unique \ --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \ --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \ - --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} \ + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} \ --tag uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} \ . @@ -294,7 +294,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Install baedeker uses: UniqueNetwork/baedeker-action/setup@built diff --git a/.github/workflows/xnft.yml b/.github/workflows/xnft.yml index b7ba84c29f..f90831e4d5 100644 --- a/.github/workflows/xnft.yml +++ b/.github/workflows/xnft.yml @@ -160,7 +160,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Clone xnft-tests run: git clone https://github.com/UniqueNetwork/xnft-tests.git diff --git a/.github/workflows/yarn-dev.yml b/.github/workflows/yarn-dev.yml index 9e393eab16..63b3af4299 100644 --- a/.github/workflows/yarn-dev.yml +++ b/.github/workflows/yarn-dev.yml @@ -60,7 +60,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 18 + node-version: 20 - name: Run tests working-directory: js-packages/tests From 826d4e589251532449eaef08229d85041e5df9c9 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 23:08:35 +0700 Subject: [PATCH 08/19] fix --- .env | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 766916f78d..5c62f17a89 100644 --- a/.env +++ b/.env @@ -8,7 +8,7 @@ STATEMINT_BUILD_BRANCH=release-parachains-v9430 ACALA_BUILD_BRANCH=2.21.0 MOONBEAM_BUILD_BRANCH=runtime-2500 ASTAR_BUILD_BRANCH=v5.18.0 -UNIQUE_MAINNET_BRANCH=release-v10010070 +UNIQUE_MAINNET_BRANCH=release-v10030070 UNIQUE_REPLICA_FROM=wss://ws.unique.network:443 POLKADEX_BUILD_BRANCH=v1.1.0 @@ -17,15 +17,15 @@ STATEMINE_BUILD_BRANCH=release-parachains-v9430 KARURA_BUILD_BRANCH=xnft-poc MOONRIVER_BUILD_BRANCH=runtime-2500 SHIDEN_BUILD_BRANCH=v5.18.0 -QUARTZ_MAINNET_BRANCH=release-v10010070 +QUARTZ_MAINNET_BRANCH=release-v10030070 QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443 UNIQUEWEST_MAINNET_BRANCH=release-v1.0.0 WESTMINT_BUILD_BRANCH=parachains-v9430 -OPAL_MAINNET_BRANCH=release-v10010070 +OPAL_MAINNET_BRANCH=release-v10030070 OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443 UNIQUEEAST_MAINNET_BRANCH=release-v1.0.0 -SAPPHIRE_MAINNET_BRANCH=release-v10010070 +SAPPHIRE_MAINNET_BRANCH=release-v10030070 SAPPHIRE_REPLICA_FROM=wss://ws-sapphire.unique.network:443 From c86cde5a9ef226ff322120302823ef81e66ca555 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 23:44:41 +0700 Subject: [PATCH 09/19] fix nodejs error --- .github/workflows/forkless-update-data.yml | 2 +- .github/workflows/forkless-update-nodata.yml | 2 +- .github/workflows/make-bench.yml | 4 ++-- .github/workflows/xcm.yml | 2 +- .github/workflows/yarn-dev.yml | 4 ++-- js-packages/package.json | 6 +++--- js-packages/scripts/package.json | 8 ++++---- .../tests/migrations/942057-appPromotion/README.md | 2 +- js-packages/tests/package.json | 6 +++--- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/forkless-update-data.yml b/.github/workflows/forkless-update-data.yml index f0b321a653..f7d3b5eff2 100644 --- a/.github/workflows/forkless-update-data.yml +++ b/.github/workflows/forkless-update-data.yml @@ -152,7 +152,7 @@ jobs: yarn ../scripts/wait_for_first_block.sh echo "Executing upgrade" - yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm + yarn node --loader ts-node/esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} diff --git a/.github/workflows/forkless-update-nodata.yml b/.github/workflows/forkless-update-nodata.yml index f6add01dbb..ada1388238 100644 --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -167,7 +167,7 @@ jobs: yarn ../scripts/wait_for_first_block.sh echo "Executing upgrade" - yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm + yarn node --loader ts-node/esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} diff --git a/.github/workflows/make-bench.yml b/.github/workflows/make-bench.yml index 4b52fa362e..6c6e40aee2 100644 --- a/.github/workflows/make-bench.yml +++ b/.github/workflows/make-bench.yml @@ -50,8 +50,8 @@ jobs: working-directory: js-packages/scripts run: | yarn - yarn ts-node --esm calibrate.ts - yarn ts-node --esm calibrateApply.ts + yarn node --loader ts-node/esm calibrate.ts + yarn node --loader ts-node/esm calibrateApply.ts - name: show git diff run: | diff --git a/.github/workflows/xcm.yml b/.github/workflows/xcm.yml index 600c387ef0..f1a5d8eab6 100644 --- a/.github/workflows/xcm.yml +++ b/.github/workflows/xcm.yml @@ -336,7 +336,7 @@ jobs: - name: Call HRMP initialization working-directory: js-packages/tests run: | - yarn ts-node --esm util/createHrmp.ts ${{matrix.network}} + yarn node --loader ts-node/esm util/createHrmp.ts ${{matrix.network}} - name: Run XCM tests working-directory: js-packages/tests diff --git a/.github/workflows/yarn-dev.yml b/.github/workflows/yarn-dev.yml index 63b3af4299..46c41e5288 100644 --- a/.github/workflows/yarn-dev.yml +++ b/.github/workflows/yarn-dev.yml @@ -91,13 +91,13 @@ jobs: working-directory: js-packages/scripts run: | yarn install - npx ts-node --esm ./benchmarks/mintFee/index.ts + npx node --loader ts-node/esm ./benchmarks/mintFee/index.ts - name: Run benchmark opsFee tests working-directory: js-packages/scripts run: | yarn install - npx ts-node --esm ./benchmarks/opsFee/index.ts + npx node --loader ts-node/esm ./benchmarks/opsFee/index.ts - name: Stop running containers if: always() # run this step always diff --git a/js-packages/package.json b/js-packages/package.json index 553f37fca8..0fda3c76a8 100644 --- a/js-packages/package.json +++ b/js-packages/package.json @@ -45,9 +45,9 @@ "prepublish": "yarn tsc", "lint": "eslint --ext .ts .", "fix": "yarn lint --fix", - "polkadot-types-fetch-metadata": "yarn ts-node --esm scripts/fetchMetadata.ts", - "polkadot-types-from-defs": "ts-node --esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .", - "polkadot-types-from-chain": "ts-node --esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .", + "polkadot-types-fetch-metadata": "yarn node --loader ts-node/esm scripts/fetchMetadata.ts", + "polkadot-types-from-defs": "node --loader ts-node/esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .", + "polkadot-types-from-chain": "node --loader ts-node/esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .", "polkadot-types": "echo \"export default {}\" > types/lookup.ts && yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain && rm types/registry.ts" }, "resolutions": { diff --git a/js-packages/scripts/package.json b/js-packages/scripts/package.json index bd30606392..d230834091 100644 --- a/js-packages/scripts/package.json +++ b/js-packages/scripts/package.json @@ -12,9 +12,9 @@ "scripts": { "benchMintingFee": "yarn ts-node benchmarks/mintFee/benchmark.ts", "loadTransfer": "yarn ts-node transfer.nload.ts", - "generateEnv": "yarn ts-node --esm ./generateEnv.ts", - "propose-upgrade": "yarn ts-node --esm ./proposeupgrade.ts", - "propose-fast-track": "yarn ts-node --esm ./proposefasttrack.ts", - "council-democracy-proposal": "yarn ts-node --esm ./councilproposal.ts" + "generateEnv": "yarn node --loader ts-node/esm ./generateEnv.ts", + "propose-upgrade": "yarn node --loader ts-node/esm ./proposeupgrade.ts", + "propose-fast-track": "yarn node --loader ts-node/esm ./proposefasttrack.ts", + "council-democracy-proposal": "yarn node --loader ts-node/esm ./councilproposal.ts" } } diff --git a/js-packages/tests/migrations/942057-appPromotion/README.md b/js-packages/tests/migrations/942057-appPromotion/README.md index fcdf6bb048..14b4d727b0 100644 --- a/js-packages/tests/migrations/942057-appPromotion/README.md +++ b/js-packages/tests/migrations/942057-appPromotion/README.md @@ -38,5 +38,5 @@ To run, you need to set an environment variables: Run the migration by executing the following command: ```sh -npx ts-node --esm executeMigration.ts +npx node --loader ts-node/esm executeMigration.ts ``` diff --git a/js-packages/tests/package.json b/js-packages/tests/package.json index c7f0fbbd17..537673ab4c 100644 --- a/js-packages/tests/package.json +++ b/js-packages/tests/package.json @@ -13,9 +13,9 @@ "mocha": "^10.1.0" }, "scripts": { - "setup": "yarn ts-node --esm ./util/globalSetup.ts", - "setIdentities": "yarn ts-node --esm ./util/identitySetter.ts", - "checkRelayIdentities": "yarn ts-node --esm ./util/relayIdentitiesChecker.ts", + "setup": "yarn node --loader ts-node/esm ./util/globalSetup.ts", + "setIdentities": "yarn node --loader ts-node/esm ./util/identitySetter.ts", + "checkRelayIdentities": "yarn node --loader ts-node/esm ./util/relayIdentitiesChecker.ts", "_test": "yarn setup && yarn mocha --timeout 9999999 --loader=ts-node/esm.mjs", "_testParallel": "yarn setup && yarn mocha --timeout 9999999 --parallel --loader=ts-node/esm.mjs", "test": "yarn _test './**/*.*test.ts'", From f741d8eb4fdfbc18ff97a0b70ad5517abd6813b9 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Mon, 1 Apr 2024 23:55:18 +0700 Subject: [PATCH 10/19] fix --- .docker/Dockerfile-try-runtime.j2 | 3 +-- .docker/docker-compose.gov.j2 | 2 +- .github/workflows/forkless-update-nodata.yml | 1 + .github/workflows/node-only-update.yml | 14 ++++++-------- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.docker/Dockerfile-try-runtime.j2 b/.docker/Dockerfile-try-runtime.j2 index 225cca4140..6953e6cb2e 100644 --- a/.docker/Dockerfile-try-runtime.j2 +++ b/.docker/Dockerfile-try-runtime.j2 @@ -21,12 +21,11 @@ WORKDIR /unique_parachain FROM rust-builder as builder-unique ARG PROFILE=release +ARG GIT_PRIVATE_CREDENTIALS COPY . /unique_parachain WORKDIR /unique_parachain -ARG GIT_PRIVATE_CREDENTIALS - RUN git config --global url."https://$GIT_PRIVATE_CREDENTIALS@github.com".insteadOf ssh://git@github.com RUN echo "Requested features: {{ NETWORK }}-runtime\n" && \ diff --git a/.docker/docker-compose.gov.j2 b/.docker/docker-compose.gov.j2 index edabc3fb27..77d54c5b3c 100644 --- a/.docker/docker-compose.gov.j2 +++ b/.docker/docker-compose.gov.j2 @@ -7,7 +7,7 @@ services: - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}" - "NETWORK={{ NETWORK }}" - "WASM_NAME={{ WASM_NAME }}" - - "GIT_PRIVATE_CREDENTIALS"={{ GIT_PRIVATE_CREDENTIALS }} + - "GIT_PRIVATE_CREDENTIALS={{ GIT_PRIVATE_CREDENTIALS }}" context: ../ dockerfile: .docker/Dockerfile-chain-dev image: node-dev diff --git a/.github/workflows/forkless-update-nodata.yml b/.github/workflows/forkless-update-nodata.yml index ada1388238..f17408fd5e 100644 --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -174,6 +174,7 @@ jobs: - name: Run Parallel tests after forkless upgrade working-directory: js-packages/tests run: | + yarn yarn add mochawesome ../scripts/wait_for_first_block.sh echo "Ready to start tests" diff --git a/.github/workflows/node-only-update.yml b/.github/workflows/node-only-update.yml index 0783e56981..4fc4968ab6 100644 --- a/.github/workflows/node-only-update.yml +++ b/.github/workflows/node-only-update.yml @@ -166,13 +166,12 @@ jobs: ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}) - name: Run Parallel tests before Node Parachain upgrade - working-directory: ${{ matrix.mainnet_branch }}/tests + working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests if: success() run: | yarn yarn add mochawesome - # TODO: Update to new script structure after mainnet will have it - ./scripts/wait_for_first_block.sh + ../scripts/wait_for_first_block.sh echo "Ready to start tests" NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} env: @@ -180,7 +179,7 @@ jobs: - name: Run Sequential tests before Node Parachain upgrade if: success() || failure() - working-directory: ${{ matrix.mainnet_branch }}/tests + working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} @@ -214,13 +213,12 @@ jobs: snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}) - name: Run Parallel tests after Node Parachain upgrade - working-directory: ${{ matrix.mainnet_branch }}/tests + working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests if: success() || failure() # run this step even if previous step failed run: | yarn install yarn add mochawesome - # TODO: Update to new script structure after mainnet will have it - ./scripts/wait_for_first_block.sh + ../scripts/wait_for_first_block.sh echo "Ready to start tests" NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} env: @@ -228,7 +226,7 @@ jobs: - name: Run Sequential tests after Node Parachain upgrade if: success() || failure() - working-directory: ${{ matrix.mainnet_branch }}/tests + working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} From 2ed496d394fa170ef3c4bf5fd2c9cdd471e96d4e Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Tue, 2 Apr 2024 00:33:24 +0700 Subject: [PATCH 11/19] try-runtime --- .docker/Dockerfile-try-runtime | 37 +++++++++++++++++++++++++++++++ .github/workflows/try-runtime.yml | 37 ++++++++++++++++--------------- js-packages/scripts/package.json | 4 ++-- js-packages/tests/package.json | 4 ++-- 4 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 .docker/Dockerfile-try-runtime diff --git a/.docker/Dockerfile-try-runtime b/.docker/Dockerfile-try-runtime new file mode 100644 index 0000000000..eda2a39338 --- /dev/null +++ b/.docker/Dockerfile-try-runtime @@ -0,0 +1,37 @@ +# ===== Rust builder ===== +FROM uniquenetwork/services:latest as rust-builder + +ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN +ENV CARGO_HOME="/cargo-home" +ENV PATH="/cargo-home/bin:$PATH" +ENV TZ=UTC + +RUN rustup toolchain uninstall $(rustup toolchain list) && \ + rustup toolchain install $RUST_TOOLCHAIN && \ + rustup default $RUST_TOOLCHAIN && \ + rustup target list --installed && \ + rustup show +RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN + +RUN mkdir /unique_parachain +WORKDIR /unique_parachain + + +# ===== BUILD ====== +FROM rust-builder as builder-unique + +ARG NETWORK +ARG REPLICA_FROM +ARG WASM_NAME +ARG GIT_PRIVATE_CREDENTIALS + +COPY . /unique_parachain +WORKDIR /unique_parachain + +RUN git config --global url."https://$GIT_PRIVATE_CREDENTIALS@github.com".insteadOf ssh://git@github.com + +RUN echo "Requested features: $NETWORK-runtime\n" && \ + echo "Fork from: $REPLICA_FROM\n" && \ + cargo build --features=try-runtime,$NETWORK-runtime --release + +CMD cargo run --release --features $NETWORK-runtime,try-runtime -- try-runtime --runtime target/release/wbuild/$WASM_NAME-runtime/$WASM_NAME_runtime.compact.compressed.wasm -lruntime=debug -ltry-runtime::cli=debug on-runtime-upgrade --checks live --uri $REPLICA_FROM diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index 23d5c10c16..fdf0180e83 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -73,22 +73,6 @@ jobs: username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} - # Build main image for TRY-RUNTIME - - name: Generate ENV related extend Dockerfile file - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/Dockerfile-try-runtime.j2 - output_file: .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml - variables: | - RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - NETWORK=${{ matrix.network }} - WASM_NAME=${{ matrix.wasm_name }} - REPLICA_FROM=${{ matrix.replica_from_address }} - GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS }} - - - name: Show build Dockerfile - run: cat .docker/Dockerfile-try-runtime.${{ matrix.network }}.yml - - name: Run find-and-replace to remove slashes from branch name uses: mad9000/actions-find-and-replace-string@4 id: branchname @@ -102,8 +86,25 @@ jobs: run: | echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV - - name: Build the stack - run: cd .docker/ && docker build --no-cache --file ./Dockerfile-try-runtime.${{ matrix.network }}.yml --tag uniquenetwork/ci-tryruntime-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA ../ + - name: Prepare docker containers + uses: ./.github/actions/buildContainer + id: try-runtime + with: + container: uniquenetwork/ci-tryruntime-local + tag: ${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA + context: . + dockerfile: ./Dockerfile-try-runtime + args: | + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + --build-arg NETWORK=${{ matrix.network }} + --build-arg WASM_NAME=${{ matrix.wasm_name }} + --build-arg REPLICA_FROM=${{ matrix.replica_from_address }} + --build-arg GIT_PRIVATE_CREDENTIALS=${{ secrets.GIT_PRIVATE_CREDENTIALS}} + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + # - name: Build the stack + # run: cd .docker/ && docker build --no-cache --file ./Dockerfile-try-runtime.${{ matrix.network }}.yml --tag uniquenetwork/ci-tryruntime-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA ../ - name: Push docker image version run: docker push uniquenetwork/ci-tryruntime-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA diff --git a/js-packages/scripts/package.json b/js-packages/scripts/package.json index d230834091..68f9494197 100644 --- a/js-packages/scripts/package.json +++ b/js-packages/scripts/package.json @@ -10,8 +10,8 @@ "version": "1.0.0", "main": "", "scripts": { - "benchMintingFee": "yarn ts-node benchmarks/mintFee/benchmark.ts", - "loadTransfer": "yarn ts-node transfer.nload.ts", + "benchMintingFee": "yarn node --loader ts-node/esm benchmarks/mintFee/benchmark.ts", + "loadTransfer": "yarn node --loader ts-node/esm transfer.nload.ts", "generateEnv": "yarn node --loader ts-node/esm ./generateEnv.ts", "propose-upgrade": "yarn node --loader ts-node/esm ./proposeupgrade.ts", "propose-fast-track": "yarn node --loader ts-node/esm ./proposefasttrack.ts", diff --git a/js-packages/tests/package.json b/js-packages/tests/package.json index 537673ab4c..ff31b65a1c 100644 --- a/js-packages/tests/package.json +++ b/js-packages/tests/package.json @@ -16,8 +16,8 @@ "setup": "yarn node --loader ts-node/esm ./util/globalSetup.ts", "setIdentities": "yarn node --loader ts-node/esm ./util/identitySetter.ts", "checkRelayIdentities": "yarn node --loader ts-node/esm ./util/relayIdentitiesChecker.ts", - "_test": "yarn setup && yarn mocha --timeout 9999999 --loader=ts-node/esm.mjs", - "_testParallel": "yarn setup && yarn mocha --timeout 9999999 --parallel --loader=ts-node/esm.mjs", + "_test": "yarn setup && yarn mocha --timeout 9999999 --loader ts-node/esm", + "_testParallel": "yarn setup && yarn mocha --timeout 9999999 --parallel --loader ts-node/esm", "test": "yarn _test './**/*.*test.ts'", "testParallel": "yarn _testParallel './**/*.test.ts'", "testSequential": "yarn _test './**/*.seqtest.ts'", From d9dbe1a8ce3d0b31845dd85e1e1faf07a1dbdbae Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Tue, 2 Apr 2024 01:51:55 +0700 Subject: [PATCH 12/19] fix --- .docker/Dockerfile-chain-dev | 3 +-- js-packages/scripts/tsconfig.json | 26 ++++++++++++++++++++++++++ js-packages/tests/tsconfig.json | 26 ++++++++++++++++++++++++++ js-packages/types/tsconfig.json | 26 ++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 js-packages/scripts/tsconfig.json create mode 100644 js-packages/tests/tsconfig.json create mode 100644 js-packages/types/tsconfig.json diff --git a/.docker/Dockerfile-chain-dev b/.docker/Dockerfile-chain-dev index f2d2b80c79..3a0cb2cf6e 100644 --- a/.docker/Dockerfile-chain-dev +++ b/.docker/Dockerfile-chain-dev @@ -2,6 +2,7 @@ FROM uniquenetwork/services:latest ARG RUST_TOOLCHAIN ARG NETWORK +ARG GIT_PRIVATE_CREDENTIALS ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC @@ -21,8 +22,6 @@ COPY . /dev_chain WORKDIR /dev_chain -ARG GIT_PRIVATE_CREDENTIALS - RUN git config --global url."https://$GIT_PRIVATE_CREDENTIALS@github.com".insteadOf ssh://git@github.com RUN cargo build --profile integration-tests --features=${NETWORK}-runtime,fast-inflation diff --git a/js-packages/scripts/tsconfig.json b/js-packages/scripts/tsconfig.json new file mode 100644 index 0000000000..3b34ea4858 --- /dev/null +++ b/js-packages/scripts/tsconfig.json @@ -0,0 +1,26 @@ +{ + "include": [ + "./src/**/*" + ], + "exclude": [ + "**/*.test.*", + "node_modules" + ], + "ts-node": { + // Tell ts-node CLI to install the --loader automatically + "esm": true + }, + "compilerOptions": { + "target": "ESNext", + "module": "commonjs", + "sourceMap": true, + "outDir": "dist", + "strict": true, + "lib": [ + "esnext" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/js-packages/tests/tsconfig.json b/js-packages/tests/tsconfig.json new file mode 100644 index 0000000000..3b34ea4858 --- /dev/null +++ b/js-packages/tests/tsconfig.json @@ -0,0 +1,26 @@ +{ + "include": [ + "./src/**/*" + ], + "exclude": [ + "**/*.test.*", + "node_modules" + ], + "ts-node": { + // Tell ts-node CLI to install the --loader automatically + "esm": true + }, + "compilerOptions": { + "target": "ESNext", + "module": "commonjs", + "sourceMap": true, + "outDir": "dist", + "strict": true, + "lib": [ + "esnext" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file diff --git a/js-packages/types/tsconfig.json b/js-packages/types/tsconfig.json new file mode 100644 index 0000000000..3b34ea4858 --- /dev/null +++ b/js-packages/types/tsconfig.json @@ -0,0 +1,26 @@ +{ + "include": [ + "./src/**/*" + ], + "exclude": [ + "**/*.test.*", + "node_modules" + ], + "ts-node": { + // Tell ts-node CLI to install the --loader automatically + "esm": true + }, + "compilerOptions": { + "target": "ESNext", + "module": "commonjs", + "sourceMap": true, + "outDir": "dist", + "strict": true, + "lib": [ + "esnext" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} \ No newline at end of file From ce601ac00a6924a404832f483031a789bfa04a68 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Tue, 2 Apr 2024 01:56:50 +0700 Subject: [PATCH 13/19] fix --- .github/workflows/try-runtime.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index fdf0180e83..9b77e0d9c1 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -93,7 +93,7 @@ jobs: container: uniquenetwork/ci-tryruntime-local tag: ${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA context: . - dockerfile: ./Dockerfile-try-runtime + dockerfile: .docker/Dockerfile-try-runtime args: | --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} --build-arg NETWORK=${{ matrix.network }} From 0f04a3670ee40faae56e68331def653d3b7c85a3 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Tue, 2 Apr 2024 12:26:01 +0700 Subject: [PATCH 14/19] tsconfig test --- js-packages/scripts/tsconfig.json | 42 +++++++++++++------------------ js-packages/tests/tsconfig.json | 8 ------ js-packages/tsconfig.json | 12 ++++++++- 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/js-packages/scripts/tsconfig.json b/js-packages/scripts/tsconfig.json index 3b34ea4858..c06fc27c7d 100644 --- a/js-packages/scripts/tsconfig.json +++ b/js-packages/scripts/tsconfig.json @@ -1,26 +1,18 @@ { - "include": [ - "./src/**/*" - ], - "exclude": [ - "**/*.test.*", - "node_modules" - ], - "ts-node": { - // Tell ts-node CLI to install the --loader automatically - "esm": true - }, - "compilerOptions": { - "target": "ESNext", - "module": "commonjs", - "sourceMap": true, - "outDir": "dist", - "strict": true, - "lib": [ - "esnext" - ], - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } -} \ No newline at end of file + "ts-node": { + // Tell ts-node CLI to install the --loader automatically + "esm": true + }, + "compilerOptions": { + "target": "ESNext", + "module": "commonjs", + "sourceMap": true, + "strict": true, + "lib": [ + "esnext" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } + } \ No newline at end of file diff --git a/js-packages/tests/tsconfig.json b/js-packages/tests/tsconfig.json index 3b34ea4858..0ff4e307e7 100644 --- a/js-packages/tests/tsconfig.json +++ b/js-packages/tests/tsconfig.json @@ -1,11 +1,4 @@ { - "include": [ - "./src/**/*" - ], - "exclude": [ - "**/*.test.*", - "node_modules" - ], "ts-node": { // Tell ts-node CLI to install the --loader automatically "esm": true @@ -14,7 +7,6 @@ "target": "ESNext", "module": "commonjs", "sourceMap": true, - "outDir": "dist", "strict": true, "lib": [ "esnext" diff --git a/js-packages/tsconfig.json b/js-packages/tsconfig.json index eecbacfb81..cf45f22921 100644 --- a/js-packages/tsconfig.json +++ b/js-packages/tsconfig.json @@ -2,15 +2,25 @@ "exclude": [ "**/node_modules" ], + "ts-node": { + // Tell ts-node CLI to install the --loader automatically + "esm": true + }, "compilerOptions": { "skipLibCheck": true, - "module": "ESNext", + "module": "commonjs", "moduleResolution": "Bundler", "target": "ES2022", "declaration": true, "checkJs": false, "strict": true, "resolveJsonModule": true, + "lib": [ + "esnext" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, "include": [ "./**/*.ts" From 9fcee857ed25983f130855bdd228a14c7db9b232 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Tue, 2 Apr 2024 13:02:18 +0700 Subject: [PATCH 15/19] ts-node-esm --- .github/workflows/forkless-update-data.yml | 2 +- .github/workflows/forkless-update-nodata.yml | 2 +- .github/workflows/make-bench.yml | 4 ++-- .github/workflows/xcm.yml | 2 +- .github/workflows/yarn-dev.yml | 4 ++-- js-packages/package.json | 6 +++--- js-packages/scripts/package.json | 12 ++++++------ .../tests/migrations/942057-appPromotion/README.md | 2 +- js-packages/tests/package.json | 6 +++--- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/forkless-update-data.yml b/.github/workflows/forkless-update-data.yml index f7d3b5eff2..1f6692e468 100644 --- a/.github/workflows/forkless-update-data.yml +++ b/.github/workflows/forkless-update-data.yml @@ -152,7 +152,7 @@ jobs: yarn ../scripts/wait_for_first_block.sh echo "Executing upgrade" - yarn node --loader ts-node/esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm + yarn ts-node-esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} diff --git a/.github/workflows/forkless-update-nodata.yml b/.github/workflows/forkless-update-nodata.yml index f17408fd5e..1b1b9b4ea7 100644 --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -167,7 +167,7 @@ jobs: yarn ../scripts/wait_for_first_block.sh echo "Executing upgrade" - yarn node --loader ts-node/esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm + yarn ts-node-esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} diff --git a/.github/workflows/make-bench.yml b/.github/workflows/make-bench.yml index 6c6e40aee2..8331c6d9d8 100644 --- a/.github/workflows/make-bench.yml +++ b/.github/workflows/make-bench.yml @@ -50,8 +50,8 @@ jobs: working-directory: js-packages/scripts run: | yarn - yarn node --loader ts-node/esm calibrate.ts - yarn node --loader ts-node/esm calibrateApply.ts + yarn ts-node-esm calibrate.ts + yarn ts-node-esm calibrateApply.ts - name: show git diff run: | diff --git a/.github/workflows/xcm.yml b/.github/workflows/xcm.yml index f1a5d8eab6..bc8c4cf019 100644 --- a/.github/workflows/xcm.yml +++ b/.github/workflows/xcm.yml @@ -336,7 +336,7 @@ jobs: - name: Call HRMP initialization working-directory: js-packages/tests run: | - yarn node --loader ts-node/esm util/createHrmp.ts ${{matrix.network}} + yarn ts-node-esm util/createHrmp.ts ${{matrix.network}} - name: Run XCM tests working-directory: js-packages/tests diff --git a/.github/workflows/yarn-dev.yml b/.github/workflows/yarn-dev.yml index 46c41e5288..dcbbb3b13b 100644 --- a/.github/workflows/yarn-dev.yml +++ b/.github/workflows/yarn-dev.yml @@ -91,13 +91,13 @@ jobs: working-directory: js-packages/scripts run: | yarn install - npx node --loader ts-node/esm ./benchmarks/mintFee/index.ts + npx ts-node-esm ./benchmarks/mintFee/index.ts - name: Run benchmark opsFee tests working-directory: js-packages/scripts run: | yarn install - npx node --loader ts-node/esm ./benchmarks/opsFee/index.ts + npx ts-node-esm ./benchmarks/opsFee/index.ts - name: Stop running containers if: always() # run this step always diff --git a/js-packages/package.json b/js-packages/package.json index 0fda3c76a8..9bda845ff5 100644 --- a/js-packages/package.json +++ b/js-packages/package.json @@ -45,9 +45,9 @@ "prepublish": "yarn tsc", "lint": "eslint --ext .ts .", "fix": "yarn lint --fix", - "polkadot-types-fetch-metadata": "yarn node --loader ts-node/esm scripts/fetchMetadata.ts", - "polkadot-types-from-defs": "node --loader ts-node/esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .", - "polkadot-types-from-chain": "node --loader ts-node/esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .", + "polkadot-types-fetch-metadata": "yarn ts-node-esm scripts/fetchMetadata.ts", + "polkadot-types-from-defs": "ts-node-esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .", + "polkadot-types-from-chain": "ts-node-esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .", "polkadot-types": "echo \"export default {}\" > types/lookup.ts && yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain && rm types/registry.ts" }, "resolutions": { diff --git a/js-packages/scripts/package.json b/js-packages/scripts/package.json index 68f9494197..51c1ab6906 100644 --- a/js-packages/scripts/package.json +++ b/js-packages/scripts/package.json @@ -10,11 +10,11 @@ "version": "1.0.0", "main": "", "scripts": { - "benchMintingFee": "yarn node --loader ts-node/esm benchmarks/mintFee/benchmark.ts", - "loadTransfer": "yarn node --loader ts-node/esm transfer.nload.ts", - "generateEnv": "yarn node --loader ts-node/esm ./generateEnv.ts", - "propose-upgrade": "yarn node --loader ts-node/esm ./proposeupgrade.ts", - "propose-fast-track": "yarn node --loader ts-node/esm ./proposefasttrack.ts", - "council-democracy-proposal": "yarn node --loader ts-node/esm ./councilproposal.ts" + "benchMintingFee": "yarn ts-node-esm benchmarks/mintFee/benchmark.ts", + "loadTransfer": "yarn ts-node-esm transfer.nload.ts", + "generateEnv": "yarn ts-node-esm ./generateEnv.ts", + "propose-upgrade": "yarn ts-node-esm ./proposeupgrade.ts", + "propose-fast-track": "yarn ts-node-esm ./proposefasttrack.ts", + "council-democracy-proposal": "yarn ts-node-esm ./councilproposal.ts" } } diff --git a/js-packages/tests/migrations/942057-appPromotion/README.md b/js-packages/tests/migrations/942057-appPromotion/README.md index 14b4d727b0..6ed601d05a 100644 --- a/js-packages/tests/migrations/942057-appPromotion/README.md +++ b/js-packages/tests/migrations/942057-appPromotion/README.md @@ -38,5 +38,5 @@ To run, you need to set an environment variables: Run the migration by executing the following command: ```sh -npx node --loader ts-node/esm executeMigration.ts +npx ts-node-esm executeMigration.ts ``` diff --git a/js-packages/tests/package.json b/js-packages/tests/package.json index ff31b65a1c..e463e004cd 100644 --- a/js-packages/tests/package.json +++ b/js-packages/tests/package.json @@ -13,9 +13,9 @@ "mocha": "^10.1.0" }, "scripts": { - "setup": "yarn node --loader ts-node/esm ./util/globalSetup.ts", - "setIdentities": "yarn node --loader ts-node/esm ./util/identitySetter.ts", - "checkRelayIdentities": "yarn node --loader ts-node/esm ./util/relayIdentitiesChecker.ts", + "setup": "yarn ts-node-esm ./util/globalSetup.ts", + "setIdentities": "yarn ts-node-esm ./util/identitySetter.ts", + "checkRelayIdentities": "yarn ts-node-esm ./util/relayIdentitiesChecker.ts", "_test": "yarn setup && yarn mocha --timeout 9999999 --loader ts-node/esm", "_testParallel": "yarn setup && yarn mocha --timeout 9999999 --parallel --loader ts-node/esm", "test": "yarn _test './**/*.*test.ts'", From 01429ec2dae4e82ba8a684192198101d26bd0c2e Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Tue, 2 Apr 2024 13:28:40 +0700 Subject: [PATCH 16/19] --esm --- .github/workflows/forkless-update-data.yml | 2 +- .github/workflows/forkless-update-nodata.yml | 2 +- .github/workflows/make-bench.yml | 4 ++-- .github/workflows/xcm.yml | 2 +- .github/workflows/yarn-dev.yml | 4 ++-- js-packages/package.json | 6 +++--- js-packages/scripts/package.json | 12 ++++++------ .../tests/migrations/942057-appPromotion/README.md | 2 +- js-packages/tests/package.json | 6 +++--- js-packages/yarn.lock | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/forkless-update-data.yml b/.github/workflows/forkless-update-data.yml index 1f6692e468..f0b321a653 100644 --- a/.github/workflows/forkless-update-data.yml +++ b/.github/workflows/forkless-update-data.yml @@ -152,7 +152,7 @@ jobs: yarn ../scripts/wait_for_first_block.sh echo "Executing upgrade" - yarn ts-node-esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm + yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} diff --git a/.github/workflows/forkless-update-nodata.yml b/.github/workflows/forkless-update-nodata.yml index 1b1b9b4ea7..336fa6feb3 100644 --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -167,7 +167,7 @@ jobs: yarn ../scripts/wait_for_first_block.sh echo "Executing upgrade" - yarn ts-node-esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm + yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm env: RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} diff --git a/.github/workflows/make-bench.yml b/.github/workflows/make-bench.yml index 8331c6d9d8..4b52fa362e 100644 --- a/.github/workflows/make-bench.yml +++ b/.github/workflows/make-bench.yml @@ -50,8 +50,8 @@ jobs: working-directory: js-packages/scripts run: | yarn - yarn ts-node-esm calibrate.ts - yarn ts-node-esm calibrateApply.ts + yarn ts-node --esm calibrate.ts + yarn ts-node --esm calibrateApply.ts - name: show git diff run: | diff --git a/.github/workflows/xcm.yml b/.github/workflows/xcm.yml index bc8c4cf019..600c387ef0 100644 --- a/.github/workflows/xcm.yml +++ b/.github/workflows/xcm.yml @@ -336,7 +336,7 @@ jobs: - name: Call HRMP initialization working-directory: js-packages/tests run: | - yarn ts-node-esm util/createHrmp.ts ${{matrix.network}} + yarn ts-node --esm util/createHrmp.ts ${{matrix.network}} - name: Run XCM tests working-directory: js-packages/tests diff --git a/.github/workflows/yarn-dev.yml b/.github/workflows/yarn-dev.yml index dcbbb3b13b..63b3af4299 100644 --- a/.github/workflows/yarn-dev.yml +++ b/.github/workflows/yarn-dev.yml @@ -91,13 +91,13 @@ jobs: working-directory: js-packages/scripts run: | yarn install - npx ts-node-esm ./benchmarks/mintFee/index.ts + npx ts-node --esm ./benchmarks/mintFee/index.ts - name: Run benchmark opsFee tests working-directory: js-packages/scripts run: | yarn install - npx ts-node-esm ./benchmarks/opsFee/index.ts + npx ts-node --esm ./benchmarks/opsFee/index.ts - name: Stop running containers if: always() # run this step always diff --git a/js-packages/package.json b/js-packages/package.json index 9bda845ff5..553f37fca8 100644 --- a/js-packages/package.json +++ b/js-packages/package.json @@ -45,9 +45,9 @@ "prepublish": "yarn tsc", "lint": "eslint --ext .ts .", "fix": "yarn lint --fix", - "polkadot-types-fetch-metadata": "yarn ts-node-esm scripts/fetchMetadata.ts", - "polkadot-types-from-defs": "ts-node-esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .", - "polkadot-types-from-chain": "ts-node-esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .", + "polkadot-types-fetch-metadata": "yarn ts-node --esm scripts/fetchMetadata.ts", + "polkadot-types-from-defs": "ts-node --esm ./node_modules/.bin/polkadot-types-from-defs --endpoint scripts/metadata.json --input types/ --package .", + "polkadot-types-from-chain": "ts-node --esm ./node_modules/.bin/polkadot-types-from-chain --endpoint scripts/metadata.json --output types/ --package .", "polkadot-types": "echo \"export default {}\" > types/lookup.ts && yarn polkadot-types-fetch-metadata && yarn polkadot-types-from-defs && yarn polkadot-types-from-defs && yarn polkadot-types-from-chain && rm types/registry.ts" }, "resolutions": { diff --git a/js-packages/scripts/package.json b/js-packages/scripts/package.json index 51c1ab6906..33001cd1af 100644 --- a/js-packages/scripts/package.json +++ b/js-packages/scripts/package.json @@ -10,11 +10,11 @@ "version": "1.0.0", "main": "", "scripts": { - "benchMintingFee": "yarn ts-node-esm benchmarks/mintFee/benchmark.ts", - "loadTransfer": "yarn ts-node-esm transfer.nload.ts", - "generateEnv": "yarn ts-node-esm ./generateEnv.ts", - "propose-upgrade": "yarn ts-node-esm ./proposeupgrade.ts", - "propose-fast-track": "yarn ts-node-esm ./proposefasttrack.ts", - "council-democracy-proposal": "yarn ts-node-esm ./councilproposal.ts" + "benchMintingFee": "yarn ts-node --esm benchmarks/mintFee/benchmark.ts", + "loadTransfer": "yarn ts-node --esm transfer.nload.ts", + "generateEnv": "yarn ts-node --esm ./generateEnv.ts", + "propose-upgrade": "yarn ts-node --esm ./proposeupgrade.ts", + "propose-fast-track": "yarn ts-node --esm ./proposefasttrack.ts", + "council-democracy-proposal": "yarn ts-node --esm ./councilproposal.ts" } } diff --git a/js-packages/tests/migrations/942057-appPromotion/README.md b/js-packages/tests/migrations/942057-appPromotion/README.md index 6ed601d05a..fcdf6bb048 100644 --- a/js-packages/tests/migrations/942057-appPromotion/README.md +++ b/js-packages/tests/migrations/942057-appPromotion/README.md @@ -38,5 +38,5 @@ To run, you need to set an environment variables: Run the migration by executing the following command: ```sh -npx ts-node-esm executeMigration.ts +npx ts-node --esm executeMigration.ts ``` diff --git a/js-packages/tests/package.json b/js-packages/tests/package.json index e463e004cd..1c446694f7 100644 --- a/js-packages/tests/package.json +++ b/js-packages/tests/package.json @@ -13,9 +13,9 @@ "mocha": "^10.1.0" }, "scripts": { - "setup": "yarn ts-node-esm ./util/globalSetup.ts", - "setIdentities": "yarn ts-node-esm ./util/identitySetter.ts", - "checkRelayIdentities": "yarn ts-node-esm ./util/relayIdentitiesChecker.ts", + "setup": "yarn ts-node --esm ./util/globalSetup.ts", + "setIdentities": "yarn ts-node --esm ./util/identitySetter.ts", + "checkRelayIdentities": "yarn ts-node --esm ./util/relayIdentitiesChecker.ts", "_test": "yarn setup && yarn mocha --timeout 9999999 --loader ts-node/esm", "_testParallel": "yarn setup && yarn mocha --timeout 9999999 --parallel --loader ts-node/esm", "test": "yarn _test './**/*.*test.ts'", diff --git a/js-packages/yarn.lock b/js-packages/yarn.lock index 6d35f99181..a256fae612 100644 --- a/js-packages/yarn.lock +++ b/js-packages/yarn.lock @@ -5804,7 +5804,7 @@ __metadata: bin: ts-node: dist/bin.js ts-node-cwd: dist/bin-cwd.js - ts-node-esm: dist/bin-esm.js + ts-node --esm: dist/bin-esm.js ts-node-script: dist/bin-script.js ts-node-transpile-only: dist/bin-transpile.js ts-script: dist/bin-script-deprecated.js From abab0b7bc470b7c5a3ea4b3021af6412fc1d8392 Mon Sep 17 00:00:00 2001 From: Konstantin Astakhov Date: Tue, 2 Apr 2024 15:08:03 +0700 Subject: [PATCH 17/19] fix --- .docker/Dockerfile-try-runtime | 4 ++-- .github/workflows/node-only-update.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.docker/Dockerfile-try-runtime b/.docker/Dockerfile-try-runtime index eda2a39338..0622a65209 100644 --- a/.docker/Dockerfile-try-runtime +++ b/.docker/Dockerfile-try-runtime @@ -6,8 +6,8 @@ ENV CARGO_HOME="/cargo-home" ENV PATH="/cargo-home/bin:$PATH" ENV TZ=UTC -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install $RUST_TOOLCHAIN && \ +ARG RUST_TOOLCHAIN +RUN rustup toolchain install $RUST_TOOLCHAIN && \ rustup default $RUST_TOOLCHAIN && \ rustup target list --installed && \ rustup show diff --git a/.github/workflows/node-only-update.yml b/.github/workflows/node-only-update.yml index 4fc4968ab6..f54d25b82f 100644 --- a/.github/workflows/node-only-update.yml +++ b/.github/workflows/node-only-update.yml @@ -169,6 +169,7 @@ jobs: working-directory: ${{ matrix.mainnet_branch }}/js-packages/tests if: success() run: | + yarn cache clean --all yarn yarn add mochawesome ../scripts/wait_for_first_block.sh From 4a4ac55b6cb681161c2699c779faa0df3c7d95a0 Mon Sep 17 00:00:00 2001 From: Maksandre Date: Tue, 2 Apr 2024 12:36:11 +0400 Subject: [PATCH 18/19] Update yarn.lock --- js-packages/yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js-packages/yarn.lock b/js-packages/yarn.lock index a256fae612..d07d3110af 100644 --- a/js-packages/yarn.lock +++ b/js-packages/yarn.lock @@ -5803,8 +5803,8 @@ __metadata: optional: true bin: ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js ts-node --esm: dist/bin-esm.js + ts-node-cwd: dist/bin-cwd.js ts-node-script: dist/bin-script.js ts-node-transpile-only: dist/bin-transpile.js ts-script: dist/bin-script-deprecated.js From b925b4feb1649efb0634d2d518ffbb4e19a3f76b Mon Sep 17 00:00:00 2001 From: Maksandre Date: Tue, 2 Apr 2024 13:27:43 +0400 Subject: [PATCH 19/19] Use node instead of ts-node --- .github/workflows/xcm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/xcm.yml b/.github/workflows/xcm.yml index 600c387ef0..4e7a82162c 100644 --- a/.github/workflows/xcm.yml +++ b/.github/workflows/xcm.yml @@ -336,7 +336,7 @@ jobs: - name: Call HRMP initialization working-directory: js-packages/tests run: | - yarn ts-node --esm util/createHrmp.ts ${{matrix.network}} + node --loader ts-node/esm util/createHrmp.ts ${{matrix.network}} - name: Run XCM tests working-directory: js-packages/tests