change hashing algorithm form sha256 to blake3#32
Merged
Conversation
a-ok123
previously approved these changes
Apr 29, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the hashing algorithm used across various modules from SHA256 (and SHA3-256) to Blake3. Key changes include replacing calls to utils.Sha3256hash with utils.Blake3Hash in production code, updating corresponding documentation comments and error messages, and modifying tests to verify outputs of the new hash function.
Reviewed Changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/utils/storagechallenge/storage_challenge.go | Updated hash function call for SCSummaryStats |
| pkg/utils/metrics/metrics.go | Updated hash function call for Metrics |
| pkg/utils/healthcheckchallenge/health_check_challenge.go | Updated hash function call for HCSummaryStats |
| pkg/types/storage_challenge.go | Updated hash function calls in StorageChallengeMessages and AggregatedScoreList |
| pkg/types/self_healing.go | Updated hash function call for SelfHealingReports |
| pkg/types/healthcheck_challenge.go | Updated hash function call for HealthCheckChallengeMessages |
| pkg/raptorq/helper.go | Updated hash function call; error message unchanged |
| pkg/net/credentials/alts/common/utils.go | Adjusted import ordering and condition style |
| pkg/crypto/hash.go | New minimal file |
| p2p/p2p.go | Updated documentation comments to reference Blake3 correctly |
| p2p/kademlia/store/sqlite/* (sqlite.go, sqlite_test.go, replication.go) | Updated hash function calls and documentation in store operations |
| p2p/kademlia/node.go | Updated hashed ID computation |
| p2p/kademlia/network.go | Updated hash function calls in network operations |
| p2p/kademlia/fetch_and_store.go | Updated hash function call in batch operations |
| p2p/kademlia/dht.go | Updated hash function calls and error handling |
| p2p/client.go | Updated documentation comments for key-related methods |
| p2p/DEVDOCS.md | Updated documentation to reflect Blake3 as the new hash algorithm |
Files not reviewed (1)
- go.mod: Language not supported
6723bf0 to
adb0f02
Compare
mateeullahmalik
approved these changes
Apr 30, 2025
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.
No description provided.