From 3175d8aab3d80633f1717a2d0631617b877a1f84 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 22 Jul 2022 21:45:42 +0300 Subject: [PATCH] Bump go1.18. (#4107) * Bump go1.18. * Build tags. * Go vet errors fix. * Fix imports. * Fix imports. * Fix go vet. * Fix protobuf. * Fix file gen. * Fix tools. * Travis fix. * Travis fix. * Travis fix. * Fix dependency. * Clean up. * Fix rosetta test. * Add comment to run tests. * Add comment to run tests. * 1.18.2 * Fix rosetta script. * Fix docker version. * Fix imports. * Fix formatting. * Fix formatting. Co-authored-by: Konstantin --- .travis.yml | 5 +- Dockerfile | 2 +- Makefile | 2 +- README.md | 2 +- accounts/keystore/watch.go | 1 - accounts/keystore/watch_fallback.go | 1 - common/fdlimit/fdlimit_unix.go | 1 - consensus/debug.go | 2 +- consensus/view_change_construct.go | 2 +- core/vm/int_pool_verifier.go | 1 - core/vm/int_pool_verifier_empty.go | 1 - core/vm/runtime/fuzz.go | 1 - eth/rpc/constants_unix.go | 1 - eth/rpc/constants_unix_nocgo.go | 1 - eth/rpc/ipc_js.go | 1 - eth/rpc/ipc_unix.go | 1 - eth/rpc/ipc_windows.go | 1 - go.mod | 193 +++++++++++++++++++++++++++- go.sum | 6 - rosetta/infra/Dockerfile | 2 +- scripts/travis_rosetta_checker.sh | 18 ++- tools/tools.go | 1 - 22 files changed, 206 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index b5698c863..39e564ae0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ os: linux dist: bionic language: go go: - - 1.16 + - 1.18 go_import_path: github.com/harmony-one/harmony cache: directories: @@ -16,9 +16,10 @@ install: # default working directory with source code is automatically set to # /home/travis/gopath/src/github.com/harmony-one/harmony # https://docs.travis-ci.com/user/languages/go/#go-import-path + - echo $TRAVIS_PULL_REQUEST_BRANCH - git clone https://github.com/harmony-one/mcl.git $GOPATH/src/github.com/harmony-one/mcl - git clone https://github.com/harmony-one/bls.git $GOPATH/src/github.com/harmony-one/bls - - git clone https://github.com/harmony-one/harmony-test $GOPATH/src/github.com/harmony-one/harmony-test + - git clone https://github.com/harmony-one/harmony-test.git $GOPATH/src/github.com/harmony-one/harmony-test - (cd $GOPATH/src/github.com/harmony-one/mcl; make -j4) - (cd $GOPATH/src/github.com/harmony-one/bls; make BLS_SWAP_G=1 -j4) - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 diff --git a/Dockerfile b/Dockerfile index 8fc4261bc..aff61d458 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:18.04 ARG TARGETARCH -ARG GOLANG_VERSION="1.16.3" +ARG GOLANG_VERSION="1.18" SHELL ["/bin/bash", "-c"] diff --git a/Makefile b/Makefile index 776ecf5b7..47633d7f3 100644 --- a/Makefile +++ b/Makefile @@ -156,4 +156,4 @@ go-vet: go vet ./... go-test: - go test -vet=all -race ./... \ No newline at end of file + go test -vet=all -race ./... diff --git a/README.md b/README.md index da49ce979..01c98dfd5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ http://api.hmny.io/ ## Requirements -### **Go 1.16.3** +### **Go 1.18** ### **GMP and OpenSSL** On macOS: diff --git a/accounts/keystore/watch.go b/accounts/keystore/watch.go index 76c711452..75cf156f0 100644 --- a/accounts/keystore/watch.go +++ b/accounts/keystore/watch.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build (darwin && !ios) || freebsd || (linux && !arm64) || netbsd || solaris -// +build darwin,!ios freebsd linux,!arm64 netbsd solaris package keystore diff --git a/accounts/keystore/watch_fallback.go b/accounts/keystore/watch_fallback.go index 584a991f4..9a8f0fc0b 100644 --- a/accounts/keystore/watch_fallback.go +++ b/accounts/keystore/watch_fallback.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build ios || (linux && arm64) || windows || (!darwin && !freebsd && !linux && !netbsd && !solaris) -// +build ios linux,arm64 windows !darwin,!freebsd,!linux,!netbsd,!solaris // This is the fallback implementation of directory watching. // It is used on unsupported platforms. diff --git a/common/fdlimit/fdlimit_unix.go b/common/fdlimit/fdlimit_unix.go index a1f388ebb..704ca27f2 100644 --- a/common/fdlimit/fdlimit_unix.go +++ b/common/fdlimit/fdlimit_unix.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build linux || netbsd || openbsd || solaris -// +build linux netbsd openbsd solaris package fdlimit diff --git a/consensus/debug.go b/consensus/debug.go index 95a34cd86..ae1d2d92b 100644 --- a/consensus/debug.go +++ b/consensus/debug.go @@ -1,6 +1,6 @@ package consensus -// GetConsensusPhase returns the current phase of the consensus +// GetConsensusPhase returns the current phase of the consensus. func (consensus *Consensus) GetConsensusPhase() string { return consensus.phase.String() } diff --git a/consensus/view_change_construct.go b/consensus/view_change_construct.go index a915a2c27..29ba664ee 100644 --- a/consensus/view_change_construct.go +++ b/consensus/view_change_construct.go @@ -500,7 +500,7 @@ func (vc *viewChange) GetViewIDBitmap(viewID uint64) *bls_cosi.Mask { return vc.viewIDBitmap[viewID] } -// GetM1Payload returns the m1Payload +// GetM1Payload returns the m1Payload. func (vc *viewChange) GetM1Payload() []byte { return vc.m1Payload } diff --git a/core/vm/int_pool_verifier.go b/core/vm/int_pool_verifier.go index c2382b189..72d55ff67 100644 --- a/core/vm/int_pool_verifier.go +++ b/core/vm/int_pool_verifier.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build VERIFY_EVM_INTEGER_POOL -// +build VERIFY_EVM_INTEGER_POOL package vm diff --git a/core/vm/int_pool_verifier_empty.go b/core/vm/int_pool_verifier_empty.go index 6f7ff5759..6cbe6cafe 100644 --- a/core/vm/int_pool_verifier_empty.go +++ b/core/vm/int_pool_verifier_empty.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build !VERIFY_EVM_INTEGER_POOL -// +build !VERIFY_EVM_INTEGER_POOL package vm diff --git a/core/vm/runtime/fuzz.go b/core/vm/runtime/fuzz.go index d20a784e1..71fd54cb4 100644 --- a/core/vm/runtime/fuzz.go +++ b/core/vm/runtime/fuzz.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build gofuzz -// +build gofuzz package runtime diff --git a/eth/rpc/constants_unix.go b/eth/rpc/constants_unix.go index 1a2433a18..0552b3047 100644 --- a/eth/rpc/constants_unix.go +++ b/eth/rpc/constants_unix.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build darwin || dragonfly || freebsd || linux || nacl || netbsd || openbsd || solaris -// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris package rpc diff --git a/eth/rpc/constants_unix_nocgo.go b/eth/rpc/constants_unix_nocgo.go index a62e4ee52..851d4f116 100644 --- a/eth/rpc/constants_unix_nocgo.go +++ b/eth/rpc/constants_unix_nocgo.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build !cgo && !windows -// +build !cgo,!windows package rpc diff --git a/eth/rpc/ipc_js.go b/eth/rpc/ipc_js.go index 453a20bc1..ce0779b65 100644 --- a/eth/rpc/ipc_js.go +++ b/eth/rpc/ipc_js.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build js -// +build js package rpc diff --git a/eth/rpc/ipc_unix.go b/eth/rpc/ipc_unix.go index 249a9cf04..8af914baf 100644 --- a/eth/rpc/ipc_unix.go +++ b/eth/rpc/ipc_unix.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build darwin || dragonfly || freebsd || linux || nacl || netbsd || openbsd || solaris -// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris package rpc diff --git a/eth/rpc/ipc_windows.go b/eth/rpc/ipc_windows.go index adb1826f0..f362ca3f8 100644 --- a/eth/rpc/ipc_windows.go +++ b/eth/rpc/ipc_windows.go @@ -15,7 +15,6 @@ // along with the go-ethereum library. If not, see . //go:build windows -// +build windows package rpc diff --git a/go.mod b/go.mod index 1e91347a1..d766636c7 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,10 @@ module github.com/harmony-one/harmony -go 1.16 +go 1.18 require ( - github.com/VictoriaMetrics/fastcache v1.5.7 // indirect github.com/Workiva/go-datastructures v1.0.50 github.com/allegro/bigcache v1.2.1 - github.com/aristanetworks/goarista v0.0.0-20190607111240-52c2a7864a08 // indirect github.com/aws/aws-sdk-go v1.30.1 github.com/beevik/ntp v0.3.0 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce @@ -15,7 +13,6 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/deckarep/golang-set v1.7.1 github.com/ethereum/go-ethereum v1.9.25 - github.com/fjl/memsize v0.0.0-20180929194037-2a09253e352a // indirect github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 github.com/golangci/golangci-lint v1.22.2 @@ -55,18 +52,200 @@ require ( go.uber.org/ratelimit v0.1.0 go.uber.org/zap v1.16.0 golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba - golang.org/x/tools v0.1.7 // indirect google.golang.org/grpc v1.33.2 google.golang.org/protobuf v1.26.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 gopkg.in/yaml.v2 v2.4.0 +) + +require ( + github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect + github.com/BurntSushi/toml v0.3.1 // indirect + github.com/OpenPeeDeeP/depguard v1.0.1 // indirect + github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect + github.com/VictoriaMetrics/fastcache v1.5.7 // indirect + github.com/aristanetworks/goarista v0.0.0-20190607111240-52c2a7864a08 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bombsimon/wsl/v2 v2.0.0 // indirect + github.com/btcsuite/btcd v0.21.0-beta // indirect + github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect + github.com/dgraph-io/badger v1.6.2 // indirect + github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/edsrzf/mmap-go v1.0.0 // indirect + github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa // indirect + github.com/fatih/color v1.10.0 // indirect + github.com/fjl/memsize v0.0.0-20180929194037-2a09253e352a // indirect + github.com/flynn/noise v1.0.0 // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect + github.com/go-critic/go-critic v0.4.0 // indirect + github.com/go-lintpack/lintpack v0.5.2 // indirect + github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-stack/stack v1.8.0 // indirect + github.com/go-toolsmith/astcast v1.0.0 // indirect + github.com/go-toolsmith/astcopy v1.0.0 // indirect + github.com/go-toolsmith/astequal v1.0.0 // indirect + github.com/go-toolsmith/astfmt v1.0.0 // indirect + github.com/go-toolsmith/astp v1.0.0 // indirect + github.com/go-toolsmith/strparse v1.0.0 // indirect + github.com/go-toolsmith/typep v1.0.0 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/snappy v0.0.1 // indirect + github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect + github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect + github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 // indirect + github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 // indirect + github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 // indirect + github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee // indirect + github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect + github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc // indirect + github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect + github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect + github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 // indirect + github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 // indirect + github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 // indirect + github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect + github.com/google/gopacket v1.1.19 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.1.0 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/huin/goupnp v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/ipfs/go-cid v0.0.7 // indirect + github.com/ipfs/go-datastore v0.4.5 // indirect + github.com/ipfs/go-ipfs-util v0.0.2 // indirect + github.com/ipfs/go-ipns v0.0.2 // indirect + github.com/ipfs/go-log v1.0.5 // indirect + github.com/ipfs/go-log/v2 v2.1.3 // indirect + github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect + github.com/jbenet/goprocess v0.1.4 // indirect + github.com/jmespath/go-jmespath v0.3.0 // indirect + github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 // indirect + github.com/kisielk/gotool v1.0.0 // indirect + github.com/klauspost/cpuid/v2 v2.0.4 // indirect + github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect + github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d // indirect + github.com/kr/pretty v0.2.1 // indirect + github.com/kr/text v0.1.0 // indirect + github.com/libp2p/go-addr-util v0.1.0 // indirect + github.com/libp2p/go-buffer-pool v0.0.2 // indirect + github.com/libp2p/go-cidranger v1.1.0 // indirect + github.com/libp2p/go-conn-security-multistream v0.2.1 // indirect + github.com/libp2p/go-eventbus v0.2.1 // indirect + github.com/libp2p/go-flow-metrics v0.0.3 // indirect + github.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052 // indirect + github.com/libp2p/go-libp2p-autonat v0.4.2 // indirect + github.com/libp2p/go-libp2p-blankhost v0.2.0 // indirect + github.com/libp2p/go-libp2p-circuit v0.4.0 // indirect + github.com/libp2p/go-libp2p-kbucket v0.4.7 // indirect + github.com/libp2p/go-libp2p-mplex v0.4.1 // indirect + github.com/libp2p/go-libp2p-nat v0.0.6 // indirect + github.com/libp2p/go-libp2p-noise v0.2.0 // indirect + github.com/libp2p/go-libp2p-peerstore v0.2.8 // indirect + github.com/libp2p/go-libp2p-pnet v0.2.0 // indirect + github.com/libp2p/go-libp2p-record v0.1.3 // indirect + github.com/libp2p/go-libp2p-swarm v0.5.3 // indirect + github.com/libp2p/go-libp2p-tls v0.1.3 // indirect + github.com/libp2p/go-libp2p-transport-upgrader v0.4.6 // indirect + github.com/libp2p/go-libp2p-yamux v0.5.4 // indirect + github.com/libp2p/go-maddr-filter v0.1.0 // indirect + github.com/libp2p/go-mplex v0.3.0 // indirect + github.com/libp2p/go-msgio v0.0.6 // indirect + github.com/libp2p/go-nat v0.0.5 // indirect + github.com/libp2p/go-netroute v0.1.6 // indirect + github.com/libp2p/go-openssl v0.0.7 // indirect + github.com/libp2p/go-reuseport v0.0.2 // indirect + github.com/libp2p/go-reuseport-transport v0.0.5 // indirect + github.com/libp2p/go-sockaddr v0.1.1 // indirect + github.com/libp2p/go-stream-muxer-multistream v0.3.0 // indirect + github.com/libp2p/go-tcp-transport v0.2.7 // indirect + github.com/libp2p/go-ws-transport v0.4.0 // indirect + github.com/libp2p/go-yamux/v2 v2.2.0 // indirect + github.com/magiconair/properties v1.8.1 // indirect + github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect + github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-runewidth v0.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/miekg/dns v1.1.41 // indirect + github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect + github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect + github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect + github.com/minio/sha256-simd v1.0.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.3.3 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mr-tron/base58 v1.2.0 // indirect + github.com/multiformats/go-base32 v0.0.3 // indirect + github.com/multiformats/go-base36 v0.1.0 // indirect + github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect + github.com/multiformats/go-multibase v0.0.3 // indirect + github.com/multiformats/go-multihash v0.0.15 // indirect + github.com/multiformats/go-multistream v0.2.2 // indirect + github.com/multiformats/go-varint v0.0.6 // indirect + github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect + github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.18.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/tsdb v0.7.1 // indirect + github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d // indirect + github.com/sirupsen/logrus v1.6.0 // indirect + github.com/sourcegraph/go-diff v0.5.1 // indirect + github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect + github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/cast v1.3.0 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 // indirect + github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 // indirect + github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect + github.com/stretchr/objx v0.2.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e // indirect + github.com/tommy-muehle/go-mnd v1.1.1 // indirect + github.com/tyler-smith/go-bip39 v1.0.2 // indirect + github.com/ultraware/funlen v0.0.2 // indirect + github.com/ultraware/whitespace v0.0.4 // indirect + github.com/uudashr/gocognit v1.0.1 // indirect + github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect + github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 // indirect + github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 // indirect + go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect + golang.org/x/mod v0.4.2 // indirect + golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect + golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect + golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/tools v0.1.7 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect + gopkg.in/ini.v1 v1.51.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect honnef.co/go/tools v0.0.1-2020.1.5 // indirect + mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect + mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect + mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f // indirect + sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 // indirect ) replace github.com/ethereum/go-ethereum => github.com/ethereum/go-ethereum v1.9.9 diff --git a/go.sum b/go.sum index 15a365541..ef460d7b0 100644 --- a/go.sum +++ b/go.sum @@ -82,7 +82,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bombsimon/wsl v1.2.5 h1:9gTOkIwVtoDZywvX802SDHokeX4kW1cKnV8ZTVAPkRs= github.com/bombsimon/wsl v1.2.5/go.mod h1:43lEF/i0kpXbLCeDXL9LMT8c92HyBywXb0AsgMHYngM= github.com/bombsimon/wsl/v2 v2.0.0 h1:+Vjcn+/T5lSrO8Bjzhk4v14Un/2UyCA1E3V5j9nwTkQ= github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= @@ -508,7 +507,6 @@ github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlT github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -532,7 +530,6 @@ github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.0 h1:NMpwD2G9JSFOE1/TJjGSo5zG7Yb2bTe7eq1jH+irmeE= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.4 h1:g0I61F2K2DjRHz1cnxlkNSBIaePVoJIjjnHui8QHbiw= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -777,7 +774,6 @@ github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZ github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= -github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI= github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux/v2 v2.2.0 h1:RwtpYZ2/wVviZ5+3pjC8qdQ4TKnrak0/E01N1UWoAFU= github.com/libp2p/go-yamux/v2 v2.2.0/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ= @@ -870,7 +866,6 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= @@ -1226,7 +1221,6 @@ github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= diff --git a/rosetta/infra/Dockerfile b/rosetta/infra/Dockerfile index da16be092..832f5b224 100644 --- a/rosetta/infra/Dockerfile +++ b/rosetta/infra/Dockerfile @@ -1,5 +1,5 @@ # Build -FROM golang:1.16 AS build +FROM golang:1.18 AS build RUN apt update -y && \ apt install libgmp-dev libssl-dev git -y && \ diff --git a/scripts/travis_rosetta_checker.sh b/scripts/travis_rosetta_checker.sh index 150ed954f..6576b4e07 100644 --- a/scripts/travis_rosetta_checker.sh +++ b/scripts/travis_rosetta_checker.sh @@ -1,11 +1,15 @@ #!/usr/bin/env bash set -e + +echo $TRAVIS_PULL_REQUEST_BRANCH DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -CACHE_DIR="docker_images" -mkdir -p $CACHE_DIR -echo "pulling cached docker img" -docker load -i $CACHE_DIR/images.tar || true -docker pull harmonyone/localnet-test -echo "saving cached docker img" -docker save -o $CACHE_DIR/images.tar harmonyone/localnet-test +echo $DIR +echo $GOPATH +cd $GOPATH/src/github.com/harmony-one/harmony-test +git fetch +git checkout $TRAVIS_PULL_REQUEST_BRANCH || true +git pull +git branch --show-current +cd localnet +docker build -t harmonyone/localnet-test . docker run -v "$DIR/../:/go/src/github.com/harmony-one/harmony" harmonyone/localnet-test -r \ No newline at end of file diff --git a/tools/tools.go b/tools/tools.go index 47fbf1fe9..dd98334af 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -3,7 +3,6 @@ // and not really importable packages. // //go:build tools -// +build tools // Package tools provides build tools necessary for Harmony. package tools