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

arbo: add blake3 HashFunction #1396

Merged
merged 2 commits into from
Oct 18, 2024
Merged

arbo: add blake3 HashFunction #1396

merged 2 commits into from
Oct 18, 2024

Conversation

altergui
Copy link
Contributor

@altergui altergui commented Oct 11, 2024

arbo: add blake3 HashFunction

@coveralls
Copy link

coveralls commented Oct 11, 2024

Pull Request Test Coverage Report for Build 11385272005

Details

  • 29 of 56 (51.79%) changed or added relevant lines in 10 files are covered.
  • 12 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.09%) to 62.202%

Changes Missing Coverage Covered Lines Changed/Added Lines %
test/testcommon/testutil/util.go 0 1 0.0%
tree/arbo/hash.go 2 15 13.33%
tree/arbo/utils.go 2 15 13.33%
Files with Coverage Reduction New Missed Lines %
api/accounts.go 2 68.43%
apiclient/account.go 2 38.32%
tree/arbo/utils.go 2 64.63%
vochain/appsetup.go 2 58.88%
cmd/end2endtest/account.go 4 60.7%
Totals Coverage Status
Change from base Build 10899531372: -0.09%
Covered Lines: 16828
Relevant Lines: 27054

💛 - Coveralls

@altergui
Copy link
Contributor Author

altergui commented Oct 15, 2024

i discovered we've been using arbo.BigIntToBytes and arbo.BytesToBigInt on our codebase with big-endian bytes, i propose a commit edb37ba to rename the methods and avoid such misuse in the future.

image

@altergui altergui requested a review from p4u October 17, 2024 12:32
@altergui altergui marked this pull request as ready for review October 17, 2024 12:33
…LE and BE funcs

the neutral name lured devs into incorrect uses in the past.

renames all over the codebase:
 * BytesToBigInt -> BytesLEToBigInt
 * BigIntToBytes -> BigIntToBytesLE

the new names make it clear to the reader which endianess is used or expected,
allowing to spot endianness bugs
@altergui altergui merged commit d969541 into main Oct 18, 2024
11 checks passed
@altergui altergui deleted the feat/blake3 branch October 18, 2024 08:13
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