Skip to content

Commit 02aa8bc

Browse files
authored
Merge pull request #1121 from ricardolyn/upgrade/quorum-geth-1.9.11
[Upgrade] Go-Ethereum release v1.9.11
2 parents e854f8d + 54612f5 commit 02aa8bc

File tree

326 files changed

+11442
-4157
lines changed

Some content is hidden

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

326 files changed

+11442
-4157
lines changed

.golangci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ run:
66
# default is true. Enables skipping of directories:
77
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
88
skip-dirs-use-default: true
9+
skip-files:
10+
- core/genesis_alloc.go
911

1012
linters:
1113
disable-all: true
@@ -30,6 +32,10 @@ linters-settings:
3032
min-occurrences: 6 # minimum number of occurrences
3133

3234
issues:
35+
# Quorum - Disabling check for "S1039: unnecessary use of fmt.Sprintf (gosimple)" until we upgrade to geth 1.9.20 and have the lint fixes that also were applied in go-ethereum, as it was creating many necessary changes in geth codebase
36+
exclude:
37+
- S1039
38+
# End Quorum
3339
exclude-rules:
3440
- path: crypto/blake2b/
3541
linters:
@@ -43,3 +49,6 @@ issues:
4349
- path: core/vm/instructions_test.go
4450
linters:
4551
- goconst
52+
- path: cmd/faucet/
53+
linters:
54+
- deadcode

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646

4747
- stage: build
4848
os: osx
49+
osx_image: xcode11.3
4950
go: 1.13.x
5051
script:
5152
- echo "Increase the maximum number of open file descriptors on macOS"
@@ -174,7 +175,7 @@ jobs:
174175
git:
175176
submodules: false # avoid cloning ethereum/tests
176177
before_install:
177-
- curl https://dl.google.com/go/go1.13.linux-amd64.tar.gz | tar -xz
178+
- curl https://dl.google.com/go/go1.13.8.linux-amd64.tar.gz | tar -xz
178179
- export PATH=`pwd`/go/bin:$PATH
179180
- export GOROOT=`pwd`/go
180181
- export GOPATH=$HOME/go

Makefile

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,39 @@
1010

1111
GOBIN = ./build/bin
1212
GO ?= latest
13+
GORUN = env GO111MODULE=on go run
1314

1415
geth:
15-
build/env.sh go run build/ci.go install ./cmd/geth
16+
$(GORUN) build/ci.go install ./cmd/geth
1617
@echo "Done building."
1718
@echo "Run \"$(GOBIN)/geth\" to launch geth."
1819

1920
bootnode:
20-
build/env.sh go run build/ci.go install ./cmd/bootnode
21+
$(GORUN) build/ci.go install ./cmd/bootnode
2122
@echo "Done building."
2223
@echo "Run \"$(GOBIN)/bootnode\" to launch bootnode."
2324

24-
2525
all:
26-
build/env.sh go run build/ci.go install
26+
$(GORUN) build/ci.go install
2727

2828
android:
29-
build/env.sh go run build/ci.go aar --local
29+
$(GORUN) build/ci.go aar --local
3030
@echo "Done building."
3131
@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
3232

3333
ios:
34-
build/env.sh go run build/ci.go xcode --local
34+
$(GORUN) build/ci.go xcode --local
3535
@echo "Done building."
3636
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
3737

3838
test: all
39-
build/env.sh go run build/ci.go test
39+
$(GORUN) build/ci.go test
4040

4141
lint: ## Run linters.
42-
build/env.sh go run build/ci.go lint
42+
$(GORUN) build/ci.go lint
4343

4444
clean:
45-
go clean -cache
45+
env GO111MODULE=on go clean -cache
4646
rm -fr build/_workspace/pkg/ $(GOBIN)/*
4747

4848
# The devtools target installs tools required for 'go generate'.
@@ -69,12 +69,12 @@ geth-linux: geth-linux-386 geth-linux-amd64 geth-linux-arm geth-linux-mips64 get
6969
@ls -ld $(GOBIN)/geth-linux-*
7070

7171
geth-linux-386:
72-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth
72+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/geth
7373
@echo "Linux 386 cross compilation done:"
7474
@ls -ld $(GOBIN)/geth-linux-* | grep 386
7575

7676
geth-linux-amd64:
77-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth
77+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/geth
7878
@echo "Linux amd64 cross compilation done:"
7979
@ls -ld $(GOBIN)/geth-linux-* | grep amd64
8080

@@ -83,42 +83,42 @@ geth-linux-arm: geth-linux-arm-5 geth-linux-arm-6 geth-linux-arm-7 geth-linux-ar
8383
@ls -ld $(GOBIN)/geth-linux-* | grep arm
8484

8585
geth-linux-arm-5:
86-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth
86+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-5 -v ./cmd/geth
8787
@echo "Linux ARMv5 cross compilation done:"
8888
@ls -ld $(GOBIN)/geth-linux-* | grep arm-5
8989

9090
geth-linux-arm-6:
91-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth
91+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-6 -v ./cmd/geth
9292
@echo "Linux ARMv6 cross compilation done:"
9393
@ls -ld $(GOBIN)/geth-linux-* | grep arm-6
9494

9595
geth-linux-arm-7:
96-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth
96+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm-7 -v ./cmd/geth
9797
@echo "Linux ARMv7 cross compilation done:"
9898
@ls -ld $(GOBIN)/geth-linux-* | grep arm-7
9999

100100
geth-linux-arm64:
101-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth
101+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/arm64 -v ./cmd/geth
102102
@echo "Linux ARM64 cross compilation done:"
103103
@ls -ld $(GOBIN)/geth-linux-* | grep arm64
104104

105105
geth-linux-mips:
106-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth
106+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/geth
107107
@echo "Linux MIPS cross compilation done:"
108108
@ls -ld $(GOBIN)/geth-linux-* | grep mips
109109

110110
geth-linux-mipsle:
111-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth
111+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/geth
112112
@echo "Linux MIPSle cross compilation done:"
113113
@ls -ld $(GOBIN)/geth-linux-* | grep mipsle
114114

115115
geth-linux-mips64:
116-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth
116+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/geth
117117
@echo "Linux MIPS64 cross compilation done:"
118118
@ls -ld $(GOBIN)/geth-linux-* | grep mips64
119119

120120
geth-linux-mips64le:
121-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth
121+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/geth
122122
@echo "Linux MIPS64le cross compilation done:"
123123
@ls -ld $(GOBIN)/geth-linux-* | grep mips64le
124124

@@ -127,12 +127,12 @@ geth-darwin: geth-darwin-386 geth-darwin-amd64
127127
@ls -ld $(GOBIN)/geth-darwin-*
128128

129129
geth-darwin-386:
130-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth
130+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/geth
131131
@echo "Darwin 386 cross compilation done:"
132132
@ls -ld $(GOBIN)/geth-darwin-* | grep 386
133133

134134
geth-darwin-amd64:
135-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth
135+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/geth
136136
@echo "Darwin amd64 cross compilation done:"
137137
@ls -ld $(GOBIN)/geth-darwin-* | grep amd64
138138

@@ -141,11 +141,11 @@ geth-windows: geth-windows-386 geth-windows-amd64
141141
@ls -ld $(GOBIN)/geth-windows-*
142142

143143
geth-windows-386:
144-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth
144+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/386 -v ./cmd/geth
145145
@echo "Windows 386 cross compilation done:"
146146
@ls -ld $(GOBIN)/geth-windows-* | grep 386
147147

148148
geth-windows-amd64:
149-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth
149+
$(GORUN) build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth
150150
@echo "Windows amd64 cross compilation done:"
151151
@ls -ld $(GOBIN)/geth-windows-* | grep amd64

accounts/abi/abi.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@ func (abi ABI) UnpackIntoMap(v map[string]interface{}, name string, data []byte)
108108
// UnmarshalJSON implements json.Unmarshaler interface
109109
func (abi *ABI) UnmarshalJSON(data []byte) error {
110110
var fields []struct {
111-
Type string
112-
Name string
113-
Constant bool
114-
Anonymous bool
115-
Inputs []Argument
116-
Outputs []Argument
111+
Type string
112+
Name string
113+
Constant bool
114+
StateMutability string
115+
Anonymous bool
116+
Inputs []Argument
117+
Outputs []Argument
117118
}
118119
if err := json.Unmarshal(data, &fields); err != nil {
119120
return err
@@ -134,10 +135,11 @@ func (abi *ABI) UnmarshalJSON(data []byte) error {
134135
name = fmt.Sprintf("%s%d", field.Name, idx)
135136
_, ok = abi.Methods[name]
136137
}
138+
isConst := field.Constant || field.StateMutability == "pure" || field.StateMutability == "view"
137139
abi.Methods[name] = Method{
138140
Name: name,
139141
RawName: field.Name,
140-
Const: field.Constant,
142+
Const: isConst,
141143
Inputs: field.Inputs,
142144
Outputs: field.Outputs,
143145
}

0 commit comments

Comments
 (0)