diff --git a/.github/workflows/build_and_lint.yml b/.github/workflows/build_and_lint.yml index deea582e..cfec5cb2 100644 --- a/.github/workflows/build_and_lint.yml +++ b/.github/workflows/build_and_lint.yml @@ -34,7 +34,10 @@ jobs: run: cargo fmt --all -- --check - name: Clippy - run: cargo clippy --all-features -- -D warnings + # Exclude async-std-rt: it is deprecated (RUSTSEC-2025-0052) and emits a + # compile_error! at crate level, so --all-features would always fail. + # NOTE: When adding new Cargo features, add them to this list manually. + run: cargo clippy --features std,tokio-rt,embassy-rt,actix-rt,futures-rt,smol-rt,core,wallet,models,utils,helpers,json-rpc,websocket,cli -- -D warnings - name: Build (default) run: cargo build --release diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 12e3df17..cd26abf8 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -11,7 +11,8 @@ on: name: Integration Test env: - RIPPLED_DOCKER_IMAGE: rippleci/rippled:develop + # Pin to known-good digest; rippleci/rippled:develop broke after 2026-04-01 + RIPPLED_DOCKER_IMAGE: rippleci/rippled:develop@sha256:328175bf14b7b83db9e5e6b50c7458bf828b02b2855453efc038233094aa8d85 jobs: integration_test: @@ -41,10 +42,22 @@ jobs: - name: Wait for rippled to be healthy run: | - until docker inspect --format='{{.State.Health.Status}}' rippled-service | grep -q healthy; do - echo "Waiting for rippled to be ready..." + for i in $(seq 1 30); do + if ! docker ps -q -f name=rippled-service | grep -q .; then + echo "Container exited unexpectedly" + docker logs rippled-service 2>&1 || true + exit 1 + fi + STATUS=$(docker inspect --format='{{.State.Health.Status}}' rippled-service 2>/dev/null || echo "unknown") + echo "Attempt $i/30: $STATUS" + if [ "$STATUS" = "healthy" ]; then + exit 0 + fi sleep 2 done + echo "Timed out waiting for rippled" + docker logs rippled-service 2>&1 || true + exit 1 - uses: dtolnay/rust-toolchain@stable diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b985b43..87a4481f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [[v1.1.0]] +- **`async-std-rt` feature deprecated**: The `async-std` crate has been officially discontinued (RUSTSEC-2025-0052). The `async-std-rt` feature now emits a `compile_error!` directing users to migrate to `smol-rt` as a drop-in replacement. Code using `async-std-rt` will no longer compile until the feature is updated. + +### Known Blockers + +- **`atomic-polyfill` advisory (RUSTSEC-2023-0089)**: Cannot be resolved yet. `reqwless` 0.13.0 pins `embedded-tls` 0.17.0 which transitively depends on `atomic-polyfill`. This is blocked upstream and will be resolved when `reqwless` upgrades its `embedded-tls` dependency. + ### Added - Implemented full deserialization from hex binary back to JSON, update `definitions.json` to `xrpl.js` latest, added all codec test fixtures from xrpl.js and implemented tests for all of them. diff --git a/Cargo.toml b/Cargo.toml index 1570edce..8d533e5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,6 +81,9 @@ embassy-time = { version = "0.3.2", optional = true } embedded-websocket-embedded-io = { version = "0.1.0", optional = true, default-features = false, features = [ "embedded-io-async", ] } +# NOTE: reqwless 0.13.0 pins embedded-tls 0.17.0 which depends on atomic-polyfill +# (RUSTSEC-2023-0089). Newer embedded-tls versions use portable-atomic instead, but +# reqwless has not released a compatible update yet. Blocked upstream. reqwless = { version = "0.13.0", optional = true } reqwest = { version = "0.12.7", optional = true, features = ["json"] } tokio-tungstenite = { version = "0.24.0", optional = true, features = [ @@ -89,6 +92,8 @@ tokio-tungstenite = { version = "0.24.0", optional = true, features = [ embassy-futures = { version = "0.1.1" } embedded-nal-async = { version = "0.8.0", optional = true } actix-rt = { version = "2.10.0", optional = true } +# DEPRECATED: async-std has been discontinued (RUSTSEC-2025-0052). Use smol-rt instead. +# Retained so the async-std-rt feature gate resolves; enabling it emits a compile_error. async-std = { version = "1.13.0", optional = true } futures-executor = { version = "0.3.30", optional = true } futures-timer = { version = "3.0.3", optional = true } diff --git a/src/asynch/clients/exceptions.rs b/src/asynch/clients/exceptions.rs index 539bcdea..e6600810 100644 --- a/src/asynch/clients/exceptions.rs +++ b/src/asynch/clients/exceptions.rs @@ -1,4 +1,4 @@ -#[cfg(not(feature = "std"))] +#[cfg(all(not(feature = "std"), feature = "websocket"))] use alloc::boxed::Box; use thiserror_no_std::Error; diff --git a/src/asynch/mod.rs b/src/asynch/mod.rs index 1323f9d0..9dc7b8b8 100644 --- a/src/asynch/mod.rs +++ b/src/asynch/mod.rs @@ -11,6 +11,16 @@ pub mod transaction; #[cfg(feature = "helpers")] pub mod wallet; +// async-std has been discontinued (RUSTSEC-2025-0052). Emit a compile-time error so +// callers get a clear message instead of a runtime panic, and avoid unreachable-code +// lint when --all-features is used alongside other runtime feature flags. +#[cfg(feature = "async-std-rt")] +compile_error!( + "The async-std-rt feature is deprecated and no longer supported. \ + async-std has been discontinued (RUSTSEC-2025-0052). \ + Use the smol-rt feature instead." +); + async fn wait_seconds(_seconds: u64) { #[cfg(feature = "tokio-rt")] { @@ -25,11 +35,6 @@ async fn wait_seconds(_seconds: u64) { use core::time::Duration; actix_rt::time::sleep(Duration::from_secs(_seconds)).await; } - #[cfg(feature = "async-std-rt")] - { - use core::time::Duration; - async_std::task::sleep(Duration::from_secs(_seconds)).await; - } #[cfg(feature = "futures-rt")] { use core::time::Duration; diff --git a/src/lib.rs b/src/lib.rs index c83e5dba..ab5d4620 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,7 +65,6 @@ mod _serde; feature = "tokio-rt", feature = "embassy-rt", feature = "actix-rt", - feature = "async-std-rt", feature = "futures-rt", feature = "smol-rt" ))