Skip to content

CI is red on main: ed25519-dalek 3.0 resolved into soroban-env-host (no lockfile) #161

Description

@neromtoobad

Problem Statement

Tests (host target) fails on main and therefore on every open PR:

error[E0277]: the trait bound `ChaCha20Rng: ed25519_dalek::rand_core::CryptoRng` is not satisfied
   host.with_test_prng(|chacha| Ok(SigningKey::generate(chacha)))
   note: required by a bound in `ed25519_dalek::SigningKey::generate`
     --> ed25519-dalek-3.0.0/src/signing.rs:213
error: could not compile `soroban-env-host` (lib)

No code change caused this. main was green on 28 Jun and red from ~14 Jul with no commits in between.

Root cause

soroban-env-host declares an unbounded requirement:

[dependencies.ed25519-dalek]
version = ">=2.0.0"

When ed25519-dalek 3.0.0 was published it satisfied >=2.0.0 and was resolved in — but env-host only compiles against 2.x, since 3.0 tightened CryptoRng (now requiring DerefMut/TryRng, which ChaCha20Rng does not implement).

Because Cargo.lock is git-ignored, CI re-resolves from crates.io on every run and keeps picking the new major.

Note that crates/tools' own ed25519-dalek = "2.2" does not prevent this: Cargo allows majors to coexist, so tools gets 2.2.0 while soroban-env-host independently takes 3.0.0.

Why it Matters

  • Every PR is red, so CI signal is currently worthless — a real regression would be indistinguishable from this noise.
  • Without a lockfile the build is not reproducible, which matters for a repo that ships deployable contracts and verifies WASM hashes.

Expected Outcome

Commit Cargo.lock (pinned to ed25519-dalek 2.2.0) and remove it from .gitignore.

Acceptance Criteria

  • Tests (host target) passes on main
  • Cargo.lock is tracked, so dependency resolution is reproducible

Verification

With the pin, CI's exact commands pass locally:

cargo test <contracts> --locked   -> 166 passed; 0 failed
cargo clippy <contracts> --locked -- -D warnings  -> clean

Optional follow-ups

  • Add --locked to CI's cargo invocations so a stale lock fails loudly.
  • Upstream: soroban-env-host capping to >=2.0.0, <3 would fix this for everyone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions