Skip to content

Commit

Permalink
Merge branch 'release/1.13' into merge/foundation-release/1.13.13
Browse files Browse the repository at this point in the history
 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
  • Loading branch information
meowsbits committed Feb 21, 2024
2 parents c70ec83 + 7f131dc commit 4de6e8e
Show file tree
Hide file tree
Showing 590 changed files with 37,516 additions and 28,297 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: i386 linux tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- name: Run tests
run: go test -short ./...
env:
GOOS: linux
GOARCH: 386
4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ run:
linters:
disable-all: true
enable:
- goconst
- goimports
- gosimple
- govet
Expand All @@ -42,9 +41,6 @@ linters:
linters-settings:
gofmt:
simplify: true
goconst:
min-len: 3 # minimum length of string constant
min-occurrences: 6 # minimum number of occurrences

issues:
exclude-rules:
Expand Down
168 changes: 168 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
language: go
go_import_path: github.com/ethereum/go-ethereum
sudo: false
jobs:
allow_failures:
- stage: build
os: osx
env:
- azure-osx

include:
# These builders create the Docker sub-images for multi-arch push and each
# will attempt to push the multi-arch image if they are the last builder
- stage: build
if: type = push
os: linux
arch: amd64
dist: bionic
go: 1.21.x
env:
- docker
services:
- docker
git:
submodules: false # avoid cloning ethereum/tests
before_install:
- export DOCKER_CLI_EXPERIMENTAL=enabled
script:
- go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go

- stage: build
if: type = push
os: linux
arch: arm64
dist: bionic
go: 1.21.x
env:
- docker
services:
- docker
git:
submodules: false # avoid cloning ethereum/tests
before_install:
- export DOCKER_CLI_EXPERIMENTAL=enabled
script:
- go run build/ci.go docker -image -manifest amd64,arm64 -upload ethereum/client-go

# This builder does the Linux Azure uploads
- stage: build
if: type = push
os: linux
dist: bionic
sudo: required
go: 1.21.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
- 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
- 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

# Switch over GCC to cross compilation (breaks 386, hence why do it here only)
- 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
- sudo ln -s /usr/include/asm-generic /usr/include/asm

- GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
- GOARM=5 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
- GOARM=6 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- GOARM=7 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabihf-gcc
- GOARM=7 go run build/ci.go archive -arch arm -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
- go run build/ci.go archive -arch arm64 -type tar -signer LINUX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# This builder does the OSX Azure uploads
- stage: build
if: type = push
os: osx
osx_image: xcode14.2
go: 1.21.x
env:
- azure-osx
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go install -dlgo
- go run build/ci.go archive -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds
- go run build/ci.go install -dlgo -arch arm64
- go run build/ci.go archive -arch arm64 -type tar -signer OSX_SIGNING_KEY -signify SIGNIFY_KEY -upload gethstore/builds

# These builders run the tests
- stage: build
os: linux
arch: amd64
dist: bionic
go: 1.21.x
script:
- travis_wait 30 go run build/ci.go test $TEST_PACKAGES

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

- stage: build
os: linux
dist: bionic
go: 1.20.x
script:
- travis_wait 30 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
go: 1.21.x
env:
- ubuntu-ppa
git:
submodules: false # avoid cloning ethereum/tests
addons:
apt:
packages:
- devscripts
- debhelper
- dput
- fakeroot
- python-bzrlib
- python-paramiko
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]>"

# This builder does the Azure archive purges to avoid accumulating junk
- stage: build
if: type = cron
os: linux
dist: bionic
go: 1.21.x
env:
- azure-purge
git:
submodules: false # avoid cloning ethereum/tests
script:
- go run build/ci.go purge -store gethstore/builds -days 14

# This builder executes race tests
- stage: build
if: type = cron
os: linux
dist: bionic
go: 1.21.x
script:
- travis_wait 30 go run build/ci.go test -race $TEST_PACKAGES

2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION=""
ARG BUILDNUM=""

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

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

Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ GO ?= latest
GORUN = go run
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

#? 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

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

Expand Down Expand Up @@ -91,10 +94,12 @@ tests-generate-difficulty: ## Generate difficulty tests.
mv ./tests/testdata_generated/DifficultyTests ./tests/testdata-etc/DifficultyTests
rm -rf ./tests/testdata_generated

#? lint: Run certain pre-selected linters
lint: ## Run linters.
$(GORUN) build/ci.go lint

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

Expand All @@ -107,10 +112,17 @@ docs-generate: ## Generate JSON RPC API documentation from the OpenRPC service d
# 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:
env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
env GOBIN= go install github.com/fjl/gencodec@latest
env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
env GOBIN= go install ./cmd/abigen
@type "solc" 2> /dev/null || echo 'Please install solc'
@type "protoc" 2> /dev/null || echo 'Please install protoc'

#? help: Get more info on make commands.
help: Makefile
@echo " Choose a command run in go-ethereum:"
@sed -n 's/^#?//p' $< | column -t -s ':' | sort | sed -e 's/^/ /'
.PHONY: help
4 changes: 2 additions & 2 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

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

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

0 comments on commit 4de6e8e

Please sign in to comment.