Skip to content

Commit a322f42

Browse files
authored
Sync to 1.8.7 (#8)
* params, VERSION: v1.8.4 unstable * core/vm: Fixed typos in core/vm/interpreter.go * light: new CHT for ropsten (ethereum#16393) * whisper: fix issue in topic list copy (ethereum#16381) - Fixes ethereum#16271. What was appeneded was a pointer to an object that changes during the iteration. - The topic is allocated as a 4-byte array, fill partial topics with 0s. Partial topics are currently disabled, but would crash as they rely on the presence of byte number 3. * core/state: uniform parameter style (ethereum#16398) - Uniform code style. * core/state: rework dirty handling to avoid quadratic overhead * core/state: avoid linear overhead on journal dirty listing * travis.yml: remove sudo requirement for PPA and Azure purge builders (ethereum#16404) This is supposed to fix the FTP upload issue according to travis-ci/travis-ci#9391. * .gitattributes: enable solidity highlighting on github (ethereum#16425) * crypto/secp256k1: catch curve parameter parse errors (ethereum#16392) * core/state: avoid redundant addition to code size cache (ethereum#16427) * cmd/geth: remove relOracle variable (ethereum#16434) * eth: fix typos (ethereum#16414) * accounts/abi: improve test coverage (ethereum#16044) * README: change 'built in' to 'built-in' * core/types: remove String methods from struct types (ethereum#16205) Most of these methods did not contain all the relevant information inside the object and were not using a similar formatting type. Moreover, the existence of a suboptimal String method breaks usage with more advanced data dumping tools like go-spew. * Dockerfile: use non-privileged user account (ethereum#16052) * cmd/geth: update template for 'geth bug' command (ethereum#16350) * cmd/evm: print vm output when debug flag is on (ethereum#16326) * bmt: fix comment typos (ethereum#16461) * ethclient: remove empty object in newHeads subscription call (ethereum#16454) * compression/rle: delete RLE compression (ethereum#16468) * eth/downloader: flush state sync data before exit (ethereum#16280) * state: handle nil in journal dirties * core: add blockchain benchmarks * cmd/puppeth: fix node deploys for updated dockerfile user * Dockerfile.alltools: fix invalid command * common: delete StringToAddress, StringToHash (ethereum#16436) * common: delete StringToAddress, StringToHash These functions are confusing because they don't parse hex, but use the bytes of the string. This change removes them, replacing all uses of StringToAddress(s) by BytesToAddress([]byte(s)). * eth/filters: remove incorrect use of common.BytesToAddress * build: add -e and -X flags to get more information on ethereum#16433 (ethereum#16443) * core: remove stray account creations in state transition (ethereum#16470) The 'from' and 'to' methods on StateTransitions are reader methods and shouldn't have inadvertent side effects on state. It is safe to remove the check in 'from' because account existence is implicitly checked by the nonce and balance checks. If the account has non-zero balance or nonce, it must exist. Even if the sender account has nonce zero at the start of the state transition or no balance, the nonce is incremented before execution and the account will be created at that time. It is safe to remove the check in 'to' because the EVM creates the account if necessary. Fixes ethereum#15119 * travis, appveyor: bump to Go 1.10.1 * travis.yml: add TEST_PACKAGES to speed up swarm testing (ethereum#16456) This commit is meant to allow ecosystem projects such as ethersphere to minimize CI build times by specifying an environment variable with the packages to run tests on. If the environment variable isn't defined the build script will test all packages so this shouldn't affect the main go-ethereum repository. * les: add ps.lock.Unlock() before return (ethereum#16360) * core/state: fix bug in copy of copy State * core/state: fix ripemd-cornercase in Copy * core: txpool stable underprice drop order, perf fixes * miner: remove contention on currentMu for pending data retrievals (ethereum#16497) * ethdb: add leveldb write delay statistic (ethereum#16499) * eth/downloader: wait for all fetcher goroutines to exit before terminating (ethereum#16509) * cmd/clef, signer: initial poc of the standalone signer (ethereum#16154) * signer: introduce external signer command * cmd/signer, rpc: Implement new signer. Add info about remote user to Context * signer: refactored request/response, made use of urfave.cli * cmd/signer: Use common flags * cmd/signer: methods to validate calldata against abi * cmd/signer: work on abi parser * signer: add mutex around UI * cmd/signer: add json 4byte directory, remove passwords from api * cmd/signer: minor changes * cmd/signer: Use ErrRequestDenied, enable lightkdf * cmd/signer: implement tests * cmd/signer: made possible for UI to modify tx parameters * cmd/signer: refactors, removed channels in ui comms, added UI-api via stdin/out * cmd/signer: Made lowercase json-definitions, added UI-signer test functionality * cmd/signer: update documentation * cmd/signer: fix bugs, improve abi detection, abi argument display * cmd/signer: minor change in json format * cmd/signer: rework json communication * cmd/signer: implement mixcase addresses in API, fix json id bug * cmd/signer: rename fromaccount, update pythonpoc with new json encoding format * cmd/signer: make use of new abi interface * signer: documentation * signer/main: remove redundant option * signer: implement audit logging * signer: create package 'signer', minor changes * common: add 0x-prefix to mixcaseaddress in json marshalling + validation * signer, rules, storage: implement rules + ephemeral storage for signer rules * signer: implement OnApprovedTx, change signing response (API BREAKAGE) * signer: refactoring + documentation * signer/rules: implement dispatching to next handler * signer: docs * signer/rules: hide json-conversion from users, ensure context is cleaned * signer: docs * signer: implement validation rules, change signature of call_info * signer: fix log flaw with string pointer * signer: implement custom 4byte databsae that saves submitted signatures * signer/storage: implement aes-gcm-backed credential storage * accounts: implement json unmarshalling of url * signer: fix listresponse, fix gas->uint64 * node: make http/ipc start methods public * signer: add ipc capability+review concerns * accounts: correct docstring * signer: address review concerns * rpc: go fmt -s * signer: review concerns+ baptize Clef * signer,node: move Start-functions to separate file * signer: formatting * light: new CHTs (ethereum#16515) * params: release Geth v1.8.4 * VERSION, params: begin v1.8.5 release cycle * build: enable goimports and varcheck linters (ethereum#16446) * core/asm: remove unused condition (ethereum#16487) * cmd/utils: fix help template issue for subcommands (ethereum#16351) * rpc: clean up IPC handler (ethereum#16524) This avoids logging accept errors on shutdown and removes a bit of duplication. It also fixes some goimports lint warnings. * core/asm: accept uppercase instructions (ethereum#16531) * all: fix various typos (ethereum#16533) * fix typo * fix typo * fix typo * rpc: handle HTTP response error codes (ethereum#16500) * whisper/whisperv6: post returns the hash of sent message (ethereum#16495) * ethclient: add DialContext and Close (ethereum#16318) DialContext allows users to pass a Context object for cancellation. Close closes the underlying RPC connection. * vendor: update elastic/gosigar so that it compiles on OpenBSD (ethereum#16542) * eth/downloader: fix for Issue ethereum#16539 (ethereum#16546) * params: release Geth v1.8.5 - Dirty Derivative² * VERSION, params: begin Geth 1.8.6 release cycle * cmd/geth: update the copyright year in the geth command usage (ethereum#16537) * Revert "Dockerfile.alltools: fix invalid command" * Revert "cmd/puppeth: fix node deploys for updated dockerfile user" * Dockerfile: revert the user change PR that broke all APIs * Dockerfile: drop legacy discovery v5 port mappings * params: release v1.8.6 to fix docker images * VERSION, params: begin release cycle 1.8.7 * cmd/geth, mobile: add memsize to pprof server (ethereum#16532) * cmd/geth, mobile: add memsize to pprof server This is a temporary change, to be reverted before the next release. * cmd/geth: fix variable name * core/types: avoid duplicating transactions on changing signer (ethereum#16435) * core/state: cache missing storage entries (ethereum#16584) * cmd/utils: point users to --syncmode under DEPRECATED (ethereum#16572) Indicate that --light and --fast options are replaced by --syncmode * trie: remove unused `buf` parameter (ethereum#16583) * core, eth: fix tracer dirty finalization * travis.yml: remove obsolete brew-cask install * whisper: Golint fixes in whisper packages (ethereum#16637) * vendor: fix leveldb crash when bigger than 1 TiB * core: ensure local transactions aren't discarded as underpriced This fixes an issue where local transactions are discarded as underpriced when the pool and queue are full. * evm/main: use blocknumber from genesis * accounts: golint updates for this or self warning (ethereum#16627) * tests: golint fixes for tests directory (ethereum#16640) * trie: golint iterator fixes (ethereum#16639) * internal: golint updates for this or self warning (ethereum#16634) * core: golint updates for this or self warning (ethereum#16633) * build: Add ldflags -s -w when building aar Smaller size on mobile is always good. Might also solve our maven central upload problem * cmd/clef: documentation about setup (ethereum#16568) clef: documentation about setup * params: release geth 1.8.7 * Zero Block Reward Post Byzantium * Remove Difficulty Bomb * 1 Second Block * Lower Minimum Difficulty (#4) * 1 Second Blocks (#5) * Lower Minimum Difficulty * One Second Blocks * Lower minimum difficulty (#6) * Enable geth compile.solidity for rpc (#7)
1 parent 5cfb0d4 commit a322f42

File tree

193 files changed

+8665
-1187
lines changed

Some content is hidden

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

193 files changed

+8665
-1187
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
3+
*.sol linguist-language=Solidity

.travis.yml

+28-18
Original file line numberDiff line numberDiff line change
@@ -12,49 +12,46 @@ matrix:
1212
- sudo chmod 666 /dev/fuse
1313
- sudo chown root:$USER /etc/fuse.conf
1414
- go run build/ci.go install
15-
- go run build/ci.go test -coverage
15+
- go run build/ci.go test -coverage $TEST_PACKAGES
1616

1717
# These are the latest Go versions.
1818
- os: linux
1919
dist: trusty
2020
sudo: required
21-
go: "1.10"
21+
go: 1.10.x
2222
script:
2323
- sudo modprobe fuse
2424
- sudo chmod 666 /dev/fuse
2525
- sudo chown root:$USER /etc/fuse.conf
2626
- go run build/ci.go install
27-
- go run build/ci.go test -coverage
27+
- go run build/ci.go test -coverage $TEST_PACKAGES
2828

2929
- os: osx
30-
go: "1.10"
30+
go: 1.10.x
3131
script:
3232
- unset -f cd # workaround for https://github.com/travis-ci/travis-ci/issues/8703
3333
- brew update
34-
- brew install caskroom/cask/brew-cask
3534
- brew cask install osxfuse
3635
- go run build/ci.go install
37-
- go run build/ci.go test -coverage
36+
- go run build/ci.go test -coverage $TEST_PACKAGES
3837

3938
# This builder only tests code linters on latest version of Go
4039
- os: linux
4140
dist: trusty
42-
go: "1.10"
41+
go: 1.10.x
4342
env:
4443
- lint
4544
git:
4645
submodules: false # avoid cloning ethereum/tests
4746
script:
4847
- go run build/ci.go lint
4948

50-
# This builder does the Ubuntu PPA and Linux Azure uploads
49+
# This builder does the Ubuntu PPA upload
5150
- os: linux
5251
dist: trusty
53-
sudo: required
54-
go: "1.10"
52+
go: 1.10.x
5553
env:
5654
- ubuntu-ppa
57-
- azure-linux
5855
git:
5956
submodules: false # avoid cloning ethereum/tests
6057
addons:
@@ -63,11 +60,25 @@ matrix:
6360
- devscripts
6461
- debhelper
6562
- dput
66-
- gcc-multilib
6763
- fakeroot
6864
script:
69-
# Build for the primary platforms that Trusty can manage
7065
- go run build/ci.go debsrc -signer "Go Ethereum Linux Builder <[email protected]>" -upload ppa:ethereum/ethereum
66+
67+
# This builder does the Linux Azure uploads
68+
- os: linux
69+
dist: trusty
70+
sudo: required
71+
go: 1.10.x
72+
env:
73+
- azure-linux
74+
git:
75+
submodules: false # avoid cloning ethereum/tests
76+
addons:
77+
apt:
78+
packages:
79+
- gcc-multilib
80+
script:
81+
# Build for the primary platforms that Trusty can manage
7182
- go run build/ci.go install
7283
- go run build/ci.go archive -type tar -signer LINUX_SIGNING_KEY -upload gethstore/builds
7384
- go run build/ci.go install -arch 386
@@ -91,7 +102,7 @@ matrix:
91102
dist: trusty
92103
services:
93104
- docker
94-
go: "1.10"
105+
go: 1.10.x
95106
env:
96107
- azure-linux-mips
97108
git:
@@ -135,7 +146,7 @@ matrix:
135146
git:
136147
submodules: false # avoid cloning ethereum/tests
137148
before_install:
138-
- curl https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz | tar -xz
149+
- curl https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz | tar -xz
139150
- export PATH=`pwd`/go/bin:$PATH
140151
- export GOROOT=`pwd`/go
141152
- export GOPATH=$HOME/go
@@ -152,7 +163,7 @@ matrix:
152163

153164
# This builder does the OSX Azure, iOS CocoaPods and iOS Azure uploads
154165
- os: osx
155-
go: "1.10"
166+
go: 1.10.x
156167
env:
157168
- azure-osx
158169
- azure-ios
@@ -181,8 +192,7 @@ matrix:
181192
# This builder does the Azure archive purges to avoid accumulating junk
182193
- os: linux
183194
dist: trusty
184-
sudo: required
185-
go: "1.10"
195+
go: 1.10.x
186196
env:
187197
- azure-purge
188198
git:

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ FROM alpine:latest
1212
RUN apk add --no-cache ca-certificates
1313
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
1414

15-
EXPOSE 8545 8546 30303 30303/udp 30304/udp
15+
EXPOSE 8545 8546 30303 30303/udp
1616
ENTRYPOINT ["geth"]

Dockerfile.alltools

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ FROM alpine:latest
1212
RUN apk add --no-cache ca-certificates
1313
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/
1414

15-
EXPOSE 8545 8546 30303 30303/udp 30304/udp
15+
EXPOSE 8545 8546 30303 30303/udp

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ ios:
3737
test: all
3838
build/env.sh go run build/ci.go test
3939

40+
lint: ## Run linters.
41+
build/env.sh go run build/ci.go lint
42+
4043
clean:
4144
rm -fr build/_workspace/pkg/ $(GOBIN)/*
4245

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Do not forget `--rpcaddr 0.0.0.0`, if you want to access RPC from other containe
142142
### Programatically interfacing Geth nodes
143143

144144
As a developer, sooner rather than later you'll want to start interacting with Geth and the Ethereum
145-
network via your own programs and not manually through the console. To aid this, Geth has built in
145+
network via your own programs and not manually through the console. To aid this, Geth has built-in
146146
support for a JSON-RPC based APIs ([standard APIs](https://github.com/ethereum/wiki/wiki/JSON-RPC) and
147147
[Geth specific APIs](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)). These can be
148148
exposed via HTTP, WebSockets and IPC (unix sockets on unix based platforms, and named pipes on Windows).

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.3
1+
1.8.7

accounts/abi/event.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ type Event struct {
3333
Inputs Arguments
3434
}
3535

36-
func (event Event) String() string {
37-
inputs := make([]string, len(event.Inputs))
38-
for i, input := range event.Inputs {
36+
func (e Event) String() string {
37+
inputs := make([]string, len(e.Inputs))
38+
for i, input := range e.Inputs {
3939
inputs[i] = fmt.Sprintf("%v %v", input.Name, input.Type)
4040
if input.Indexed {
4141
inputs[i] = fmt.Sprintf("%v indexed %v", input.Name, input.Type)
4242
}
4343
}
44-
return fmt.Sprintf("event %v(%v)", event.Name, strings.Join(inputs, ", "))
44+
return fmt.Sprintf("e %v(%v)", e.Name, strings.Join(inputs, ", "))
4545
}
4646

4747
// Id returns the canonical representation of the event's signature used by the

accounts/abi/numbers.go

+18-18
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ import (
2525
)
2626

2727
var (
28-
big_t = reflect.TypeOf(&big.Int{})
29-
derefbig_t = reflect.TypeOf(big.Int{})
30-
uint8_t = reflect.TypeOf(uint8(0))
31-
uint16_t = reflect.TypeOf(uint16(0))
32-
uint32_t = reflect.TypeOf(uint32(0))
33-
uint64_t = reflect.TypeOf(uint64(0))
34-
int_t = reflect.TypeOf(int(0))
35-
int8_t = reflect.TypeOf(int8(0))
36-
int16_t = reflect.TypeOf(int16(0))
37-
int32_t = reflect.TypeOf(int32(0))
38-
int64_t = reflect.TypeOf(int64(0))
39-
address_t = reflect.TypeOf(common.Address{})
40-
int_ts = reflect.TypeOf([]int(nil))
41-
int8_ts = reflect.TypeOf([]int8(nil))
42-
int16_ts = reflect.TypeOf([]int16(nil))
43-
int32_ts = reflect.TypeOf([]int32(nil))
44-
int64_ts = reflect.TypeOf([]int64(nil))
28+
bigT = reflect.TypeOf(&big.Int{})
29+
derefbigT = reflect.TypeOf(big.Int{})
30+
uint8T = reflect.TypeOf(uint8(0))
31+
uint16T = reflect.TypeOf(uint16(0))
32+
uint32T = reflect.TypeOf(uint32(0))
33+
uint64T = reflect.TypeOf(uint64(0))
34+
intT = reflect.TypeOf(int(0))
35+
int8T = reflect.TypeOf(int8(0))
36+
int16T = reflect.TypeOf(int16(0))
37+
int32T = reflect.TypeOf(int32(0))
38+
int64T = reflect.TypeOf(int64(0))
39+
addressT = reflect.TypeOf(common.Address{})
40+
intTS = reflect.TypeOf([]int(nil))
41+
int8TS = reflect.TypeOf([]int8(nil))
42+
int16TS = reflect.TypeOf([]int16(nil))
43+
int32TS = reflect.TypeOf([]int32(nil))
44+
int64TS = reflect.TypeOf([]int64(nil))
4545
)
4646

4747
// U256 converts a big Int into a 256bit EVM number.
@@ -52,7 +52,7 @@ func U256(n *big.Int) []byte {
5252
// checks whether the given reflect value is signed. This also works for slices with a number type
5353
func isSigned(v reflect.Value) bool {
5454
switch v.Type() {
55-
case int_ts, int8_ts, int16_ts, int32_ts, int64_ts, int_t, int8_t, int16_t, int32_t, int64_t:
55+
case intTS, int8TS, int16TS, int32TS, int64TS, intT, int8T, int16T, int32T, int64T:
5656
return true
5757
}
5858
return false

accounts/abi/reflect.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
// indirect recursively dereferences the value until it either gets the value
2525
// or finds a big.Int
2626
func indirect(v reflect.Value) reflect.Value {
27-
if v.Kind() == reflect.Ptr && v.Elem().Type() != derefbig_t {
27+
if v.Kind() == reflect.Ptr && v.Elem().Type() != derefbigT {
2828
return indirect(v.Elem())
2929
}
3030
return v
@@ -36,26 +36,26 @@ func reflectIntKindAndType(unsigned bool, size int) (reflect.Kind, reflect.Type)
3636
switch size {
3737
case 8:
3838
if unsigned {
39-
return reflect.Uint8, uint8_t
39+
return reflect.Uint8, uint8T
4040
}
41-
return reflect.Int8, int8_t
41+
return reflect.Int8, int8T
4242
case 16:
4343
if unsigned {
44-
return reflect.Uint16, uint16_t
44+
return reflect.Uint16, uint16T
4545
}
46-
return reflect.Int16, int16_t
46+
return reflect.Int16, int16T
4747
case 32:
4848
if unsigned {
49-
return reflect.Uint32, uint32_t
49+
return reflect.Uint32, uint32T
5050
}
51-
return reflect.Int32, int32_t
51+
return reflect.Int32, int32T
5252
case 64:
5353
if unsigned {
54-
return reflect.Uint64, uint64_t
54+
return reflect.Uint64, uint64T
5555
}
56-
return reflect.Int64, int64_t
56+
return reflect.Int64, int64T
5757
}
58-
return reflect.Ptr, big_t
58+
return reflect.Ptr, bigT
5959
}
6060

6161
// mustArrayToBytesSlice creates a new byte slice with the exact same size as value

accounts/abi/type.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func NewType(t string) (typ Type, err error) {
135135
typ.Type = reflect.TypeOf(bool(false))
136136
case "address":
137137
typ.Kind = reflect.Array
138-
typ.Type = address_t
138+
typ.Type = addressT
139139
typ.Size = 20
140140
typ.T = AddressTy
141141
case "string":

0 commit comments

Comments
 (0)