Skip to content

Commit

Permalink
Merge pull request #531 from etclabscore/merge/foundation-release/1.11
Browse files Browse the repository at this point in the history
Merge/foundation release/1.11
  • Loading branch information
meowsbits authored Apr 14, 2023
2 parents 771951e + 4a3733b commit 8a2fcc1
Show file tree
Hide file tree
Showing 879 changed files with 119,578 additions and 112,235 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ and help.

## Configuration, dependencies, and tests

Please see the [Developers' Guide](https://geth.ethereum.org/docs/developers/devguide)
Please see the [Developers' Guide](https://geth.ethereum.org/docs/developers/geth-developer/dev-guide)
for more details on configuring your environment, managing project dependencies
and testing procedures.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ For general questions please use [discord](https://discord.gg/nthXNEv) or the Et
#### System information

Geth version: `geth version`
CL client & version: e.g. lighthouse/nimbus/[email protected]
OS & Version: Windows/Linux/OSX
Commit hash : (if `develop`)

Expand All @@ -25,4 +26,4 @@ Commit hash : (if `develop`)
[backtrace]
````

When submitting logs: please submit them as text and not screenshots.
When submitting logs: please submit them as text and not screenshots.
2 changes: 1 addition & 1 deletion .github/workflows/audit-bootnodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.19
id: go

- name: Check out code into the Go module directory
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bench-trie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -38,7 +38,7 @@ jobs:
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/bench-vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -40,7 +40,7 @@ jobs:
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -52,7 +52,7 @@ jobs:
run: |
git remote add foundation https://github.com/ethereum/go-ethereum.git
git fetch foundation
git checkout v1.10.26
git checkout v1.11.5
# git submodule update
git checkout $GITHUB_SHA -- tests/vm_bench_test.go
go test -short ./tests -count 1 -p 1 -timeout 60m -run NONE -bench=VM -v |& tee go-ethereum.txt
Expand All @@ -72,7 +72,7 @@ jobs:
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/evmc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19
id: go

- name: Check out code into the Go module directory
Expand All @@ -38,7 +38,7 @@ jobs:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
g++ --version
gcc --version
gcc --version
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
- name: Get dependencies
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/go-generate-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -55,7 +55,10 @@ jobs:
# Intentionally revert this commit which has a custom modification to the genesis unmarshaling,
# with regards reading different genesis formats origniating from different clients
# This way, this script can alert us on any code changes that have to be applied on if file gets changed.
git revert --no-edit 4b2cf83737ffe7c46c334a11414d151de049e0b3
# This commit implements genesis JSON unmarshaling for supported data types.
git revert --no-edit db245033d654c18d5fd82ca7050dc2d72d2d6d0a
# This commit implements omit-empty JSON marshaling for Receipt's effectiveGasPrice field.
git revert --no-edit 1e5b446042262be42637706620b2b353cc97e8cc
- name: Check for modified files
id: git-check
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
- name: Checkout etclabscore/core-geth
uses: actions/checkout@v2

- name: Set up Go 1.16
- name: Set up Go 1.19
if: ${{ matrix.BUILD_OS_NAME != 'arm' }}
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- name: Build all packages (non ARM)
if: ${{ matrix.BUILD_OS_NAME != 'arm' }}
Expand All @@ -59,14 +59,14 @@ jobs:
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
echo "arm: This archive filepath is deprecated."
echo " It will be removed, and will cease to be present"
echo " as of the etclabscore/[email protected] release."
echo " The \*-arm5\* build should be used instead."
GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
env BUILD_OS_NAME=arm ./build/archive-signing.sh
GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
env BUILD_OS_NAME=arm5 ./build/archive-signing.sh
GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17.8
- name: Set up Go 1.19
id: go
uses: actions/setup-go@v2
with:
go-version: 1.17.8
go-version: 1.19

- uses: actions/checkout@v2
with:
Expand All @@ -34,11 +34,11 @@ jobs:
name: Tests-CoreGeth
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
- name: Set up Go 1.19
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ^1.19

- uses: actions/checkout@v2
with:
Expand All @@ -51,11 +51,11 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
- name: Set up Go 1.19
id: go
uses: actions/setup-go@v2
with:
go-version: ^1.16
go-version: ^1.19

- uses: actions/checkout@v2
with:
Expand Down
25 changes: 4 additions & 21 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,19 @@ run:
linters:
disable-all: true
enable:
- deadcode
- goconst
- goimports
- gosimple
- govet
- ineffassign
- misspell
- unconvert
- varcheck
- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
- gosec
- whitespace

# - structcheck # lots of false positives
Expand All @@ -48,11 +45,6 @@ linters-settings:
goconst:
min-len: 3 # minimum length of string constant
min-occurrences: 6 # minimum number of occurrences
gosec:
excludes:
- G404 # Use of weak random number generator - lots of FP
- G107 # Potential http request -- those are intentional
- G306 # G306: Expect WriteFile permissions to be 0600 or less

issues:
exclude-rules:
Expand All @@ -61,24 +53,15 @@ issues:
- deadcode
- staticcheck
- path: internal/build/pgp.go
text: 'SA1019: package golang.org/x/crypto/openpgp is deprecated'
text: 'SA1019: "golang.org/x/crypto/openpgp" is deprecated: this package is unmaintained except for security fixes.'
- path: core/vm/contracts.go
text: 'SA1019: package golang.org/x/crypto/ripemd160 is deprecated'
text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.'
- path: accounts/usbwallet/trezor.go
text: 'SA1019: package github.com/golang/protobuf/proto is deprecated'
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
- path: accounts/usbwallet/trezor/
text: 'SA1019: package github.com/golang/protobuf/proto is deprecated'
- path: tests/params.go
text: 'G505: Blocklisted import crypto/sha1: weak cryptographic primitive'
- path: tests/params.go
text: 'G401: Use of weak cryptographic primitive'
- path: tests/difficulty_mgen_test.go
text: 'G505: Blocklisted import crypto/sha1: weak cryptographic primitive'
- path: tests/difficulty_mgen_test.go
text: 'G401: Use of weak cryptographic primitive'
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
exclude:
- 'SA1019: event.TypeMux is deprecated: use Feed'
- 'SA1019: strings.Title is deprecated'
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
- 'SA1029: should not use built-in type string as key for value'
- 'G306: Expect WriteFile permissions to be 0600 or less'
2 changes: 1 addition & 1 deletion Dockerfile
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.18-alpine as builder
FROM golang:1.20-alpine as builder

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

Expand Down
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.18-alpine as builder
FROM golang:1.20-alpine as builder

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

Expand Down
21 changes: 2 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,7 @@ geth:
all:
$(GORUN) build/ci.go install

android:
$(GORUN) build/ci.go aar --local
@echo "Done building."
@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
@echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs"
@echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc"

ios:
$(GORUN) build/ci.go xcode --local
@echo "Done building."
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."

test:
test: all
$(GORUN) build/ci.go test -timeout 20m

# DEPRECATED.
Expand Down Expand Up @@ -60,19 +48,14 @@ clean-evmc:
rm -rf ./build/_workspace/hera ./build/_workspace/evmone

test-coregeth-features: \
test-coregeth-features-coregeth \
test-coregeth-features-multigethv0 ## Runs tests specific to multi-geth using Fork/Feature configs.
test-coregeth-features-coregeth ## Runs tests specific to multi-geth using Fork/Feature configs.

test-coregeth-consensus: test-coregeth-features-clique-consensus

test-coregeth-features-coregeth:
@echo "Testing fork/feature/datatype implementation; equivalence - COREGETH."
env COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_COREGETH=on go test -count=1 -timeout 60m ./tests

test-coregeth-features-multigethv0:
@echo "Testing fork/feature/datatype implementation; equivalence - MULTIGETHv0."
env COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_MULTIGETHV0=on go test -count=1 -timeout 60m ./tests

test-coregeth-features-clique-consensus:
@echo "Testing fork/feature/datatype implementation; equivalence - Clique consensus"
env COREGETH_TESTS_CHAINCONFIG_CONSENSUS_EQUIVALENCE_CLIQUE=on go test -count=1 -timeout 60m -run TestState ./tests ## Only run state tests here, since Blockchain tests will care about rewards, etc.
Expand Down
7 changes: 5 additions & 2 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (abi ABI) getArguments(name string, data []byte) (Arguments, error) {
var args Arguments
if method, ok := abi.Methods[name]; ok {
if len(data)%32 != 0 {
return nil, fmt.Errorf("abi: improperly formatted output: %s - Bytes: [%+v]", string(data), data)
return nil, fmt.Errorf("abi: improperly formatted output: %q - Bytes: %+v", data, data)
}
args = method.Outputs
}
Expand Down Expand Up @@ -246,7 +246,10 @@ func UnpackRevert(data []byte) (string, error) {
if !bytes.Equal(data[:4], revertSelector) {
return "", errors.New("invalid data for unpacking")
}
typ, _ := NewType("string", "", nil)
typ, err := NewType("string", "", nil)
if err != nil {
return "", err
}
unpacked, err := (Arguments{{Type: typ}}).Unpack(data[4:])
if err != nil {
return "", err
Expand Down
Loading

0 comments on commit 8a2fcc1

Please sign in to comment.