fix: resolve build errors in rustchain-miner and cross-chain-airdrop - #8182
Open
jjb9707 wants to merge 3 commits into
Open
fix: resolve build errors in rustchain-miner and cross-chain-airdrop#8182jjb9707 wants to merge 3 commits into
jjb9707 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.
Contributor
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.