Skip to content

Commit

Permalink
Merge pull request #1300 from maticnetwork/upstream_merge_1.14.6
Browse files Browse the repository at this point in the history
Upstream merge 1.14.6
  • Loading branch information
cffls authored Oct 1, 2024
2 parents 44d0938 + 396c06d commit b8901bc
Show file tree
Hide file tree
Showing 799 changed files with 61,062 additions and 28,693 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
os: [ ubuntu-20.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
git submodule update --init --recursive --force
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
os: [ ubuntu-20.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
git submodule update --init --recursive --force
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
os: [ ubuntu-20.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
git submodule update --init --recursive --force
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
Expand All @@ -107,7 +107,7 @@ jobs:
- name: Test
run: make test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: unitTest-coverage
path: cover.out
Expand All @@ -133,7 +133,7 @@ jobs:
os: [ ubuntu-20.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
git submodule update --init --recursive --force
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
Expand All @@ -146,7 +146,7 @@ jobs:
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install build-essential

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
Expand All @@ -158,7 +158,7 @@ jobs:
- name: test-integration
run: make test-integration

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: integrationTest-coverage
path: cover.out
Expand All @@ -172,9 +172,9 @@ jobs:
needs: [unit-tests, integration-tests]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

Expand All @@ -185,7 +185,7 @@ jobs:
os: [ ubuntu-20.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: bor
- name: Checkout submodules
Expand All @@ -199,7 +199,7 @@ jobs:
go-version: 1.22.x

- name: Checkout matic-cli
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: maticnetwork/matic-cli
ref: master
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: logs_${{ github.run_id }}
path: |
Expand All @@ -277,7 +277,7 @@ jobs:
- name: Upload code and chain data
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code_${{ github.run_id }}
path: code.tar.gz
23 changes: 0 additions & 23 deletions .github/workflows/go.yml

This file was deleted.

19 changes: 15 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ run:
linters:
disable-all: true
enable:
- goconst
- goimports
- gosimple
- govet
Expand All @@ -24,7 +23,10 @@ linters:
- durationcheck
- exportloopref
- whitespace
- revive # only certain checks enabled

### linters we tried and will not be using:
###
# - structcheck # lots of false positives
# - errcheck #lot of false positives
# - contextcheck
Expand All @@ -37,9 +39,15 @@ linters:
linters-settings:
gofmt:
simplify: true
goconst:
min-len: 3 # minimum length of string constant
min-occurrences: 6 # minimum number of occurrences
revive:
enable-all-rules: false
# here we enable specific useful rules
# see https://golangci-lint.run/usage/linters/#revive for supported rules
rules:
- name: receiver-naming
severity: warning
disabled: false
exclude: [""]

issues:
exclude-files:
Expand All @@ -49,6 +57,9 @@ issues:
linters:
- deadcode
- staticcheck
- path: crypto/bn256/
linters:
- revive
- path: internal/build/pgp.go
text: 'SA1019: "golang.org/x/crypto/openpgp" is deprecated: this package is unmaintained except for security fixes.'
- path: core/vm/contracts.go
Expand Down
1 change: 0 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Diederik Loerakker <[email protected]>
Dimitry Khokhlov <[email protected]>

Domino Valdano <[email protected]>
Domino Valdano <[email protected]> <[email protected]>

Edgar Aroutiounian <[email protected]>

Expand Down
50 changes: 22 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
if: type = push
os: linux
arch: amd64
dist: bionic
dist: noble
go: 1.22.x
env:
- docker
Expand All @@ -44,7 +44,7 @@ jobs:
if: type = push
os: linux
arch: arm64
dist: bionic
dist: noble
go: 1.22.x
env:
- docker
Expand Down Expand Up @@ -85,21 +85,20 @@ jobs:
- stage: build
if: type = push
os: linux
dist: bionic
dist: noble
sudo: required
go: 1.22.x
env:
- azure-linux
git:
submodules: false # avoid cloning ethereum/tests
addons:
apt:
packages:
- gcc-multilib
script:
# Build for the primary platforms that Trusty can manage
# build amd64
- go run build/ci.go install -dlgo
- go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# build 386
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends install gcc-multilib
- go run build/ci.go install -dlgo -arch 386
- go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

Expand Down Expand Up @@ -172,48 +171,42 @@ jobs:

# These builders run the tests
- stage: build
if: type = push
os: linux
arch: amd64
dist: bionic
dist: noble
go: 1.22.x
script:
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
- travis_wait 45 go run build/ci.go test $TEST_PACKAGES

- stage: build
if: type = pull_request
os: linux
arch: arm64
dist: bionic
dist: noble
go: 1.22.x
script:
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
- travis_wait 45 go run build/ci.go test $TEST_PACKAGES

- stage: build
os: linux
dist: bionic
dist: noble
go: 1.22.x
script:
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
- travis_wait 45 go run build/ci.go test $TEST_PACKAGES

# This builder does the Ubuntu PPA nightly uploads
- stage: build
if: type = cron || (type = push && tag ~= /^v[0-9]/)
os: linux
dist: bionic
dist: noble
go: 1.22.x
env:
- ubuntu-ppa
git:
submodules: false # avoid cloning ethereum/tests
addons:
apt:
packages:
- devscripts
- debhelper
- dput
- fakeroot
- python-bzrlib
- python-paramiko
before_install:
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends install devscripts debhelper dput fakeroot
script:
- echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
- go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <[email protected]>"
Expand All @@ -222,7 +215,7 @@ jobs:
- stage: build
if: type = cron
os: linux
dist: bionic
dist: noble
go: 1.22.x
env:
- azure-purge
Expand All @@ -235,8 +228,9 @@ jobs:
- stage: build
if: type = cron
os: linux
dist: bionic
dist: noble
go: 1.22.x
env:
- racetests
script:
- travis_wait 30 go run build/ci.go test -race $TEST_PACKAGES

- travis_wait 60 go run build/ci.go test -race $TEST_PACKAGES
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.PHONY: geth-linux-arm geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-arm64
.PHONY: geth-darwin geth-darwin-386 geth-darwin-amd64
.PHONY: geth-windows geth-windows-386 geth-windows-amd64
.PHONY: geth all test lint fmt clean devtools help

GO ?= latest
GOBIN = $(CURDIR)/build/bin
Expand Down Expand Up @@ -38,11 +39,13 @@ generate-mocks:
go generate mockgen -destination=./eth/filters/IBackend.go -package=filters ./eth/filters Backend
go generate mockgen -destination=../eth/filters/IDatabase.go -package=filters ./ethdb Database

#? geth: Build geth.
geth:
$(GORUN) build/ci.go install ./cmd/geth
@echo "Done building."
@echo "Run \"$(GOBIN)/geth\" to launch geth."

#? all: Build all packages and executables.
all:
$(GORUN) build/ci.go install

Expand All @@ -59,7 +62,7 @@ ios:
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."

test:
$(GOTEST) --timeout 15m -cover -short -coverprofile=cover.out -covermode=atomic $(TESTALL)
$(GOTEST) --timeout 30m -cover -short -coverprofile=cover.out -covermode=atomic $(TESTALL)

test-txpool-race:
$(GOTEST) -run=TestPoolMiningDataRaces --timeout 600m -race -v ./core/
Expand Down Expand Up @@ -89,13 +92,19 @@ goimports:
docs:
$(GORUN) cmd/clidoc/main.go -d ./docs/cli

#? fmt: Ensure consistent code formatting.
fmt:
gofmt -s -w $(shell find . -name "*.go")

#? clean: Clean go cache, built executables, and the auto generated folder.
clean:
go clean -cache
rm -fr build/_workspace/pkg/ $(GOBIN)/*

# The devtools target installs tools required for 'go generate'.
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.

#? devtools: Install recommended developer tools.
devtools:
# Notice! If you adding new binary - add it also to tests/deps/fake.go file
$(GOBUILD) -o $(GOBIN)/stringer github.com/golang.org/x/tools/cmd/stringer
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/argument.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (arguments Arguments) Copy(v interface{}, values []interface{}) error {
return arguments.copyAtomic(v, values[0])
}

// unpackAtomic unpacks ( hexdata -> go ) a single value
// copyAtomic copies ( hexdata -> go ) a single value
func (arguments Arguments) copyAtomic(v interface{}, marshalledValues interface{}) error {
dst := reflect.ValueOf(v).Elem()
src := reflect.ValueOf(marshalledValues)
Expand Down
4 changes: 1 addition & 3 deletions accounts/abi/bind/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,10 @@ func NewKeyStoreTransactorWithChainID(keystore *keystore.KeyStore, account accou
// NewKeyedTransactorWithChainID is a utility method to easily create a transaction signer
// from a single private key.
func NewKeyedTransactorWithChainID(key *ecdsa.PrivateKey, chainID *big.Int) (*TransactOpts, error) {
keyAddr := crypto.PubkeyToAddress(key.PublicKey)

if chainID == nil {
return nil, ErrNoChainID
}

keyAddr := crypto.PubkeyToAddress(key.PublicKey)
signer := types.LatestSignerForChainID(chainID)

return &TransactOpts{
Expand Down
Loading

0 comments on commit b8901bc

Please sign in to comment.