Commit Graph

11954 Commits

Author SHA1 Message Date
Felix Lange
39b0b1a1a6
all: make unit tests work with Go 1.13 (#20053)
Most of these changes are related to the Go 1.13 changes to test binary
flag handling. 

* cmd/geth: make attach tests more reliable

This makes the test wait for the endpoint to come up by polling
it instead of waiting for two seconds.

* tests: fix test binary flags for Go 1.13

Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.

* crypto/ecies: remove useless -dump flag in tests

* p2p/simulations: fix test binary flags for Go 1.13

Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.

* build: remove workaround for ./... vendor matching

This workaround was necessary for Go 1.8. The Go 1.9 release changed
the expansion rules to exclude vendored packages.

* Makefile: use relative path for GOBIN

This makes the "Run ./build/bin/..." line look nicer.

* les: fix test binary flags for Go 1.13

Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.
2019-09-11 14:41:22 +02:00
Martin Holst Swende
91b7349509 tests: expose internal RunNoVerify method (#20051) 2019-09-11 13:46:14 +02:00
Nguyen Kien Trung
52a967cfab eth: remove unused field (#20049) 2019-09-11 01:38:42 +03:00
Péter Szilágyi
305ed955db
Merge pull request #20038 from holiman/minor_encodingfix
core/state: optimize some internals during encoding
2019-09-10 17:12:06 +03:00
Martin Holst Swende
72045dff4f
core/state: optimize some internals during encoding 2019-09-10 15:15:34 +02:00
Péter Szilágyi
46b437f39c
Merge pull request #20047 from karalabe/counter-to-gauge
core, metrics, p2p: switch some invalid counters to gauges
2019-09-10 15:23:20 +03:00
Péter Szilágyi
72d5a27a39
core, metrics, p2p: switch some invalid counters to gauges 2019-09-10 14:39:07 +03:00
Péter Szilágyi
4f6bf2f1c5
Merge pull request #20046 from karalabe/graphql-fix-web-and-decoding
common, graphql: fix hash/address decoding + UI content type
2019-09-10 13:33:01 +03:00
Péter Szilágyi
49b86a2859
common, graphql: fix hash/address decoding + UI content type 2019-09-10 12:20:36 +03:00
Flash Sheridan
cea2c80445 README: accounts in alloc field should exist (#20005)
* Accounts in alloc field must already exist

Note that accounts in alloc field must already exist, as pointed out by Simeon Vanov in https://gettoshare.com/2017/10/30/how-to-use-genesis-json-alloc-property/

* Change wording per PR review comment

* README: minor fixups
2019-09-10 12:06:26 +03:00
Péter Szilágyi
67bfc93053
Merge pull request #20033 from karalabe/docker-expose-graphql
Dockerfile: expose GraphQL ports
2019-09-04 15:13:54 +03:00
Péter Szilágyi
ce2da832ac
Dockerfile: expose GraphQL ports 2019-09-04 14:46:07 +03:00
Péter Szilágyi
b4a4a4db71
params: begin Geth v1.9.4 release cycle 2019-09-03 12:12:53 +03:00
Péter Szilágyi
cfbb969da8
params: release Geth v1.9.3 stable 2019-09-03 12:00:38 +03:00
SjonHortensius
1611815b8d cmd/utils: reduce light.maxpeers default for clients to 1/10th (#19933)
Currently light.maxpeers is 100 - after this change it's 10 for non-servers.

Fixes #19820
2019-09-03 10:43:35 +02:00
Péter Szilágyi
b8a9457139
Merge pull request #19915 from holiman/filltx
internal/ethapi: implement fillTransaction
2019-09-03 11:38:11 +03:00
Felix Lange
af16ca177f
rpc: raise limit in TestClientNotificationStorm (#19999) 2019-09-02 12:05:07 +02:00
winsvega
cedf8be435 retesteth: enable maxResults in AccountRange (#20020) 2019-09-02 11:49:49 +02:00
Péter Szilágyi
d5bd38384c
Merge pull request #20019 from holiman/minor_adminfix
eth: disallow overwrite files via admin.exportChain
2019-08-30 15:35:43 +03:00
Martin Holst Swende
292cf7c649
eth: disallow overwrite files via admin.exportChain 2019-08-30 10:39:29 +02:00
gary rong
396f1dd87b les: fix panic (#20013) 2019-08-27 15:29:00 +02:00
gary rong
68502595f6 les: wait for all task goroutines before dropping the peer (#20010)
* les: wait all task routines before drop the peer

* les: address comments

* les: fix issue
2019-08-27 14:07:25 +03:00
Flash Sheridan
a978adfd7c README: change chainID to <arbitrary positive integer> (#20002)
* Change chainId in genesis block to 8888 from 0 

Change chainId in genesis block to 8888 from 0 per Moriteru in https://ethereum.stackexchange.com/a/28082/40230.

* Replace 8888 with “<arbitrary positive integer>”

Per PR review, replace Moriteru’s arbitrary positive integer 8888 with “<arbitrary positive integer>” in chainId field.
2019-08-26 10:44:05 +03:00
Péter Szilágyi
cc9eb91d30
Merge pull request #20004 from karalabe/istanbul-override
cmd, core, eth, les: support --override.istanbul
2019-08-23 12:38:05 +03:00
Péter Szilágyi
e39b2a2bde
acmd, core, eth, les: support --override.istanbul 2019-08-23 12:09:27 +03:00
Péter Szilágyi
c8a1c0a115
Merge pull request #19993 from karalabe/istanbul-eip-integration
core/vm: enable istanbul EIPs in the jump table
2019-08-23 11:55:43 +03:00
Martin Holst Swende
4aeeddc658
tests: implement Istanbul support 2019-08-23 10:01:09 +02:00
Martin Holst Swende
e126b0836a
retesteth: implement istanbul support 2019-08-23 09:48:40 +02:00
SjonHortensius
961aa0533f rpc: enable compression on HTTP transport (#19997)
This change adds support for gzip encoding on HTTP responses.
Gzip encoding is used when the client sets the 'accept-encoding: gzip' header.
Original change by @brianosaurus, with fixes from @SjonHortensius.
2019-08-22 15:18:39 +02:00
Felix Lange
54b271a86d
crypto: add SignatureLength constant and use it everywhere (#19996)
Original change by @jpeletier
2019-08-22 15:14:06 +02:00
alexwang
b90cdbaa79 p2p/enode: allow DNS names in enode URLs (#18524) 2019-08-22 14:23:40 +02:00
SjonHortensius
4d358b9fc0 cmd/utils: customize cli.HelpPrinter to fix alignment (#19956)
This copies cli.printHelp but changes minwidth to 38. Custom flag
code is improved to print the default value using cli.FlagStringer like
all built-in flags do.
2019-08-22 13:32:26 +02:00
Péter Szilágyi
1eaf66ae60
Merge pull request #19995 from karalabe/ios-notag
build: gomobile automaticall adds the ios tag, don't duplicate
2019-08-22 14:18:51 +03:00
Péter Szilágyi
4ef5e9746b
build: gomobile automaticall adds the ios tag, don't duplicate 2019-08-22 14:16:48 +03:00
Péter Szilágyi
060e33fb4c
core/vm: enable istanbul EIPs in the jump table 2019-08-22 13:41:55 +03:00
Andrey Petrov
46ec63b849 ethdb/dbtest: addd test suite for ethdb backends (#19960)
- Move the existing tests from memorydb into a generalized testsuite
that can be run by any ethdb backend implementation.
- Add several more test cases to clarify some non-obvious nuances when
implementing a custom ethdb backend, such as the behaviour of
NewIteratorWithPrefix vs NewIteratorWithStart.
- Add leveldb to the testsuite using in-memory storage for fast
execution.
2019-08-22 11:47:24 +02:00
lmittmann
1cd5bf080e common: unify hex prefix check code (#19937) 2019-08-22 11:45:07 +02:00
HackyMiner
7c229941ac core: log chain reorg/split metrics (#18950)
* core: log chain reorg/split metrics

* core: report 1-block reorgs on the metrics too
2019-08-22 12:28:23 +03:00
Péter Szilágyi
ac23073619
Merge pull request #19992 from karalabe/fix-blake2b-386-2
crypto/blake2b: fix 386, round 2
2019-08-22 12:27:54 +03:00
Péter Szilágyi
8e391cec43
crypto/blake2b: fix 386, round 2 2019-08-22 12:24:11 +03:00
Péter Szilágyi
5b2c47a575
Merge pull request #19990 from karalabe/fix-blake2b-386
crypto/blake2b: fix non-amd64 builds
2019-08-22 11:50:40 +03:00
Péter Szilágyi
8517dd463d
crypto/blake2b: fix non-amd64 builds 2019-08-22 11:22:16 +03:00
Péter Szilágyi
22fdbee8ed
Merge pull request #19972 from keep-network/istanbul-eip-152-blake2b-f-precompile
core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09
2019-08-22 11:09:31 +03:00
Péter Szilágyi
1bccafe5ef
core/vm, crypto/blake2b: add SSE, AVX and AVX2 code 2019-08-21 13:09:15 +03:00
Piotr Dyraga
2890f060b7
core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09
The precompile at 0x09 wraps the BLAKE2b F compression function:
https://tools.ietf.org/html/rfc7693#section-3.2

The precompile requires 6 inputs tightly encoded, taking exactly 213
bytes, as explained below.

- `rounds` - the number of rounds - 32-bit unsigned big-endian word
- `h` - the state vector - 8 unsigned 64-bit little-endian words
- `m` - the message block vector - 16 unsigned 64-bit little-endian words
- `t_0, t_1` - offset counters - 2 unsigned 64-bit little-endian words
- `f` - the final block indicator flag - 8-bit word

[4 bytes for rounds][64 bytes for h][128 bytes for m][8 bytes for t_0]
[8 bytes for t_1][1 byte for f]

The boolean `f` parameter is considered as `true` if set to `1`.
The boolean `f` parameter is considered as `false` if set to `0`.
All other values yield an invalid encoding of `f` error.

The precompile should compute the F function as specified in the RFC
(https://tools.ietf.org/html/rfc7693#section-3.2) and return the updated
state vector `h` with unchanged encoding (little-endian).

See EIP-152 for details.
2019-08-21 13:09:15 +03:00
gary rong
2ed729d38e les: handler separation (#19639)
les: handler separation
2019-08-21 11:29:34 +02:00
Martin Holst Swende
4aee0d1994 core: fix crash in chain reimport (#19986)
* blockchain: fix flaw in block import

* core/blockchain: address review concerns

* core/blockchain: go format with 's'
2019-08-21 10:17:19 +03:00
Samuel Marks
039a9c3622 appveyor: bump to Go 1.12.9 (#19966)
* appveyor: bump to Go 1.12.8

* appveyor: bump to Go 1.12.9
2019-08-19 16:23:13 +03:00
Péter Szilágyi
3bb9b49afb
core/vm, params: implement EIP2200, SSTORE optimizations (#19964)
* core/vm, params: implement EIP2200, SSTORE optimizations

* core/vm, params: switch EIP2200 to Wei's version
2019-08-19 14:39:38 +03:00
Péter Szilágyi
9dfca5df4b
Merge pull request #19983 from karalabe/private-chain-config
README: update private network fork config fields
2019-08-19 14:08:34 +03:00