Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate BLAKE3 to BLAKE2 for easier cross-compilation #2279

Merged
merged 6 commits into from
Oct 7, 2024
Merged

Conversation

aumetra
Copy link
Member

@aumetra aumetra commented Oct 7, 2024

Closes #2277

This also modifies the hash in the pathname to be 10 characters long instead of the full (would-be) 128 characters (which we could shorten to 64 characters by just outputting 32 bytes for the hash).

5 bytes should be fine for this usecase. This is the length of a Git short hash.

@aumetra
Copy link
Member Author

aumetra commented Oct 7, 2024

Great. So the newest nightly breaks everything with lockfile v4. Cool cool.

@aumetra aumetra requested a review from chipshort October 7, 2024 11:30
@aumetra
Copy link
Member Author

aumetra commented Oct 7, 2024

BLAKE3 had a handy output function that defaulted to 32 bytes, but the BLAKE2 crate by RustCrypto is variable output by default.

They define a type alias that outputs a 512-bit hash, but rather have it explicit in the docs.

Copy link
Collaborator

@chipshort chipshort left a comment

Choose a reason for hiding this comment

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

Nice! Thanks

@chipshort
Copy link
Collaborator

@Mergifyio backport release/2.2

Copy link
Contributor

mergify bot commented Oct 7, 2024

backport release/2.2

✅ Backports have been created

@chipshort chipshort merged commit be905f3 into main Oct 7, 2024
36 of 38 checks passed
@chipshort chipshort deleted the aw/blake2 branch October 7, 2024 11:44
aumetra added a commit that referenced this pull request Oct 7, 2024
Migrate BLAKE3 to BLAKE2 for easier cross-compilation (backport #2279)
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.

Use BLAKE2 instead of BLAKE3 for cache versioning
2 participants