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

Cairo0 unsafe keccak hint #361

Merged
merged 38 commits into from
Jun 11, 2024
Merged

Cairo0 unsafe keccak hint #361

merged 38 commits into from
Jun 11, 2024

Conversation

MaksymMalicki
Copy link
Contributor

No description provided.

@MaksymMalicki MaksymMalicki linked an issue Apr 24, 2024 that may be closed by this pull request
pkg/hintrunner/zero/zerohint_keccak.go Outdated Show resolved Hide resolved
pkg/hintrunner/zero/zerohint_keccak.go Outdated Show resolved Hide resolved
pkg/hintrunner/zero/zerohint_keccak.go Outdated Show resolved Hide resolved
pkg/hintrunner/zero/zerohint_keccak.go Outdated Show resolved Hide resolved
@MaksymMalicki
Copy link
Contributor Author

Currently the NewLegacyKeccak256() from the https://pkg.go.dev/golang.org/x/crypto/sha3 is used, which is also used in the go-ethereum crypto package. Alternatively, we could use this package, which is 10x faster on the benchmarks, than the package used in lambdaclass golang-vm.

@TAdev0
Copy link
Contributor

TAdev0 commented May 22, 2024

@cicr99 @rodrigo-pino what do you think? Why not using a faster implementation ?

@MaksymMalicki
Copy link
Contributor Author

Actually after some research, the benchmarks aren't that better than the official goland lib for sha3 and it's not maintaned, so I think we should stick to what we are using currently

pkg/hintrunner/zero/zerohint_keccak.go Outdated Show resolved Hide resolved
Base automatically changed from cairo0_CairoKeccakFinalizeHint to main June 6, 2024 12:07
pkg/hintrunner/hinter/scope.go Show resolved Hide resolved
pkg/hintrunner/zero/zerohint_keccak.go Outdated Show resolved Hide resolved
pkg/hintrunner/zero/zerohint_keccak.go Outdated Show resolved Hide resolved
Copy link
Contributor

@TAdev0 TAdev0 left a comment

Choose a reason for hiding this comment

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

lgtm!

@cicr99 cicr99 merged commit 1b62872 into main Jun 11, 2024
4 checks passed
@cicr99 cicr99 deleted the cairo0_UnsafeKeccakHint branch June 11, 2024 12:19
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.

UnsafeKeccak
4 participants