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

Implement Blake2s Hints (Part 1) #311

Merged
merged 16 commits into from
Oct 24, 2023
Merged

Implement Blake2s Hints (Part 1) #311

merged 16 commits into from
Oct 24, 2023

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Oct 3, 2023

Depends on #310

@fmoletta fmoletta marked this pull request as ready for review October 3, 2023 15:17
@fmoletta fmoletta mentioned this pull request Oct 3, 2023
4 tasks
Base automatically changed from blake2s to main October 23, 2023 19:04
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2023

Codecov Report

Merging #311 (5e1ce12) into main (a629107) will increase coverage by 0.16%.
The diff coverage is 73.91%.

@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
+ Coverage   57.07%   57.24%   +0.16%     
==========================================
  Files          52       53       +1     
  Lines        6915     6984      +69     
==========================================
+ Hits         3947     3998      +51     
- Misses       2574     2586      +12     
- Partials      394      400       +6     
Files Coverage Δ
pkg/hints/hint_processor.go 89.47% <100.00%> (+0.10%) ⬆️
pkg/lambdaworks/lambdaworks.go 91.41% <100.00%> (+0.22%) ⬆️
pkg/hints/blake2s_hints.go 70.49% <70.49%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines +430 to +451
func TestToU321(t *testing.T) {
felt := lambdaworks.FeltOne()
result, err := felt.ToU32()

var expected uint32 = 1

if expected != result {
t.Errorf("Error in conversion expected: %v, got %v with err: %v", expected, result, err)
}

}

func TestToU3210230(t *testing.T) {
felt := lambdaworks.FeltFromUint64(10230)
result, err := felt.ToU32()

var expected uint32 = 10230

if expected != result {
t.Errorf("Error in conversion expected: %v, got %v with err: %v", expected, result, err)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Maybe separate the the number from the type in the name with an underscore, or put the number first, so it's easier to read as two separate entities.

@Oppen Oppen added this pull request to the merge queue Oct 24, 2023
Merged via the queue into main with commit 5a2d812 Oct 24, 2023
2 checks passed
@Oppen Oppen deleted the blake2s-hints-1 branch October 24, 2023 14:23
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.

5 participants