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
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.
Problem Statement
Tests (host target)fails onmainand therefore on every open PR:No code change caused this.
mainwas green on 28 Jun and red from ~14 Jul with no commits in between.Root cause
soroban-env-hostdeclares an unbounded requirement:When
ed25519-dalek 3.0.0was published it satisfied>=2.0.0and was resolved in — but env-host only compiles against 2.x, since 3.0 tightenedCryptoRng(now requiringDerefMut/TryRng, whichChaCha20Rngdoes not implement).Because
Cargo.lockis git-ignored, CI re-resolves from crates.io on every run and keeps picking the new major.Note that
crates/tools' owned25519-dalek = "2.2"does not prevent this: Cargo allows majors to coexist, so tools gets 2.2.0 whilesoroban-env-hostindependently takes 3.0.0.Why it Matters
Expected Outcome
Commit
Cargo.lock(pinned toed25519-dalek 2.2.0) and remove it from.gitignore.Acceptance Criteria
Tests (host target)passes onmainCargo.lockis tracked, so dependency resolution is reproducibleVerification
With the pin, CI's exact commands pass locally:
Optional follow-ups
--lockedto CI's cargo invocations so a stale lock fails loudly.soroban-env-hostcapping to>=2.0.0, <3would fix this for everyone.