From ef11e7d2ee57c21b5b274520b47bbd5c67f27c83 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 23 Aug 2024 13:47:27 +0200 Subject: [PATCH 01/11] build: bump Alpine version to 3.20 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 67c1c96a7e3..c1057bb68bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ # 3. Github Actions have shared networking configured, so we need to set a random # SCCACHE_SERVER_PORT port to avoid conflicts in case of parallel compilation -ARG ALPINE_VERSION=3.18 +ARG ALPINE_VERSION=3.20 ARG PROTOC_VERSION=25.2 ARG RUSTC_WRAPPER @@ -48,6 +48,7 @@ RUN apk add --no-cache \ ca-certificates \ clang-static clang-dev \ cmake \ + curl \ git \ libc-dev \ linux-headers \ From e010d64d6d5da6e70e71057ff20c57edc1788881 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:24:22 +0200 Subject: [PATCH 02/11] fix: sccache cache conflict between alpine versions --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c1057bb68bf..72c621c64e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -149,7 +149,7 @@ ARG AWS_SECRET_ACCESS_KEY FROM deps-${RUSTC_WRAPPER:-base} AS deps ARG SCCACHE_S3_KEY_PREFIX -ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl +ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl-alpine${ALPINE_VERSION} # Install wasm-bindgen-cli in the same profile as other components, to sacrifice some performance & disk space to gain # better build caching @@ -188,7 +188,7 @@ RUN touch /platform/packages/dapi-grpc/build.rs FROM sources AS build-drive-abci ARG SCCACHE_S3_KEY_PREFIX -ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl +ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/${TARGETARCH}/linux-musl-alpine${ALPINE_VERSION} RUN mkdir /artifacts @@ -212,7 +212,7 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM FROM sources AS build-js ARG SCCACHE_S3_KEY_PREFIX -ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/wasm/wasm32 +ENV SCCACHE_S3_KEY_PREFIX=${SCCACHE_S3_KEY_PREFIX}/wasm/wasm32-alpine${ALPINE_VERSION} RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ From 74dd270708221dfa624050e3490d483bd2c6b705 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:26:17 +0200 Subject: [PATCH 03/11] fix: cache conflict of /target between alpine versions --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 72c621c64e8..a26a88b65a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -157,7 +157,7 @@ WORKDIR /platform RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ - --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ + --mount=type=cache,sharing=shared,id=target_${TARGETARCH}_alpine${ALPINE_VERSION},target=/platform/target \ export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \ source $HOME/.cargo/env && \ if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \ @@ -195,7 +195,7 @@ RUN mkdir /artifacts RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ - --mount=type=cache,sharing=shared,id=target_${TARGETARCH},target=/platform/target \ + --mount=type=cache,sharing=shared,id=target_${TARGETARCH}_alpine${ALPINE_VERSION},target=/platform/target \ source $HOME/.cargo/env && \ export SCCACHE_SERVER_PORT=$((RANDOM+1025)) && \ if [[ -z "${SCCACHE_MEMCACHED}" ]] ; then unset SCCACHE_MEMCACHED ; fi ; \ From 272fc389e194c9ab2d88e08ce08e6ba5b6cba580 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:36:30 +0100 Subject: [PATCH 04/11] chore: switch to alpine 3.21 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c921666b0bc..96a74035f11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ # 3. Github Actions have shared networking configured, so we need to set a random # SCCACHE_SERVER_PORT port to avoid conflicts in case of parallel compilation -ARG ALPINE_VERSION=3.20 +ARG ALPINE_VERSION=3.21 ARG PROTOC_VERSION=25.2 ARG RUSTC_WRAPPER From 5a5bd7becdd2a2dbdd718dd640f415e81e82cddd Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:41:40 +0100 Subject: [PATCH 05/11] chore: update Alpine to 3.21 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5c8ac67655e..3e622eb4375 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ # conflicts in case of parallel compilation. # 3. Configuration variables are shared between runs using /root/env file. -ARG ALPINE_VERSION=3.18 +ARG ALPINE_VERSION=3.21 # deps-${RUSTC_WRAPPER:-base} # If one of SCCACHE_GHA_ENABLED, SCCACHE_BUCKET, SCCACHE_MEMCACHED is set, then deps-sccache is used, otherwise deps-base @@ -72,6 +72,7 @@ RUN apk add --no-cache \ ca-certificates \ clang-static clang-dev \ cmake \ + curl \ git \ libc-dev \ linux-headers \ From 5ed0015c44fa20998bf8c2a0c4ca96a6ac301de9 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:09:05 +0100 Subject: [PATCH 06/11] build: update rocksdb 8.10.2 to 9.8.4 --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3e622eb4375..a72a051085e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -130,7 +130,12 @@ RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export PROTOC_ARCH=aarch_64; else e ln -s /opt/protoc/bin/protoc /usr/bin/ # Switch to clang +# Note that CC / CXX can be updated later on (eg. when configuring sccache) RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc +RUN <> /root/env +echo "export CC='clang'" >> /root/env +EOS ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} @@ -261,7 +266,7 @@ WORKDIR /tmp/rocksdb RUN --mount=type=secret,id=AWS < Date: Tue, 17 Dec 2024 11:19:38 +0100 Subject: [PATCH 07/11] build: update wasm-bindgen-cli to 0.2.99 --- .devcontainer/Dockerfile | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests-build-js.yml | 2 +- Dockerfile | 2 +- README.md | 2 +- packages/wasm-dpp/Cargo.toml | 2 +- packages/wasm-dpp/README.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ce363420efb..f2373424b67 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -66,7 +66,7 @@ RUN set -ex; \ rm /tmp/cargo-binstall; \ cargo binstall -V -RUN cargo binstall wasm-bindgen-cli@0.2.86 --locked \ +RUN cargo binstall wasm-bindgen-cli@0.2.99 --locked \ --no-discover-github-token \ --disable-telemetry \ --no-track \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 269798a2ff6..0fd5f05672f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,7 @@ jobs: if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Install wasm-bindgen-cli - run: cargo binstall wasm-bindgen-cli@0.2.86 + run: cargo binstall wasm-bindgen-cli@0.2.99 if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Build packages diff --git a/.github/workflows/tests-build-js.yml b/.github/workflows/tests-build-js.yml index a36bd91e2c0..0efd75fc7ce 100644 --- a/.github/workflows/tests-build-js.yml +++ b/.github/workflows/tests-build-js.yml @@ -50,7 +50,7 @@ jobs: if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Install wasm-bindgen-cli - run: cargo binstall wasm-bindgen-cli@0.2.86 + run: cargo binstall wasm-bindgen-cli@0.2.99 if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Build JS packages diff --git a/Dockerfile b/Dockerfile index a72a051085e..2d7ad5f5f01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -319,7 +319,7 @@ RUN --mount=type=secret,id=AWS \ RUN --mount=type=secret,id=AWS \ source /root/env; \ - cargo binstall wasm-bindgen-cli@0.2.86 cargo-chef@0.1.67 \ + cargo binstall wasm-bindgen-cli@0.2.99 cargo-chef@0.1.67 \ --locked \ --no-discover-github-token \ --disable-telemetry \ diff --git a/README.md b/README.md index 5f4536c1769..d3bf8d7503d 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ this repository may be used on the following networks: in terminal run `echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc` or `echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.bash_profile` depending on your default shell. You can find your default shell with `echo $SHELL` - Reload your shell with `source ~/.zshrc` or `source ~/.bash_profile` - - `cargo install wasm-bindgen-cli@0.2.86` + - `cargo install wasm-bindgen-cli@0.2.99` - *double-check that wasm-bindgen-cli version above matches wasm-bindgen version in Cargo.lock file* - *Depending on system, additional packages may need to be installed as a prerequisite for wasm-bindgen-cli. If anything is missing, installation will error and prompt what packages are missing (i.e. clang, llvm, libssl-dev)* - essential build tools - example for Debian/Ubuntu: `apt install -y build-essential libssl-dev pkg-config clang cmake llvm` diff --git a/packages/wasm-dpp/Cargo.toml b/packages/wasm-dpp/Cargo.toml index 2b34c8af6ff..fc991dfe9d0 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -15,7 +15,7 @@ serde_json = { version = "1.0", features = ["preserve_order"] } # Meantime if you want to update wasm-bindgen you also need to update version in: # - packages/wasm-dpp/scripts/build-wasm.sh # - Dockerfile -wasm-bindgen = { version = "=0.2.86" } +wasm-bindgen = { version = "=0.2.99" } js-sys = "0.3.53" web-sys = { version = "0.3.6", features = ["console"] } thiserror = { version = "1.0.63" } diff --git a/packages/wasm-dpp/README.md b/packages/wasm-dpp/README.md index 73b3494c454..e16390f30ad 100644 --- a/packages/wasm-dpp/README.md +++ b/packages/wasm-dpp/README.md @@ -39,7 +39,7 @@ Library consumers must ignore class names minification for `@dashevo/wasm-dpp` l - Install [Rust](https://www.rust-lang.org/tools/install) v1.73+ - Add wasm32 target: `$ rustup target add wasm32-unknown-unknown` -- Install wasm-bingen-cli: `cargo install wasm-bindgen-cli@0.2.86` +- Install wasm-bingen-cli: `cargo install wasm-bindgen-cli@0.2.99` - *double-check that wasm-bindgen-cli version above matches wasm-bindgen version in Cargo.lock file* - *Depending on system, additional packages may need to be installed as a prerequisite for wasm-bindgen-cli. If anything is missing, installation will error and prompt what packages are missing (i.e. clang, llvm, libssl-dev)* From 9b94e8e39cf13aa872757dc91c6f0d255ca37b00 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:19:38 +0100 Subject: [PATCH 08/11] build: update wasm-bindgen-cli to 0.2.99 --- .devcontainer/Dockerfile | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/tests-build-js.yml | 2 +- Dockerfile | 2 +- README.md | 2 +- packages/wasm-dpp/Cargo.toml | 2 +- packages/wasm-dpp/README.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ce363420efb..f2373424b67 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -66,7 +66,7 @@ RUN set -ex; \ rm /tmp/cargo-binstall; \ cargo binstall -V -RUN cargo binstall wasm-bindgen-cli@0.2.86 --locked \ +RUN cargo binstall wasm-bindgen-cli@0.2.99 --locked \ --no-discover-github-token \ --disable-telemetry \ --no-track \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 269798a2ff6..0fd5f05672f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,7 @@ jobs: if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Install wasm-bindgen-cli - run: cargo binstall wasm-bindgen-cli@0.2.86 + run: cargo binstall wasm-bindgen-cli@0.2.99 if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Build packages diff --git a/.github/workflows/tests-build-js.yml b/.github/workflows/tests-build-js.yml index a36bd91e2c0..0efd75fc7ce 100644 --- a/.github/workflows/tests-build-js.yml +++ b/.github/workflows/tests-build-js.yml @@ -50,7 +50,7 @@ jobs: if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Install wasm-bindgen-cli - run: cargo binstall wasm-bindgen-cli@0.2.86 + run: cargo binstall wasm-bindgen-cli@0.2.99 if: ${{ steps.check-artifact.outputs.exists != 'true' }} - name: Build JS packages diff --git a/Dockerfile b/Dockerfile index 5c8ac67655e..671b488fff4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -313,7 +313,7 @@ RUN --mount=type=secret,id=AWS \ RUN --mount=type=secret,id=AWS \ source /root/env; \ - cargo binstall wasm-bindgen-cli@0.2.86 cargo-chef@0.1.67 \ + cargo binstall wasm-bindgen-cli@0.2.99 cargo-chef@0.1.67 \ --locked \ --no-discover-github-token \ --disable-telemetry \ diff --git a/README.md b/README.md index 5f4536c1769..d3bf8d7503d 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ this repository may be used on the following networks: in terminal run `echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc` or `echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.bash_profile` depending on your default shell. You can find your default shell with `echo $SHELL` - Reload your shell with `source ~/.zshrc` or `source ~/.bash_profile` - - `cargo install wasm-bindgen-cli@0.2.86` + - `cargo install wasm-bindgen-cli@0.2.99` - *double-check that wasm-bindgen-cli version above matches wasm-bindgen version in Cargo.lock file* - *Depending on system, additional packages may need to be installed as a prerequisite for wasm-bindgen-cli. If anything is missing, installation will error and prompt what packages are missing (i.e. clang, llvm, libssl-dev)* - essential build tools - example for Debian/Ubuntu: `apt install -y build-essential libssl-dev pkg-config clang cmake llvm` diff --git a/packages/wasm-dpp/Cargo.toml b/packages/wasm-dpp/Cargo.toml index 2b34c8af6ff..fc991dfe9d0 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -15,7 +15,7 @@ serde_json = { version = "1.0", features = ["preserve_order"] } # Meantime if you want to update wasm-bindgen you also need to update version in: # - packages/wasm-dpp/scripts/build-wasm.sh # - Dockerfile -wasm-bindgen = { version = "=0.2.86" } +wasm-bindgen = { version = "=0.2.99" } js-sys = "0.3.53" web-sys = { version = "0.3.6", features = ["console"] } thiserror = { version = "1.0.63" } diff --git a/packages/wasm-dpp/README.md b/packages/wasm-dpp/README.md index 73b3494c454..e16390f30ad 100644 --- a/packages/wasm-dpp/README.md +++ b/packages/wasm-dpp/README.md @@ -39,7 +39,7 @@ Library consumers must ignore class names minification for `@dashevo/wasm-dpp` l - Install [Rust](https://www.rust-lang.org/tools/install) v1.73+ - Add wasm32 target: `$ rustup target add wasm32-unknown-unknown` -- Install wasm-bingen-cli: `cargo install wasm-bindgen-cli@0.2.86` +- Install wasm-bingen-cli: `cargo install wasm-bindgen-cli@0.2.99` - *double-check that wasm-bindgen-cli version above matches wasm-bindgen version in Cargo.lock file* - *Depending on system, additional packages may need to be installed as a prerequisite for wasm-bindgen-cli. If anything is missing, installation will error and prompt what packages are missing (i.e. clang, llvm, libssl-dev)* From a27cdb379e2dc79ee3833b6029594e8154b0ec5c Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:32:54 +0100 Subject: [PATCH 09/11] build: bump wasm-bindgen-futures to 0.4.49 --- Cargo.lock | 52 +++++++++++++++++++----------------- packages/wasm-dpp/Cargo.toml | 2 +- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a7a7d564033..ea460381688 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -2772,10 +2772,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -4397,7 +4398,7 @@ dependencies = [ [[package]] name = "serde-wasm-bindgen" version = "0.5.0" -source = "git+https://github.com/QuantumExplorer/serde-wasm-bindgen?branch=feat/not_human_readable#121d1f7fbf62cb97f74b91626a1b23851098cc82" +source = "git+https://github.com/QuantumExplorer/serde-wasm-bindgen?branch=feat%2Fnot_human_readable#121d1f7fbf62cb97f74b91626a1b23851098cc82" dependencies = [ "js-sys", "serde", @@ -4890,7 +4891,7 @@ dependencies = [ [[package]] name = "tenderdash-abci" version = "1.2.1+1.3.0" -source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1+1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" +source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1%2B1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" dependencies = [ "bytes", "futures", @@ -4911,7 +4912,7 @@ dependencies = [ [[package]] name = "tenderdash-proto" version = "1.2.1+1.3.0" -source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1+1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" +source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1%2B1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" dependencies = [ "bytes", "chrono", @@ -4930,7 +4931,7 @@ dependencies = [ [[package]] name = "tenderdash-proto-compiler" version = "1.2.1+1.3.0" -source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1+1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" +source = "git+https://github.com/dashpay/rs-tenderdash-abci?tag=v1.2.1%2B1.3.0#aad72f4d25816bdf0f584ee4ba3cd383addf8a33" dependencies = [ "fs_extra", "prost-build", @@ -5300,7 +5301,7 @@ dependencies = [ [[package]] name = "tower" version = "0.4.13" -source = "git+https://github.com/QuantumExplorer/tower?branch=fix/indexMap2OnV0413#5286f8c605d10f48d51254f2434c5ab3fc5d7779" +source = "git+https://github.com/QuantumExplorer/tower?branch=fix%2FindexMap2OnV0413#5286f8c605d10f48d51254f2434c5ab3fc5d7779" dependencies = [ "futures-core", "futures-util", @@ -5344,12 +5345,12 @@ dependencies = [ [[package]] name = "tower-layer" version = "0.3.2" -source = "git+https://github.com/QuantumExplorer/tower?branch=fix/indexMap2OnV0413#5286f8c605d10f48d51254f2434c5ab3fc5d7779" +source = "git+https://github.com/QuantumExplorer/tower?branch=fix%2FindexMap2OnV0413#5286f8c605d10f48d51254f2434c5ab3fc5d7779" [[package]] name = "tower-service" version = "0.3.2" -source = "git+https://github.com/QuantumExplorer/tower?branch=fix/indexMap2OnV0413#5286f8c605d10f48d51254f2434c5ab3fc5d7779" +source = "git+https://github.com/QuantumExplorer/tower?branch=fix%2FindexMap2OnV0413#5286f8c605d10f48d51254f2434c5ab3fc5d7779" [[package]] name = "tracing" @@ -5645,23 +5646,23 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.75", @@ -5670,21 +5671,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5692,9 +5694,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", @@ -5705,9 +5707,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-dpp" @@ -5746,9 +5748,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/packages/wasm-dpp/Cargo.toml b/packages/wasm-dpp/Cargo.toml index fc991dfe9d0..ab0080a6924 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -49,7 +49,7 @@ hex = { version = "0.4" } paste = "1.0.14" anyhow = { version = "1.0.75" } # required, cargo-machete false positive -wasm-bindgen-futures = "0.4.33" +wasm-bindgen-futures = "0.4.49" async-trait = "0.1.59" bincode = "2.0.0-rc.3" [profile.release] From 7475b091887192e98960c52570f6e2006abe1853 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:42:36 +0100 Subject: [PATCH 10/11] chore(wasm-dpp): fix build --- .../wasm-dpp/src/identity/factory_utils.rs | 12 +++---- .../state_transition/asset_lock_proof/mod.rs | 5 ++- .../identity_create_transition.rs | 19 +++++------- .../identity_update_transition.rs | 31 +++++++------------ 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/packages/wasm-dpp/src/identity/factory_utils.rs b/packages/wasm-dpp/src/identity/factory_utils.rs index 18e19428423..f14431ac8ee 100644 --- a/packages/wasm-dpp/src/identity/factory_utils.rs +++ b/packages/wasm-dpp/src/identity/factory_utils.rs @@ -9,7 +9,6 @@ use dpp::identity::{IdentityPublicKey, KeyID}; use dpp::serialization::ValueConvertible; use dpp::state_transition::public_key_in_creation::IdentityPublicKeyInCreation; use std::collections::BTreeMap; -use wasm_bindgen::__rt::Ref; use wasm_bindgen::{JsCast, JsValue}; pub fn parse_public_keys( @@ -47,11 +46,10 @@ pub fn parse_create_identity_update_transition_keys( let keys: Vec = add_public_keys_array .iter() .map(|key| { - let public_key: Ref = - generic_of_js_val::( - &key, - "IdentityPublicKeyWithWitness", - )?; + let public_key = generic_of_js_val::( + &key, + "IdentityPublicKeyWithWitness", + )?; Ok(public_key.clone().into()) }) @@ -74,7 +72,7 @@ pub fn parse_create_identity_update_transition_keys( let keys: Vec = disable_public_keys_array .iter() .map(|key| { - let public_key_wasm: Ref = + let public_key_wasm = generic_of_js_val::(&key, "IdentityPublicKey")?; Ok(public_key_wasm.get_id()) }) diff --git a/packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs b/packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs index 861188d0ca4..dd4fca03cd3 100644 --- a/packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs +++ b/packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs @@ -5,7 +5,6 @@ pub use chain::*; pub use instant::*; use std::convert::TryInto; use wasm_bindgen::JsCast; -use wasm_bindgen::__rt::Ref; use dpp::identity::errors::UnknownAssetLockProofTypeError; use wasm_bindgen::prelude::*; @@ -144,13 +143,13 @@ pub fn create_asset_lock_proof_from_wasm_instance( match lock_type { AssetLockProofType::Instant => { - let instant: Ref = + let instant = generic_of_js_val::(js_value, "InstantAssetLockProof")?; Ok(AssetLockProof::Instant(instant.clone().into())) } AssetLockProofType::Chain => { - let chain: Ref = + let chain = generic_of_js_val::(js_value, "ChainAssetLockProof")?; Ok(AssetLockProof::Chain(chain.clone().into())) diff --git a/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs b/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs index 86681592df3..9b5a402ddd2 100644 --- a/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs +++ b/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs @@ -1,6 +1,5 @@ use std::default::Default; -use wasm_bindgen::__rt::Ref; use wasm_bindgen::prelude::*; use crate::bls_adapter::BlsAdapter; @@ -101,11 +100,10 @@ impl IdentityCreateTransitionWasm { let public_keys = public_keys .iter() .map(|value| { - let public_key: Ref = - generic_of_js_val::( - value, - "IdentityPublicKeyWithWitness", - )?; + let public_key = generic_of_js_val::( + value, + "IdentityPublicKeyWithWitness", + )?; Ok(public_key.clone().into()) }) .collect::, JsValue>>()?; @@ -120,11 +118,10 @@ impl IdentityCreateTransitionWasm { let mut public_keys = public_keys .iter() .map(|value| { - let public_key: Ref = - generic_of_js_val::( - value, - "IdentityPublicKeyWithWitness", - )?; + let public_key = generic_of_js_val::( + value, + "IdentityPublicKeyWithWitness", + )?; Ok(public_key.clone().into()) }) .collect::, JsValue>>()?; diff --git a/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs b/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs index 1d8988ba6f9..5692dd63d3f 100644 --- a/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs +++ b/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs @@ -1,24 +1,12 @@ -use std::convert::TryInto; -use std::default::Default; - -use serde::{Deserialize, Serialize}; - -use wasm_bindgen::__rt::Ref; -use wasm_bindgen::prelude::*; - +use crate::bls_adapter::{BlsAdapter, JsBlsAdapter}; +use crate::errors::from_dpp_err; use crate::identifier::IdentifierWrapper; - +use crate::utils::{generic_of_js_val, WithJsError}; use crate::{ buffer::Buffer, identity::state_transition::identity_public_key_transitions::IdentityPublicKeyWithWitnessWasm, identity::IdentityPublicKeyWasm, with_js_error, }; - -use crate::bls_adapter::{BlsAdapter, JsBlsAdapter}; - -use crate::utils::{generic_of_js_val, WithJsError}; - -use crate::errors::from_dpp_err; use dpp::errors::consensus::signature::SignatureError; use dpp::errors::consensus::ConsensusError; use dpp::errors::ProtocolError; @@ -34,6 +22,10 @@ use dpp::state_transition::StateTransition; use dpp::state_transition::StateTransitionIdentitySigned; use dpp::version::PlatformVersion; use dpp::{identifier::Identifier, state_transition::StateTransitionLike}; +use serde::{Deserialize, Serialize}; +use std::convert::TryInto; +use std::default::Default; +use wasm_bindgen::prelude::*; #[wasm_bindgen(js_name=IdentityUpdateTransition)] #[derive(Clone)] @@ -93,11 +85,10 @@ impl IdentityUpdateTransitionWasm { keys_to_add = keys .iter() .map(|value| { - let public_key: Ref = - generic_of_js_val::( - value, - "IdentityPublicKeyWithWitness", - )?; + let public_key = generic_of_js_val::( + value, + "IdentityPublicKeyWithWitness", + )?; Ok(public_key.clone().into()) }) .collect::, JsValue>>()?; From b14bb5b00d7294f4112a5583392a748810ca1e88 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 17 Dec 2024 12:11:46 +0100 Subject: [PATCH 11/11] revert: rocksdb back to 8.10.2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2d7ad5f5f01..5b9b6ee48b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -266,7 +266,7 @@ WORKDIR /tmp/rocksdb RUN --mount=type=secret,id=AWS <