From c34b828ce7d87edfd598a576449bd586744a44c6 Mon Sep 17 00:00:00 2001 From: e-desouza Date: Fri, 20 Feb 2026 23:26:40 -0500 Subject: [PATCH 1/7] fix: deprecate async-std-rt feature and document reqwless upgrade blocker Replace async-std sleep implementation with a deprecation warning and runtime panic. Using compile_error! would break --all-features builds (including CI clippy checks), so instead we emit a deprecation warning at compile time and panic at runtime if the feature is actually exercised. Also document in Cargo.toml that the atomic-polyfill advisory (RUSTSEC-2023-0089) is blocked upstream on a reqwless update. Closes #126 Partially addresses #111 --- Cargo.toml | 5 +++++ src/asynch/mod.rs | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 93f7716a..86c29edc 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 triggers a runtime panic. 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/mod.rs b/src/asynch/mod.rs index 1323f9d0..7433bd20 100644 --- a/src/asynch/mod.rs +++ b/src/asynch/mod.rs @@ -27,8 +27,17 @@ async fn wait_seconds(_seconds: u64) { } #[cfg(feature = "async-std-rt")] { - use core::time::Duration; - async_std::task::sleep(Duration::from_secs(_seconds)).await; + #[deprecated( + since = "1.1.0", + note = "async-std has been discontinued (RUSTSEC-2025-0052). Use the smol-rt feature instead." + )] + fn async_std_sleep_deprecated() {} + #[allow(deprecated)] + async_std_sleep_deprecated(); + panic!( + "The async-std-rt feature is deprecated. async-std has been discontinued \ + (RUSTSEC-2025-0052). Use the smol-rt feature instead." + ); } #[cfg(feature = "futures-rt")] { From 60fea5815c932f5cc291ade357dc90e21037bdba Mon Sep 17 00:00:00 2001 From: e-desouza Date: Thu, 26 Mar 2026 15:24:23 -0400 Subject: [PATCH 2/7] docs(changelog): document async-std-rt deprecation as breaking change and reqwless blocker --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39215b1a..0f7c1934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Breaking Changes +- **`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. From 563c441056f3ec71a13c3c4b8e99957f49f33dd3 Mon Sep 17 00:00:00 2001 From: e-desouza Date: Thu, 26 Mar 2026 17:26:08 -0400 Subject: [PATCH 3/7] fix(asynch): replace runtime panic with compile_error for async-std-rt deprecation async-std has been discontinued (RUSTSEC-2025-0052). Using panic!() inside a #[cfg(feature = "async-std-rt")] block caused clippy to report an unreachable statement on the subsequent futures-rt block when --all-features was used, because panic!() is a diverging expression. Replace the runtime panic with a module-level compile_error!() so: - Users get a clear compile-time message instead of a runtime panic - No unreachable-code lint is triggered (compile_error! is at module level) - The CI clippy step now uses an explicit feature list excluding async-std-rt (--all-features would always fail since compile_error! fires unconditionally) --- .github/workflows/build_and_lint.yml | 4 +++- src/asynch/mod.rs | 24 ++++++++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_and_lint.yml b/.github/workflows/build_and_lint.yml index deea582e..fe0731e6 100644 --- a/.github/workflows/build_and_lint.yml +++ b/.github/workflows/build_and_lint.yml @@ -34,7 +34,9 @@ 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. + 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/src/asynch/mod.rs b/src/asynch/mod.rs index 7433bd20..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,20 +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")] - { - #[deprecated( - since = "1.1.0", - note = "async-std has been discontinued (RUSTSEC-2025-0052). Use the smol-rt feature instead." - )] - fn async_std_sleep_deprecated() {} - #[allow(deprecated)] - async_std_sleep_deprecated(); - panic!( - "The async-std-rt feature is deprecated. async-std has been discontinued \ - (RUSTSEC-2025-0052). Use the smol-rt feature instead." - ); - } #[cfg(feature = "futures-rt")] { use core::time::Duration; From 9f4007372ceba07970e4adb47ce4a264de088c92 Mon Sep 17 00:00:00 2001 From: e-desouza Date: Fri, 27 Mar 2026 23:38:37 -0400 Subject: [PATCH 4/7] fix(asynch): tighten Box import guard to no_std + websocket only alloc::boxed::Box is only used by XRPLWebSocketError which is gated on feature = "websocket". Without the websocket gate, building with only json-rpc produces an unused import warning. --- src/asynch/clients/exceptions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 8c31cccc09134b43797139d88d5af7d926839a56 Mon Sep 17 00:00:00 2001 From: e-desouza Date: Fri, 3 Apr 2026 04:33:49 +0000 Subject: [PATCH 5/7] fix: address review feedback on async-std deprecation PR - Cargo.toml: correct comment to say "compile_error" not "runtime panic" - build_and_lint.yml: add note for contributors to manually add new features --- .github/workflows/build_and_lint.yml | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_lint.yml b/.github/workflows/build_and_lint.yml index fe0731e6..cfec5cb2 100644 --- a/.github/workflows/build_and_lint.yml +++ b/.github/workflows/build_and_lint.yml @@ -36,6 +36,7 @@ jobs: - name: Clippy # 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) diff --git a/Cargo.toml b/Cargo.toml index 86c29edc..9cbc1c22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,7 +93,7 @@ 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 triggers a runtime panic. +# 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 } From e86f2c5d8dafdf95ad9a819ee23115ebbfa3035c Mon Sep 17 00:00:00 2001 From: e-desouza Date: Mon, 20 Apr 2026 05:45:49 +0000 Subject: [PATCH 6/7] fix(features): remove async-std-rt from helpers runtime check The runtime list in src/lib.rs guarded helpers against missing a runtime, but still accepted async-std-rt even though it is deprecated and always trips the compile_error! in src/asynch/mod.rs; dropping it makes the missing-runtime message fire first and keeps the two checks consistent. --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) 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" )) From 5a66ca956da26c7d43e61e7adf8a6cc0be96d24a Mon Sep 17 00:00:00 2001 From: e-desouza Date: Fri, 17 Apr 2026 23:29:50 +0000 Subject: [PATCH 7/7] ci: pin rippled Docker image and harden health check wait The rippleci/rippled:develop image updated after 2026-04-01 and broke integration tests across all PRs (container exits before becoming healthy, causing Connection refused on localhost:5005). Pin to the last known-good digest and replace the simple until loop with a bounded retry that checks container liveness, prints status per attempt, and dumps container logs on failure. --- .github/workflows/integration_test.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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