Skip to content

Commit 7ddfffd

Browse files
authored
Merge pull request #27 from vulcanize/rebase
Rebase and GasOracle
2 parents 03270d7 + db4d0f5 commit 7ddfffd

File tree

1,846 files changed

+7124
-872487
lines changed

Some content is hidden

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

1,846 files changed

+7124
-872487
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ light/ @zsfelfoldi @rjl493456442
1616
mobile/ @karalabe @ligi
1717
p2p/ @fjl @zsfelfoldi
1818
rpc/ @fjl @holiman
19-
p2p/simulations @zelig @nonsense @janos @justelad
20-
p2p/protocols @zelig @nonsense @janos @justelad
21-
p2p/testing @zelig @nonsense @janos @justelad
19+
p2p/simulations @zelig @janos @justelad
20+
p2p/protocols @zelig @janos @justelad
21+
p2p/testing @zelig @janos @justelad
2222
signer/ @holiman
2323
whisper/ @gballet @gluk256

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ build/_vendor/pkg
2424

2525
# used by the Makefile
2626
/build/_workspace/
27+
/build/cache/
2728
/build/bin/
2829
/geth*.zip
2930

.golangci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file configures github.com/golangci/golangci-lint.
2+
3+
run:
4+
timeout: 2m
5+
tests: true
6+
# default is true. Enables skipping of directories:
7+
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
8+
skip-dirs-use-default: true
9+
10+
linters:
11+
disable-all: true
12+
enable:
13+
- deadcode
14+
- goconst
15+
- goimports
16+
- gosimple
17+
- govet
18+
- ineffassign
19+
- misspell
20+
# - staticcheck
21+
- unconvert
22+
# - unused
23+
- varcheck
24+
25+
linters-settings:
26+
gofmt:
27+
simplify: true
28+
goconst:
29+
min-len: 3 # minimum length of string constant
30+
min-occurrences: 6 # minimum number of occurrences
31+
32+
issues:
33+
exclude-rules:
34+
- path: crypto/blake2b/
35+
linters:
36+
- deadcode
37+
- path: crypto/bn256/cloudflare
38+
linters:
39+
- deadcode
40+
- path: p2p/discv5/
41+
linters:
42+
- deadcode
43+
- path: core/vm/instructions_test.go
44+
linters:
45+
- goconst

.travis.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
os: linux
2020
dist: xenial
2121
go: 1.11.x
22+
env:
23+
- GO111MODULE=on
2224
script:
2325
- go run build/ci.go install
2426
- go run build/ci.go test -coverage $TEST_PACKAGES
@@ -27,13 +29,26 @@ jobs:
2729
os: linux
2830
dist: xenial
2931
go: 1.12.x
32+
env:
33+
- GO111MODULE=on
3034
script:
3135
- go run build/ci.go install
3236
- go run build/ci.go test -coverage $TEST_PACKAGES
3337

3438
# These are the latest Go versions.
3539
- stage: build
3640
os: linux
41+
arch: amd64
42+
dist: xenial
43+
go: 1.13.x
44+
script:
45+
- go run build/ci.go install
46+
- go run build/ci.go test -coverage $TEST_PACKAGES
47+
48+
- stage: build
49+
if: type = pull_request
50+
os: linux
51+
arch: arm64
3752
dist: xenial
3853
go: 1.13.x
3954
script:
@@ -42,6 +57,7 @@ jobs:
4257

4358
- stage: build
4459
os: osx
60+
osx_image: xcode11.3
4561
go: 1.13.x
4662
script:
4763
- echo "Increase the maximum number of open file descriptors on macOS"
@@ -75,12 +91,9 @@ jobs:
7591
- fakeroot
7692
- python-bzrlib
7793
- python-paramiko
78-
cache:
79-
directories:
80-
- $HOME/.gobundle
8194
script:
8295
- echo '|1|7SiYPr9xl3uctzovOTj4gMwAC1M=|t6ReES75Bo/PxlOPJ6/GsGbTrM0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0aKz5UTUndYgIGG7dQBV+HaeuEZJ2xPHo2DS2iSKvUL4xNMSAY4UguNW+pX56nAQmZKIZZ8MaEvSj6zMEDiq6HFfn5JcTlM80UwlnyKe8B8p7Nk06PPQLrnmQt5fh0HmEcZx+JU9TZsfCHPnX7MNz4ELfZE6cFsclClrKim3BHUIGq//t93DllB+h4O9LHjEUsQ1Sr63irDLSutkLJD6RXchjROXkNirlcNVHH/jwLWR5RcYilNX7S5bIkK8NlWPjsn/8Ua5O7I9/YoE97PpO6i73DTGLh5H9JN/SITwCKBkgSDWUt61uPK3Y11Gty7o2lWsBjhBUm2Y38CBsoGmBw==' >> ~/.ssh/known_hosts
83-
- go run build/ci.go debsrc -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <[email protected]>" -goversion 1.13.4 -gohash 95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624 -gobundle $HOME/.gobundle/go.tar.gz
96+
- go run build/ci.go debsrc -goversion 1.13.4 -upload ethereum/ethereum -sftp-user geth-ci -signer "Go Ethereum Linux Builder <[email protected]>"
8497

8598
# This builder does the Linux Azure uploads
8699
- stage: build

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ lint: ## Run linters.
3636
build/env.sh go run build/ci.go lint
3737

3838
clean:
39-
./build/clean_go_build_cache.sh
39+
go clean -cache
4040
rm -fr build/_workspace/pkg/ $(GOBIN)/*
4141

4242
# The devtools target installs tools required for 'go generate'.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ also need to configure a miner to process transactions and create new blocks for
294294
Mining on the public Ethereum network is a complex task as it's only feasible using GPUs,
295295
requiring an OpenCL or CUDA enabled `ethminer` instance. For information on such a
296296
setup, please consult the [EtherMining subreddit](https://www.reddit.com/r/EtherMining/)
297-
and the [Genoil miner](https://github.com/Genoil/cpp-ethereum) repository.
297+
and the [ethminer](https://github.com/ethereum-mining/ethminer) repository.
298298

299299
In a private network setting, however a single CPU miner instance is more than enough for
300300
practical purposes as it can produce a stable stream of blocks at the correct intervals

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
}

accounts/abi/abi_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ func TestABI_MethodById(t *testing.T) {
927927
}
928928
b := fmt.Sprintf("%v", m2)
929929
if a != b {
930-
t.Errorf("Method %v (id %v) not 'findable' by id in ABI", name, common.ToHex(m.ID()))
930+
t.Errorf("Method %v (id %x) not 'findable' by id in ABI", name, m.ID())
931931
}
932932
}
933933
// Also test empty

0 commit comments

Comments
 (0)