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

Harmony Local Deploy gives unexpected error when deploying smart contracts. #4196

Open
johnwhitton opened this issue Jun 12, 2022 · 2 comments

Comments

@johnwhitton
Copy link
Contributor

Describe the bug
Localnet gives error when deploying smart contracts.

unexpected fault address 0xb01dfacedebac1e
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x4068b9f]

To Reproduce
I'm working on horizon and am running a harmony localnet to test bridging functionality.
I'm building from Ganesha's mmr-hard-fork branch
https://github.com/gupadhyaya/harmony/tree/mmr-hard-fork
and running a local network using make debug-kill
I had to make a slight mod as I was using a later version of SSL.

Note: If using a later version of openssl (e.g. openssl v3.3) on a mac you may need to modify scripts\go_executable_build.sh changing this line LIB[libcrypto.3.dylib]=/usr/local/opt/openssl/lib/libcrypto.3.dylib

Today on my mac I did a brew upgrade and a brew cleanup to fix an issue with something unrelated (vim python stuff).
So I'm using

johnlaptop horizon (refactorV2) $ go version
go version go1.18.3 darwin/amd64

Now when I try and deploy contracts to localnet I get

unexpected fault address 0xb01dfacedebac1e
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x4068b9f]

Expected behavior
No error should occur

Screenshots
The complete log can be found here
https://gist.github.com/johnwhitton/d05bcf75ff13003f09d392522cde0564
With the horizon error log here
https://gist.github.com/johnwhitton/d05bcf75ff13003f09d392522cde0564#file-horizonerror-log

Environment (please complete the following information):

  • OS: MacOS
  • Go environment
johnlaptop horizon (refactorV2) $ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/john/Library/Caches/go-build"
GOENV="/Users/john/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/john/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/john/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.18.3/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18.3/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/v9/ygdqlrt153d3hgldy9k5txjm0000gp/T/go-build3897580124=/tmp/go-build -gno-record-gcc-switches -fno-common"

Additional context
You can follow the steps in the Horizon cheat sheet

Any help appreciated
🙏 💙 🙏

@johnwhitton
Copy link
Contributor Author

johnwhitton commented Jun 13, 2022

Note: Downgrading to go@1.17 resolved the issue.
This was done by following instructions similar to this
May be related to changes in the JSON Marshaller in go@1.18
golang/go#50970 (comment)

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

No branches or pull requests

2 participants
@johnwhitton and others