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

fix(keystore): support for build without cgo #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

subnix
Copy link

@subnix subnix commented May 30, 2024

CGO and especially go-ethereum/crypto/secp256k1 adds significant overhead to build time/size. Also it doesn't allow us to build on some platforms at all.
go-ethereum has a cgo-safe wrapper for secp256k1.RecoverPubkey - crypto.Ecrecover. So we can use it to fix the problem.
https://github.com/ethereum/go-ethereum/blob/6bb13e8e2be3aa8c41460eb11837baba514e19be/crypto/signature_cgo.go#L31-L34
https://github.com/ethereum/go-ethereum/blob/6bb13e8e2be3aa8c41460eb11837baba514e19be/crypto/signature_nocgo.go#L32-L40

Fixes #103, Fixes #111, Fixes #125, Fixes #137, Fixes #139

P.S. Looks like it should resolve windows building issues, but I can't check it.

@subnix
Copy link
Author

subnix commented Aug 14, 2024

@fbsobreira could you take a look, please? It's a really small change that will significantly improve building and portability.

@jwrookie
Copy link

jwrookie commented Sep 2, 2024

look good for me

@RelicOfTesla
Copy link

RelicOfTesla commented Oct 19, 2024

#103, #111, #125, #137, #139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants