-
Notifications
You must be signed in to change notification settings - Fork 117
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
Implement blake3 #191
Comments
This looks fantastic! It even has an official implementation for Rust 😍 There don't seem to be any viable alternatives either since this is also officially endorsed by the RBE. As for usability it seems like Buck2 already supports it. cc @JannisFengler since this might interest you 😄 |
For anyone that is interested in implementing it, I think a great first step is to support it in some of our internal |
I would be interested in working on this issue! |
The hash in check_missing_last_chunk_test() in cas/store/tests/dedup_store_test.rs seems to be wrong (it should be since it's computed with sha256). Other tests are already passing. |
If you use an assert to check for equality failing tests should print something like "you gave me As an additional test you could also use the testvectors from the blake3 repo to make sure that the "basecase" of running blake3 on something is really the same: https://github.com/BLAKE3-team/BLAKE3/blob/master/test_vectors/test_vectors.json |
Awesome thanks @SpamDoodler , but for some reason it looks like #205 's commit was attributed to me instead of you. This is probably because of some rebase issues. If you want I can revert and recommit if you really care about the attribution. |
The v2.3 format specifies the hash type in the URL, meaning that BLAKE3 can now be supported by CAS in general... #281 parses the value in. It's worth noting that the hash type is supposed to be interpreted based on length of the hash if it isn't specified. See the remote_execution.proto for more details. Our capabilities response should also be updated to specify that we support BLAKE3. |
Adds DigestHasher and hashing implementation for Sha256. This will be used to abstract the different hashing algos when computing digests. towards: #191
Adds DigestHasher and hashing implementation for Sha256. This will be used to abstract the different hashing algos when computing digests. towards: #191
Adds DigestHasher and hashing implementation for Sha256. This will be used to abstract the different hashing algos when computing digests. towards: #191
Done. |
Adds DigestHasher and hashing implementation for Sha256. This will be used to abstract the different hashing algos when computing digests. towards: TraceMachina#191
Does docker-compose have blake3 support? Or is there some config that needs to be adjusted for it to work? I tried from f9e537c and CAS seemed very unhappy about it.
|
Yes it does work but it looks like you are using VerifyStore, which has not been updated to support it yet. Currently the Here's the line where it's hard codded: The easiest way is if you are able to disable hash verification in the verify store in the config it should work. I'll see about getting the VerifyStore updated too. |
Sha256 is known to be quite slow. There's a new kid in town,
Blake3
. It's crazy fast, super secure and just better overall.BRE already supports it:
https://github.com/bazelbuild/remote-apis/blob/39c174e10d224c46b556d8d4615863804d5b2ff6/build/bazel/remote/execution/v2/remote_execution.proto#L1900
Bazel appears to be in the process of supporting it:
bazelbuild/bazel#18658
Micro-bench testing shows it is worth the effort:
https://gist.github.com/allada/6b4321a6487c2888ff73ce1cc0fc86ed
All results are on a 16 core i9 with (no threads):
1GB @ 10:
1MB @ 10_000:
1KB @ 1_000_000:
100B @ 1_000_000:
This is a significant difference and when things are under high workload, it is often because we are spending so much time hashing. This hash a very high chance of dramatically improving performance of the cas stores.
The text was updated successfully, but these errors were encountered: