-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
signer/core can't compile to wasm due to unix constrains #23972
Comments
Yes, I guess we can move the |
@holiman I think it would be great if you do it... I will probably mess the package organisation. As a quick workaround I actually patched (in a brutal/poor way) several packages[0] that throw errors on wasm compilation to make sure that I won't hit unix constraints errors if I ever need to use other go-ethereum packages that have these dependencies. [0] go-ethereum/accounts/scwallet (disabled support in js) |
Seems to me like package |
Fixes ethereum#23972 (cherry picked from commit 619a3e7)
System information
go-ethereum tip
Expected behaviour
compile to wasm
Actual behaviour
signer/core package does not compile to wasm
Steps to reproduce the behaviour
import "github.com/ethereum/go-ethereum/signer/core"
Use the signer/core to generate an EIP712Domain signature;
Backtrace
I've used go-ethereum successfully in wasm environment for a while until I had to use EIP712Domain signature and import types from "signer/core". I've fixed the build tags on fast cache in VictoriaMetrics/fastcache#62 but there seem to be other transitive dependencies such
leveldb
andedsrzf/mmap-go
that require file locking.I believe the TypedData structs should perhaps be exported in a separate package so that the client can generate EIP712Domain signatures without importing (transitively) leveldb and other packages that require file synchronisation.
A more broad scope would be to make the whole go-ethereum sdk wasm compatible ( #16192 ) but that's a different, bigger issue.
The text was updated successfully, but these errors were encountered: