Skip to content

Commit 4de6e8e

Browse files
committed
Merge branch 'release/1.13' into merge/foundation-release/1.13.13
Conflicts: .travis.yml Makefile README.md accounts/abi/bind/backends/simulated.go accounts/abi/bind/backends/simulated_test.go accounts/abi/bind/bind_test.go accounts/abi/bind/util_test.go accounts/hd_test.go build/ci.go cmd/devp2p/internal/ethtest/chain.go cmd/devp2p/internal/ethtest/helpers.go cmd/devp2p/internal/ethtest/suite_test.go cmd/devp2p/internal/ethtest/testdata/genesis.json cmd/devp2p/internal/ethtest/transaction.go cmd/evm/internal/t8ntool/execution.go cmd/evm/internal/t8ntool/transaction.go cmd/evm/internal/t8ntool/transition.go cmd/evm/main.go cmd/evm/runner.go cmd/evm/staterunner.go cmd/faucet/faucet.go cmd/faucet/faucet_test.go cmd/geth/chaincmd.go cmd/geth/main.go cmd/utils/flags.go consensus/beacon/consensus.go consensus/clique/clique.go consensus/clique/clique_test.go consensus/ethash/consensus.go console/console_test.go core/bench_test.go core/block_validator_test.go core/blockchain_sethead_test.go core/blockchain_test.go core/chain_makers.go core/chain_makers_test.go core/forkid/forkid_test.go core/gen_genesis_account.go core/genesis.go core/genesis_test.go core/headerchain_test.go core/rlp_test.go core/state/statedb.go core/state_processor.go core/state_processor_test.go core/state_transition.go core/txpool/blobpool/blobpool_test.go core/txpool/legacypool/legacypool.go core/txpool/legacypool/legacypool_test.go core/txpool/validation.go core/types/gen_account.go core/types/tx_blob.go core/vm/evm.go core/vm/instructions.go core/vm/interface.go core/vm/jump_table.go core/vm/operations_acl.go core/vm/runtime/runtime.go docs/postmortems/2021-08-22-split-postmortem.md eth/api_debug.go eth/api_debug_test.go eth/catalyst/api.go eth/catalyst/api_test.go eth/catalyst/simulated_beacon.go eth/catalyst/simulated_beacon_test.go eth/downloader/downloader.go eth/downloader/downloader_test.go eth/downloader/queue.go eth/downloader/testchain_test.go eth/fetcher/block_fetcher_test.go eth/filters/filter_system_test.go eth/filters/filter_test.go eth/gasprice/gasprice_test.go eth/handler.go eth/handler_test.go eth/protocols/eth/handler.go eth/protocols/eth/handler_test.go eth/protocols/eth/protocol.go eth/protocols/snap/handler_fuzzing_test.go eth/tracers/api.go eth/tracers/api_test.go eth/tracers/internal/tracetest/calltrace_test.go eth/tracers/js/tracer_test.go eth/tracers/tracers_test.go ethclient/ethclient_test.go ethclient/gethclient/gethclient_test.go go.mod go.sum graphql/graphql_test.go internal/ethapi/api.go internal/ethapi/api_test.go internal/ethapi/transaction_args.go internal/ethapi/transaction_args_test.go les/api.go les/api_backend.go les/api_test.go les/benchmark.go les/client.go les/client_handler.go les/commons.go les/handler_test.go les/odr_test.go les/peer.go les/peer_test.go les/request_test.go les/retrieve.go les/server.go les/state_accessor.go les/test_helper.go light/lightchain.go light/lightchain_test.go light/odr.go light/odr_test.go light/odr_util.go light/postprocess.go light/trie_test.go light/txpool.go light/txpool_test.go miner/miner_test.go miner/stress/clique/main.go miner/worker_test.go params/config.go params/mutations/dao.go params/types/genesisT/gen_genesis.go params/types/genesisT/gen_genesis_account.go params/version.go rpc/json.go rpc/service.go tests/block_test_util.go tests/fuzzers/les/les-fuzzer.go tests/gen_stenv.go tests/init_test.go tests/state_test.go tests/state_test_util.go
2 parents c70ec83 + 7f131dc commit 4de6e8e

File tree

590 files changed

+37516
-28297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

590 files changed

+37516
-28297
lines changed

.github/workflows/go.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: i386 linux tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: self-hosted
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: 1.21.4
19+
- name: Run tests
20+
run: go test -short ./...
21+
env:
22+
GOOS: linux
23+
GOARCH: 386

.golangci.yml

-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ run:
1515
linters:
1616
disable-all: true
1717
enable:
18-
- goconst
1918
- goimports
2019
- gosimple
2120
- govet
@@ -42,9 +41,6 @@ linters:
4241
linters-settings:
4342
gofmt:
4443
simplify: true
45-
goconst:
46-
min-len: 3 # minimum length of string constant
47-
min-occurrences: 6 # minimum number of occurrences
4844

4945
issues:
5046
exclude-rules:

.travis.yml

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
language: go
2+
go_import_path: github.com/ethereum/go-ethereum
3+
sudo: false
4+
jobs:
5+
allow_failures:
6+
- stage: build
7+
os: osx
8+
env:
9+
- azure-osx
10+
11+
include:
12+
# These builders create the Docker sub-images for multi-arch push and each
13+
# will attempt to push the multi-arch image if they are the last builder
14+
- stage: build
15+
if: type = push
16+
os: linux
17+
arch: amd64
18+
dist: bionic
19+
go: 1.21.x
20+
env:
21+
- docker
22+
services:
23+
- docker
24+
git:
25+
submodules: false # avoid cloning ethereum/tests
26+
before_install:
27+
- export DOCKER_CLI_EXPERIMENTAL=enabled
28+
script:
29+
- go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go
30+
31+
- stage: build
32+
if: type = push
33+
os: linux
34+
arch: arm64
35+
dist: bionic
36+
go: 1.21.x
37+
env:
38+
- docker
39+
services:
40+
- docker
41+
git:
42+
submodules: false # avoid cloning ethereum/tests
43+
before_install:
44+
- export DOCKER_CLI_EXPERIMENTAL=enabled
45+
script:
46+
- go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go
47+
48+
# This builder does the Linux Azure uploads
49+
- stage: build
50+
if: type = push
51+
os: linux
52+
dist: bionic
53+
sudo: required
54+
go: 1.21.x
55+
env:
56+
- azure-linux
57+
git:
58+
submodules: false # avoid cloning ethereum/tests
59+
addons:
60+
apt:
61+
packages:
62+
- gcc-multilib
63+
script:
64+
# Build for the primary platforms that Trusty can manage
65+
- go run build/ci.go install -dlgo
66+
- go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
67+
- go run build/ci.go install -dlgo -arch 386
68+
- go run build/ci.go archive -arch 386 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
69+
70+
# Switch over GCC to cross compilation (breaks 386, hence why do it here only)
71+
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
72+
- sudo ln -s /usr/include/asm-generic /usr/include/asm
73+
74+
- GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
75+
- GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
76+
- GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
77+
- GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
78+
- GOARM=7 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabihf-gcc
79+
- GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
80+
- go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
81+
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
82+
83+
# This builder does the OSX Azure uploads
84+
- stage: build
85+
if: type = push
86+
os: osx
87+
osx_image: xcode14.2
88+
go: 1.21.x
89+
env:
90+
- azure-osx
91+
git:
92+
submodules: false # avoid cloning ethereum/tests
93+
script:
94+
- go run build/ci.go install -dlgo
95+
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
96+
- go run build/ci.go install -dlgo -arch arm64
97+
- go run build/ci.go archive -arch arm64 -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
98+
99+
# These builders run the tests
100+
- stage: build
101+
os: linux
102+
arch: amd64
103+
dist: bionic
104+
go: 1.21.x
105+
script:
106+
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
107+
108+
- stage: build
109+
if: type = pull_request
110+
os: linux
111+
arch: arm64
112+
dist: bionic
113+
go: 1.20.x
114+
script:
115+
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
116+
117+
- stage: build
118+
os: linux
119+
dist: bionic
120+
go: 1.20.x
121+
script:
122+
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES
123+
124+
# This builder does the Ubuntu PPA nightly uploads
125+
- stage: build
126+
if: type = cron || (type = push && tag ~= /^v[0-9]/)
127+
os: linux
128+
dist: bionic
129+
go: 1.21.x
130+
env:
131+
- ubuntu-ppa
132+
git:
133+
submodules: false # avoid cloning ethereum/tests
134+
addons:
135+
apt:
136+
packages:
137+
- devscripts
138+
- debhelper
139+
- dput
140+
- fakeroot
141+
- python-bzrlib
142+
- python-paramiko
143+
script:
144+
- echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
145+
- go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <[email protected]>"
146+
147+
# This builder does the Azure archive purges to avoid accumulating junk
148+
- stage: build
149+
if: type = cron
150+
os: linux
151+
dist: bionic
152+
go: 1.21.x
153+
env:
154+
- azure-purge
155+
git:
156+
submodules: false # avoid cloning ethereum/tests
157+
script:
158+
- go run build/ci.go purge -store gethstore/builds -days 14
159+
160+
# This builder executes race tests
161+
- stage: build
162+
if: type = cron
163+
os: linux
164+
dist: bionic
165+
go: 1.21.x
166+
script:
167+
- travis_wait 30 go run build/ci.go test -race $TEST_PACKAGES
168+

Dockerfile.alltools

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG VERSION=""
44
ARG BUILDNUM=""
55

66
# Build Geth in a stock Go builder container
7-
FROM golang:1.20-alpine as builder
7+
FROM golang:1.21-alpine as builder
88

99
RUN apk add --no-cache gcc musl-dev linux-headers git
1010

Makefile

+13-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ GO ?= latest
99
GORUN = go run
1010
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
1111

12+
#? geth: Build geth
1213
geth:
1314
$(GORUN) build/ci.go install ./cmd/geth
1415
@echo "Done building."
1516
@echo "Run \"$(GOBIN)/geth\" to launch geth."
1617

18+
#? all: Build all packages and executables
1719
all:
1820
$(GORUN) build/ci.go install
1921

22+
#? test: Run the tests
2023
test: all
2124
$(GORUN) build/ci.go test -timeout 20m
2225

@@ -91,10 +94,12 @@ tests-generate-difficulty: ## Generate difficulty tests.
9194
mv ./tests/testdata_generated/DifficultyTests ./tests/testdata-etc/DifficultyTests
9295
rm -rf ./tests/testdata_generated
9396

97+
#? lint: Run certain pre-selected linters
9498
lint: ## Run linters.
9599
$(GORUN) build/ci.go lint
96100

97-
clean: clean-evmc
101+
#? clean: Clean go cache, built executables, and the auto generated folder
102+
clean:
98103
go clean -cache
99104
rm -fr build/_workspace/pkg/ $(GOBIN)/*
100105

@@ -107,10 +112,17 @@ docs-generate: ## Generate JSON RPC API documentation from the OpenRPC service d
107112
# The devtools target installs tools required for 'go generate'.
108113
# You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
109114

115+
#? devtools: Install recommended developer tools
110116
devtools:
111117
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
112118
env GOBIN= go install github.com/fjl/gencodec@latest
113119
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
114120
env GOBIN= go install ./cmd/abigen
115121
@type "solc" 2> /dev/null || echo 'Please install solc'
116122
@type "protoc" 2> /dev/null || echo 'Please install protoc'
123+
124+
#? help: Get more info on make commands.
125+
help: Makefile
126+
@echo " Choose a command run in go-ethereum:"
127+
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'
128+
.PHONY: help

accounts/abi/abi.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
// The ABI holds information about a contract's context and available
32-
// invokable methods. It will allow you to type check function calls and
32+
// invocable methods. It will allow you to type check function calls and
3333
// packs data accordingly.
3434
type ABI struct {
3535
Constructor Method
@@ -251,7 +251,7 @@ var revertSelector = crypto.Keccak256([]byte("Error(string)"))[:4]
251251
var panicSelector = crypto.Keccak256([]byte("Panic(uint256)"))[:4]
252252

253253
// panicReasons map is for readable panic codes
254-
// see this linkage for the deails
254+
// see this linkage for the details
255255
// https://docs.soliditylang.org/en/v0.8.21/control-structures.html#panic-via-assert-and-error-via-require
256256
// the reason string list is copied from ether.js
257257
// https://github.com/ethers-io/ethers.js/blob/fa3a883ff7c88611ce766f58bdd4b8ac90814470/src.ts/abi/interface.ts#L207-L218

0 commit comments

Comments
 (0)