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

Feat: implement FixedLengthSum function for sha3 #1379

Merged
merged 7 commits into from
Feb 21, 2025

Conversation

liyue201
Copy link
Contributor

@liyue201 liyue201 commented Jan 3, 2025

Description

implement FixedLengthSum function for sha3

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

  • TestSHA3FixedLengthSum

How has this been benchmarked?

  • Benchmark A, on Macbook pro M1, 32GB RAM
  • Benchmark B, on x86 Intel xxx, 16GB RAM

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ivokub ivokub self-requested a review January 31, 2025 11:22
@ivokub
Copy link
Collaborator

ivokub commented Feb 20, 2025

Thanks for the contribution! I refactored a bit for easier reviewing and understanding. I also added tests for different input lengths. Currently there is an issue for input length 0, but I haven't tested other edge cases (at block length) etc. Would it be possible to have a look at the tests and see if there is obvious fix?

Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I fixed an edge case for length=0 and refactored a bit, but otherwise it was perfect!

@ivokub ivokub merged commit 33adbaf into Consensys:master Feb 21, 2025
3 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.

2 participants