fix: resolve build errors in rustchain-miner and cross-chain-airdrop - #8182
fix: resolve build errors in rustchain-miner and cross-chain-airdrop#8182jjb9707 wants to merge 3 commits into
Conversation
- rustchain-miner: reqwest 0.13 renamed the 'rustls-tls' feature to 'rustls' and split '.query()' into its own 'query' feature. Update Cargo.toml. - cross-chain-airdrop: tracked Cargo.lock was corrupt (duplicate thiserror entry) and broke 'cargo' parsing. It is gitignored by repo policy, so stop tracking it and let cargo regenerate a valid lockfile.
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
…e-certs` reqwest 0.13.x exposes no `rustls-native-certs` feature (verified against the crates.io index for 0.13.0-rc.1 through 0.13.4), so cargo would abort with "the package `rustchain-miner` depends on `reqwest`, with features: `rustls-native-certs` but `reqwest` does not have these features" before any code is compiled -- defeating the purpose of this build fix. The `rustls` feature already enables `rustls-platform-verifier`, which reads the OS trust store, so native root certificates are covered without it.
The previous comment claimed no `rustls-native-certs` feature "exists" on reqwest 0.13.x. That is wrong and easy to disprove with one command, which would undermine the rest of this change. Verified against the crates.io sparse index for every published 0.13.x: version rustls-tls rustls rustls-native-certs query 0.13.0-rc.1 no yes yes yes 0.13.0 no yes yes yes 0.13.1 no yes yes yes 0.13.2 no yes no yes 0.13.3 no yes no yes 0.13.4 no yes no yes So `rustls-tls` genuinely does not exist anywhere on 0.13.x (that is the hard resolver error this PR fixes), but `rustls-native-certs` does exist on 0.13.0/0.13.1 as the implicit feature of an optional dependency. Requesting it therefore does not error -- it silently backtracks the resolver to reqwest 0.13.1 instead of 0.13.4, which is the real reason to leave it out. It is redundant in any case: `rustls` enables `rustls-platform-verifier`, whose own dependency list includes `rustls-native-certs`, so the OS trust store is already used. Comment-only change; the resolved feature set is unchanged.
FlintLeng
left a comment
There was a problem hiding this comment.
PR Review: Resolve Build Errors in rustchain-miner and cross-chain-airdrop
Reviewed on: 2026-08-13
Summary
Fixes two independent build blockers:
rustchain-miner:reqwest0.13 has norustls-tlsfeature (should berustls-tls-native-rootsorrustls-tls-webpki-roots)cross-chain-airdrop:Cargo.lockwas severely out of sync (2385-line deletion)
Fix 1: reqwest Feature Name ✅
The bug: Cargo.toml requested reqwest = { version = "0.13", features = ["rustls-tls"] }. This feature does not exist in reqwest 0.13 — the feature names are rustls-tls-native-roots or rustls-tls-webpki-roots. Cargo fails during dependency resolution before compiling anything.
The fix: Updates to the correct feature name. This is a straightforward documentation/API change on the reqwest side.
Fix 2: Cargo.lock Sync ✅
The bug: cross-chain-airdrop/Cargo.lock was severely out of sync with Cargo.toml. The lock file recorded dependencies that no longer match the manifest.
The fix: Delete the entire lock file (2385 lines) and regenerate. This is the correct approach when the lock file is hopelessly stale. The new lock file will be generated on the next cargo build.
Minor Note
This PR is a pure build fix — no runtime logic changes. The 2385-line deletion looks large, but it's just removing a stale lock file. The actual code change is 10 lines in one Cargo.toml.
Wallet: RTC019e78d600fb3131c29d7ba80aba8fe644be426e
✅ LGTM — straightforward build fixes that unblock compilation. No security implications.
Summary
Two independent build blockers in
rustchain-minerandcross-chain-airdrop.Both are reproducible with a single cargo command; both are shown as a before/after pair below.
1.
rustchain-miner--reqwest0.13 has norustls-tlsfeatureOn
mainthe manifest asks for a feature that does not exist, so cargo aborts duringdependency resolution, before a single line of code is compiled:
With this PR:
The feature set is exactly what the source needs, no more:
jsonsrc/transport.rs:77,src/attestation.rs:223and 5 morequery.query(params)-- split into its own feature in 0.13src/transport.rs:70rustlsdanger_accept_invalid_certssrc/transport.rs:29,36No
multipart/blocking/formusage anywhere in the crate, hencedefault-features = false.Correction to an earlier claim in this PR
An earlier revision of this description (and of the inline comment in
Cargo.toml) statedthat
rustls-native-certsdoes not exist on reqwest 0.13.x. That was wrong, and itis worth correcting explicitly because it is trivially disprovable and would cast doubt on the
rest of the analysis. Checked against the crates.io sparse index for every published 0.13.x:
rustls-tlsrustlsrustls-native-certsquerySo
rustls-tlsreally is absent from every 0.13.x -- that part stands, and it is the harderror this PR fixes. But
rustls-native-certsis present on 0.13.0/0.13.1 as the implicitfeature of an optional dependency (it is not in the index
featuresmap, which is why it wasmisread as absent). Asking for it therefore does not fail -- it silently backtracks the
resolver, which is the actual reason to leave it out:
It is also redundant:
rustlsenablesrustls-platform-verifier 0.7.0, whose owndependency list contains
rustls-native-certs 0.8.4, so the OS trust store is already in use.The manifest itself was already correct; commit
7668c50only fixes the misleading commentso a future contributor does not re-add the feature.
2.
cross-chain-airdrop-- corruptCargo.lock(removed)Not the ordinary case of cargo keeping several different versions of a crate. The tracked lock
file has two
[[package]]blocks with an identical name, version and checksum butconflicting dependency lists:
dependenciesthiserror4288b5bc...fbc4thiserror-impl 1.0.69thiserror4288b5bc...fbc4thiserror-impl 2.0.18thiserror-impl2.0.18 is duplicated the same way (blocks at lines 1570 and 1581). Cargo doesnot pick one -- it refuses the file outright:
After removing it, resolution is clean and the regenerated lock has no duplicate keys at all:
Deleting rather than hand-editing is the right fix here because
cross-chain-airdrop/.gitignorealready listsCargo.lock-- the file was force-addedagainst the crate's own stated intent. The rest of that lock was structurally sound (246 packages,
245 from the registry, 0 missing checksums);
thiserror/thiserror-implwere the onlycorrupt keys.
CI scope -- why this was verified locally, and why approving the runs is safe
rust-ci.ymlis the only Rust workflow in the repository, and it is scoped torustchain-walletandrips:push/pull_requesttriggers carry apaths:filter listing onlyrustchain-wallet/**,rips/**and the workflow file itself;working-directory: rustchain-wallet.Neither
rustchain-minernorcross-chain-airdropis built by it, or by any of theother 19 workflows -- which is why this had to be verified locally, and why the queued runs on this
PR cannot go red because of this change:
ci.ymlis a Python pipeline (ruff / mypy /bandit / pytest) and the remaining checks are BCOS, RIP-309 and PoC-audit scans. None of them
compile these two crates. The two checks that did run (
PR Size Labeler,Auto Label PRs) are green; the rest sit inaction_requiredwaiting on a maintainer.Worth a separate issue: both crates ship a
[[bin]]yet have zero CI coverage, which is howtwo resolver-level defects reached
mainunnoticed. Happy to file it if useful.Reproducing all of the above
Full compilation was not run end to end on the machine used here (its MinGW install is missing
the assembler
dlltoolshells out to, sogetrandomcannot be built locally). Everythingclaimed above is at the resolver/lock-file layer, which is exactly where both defects live, and
every step is reproducible with the four commands above.
Out of scope
ripshas separate structural issues (missingdeep_entropymodule, absentsrc/bintarget) and is intentionally not touched here; that deserves its own issue.