Skip to content

Fix CI build failure by pinning generic-array to 0.14.7#1945

Merged
plebhash merged 3 commits into
stratum-mining:mainfrom
Shourya742:2025-10-13-patch-generic-array
Oct 13, 2025
Merged

Fix CI build failure by pinning generic-array to 0.14.7#1945
plebhash merged 3 commits into
stratum-mining:mainfrom
Shourya742:2025-10-13-patch-generic-array

Conversation

@Shourya742

Copy link
Copy Markdown
Member

The CI build was failing due to generic-array v0.14.8 using the cargo::rustc-check-cfg directive, which is only supported on Rust 1.79 and above.
Pinned generic-array to version 0.14.7 to maintain MSRV.

Build failure can be observed here: https://github.com/stratum-mining/stratum/actions/runs/18458666773/job/52584886703?pr=1926

@Shourya742 Shourya742 force-pushed the 2025-10-13-patch-generic-array branch from 08bd9ee to c2df937 Compare October 13, 2025 08:54

@GitGab19 GitGab19 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully get the issue here, generic_array MSRV is 1.65 according to their docs.

Why are we getting this issue?

Comment thread test/integration-tests/minerd/minerd Outdated
@Shourya742

Copy link
Copy Markdown
Member Author

This is part of the cargo tree for the protocol crates, showing the transitive dependency on generic-array:

binary_codec_sv2 v3.0.0 (/home/shourya/stratum/protocols/v2/binary-sv2/codec)
└── buffer_sv2 v2.0.0 (/home/shourya/stratum/utils/buffer)
    └── aes-gcm v0.10.3
        ├── aead v0.5.2
        │   ├── crypto-common v0.1.6
        │   │   ├── generic-array v0.14.7
        │   │   │   └── typenum v1.19.0
        │   │   │   [build-dependencies]
        │   │   │   └── version_check v0.9.5
        │   │   ├── rand_core v0.6.4
        │   │   │   └── getrandom v0.2.16
        │   │   │       ├── cfg-if v1.0.3
        │   │   │       └── libc v0.2.177
        │   │   └── typenum v1.19.0
        │   └── generic-array v0.14.7 (*)
        ├── aes v0.8.4
        │   ├── cfg-if v1.0.3
        │   ├── cipher v0.4.4
        │   │   ├── crypto-common v0.1.6 (*)
        │   │   ├── inout v0.1.4
        │   │   │   └── generic-array v0.14.7 (*)
        │   │   └── zeroize v1.8.2
        │   └── cpufeatures v0.2.17
        ├── cipher v0.4.4 (*)
        ├── ctr v0.9.2
        │   └── cipher v0.4.4 (*)
        ├── ghash v0.5.1
        │   ├── opaque-debug v0.3.1
        │   └── polyval v0.6.2
        │       ├── cfg-if v1.0.3
        │       ├── cpufeatures v0.2.17
        │       ├── opaque-debug v0.3.1
        │       └── universal-hash v0.5.1
        │           ├── crypto-common v0.1.6 (*)
        │           └── subtle v2.6.1
        └── subtle v2.6.1

Lets take the example of the crypto-common https://github.com/RustCrypto/traits/blob/crypto-common-v0.1.6/crypto-common/Cargo.toml, It has the generic-array dependency assigned as 0.14.4, However, Cargo’s dependency resolver automatically selects the latest patch, which is currently 0.14.8. The author of generic-array just released patch version 0.14.8 yesterday, which is unexpectedly recent: https://crates.io/crates/generic-array/0.14.8

@Shourya742 Shourya742 force-pushed the 2025-10-13-patch-generic-array branch from c2df937 to ab05f93 Compare October 13, 2025 12:20
@plebhash

Copy link
Copy Markdown
Member

don't we need to do anything for noise_sv2 crate?

I mean, I see CI is green here, but the previous CI failure was on noise_sv2, which takes generic_array as an indirect dependency from aes-gcm

@Shourya742

Copy link
Copy Markdown
Member Author

don't we need to do anything for noise_sv2 crate?

I mean, I see CI is green here, but the previous CI failure was on noise_sv2, which takes generic_array as an indirect dependency from aes-gcm

Ah yeah, you’re right! It wasn’t just Noise, it’s the protocol crates in general. Once we pin generic-array in any crate, Cargo locks that minor version along with patch and reuses it for all crates depending on the same version in our case "0.14.xx". That’s why we didn’t need to version it explicitly for Noise, but yeah, makes sense to add it.

@Shourya742 Shourya742 force-pushed the 2025-10-13-patch-generic-array branch from 4c96385 to 060df0e Compare October 13, 2025 13:16
@plebhash plebhash merged commit 066ac05 into stratum-mining:main Oct 13, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants