Skip to content

Commit

Permalink
Fix go build, bump v1.2.5 (#362)
Browse files Browse the repository at this point in the history
* use netgo
* deps: update prsym to solve warning about quic-go version
* use bsc-erigon
* bump v1.2.5
  • Loading branch information
setunapo committed Apr 12, 2024
2 parents 39518bb + e2ad510 commit bc6cb76
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 208 deletions.
62 changes: 6 additions & 56 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_name: erigon
project_name: bsc-erigon

release:
disable: false
Expand All @@ -14,7 +14,7 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w

- id: darwin-arm64
Expand All @@ -25,7 +25,7 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w

- id: linux-amd64
Expand All @@ -36,7 +36,7 @@ builds:
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w -extldflags "-static" # We need to build a static binary because we are building in a glibc based system and running in a musl container

- id: linux-arm64
Expand All @@ -47,7 +47,7 @@ builds:
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w -extldflags "-static" # We need to build a static binary because we are building in a glibc based system and running in a musl container

- id: windows-amd64
Expand All @@ -58,63 +58,13 @@ builds:
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
tags: [ nosqlite, noboltdb, nosilkworm ]
tags: [ nosqlite, noboltdb, nosilkworm, netgo ]
ldflags: -s -w


snapshot:
name_template: "{{ .Tag }}.next"

dockers:
- image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile.release
use: buildx
skip_push: true
goarch: amd64
ids:
- linux-amd64
build_flag_templates:
- --platform=linux/amd64

- image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-arm64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-arm64
dockerfile: Dockerfile.release
skip_push: true
use: buildx
goarch: arm64
ids:
- linux-arm64
build_flag_templates:
- --platform=linux/arm64/v8

docker_manifests:
- name_template: thorax/{{ .ProjectName }}:{{ .Version }}
skip_push: true
image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-amd64
- thorax/{{ .ProjectName }}:{{ .Version }}-arm64

- name_template: ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}
skip_push: true
image_templates:
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-arm64

- name_template: thorax/{{ .ProjectName }}:latest
skip_push: true
image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-amd64
- thorax/{{ .ProjectName }}:{{ .Version }}-arm64

- name_template: ghcr.io/ledgerwatch/{{ .ProjectName }}:latest
skip_push: true
image_templates:
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-arm64

announce:
slack:
enabled: false
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ ifeq ($(shell uname -s), Darwin)
endif

# about netgo see: https://github.com/golang/go/issues/30310#issuecomment-471669125 and https://github.com/golang/go/issues/57757
BUILD_TAGS = nosqlite,noboltdb
BUILD_TAGS = nosqlite,noboltdb,netgo

ifneq ($(shell "$(CURDIR)/turbo/silkworm/silkworm_compat_check.sh"),)
BUILD_TAGS := $(BUILD_TAGS),nosilkworm
endif

GOPRIVATE = github.com/erigontech/silkworm-go

PACKAGE = github.com/ledgerwatch/erigon
PACKAGE = github.com/node-real/bsc-erigon

GO_FLAGS += -trimpath -tags $(BUILD_TAGS) -buildvcs=false
GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}"
Expand Down Expand Up @@ -246,7 +246,7 @@ install:
@echo "Copied files to $(DIST):"
@ls -al "$(DIST)"

PACKAGE_NAME := github.com/node-real/erigon
PACKAGE_NAME := github.com/node-real/bsc-erigon
GOLANG_CROSS_VERSION ?= v1.21.6

.PHONY: release-dry-run
Expand Down
2 changes: 1 addition & 1 deletion consensus/parlia/parlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/ledgerwatch/erigon-lib/common/length"
"github.com/ledgerwatch/erigon/common"
"github.com/ledgerwatch/erigon/common/math"
"github.com/prysmaticlabs/prysm/v4/crypto/bls"
"github.com/prysmaticlabs/prysm/v5/crypto/bls"
"github.com/willf/bitset"

"github.com/holiman/uint256"
Expand Down
2 changes: 1 addition & 1 deletion core/types/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/pkg/errors"
"github.com/prysmaticlabs/prysm/v4/crypto/bls"
"github.com/prysmaticlabs/prysm/v5/crypto/bls"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/vm/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/rlp"
"github.com/ledgerwatch/secp256k1"
"github.com/prysmaticlabs/prysm/v4/crypto/bls"
"github.com/prysmaticlabs/prysm/v5/crypto/bls"
"math/big"

"github.com/holiman/uint256"
Expand Down
86 changes: 42 additions & 44 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ require (
github.com/crate-crypto/go-kzg-4844 v0.7.0
github.com/davecgh/go-spew v1.1.1
github.com/deckarep/golang-set v1.8.0
github.com/deckarep/golang-set/v2 v2.3.1
github.com/deckarep/golang-set/v2 v2.5.0
github.com/docker/docker v24.0.5+incompatible
github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127
github.com/edsrzf/mmap-go v1.1.0
github.com/emicklei/dot v1.6.1
github.com/ethereum/go-ethereum v1.13.5-0.20231027145059-2d7dba024d76
github.com/ethereum/go-ethereum v1.13.5
github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e
github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b
github.com/gfx-labs/sse v0.0.0-20231226060816-f747e26a9baa
Expand All @@ -55,34 +55,34 @@ require (
github.com/google/btree v1.1.2
github.com/google/cel-go v0.18.2
github.com/google/gofuzz v1.2.0
github.com/google/uuid v1.3.1
github.com/google/uuid v1.4.0
github.com/gorilla/websocket v1.5.1
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/hashicorp/golang-lru/arc/v2 v2.0.6
github.com/hashicorp/golang-lru/v2 v2.0.6
github.com/holiman/uint256 v1.2.3
github.com/holiman/uint256 v1.2.4
github.com/huandu/xstrings v1.4.0
github.com/huin/goupnp v1.3.0
github.com/jackpal/go-nat-pmp v1.0.2
github.com/json-iterator/go v1.1.12
github.com/julienschmidt/httprouter v1.3.0
github.com/klauspost/compress v1.17.3
github.com/klauspost/compress v1.17.6
github.com/ledgerwatch/erigon-lib v1.0.0
github.com/libp2p/go-libp2p v0.32.1
github.com/libp2p/go-libp2p v0.33.1
github.com/libp2p/go-libp2p-mplex v0.9.0
github.com/libp2p/go-libp2p-pubsub v0.10.0
github.com/maticnetwork/crand v1.0.2
github.com/multiformats/go-multiaddr v0.12.1
github.com/multiformats/go-multiaddr v0.12.2
github.com/nxadm/tail v1.4.9-0.20211216163028-4472660a31a6
github.com/pelletier/go-toml v1.9.5
github.com/pelletier/go-toml/v2 v2.1.0
github.com/pion/randutil v0.1.0
github.com/pion/stun v0.6.0
github.com/pion/stun v0.6.1
github.com/pkg/errors v0.9.1
github.com/protolambda/ztyp v0.2.2
github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7
github.com/prysmaticlabs/gohashtree v0.0.3-alpha.0.20230502123415-aafd8b3ca202
github.com/prysmaticlabs/prysm/v4 v4.2.0
github.com/prysmaticlabs/gohashtree v0.0.4-beta
github.com/prysmaticlabs/prysm/v5 v5.0.3
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/rs/cors v1.10.1
github.com/spf13/afero v1.10.0
Expand All @@ -101,12 +101,12 @@ require (
github.com/willf/bitset v1.1.10
github.com/xsleonard/go-merkle v1.1.0
go.uber.org/mock v0.4.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.18.0
golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611
golang.org/x/net v0.20.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.19.0
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a
golang.org/x/net v0.21.0
golang.org/x/sync v0.6.0
golang.org/x/sys v0.16.0
golang.org/x/sys v0.17.0
golang.org/x/time v0.5.0
google.golang.org/grpc v1.60.1
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
Expand Down Expand Up @@ -144,7 +144,7 @@ require (
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/benbjohnson/immutable v0.4.1-0.20221220213129-8932b999621d // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.7.0 // indirect
github.com/bits-and-blooms/bitset v1.11.0 // indirect
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand All @@ -163,7 +163,7 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/ferranbt/fastssz v0.0.0-20210905181407-59cf6761a7d5 // indirect
github.com/flynn/noise v1.0.0 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/garslo/gogen v0.0.0-20170307003452-d6ebae628c7c // indirect
Expand All @@ -172,17 +172,17 @@ require (
github.com/go-llsqlite/adapter v0.0.0-20230912124304-94ed0e573c23 // indirect
github.com/go-llsqlite/crawshaw v0.0.0-20230910110433-7e901377eb6c // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect
github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 // indirect
github.com/gtank/merlin v0.1.1 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/herumi/bls-eth-go-binary v0.0.0-20210917013441-d37c07cfda4e // indirect
Expand All @@ -193,7 +193,7 @@ require (
github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
Expand All @@ -211,8 +211,7 @@ require (
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/miekg/dns v1.1.58 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
Expand All @@ -235,36 +234,35 @@ require (
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-multistream v0.5.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/onsi/ginkgo/v2 v2.13.0 // indirect
github.com/opencontainers/runtime-spec v1.1.0 // indirect
github.com/onsi/ginkgo/v2 v2.15.0 // indirect
github.com/opencontainers/runtime-spec v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pion/datachannel v1.5.5 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect
github.com/pion/ice/v2 v2.3.6 // indirect
github.com/pion/interceptor v0.1.17 // indirect
github.com/pion/dtls/v2 v2.2.8 // indirect
github.com/pion/ice/v2 v2.3.11 // indirect
github.com/pion/interceptor v0.1.25 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.7 // indirect
github.com/pion/rtcp v1.2.10 // indirect
github.com/pion/rtp v1.7.13 // indirect
github.com/pion/sctp v1.8.7 // indirect
github.com/pion/mdns v0.0.9 // indirect
github.com/pion/rtcp v1.2.13 // indirect
github.com/pion/rtp v1.8.3 // indirect
github.com/pion/sctp v1.8.9 // indirect
github.com/pion/sdp/v3 v3.0.6 // indirect
github.com/pion/srtp/v2 v2.0.15 // indirect
github.com/pion/transport/v2 v2.2.1 // indirect
github.com/pion/turn/v2 v2.1.0 // indirect
github.com/pion/webrtc/v3 v3.2.9 // indirect
github.com/pion/srtp/v2 v2.0.18 // indirect
github.com/pion/transport/v2 v2.2.4 // indirect
github.com/pion/turn/v2 v2.1.4 // indirect
github.com/pion/webrtc/v3 v3.2.23 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prysmaticlabs/eth2-types v0.0.0-20210303084904-c9735a06829d // indirect
github.com/prysmaticlabs/fastssz v0.0.0-20221107182844-78142813af44 // indirect
github.com/prysmaticlabs/prysm v0.0.0-20220124113610-e26cde5e091b // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.4 // indirect
github.com/quic-go/quic-go v0.39.3 // indirect
github.com/quic-go/quic-go v0.42.0 // indirect
github.com/quic-go/webtransport-go v0.6.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
Expand All @@ -282,8 +280,8 @@ require (
github.com/spf13/cast v1.5.0 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
Expand All @@ -292,9 +290,9 @@ require (
go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.20.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/tools v0.18.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
Expand Down
Loading

0 comments on commit bc6cb76

Please sign in to comment.