protolambda / eth2-val-tools

Some experimental tools to manage validators - use at your own risk
MIT License
63 stars 21 forks source link

Errors on `go install .` #15

Closed theSamPadilla closed 3 months ago

theSamPadilla commented 1 year ago

Seeing some errors on the installation related to package github.com/herumi/bls-eth-go-binary v1.28.1.

../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:9:28: undefined: SecretKey
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:9:40: undefined: Fr
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:13:26: undefined: Fr
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:13:31: undefined: SecretKey
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:19:28: undefined: PublicKey
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:19:40: undefined: G1
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:23:26: undefined: G1
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:23:31: undefined: PublicKey
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:29:23: undefined: Sign
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:29:30: undefined: G2
../go/pkg/mod/github.com/herumi/bls-eth-go-binary@v1.28.1/bls/cast.go:29:30: too many errors

Perhaps version changed or deprecated? All in all, worth revising.

theSamPadilla commented 1 year ago

Latest version is v1.32.0 but I still seeing the same undefined errors.

protolambda commented 1 year ago

Which computer architecture and Go version are you using?

It works for me on x86_64 Linux AMD, Go 1.20.6.

theSamPadilla commented 1 year ago

Linux version: 20.04.6 LTS (Focal Fossa) Architecture: x86_64 Go Version: go version go1.21.0 linux/amd64

theSamPadilla commented 1 year ago

Tried downgrading my go version to 1.20.7 and still getting same errors.

protolambda commented 1 year ago

The Herumi library is a native dependency, this may be causing the compiler errors with undefined types, if your architecture/type somehow isn't supported by it. ~Maybe you can try bumping the dependency version, and see if newer versions work?~ Nvm, I missed the comment above. That's odd it's broken. Maybe we can move to the newer BLS libraries, Herumi is only included because of other dependencies, and there are better BLS libraries out there.

protolambda commented 1 year ago

To replace Herumi BLS with a newer better supported BLS library (BLST or Kilic BLS), we need an alternative to PrivateKeyFromSeedAndPath from https://github.com/wealdtech/go-eth2-util which depends on https://github.com/wealdtech/go-eth2-types which uses the Herumi BLS types.

theSamPadilla commented 1 year ago

Will try to dig into this a bit more. Worth keeping the issue open tho.

May be yet another reason to start hosting the direct binaries. I got around this by just moving a previously successfully installed binary to the machine.

protolambda commented 3 months ago

Closing this, issue seems stale, BLS library was swapped already and tool should install fine