Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bump Alpine version to 3.21 #2074

Open
wants to merge 14 commits into
base: v2.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ RUN set -ex; \
rm /tmp/cargo-binstall; \
cargo binstall -V

RUN cargo binstall [email protected].86 --locked \
RUN cargo binstall [email protected].99 --locked \
--no-discover-github-token \
--disable-telemetry \
--no-track \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Install wasm-bindgen-cli
run: cargo binstall [email protected].86
run: cargo binstall [email protected].99
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Build packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-build-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Install wasm-bindgen-cli
run: cargo binstall [email protected].86
run: cargo binstall [email protected].99
if: ${{ steps.check-artifact.outputs.exists != 'true' }}

- name: Build JS packages
Expand Down
52 changes: 27 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -72,6 +72,7 @@ RUN apk add --no-cache \
ca-certificates \
clang-static clang-dev \
cmake \
curl \
git \
libc-dev \
linux-headers \
Expand Down Expand Up @@ -129,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 <<EOS
echo "export CXX='clang++'" >> /root/env
echo "export CC='clang'" >> /root/env
EOS

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
Expand Down Expand Up @@ -313,7 +319,7 @@ RUN --mount=type=secret,id=AWS \

RUN --mount=type=secret,id=AWS \
source /root/env; \
cargo binstall [email protected].86 [email protected] \
cargo binstall [email protected].99 [email protected] \
--locked \
--no-discover-github-token \
--disable-telemetry \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected].86`
- `cargo install [email protected].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`
Expand Down
4 changes: 2 additions & 2 deletions packages/wasm-dpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm-dpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected].86`
- Install wasm-bingen-cli: `cargo install [email protected].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)*

Expand Down
12 changes: 5 additions & 7 deletions packages/wasm-dpp/src/identity/factory_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -47,11 +46,10 @@ pub fn parse_create_identity_update_transition_keys(
let keys: Vec<IdentityPublicKeyInCreation> = add_public_keys_array
.iter()
.map(|key| {
let public_key: Ref<IdentityPublicKeyWithWitnessWasm> =
generic_of_js_val::<IdentityPublicKeyWithWitnessWasm>(
&key,
"IdentityPublicKeyWithWitness",
)?;
let public_key = generic_of_js_val::<IdentityPublicKeyWithWitnessWasm>(
&key,
"IdentityPublicKeyWithWitness",
)?;

Ok(public_key.clone().into())
})
Expand All @@ -74,7 +72,7 @@ pub fn parse_create_identity_update_transition_keys(
let keys: Vec<KeyID> = disable_public_keys_array
.iter()
.map(|key| {
let public_key_wasm: Ref<IdentityPublicKeyWasm> =
let public_key_wasm =
generic_of_js_val::<IdentityPublicKeyWasm>(&key, "IdentityPublicKey")?;
Ok(public_key_wasm.get_id())
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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::*;
Expand Down Expand Up @@ -46,7 +45,7 @@
}
}

pub trait AssetLockProofLike {

Check warning on line 48 in packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs

View workflow job for this annotation

GitHub Actions / Rust packages (wasm-dpp) / Linting

trait `AssetLockProofLike` is never used

warning: trait `AssetLockProofLike` is never used --> packages/wasm-dpp/src/identity/state_transition/asset_lock_proof/mod.rs:48:11 | 48 | pub trait AssetLockProofLike { | ^^^^^^^^^^^^^^^^^^
fn to_object(&self) -> Result<JsValue, JsValue>;
}

Expand Down Expand Up @@ -144,13 +143,13 @@

match lock_type {
AssetLockProofType::Instant => {
let instant: Ref<InstantAssetLockProofWasm> =
let instant =
generic_of_js_val::<InstantAssetLockProofWasm>(js_value, "InstantAssetLockProof")?;

Ok(AssetLockProof::Instant(instant.clone().into()))
}
AssetLockProofType::Chain => {
let chain: Ref<ChainAssetLockProofWasm> =
let chain =
generic_of_js_val::<ChainAssetLockProofWasm>(js_value, "ChainAssetLockProof")?;

Ok(AssetLockProof::Chain(chain.clone().into()))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::default::Default;

use wasm_bindgen::__rt::Ref;
use wasm_bindgen::prelude::*;

use crate::bls_adapter::BlsAdapter;
Expand Down Expand Up @@ -101,11 +100,10 @@ impl IdentityCreateTransitionWasm {
let public_keys = public_keys
.iter()
.map(|value| {
let public_key: Ref<IdentityPublicKeyWithWitnessWasm> =
generic_of_js_val::<IdentityPublicKeyWithWitnessWasm>(
value,
"IdentityPublicKeyWithWitness",
)?;
let public_key = generic_of_js_val::<IdentityPublicKeyWithWitnessWasm>(
value,
"IdentityPublicKeyWithWitness",
)?;
Ok(public_key.clone().into())
})
.collect::<Result<Vec<IdentityPublicKeyInCreation>, JsValue>>()?;
Expand All @@ -120,11 +118,10 @@ impl IdentityCreateTransitionWasm {
let mut public_keys = public_keys
.iter()
.map(|value| {
let public_key: Ref<IdentityPublicKeyWithWitnessWasm> =
generic_of_js_val::<IdentityPublicKeyWithWitnessWasm>(
value,
"IdentityPublicKeyWithWitness",
)?;
let public_key = generic_of_js_val::<IdentityPublicKeyWithWitnessWasm>(
value,
"IdentityPublicKeyWithWitness",
)?;
Ok(public_key.clone().into())
})
.collect::<Result<Vec<IdentityPublicKeyInCreation>, JsValue>>()?;
Expand Down
Loading
Loading