Geth v1.9.11 #17

Closed
yaoandrew wants to merge 165 commits from geth-v1.9.11 into master
165 Commits
Author SHA1 Message Date
yaoandrew 60bb77b25d Clean up after merge 2020-02-21 10:16:21 -08:00
yaoandrew b808126fc0 Merge commit '6a62fe399b68ab9e3625ef5e7900394f389adc3a' into geth-v1.9.11 2020-02-21 10:02:29 -08:00
Péter Szilágyi 6a62fe399b params: release Geth v1.9.11 stable 2020-02-18 13:26:00 +02:00
Felix Lange dae3aee5ff les: add bootstrap nodes as initial discoveries (#20688) 2020-02-18 13:24:05 +02:00
Péter Szilágyi 05ccbb5edd Merge pull request #20687 from karalabe/cht-1.9.11
params: update CHTs for the v1.9.11 release
2020-02-18 10:57:05 +02:00
Péter Szilágyi 4f55e24c02 params: update CHTs for the v1.9.11 release 2020-02-18 10:55:44 +02:00
Felix Lange 91b228966e rpc: remove startup error for invalid modules, log it instead (#20684)
This removes the error added in #20597 in favor of a log message at
error level. Failing to start broke a bunch of people's setups and is
probably not the right thing to do for this check.
2020-02-17 18:33:32 +02:00
Boqin Qin 1b9c5b393b all: fix goroutine leaks in unit tests by adding 1-elem channel buffer (#20666)
This fixes a bunch of cases where a timeout in the test would leak
a goroutine.
2020-02-17 17:33:11 +01:00
Felix Lange 57d4898e29 p2p/dnsdisc: re-check tree root when leaf resolution fails (#20682)
This adds additional logic to re-resolve the root name of a tree when a
couple of leaf requests have failed. We need this change to avoid
getting into a failure state where leaf requests keep failing for half
an hour when the tree has been updated.
2020-02-17 15:23:25 +01:00
Péter Szilágyi c2117982b8 Merge pull request #20678 from karalabe/broadcast-sqrt-proper
eth: don't enforce minimum broadcast, fix broadcast test
2020-02-17 14:43:30 +02:00
Felix Lange 1c4c486a85 cmd/ethkey: speed up test by using weaker scrypt parameters (#20680) 2020-02-17 13:22:52 +02:00
Felix Lange ac72787768 p2p: remove MeteredPeerEvent (#20679)
This event was added for the dashboard, but we don't need it anymore
since the dashboard is gone.
2020-02-17 13:22:14 +02:00
Péter Szilágyi 26284ec3cc Merge pull request #20681 from karalabe/go1.13.8
travis, appveyor, build: bump builder Go to 1.13.8
2020-02-17 13:15:17 +02:00
Péter Szilágyi fef8c985bc travis, appveyor, build: bump builder Go to 1.13.8 2020-02-17 13:13:24 +02:00
Péter Szilágyi 36a1e0b67d eth: don't enforce minimum broadcast, fix broadcast test 2020-02-17 12:01:03 +02:00
Boqin Qin 37531b1884 cmd/faucet: protect f.reqs with Rlock to prevent data race (#20669)
* cmd/faucet: add Rlock to protect f.reqs in apiHandler

* cmd/faucet: make a locked copy of f.reqs
2020-02-15 20:14:29 +02:00
Martin Holst Swende 855690523a core: ensure state exists for prefetcher (#20627) 2020-02-14 10:54:02 +02:00
Felix Lange 38d1b0cba2 cmd/geth: enable DNS discovery by default (#20660)
* node: expose config in service context

* eth: integrate p2p/dnsdisc

* cmd/geth: add some DNS flags

* eth: remove DNS URLs

* cmd/utils: configure DNS names for testnets

* params: update DNS URLs

* cmd/geth: configure mainnet DNS

* cmd/utils: rename DNS flag and fix flag processing

* cmd/utils: remove debug print

* node: fix test
2020-02-13 15:38:30 +02:00
Péter Szilágyi eddcecc160 Merge pull request #20234 from rjl493456442/newtxhashes_2
core, eth: announce based transaction propagation
2020-02-13 15:28:34 +02:00
Péter Szilágyi 9938d954c8 eth: rework tx fetcher to use O(1) ops + manage network requests 2020-02-13 15:27:15 +02:00
Felix Lange 90caa2cabb p2p: new dial scheduler (#20592)
* p2p: new dial scheduler

This change replaces the peer-to-peer dial scheduler with a new and
improved implementation. The new code is better than the previous
implementation in two key aspects:

- The time between discovery of a node and dialing that node is
  significantly lower in the new version. The old dialState kept
  a buffer of nodes and launched a task to refill it whenever the buffer
  became empty. This worked well with the discovery interface we used to
  have, but doesn't really work with the new iterator-based discovery
  API.

- Selection of static dial candidates (created by Server.AddPeer or
  through static-nodes.json) performs much better for large amounts of
  static peers. Connections to static nodes are now limited like dynanic
  dials and can no longer overstep MaxPeers or the dial ratio.

* p2p/simulations/adapters: adapt to new NodeDialer interface

* p2p: re-add check for self in checkDial

* p2p: remove peersetCh

* p2p: allow static dials when discovery is disabled

* p2p: add test for dialScheduler.removeStatic

* p2p: remove blank line

* p2p: fix documentation of maxDialPeers

* p2p: change "ok" to "added" in static node log

* p2p: improve dialTask docs

Also increase log level for "Can't resolve node"

* p2p: ensure dial resolver is truly nil without discovery

* p2p: add "looking for peers" log message

* p2p: clean up Server.run comments

* p2p: fix maxDialedConns for maxpeers < dialRatio

Always allocate at least one dial slot unless dialing is disabled using
NoDial or MaxPeers == 0. Most importantly, this fixes MaxPeers == 1 to
dedicate the sole slot to dialing instead of listening.

* p2p: fix RemovePeer to disconnect the peer again

Also make RemovePeer synchronous and add a test.

* p2p: remove "Connection set up" log message

* p2p: clean up connection logging

We previously logged outgoing connection failures up to three times.

- in SetupConn() as "Setting up connection failed addr=..."
- in setupConn() with an error-specific message and "id=... addr=..."
- in dial() as "Dial error task=..."

This commit ensures a single log message is emitted per failure and adds
"id=... addr=... conn=..." everywhere (id= omitted when the ID isn't
known yet).

Also avoid printing a log message when a static dial fails but can't be
resolved because discv4 is disabled. The light client hit this case all
the time, increasing the message count to four lines per failed
connection.

* p2p: document that RemovePeer blocks
2020-02-13 11:10:03 +01:00
Boqin Qin 5f2002bbcc accounts: add walletsNoLock to avoid double read lock (#20655) 2020-02-12 15:20:50 +01:00
Boqin QinandFelix Lange a9614c3c91 event, p2p/simulations/adapters: fix rare goroutine leaks (#20657)
Co-authored-by: Felix Lange <fjl@twurst.com>
2020-02-12 15:19:47 +01:00
Marius van der Wijden 46c4b699c8 accounts/abi/bind/backends: add support for historical state (#20644) 2020-02-12 11:33:17 +01:00
Boqin Qin 1821328162 event: add missing unlock before panic (#20653) 2020-02-12 10:33:31 +01:00
Adam Schmidegandligi 8045504abf les: log disconnect reason when light server is not synced (#20643)
Co-authored-by: ligi <ligi@ligi.de>
2020-02-11 16:46:32 +01:00
Felix Lange c22fdec3c7 common/mclock: add NewTimer and Timer.Reset (#20634)
These methods can be helpful when migrating existing timer code.
2020-02-11 16:36:49 +01:00
rjl493456442 049e17116e core, eth: implement eth/65 transaction fetcher 2020-02-11 13:56:36 +02:00
winsvega dcffb7777f cmd/geth retesteth: add eth_getBlockByHash (#20621) 2020-02-11 10:54:05 +01:00
chabashilah 8694d14e65 signer: add bytes32 as valid primitive (#20609) 2020-02-11 10:52:51 +01:00
Adam Schmideg 172f7778fe rpc: add error when call result parameter is not addressable (#20638) 2020-02-11 09:48:58 +01:00
34bb132b10 graphql: add transaction signature values (#20623)
The feature update allows the GraphQL API endpoint to retrieve
transaction signature R,S,V parameters.

Co-authored-by: amitshah <amitshah0t7@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2020-02-09 21:50:44 +01:00
Nick Ward 675f4e75b8 README.md: update evm usage example (#20635) 2020-02-09 17:18:47 +01:00
Martin Holst Swende 4a231cd951 internal/ethapi: return non-null "number" for pending block (#20616)
Fixes: #20587, ethereum/web3.py#1572
2020-02-07 10:44:32 +01:00
Felix Lange 976a0f5558 cmd/devp2p: fix Route53 TXT record splitting (#20626)
For longer records and subtree entries, the deployer created two
separate TXT records. This doesn't work as intended because the client
will receive the two records in arbitrary order. The fix is to encode
longer values as "string1""string2" instead of "string1", "string2".
This encoding creates a single record on AWS Route53.
2020-02-05 15:29:59 +01:00
Martin Holst Swende a1313b5b1e trie: make hasher parallel when number of changes are large (#20488)
* trie: make hasher parallel when number of changes are large

* trie: remove unused field dirtyCount

* trie: rename unhashedCount/unhashed
2020-02-04 14:02:38 +02:00
meowsbits 711ed74e09 cmd/geth: add 'dumpgenesis' command (#20191)
Adds the 'geth dumpgenesis' command, which writes the configured
genesis in JSON format to stdout. This provides a way to generate the
data (structure and content) that can then be used with the 'geth init'
command.
2020-02-04 11:49:13 +01:00
Martin Holst SwendeandPéter Szilágyi 058a4ac5f1 core/evm: less iteration in blockhash (#20589)
* core/vm/runtime: add test for blockhash

* core/evm: less iteration in blockhash

* core/vm/runtime: nitpickfix

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2020-02-04 12:32:31 +02:00
tintinandMartin Holst Swende 33791dbeb5 tracers: avoid panic on invalid arguments (#20612)
* add regression tests for #20611

* eth/tracers: fix panics occurring for invalid params in js-tracers

Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-02-04 09:55:07 +01:00
Martin Holst Swende 5a9c96454e trie: separate hashes and committer, collapse on commit
* trie:  make db insert use size instead of full data

* core/state: minor optimization in state onleaf allocation

* trie: implement dedicated committer and hasher

* trie: use dedicated committer/hasher

* trie: linter nitpicks

* core/state, trie: avoid unnecessary storage trie load+commit

* trie: review feedback, mainly docs + minor changes

* trie: start deprecating old hasher

* trie: fix misspell+lint

* trie: deprecate hasher.go, make proof framework use new hasher

* trie: rename pure_committer/hasher to committer/hasher

* trie, core/state: fix review concerns

* trie: more review concerns

* trie: make commit collapse into hashnode, don't touch dirtyness

* trie: goimports fixes

* trie: remove panics
2020-02-03 17:28:30 +02:00
Felix Lange 4cc89a5a32 internal/build: don't crash in DownloadFile when offline (#20595) 2020-02-03 17:22:46 +02:00
Elizabeth 6ab17fc73a Merge pull request #7 from makerdao/statediff-check
Add warning to statediff docs that empty payloads may be sent to sub
2020-01-28 16:10:25 -06:00
Elizabeth 95203db648 Merge pull request #4 from makerdao/statediffing-service
Statediffing service
2020-01-28 10:13:11 -06:00
Elizabeth Engelman d66903bb8e Add warning to statediff docs that empty payloads may be sent to sub 2020-01-27 15:05:08 -06:00
Elizabeth Engelman ed2bc0587f Cleanup after rebasing v1.9.9
- Remove vendor dir
- Removing unused geth cmd config
- Apply govet updates
2019-12-30 16:11:02 -05:00
Elizabeth Engelman 844ed2545b Update test block hashes 2019-12-30 16:11:02 -05:00
Péter Szilágyi 4a2e08de14 params: release Geth v1.9.9 2019-12-30 16:11:02 -05:00
Martin Holst Swende e142beb15c consensus/ethash, params: eip-2384: bump difficulty bomb (#20347)
* consensus/ethash, params: implement eip-2384: bump difficulty bomb

* params: EIP 2384 compat checks

* consensus, params: add Muir Glacier block number (mainnet,ropsten) + official name

* core/forkid: forkid tests for muir glacier

* params/config: address review concerns

* params, core/forkid: review nitpicks

* cmd/geth,eth,les: add override option for muir glacier

* params: nit fix
2019-12-30 16:11:02 -05:00
Marius van der Wijden 04998d12a5 p2p/enode: remove data race in sliceIter (#20421) 2019-12-30 16:11:02 -05:00
Péter Szilágyi 0c7ae69814 params: update CHTs for v1.9.9 release 2019-12-30 16:11:02 -05:00
Péter Szilágyi 4c4e8e852b trie: track dirty cache metrics, track clean writes on commit 2019-12-30 16:11:02 -05:00
Marius van der Wijden 091e9db6ad accounts/abi/bind: fix destructive packing of *big.Int (#20412) 2019-12-30 16:11:02 -05:00
gary rong 72e8fb3a9e core, miner: remove PostChainEvents (#19396)
This change:

- removes the PostChainEvents method on core.BlockChain.
- sorts 'removed log' events by block number.
- fire the NewChainHead event if we inject a canonical block into the chain
  even if the entire insertion is not successful.
- guarantees correct event ordering in all cases.
2019-12-30 16:11:02 -05:00
Guillaume Ballet db26dfc075 accounts/usbwallet: fix staticcheck warnings (#20372) 2019-12-30 16:11:02 -05:00
xinluyin 05b3c161c0 internal/web3ext: add debug_accountRange (#20410) 2019-12-30 16:11:02 -05:00
Guillaume Ballet 98e0b8cd35 accounts/scwallet: fix staticcheck warnings (#20370) 2019-12-30 16:11:02 -05:00
Guillaume Ballet 84ce2ed396 internal: fix staticcheck warnings (#20380) 2019-12-30 16:11:02 -05:00
Guillaume Ballet 376e876db1 cmd/faucet, cmd/geth: fix staticcheck warnings (#20374) 2019-12-30 16:11:02 -05:00
gary rong 44e7becbe9 trie: remove dead code (#20405) 2019-12-30 16:11:02 -05:00
Guillaume Ballet e6f02948ea log: fix staticcheck warnings (#20388) 2019-12-30 16:11:02 -05:00
Felix Lange b41940f1f4 consensus/ethash: refactor remote sealer (#20335)
The original idea behind this change was to remove a use of the
deprecated CancelRequest method. Simply removing it would've been an
option, but I couldn't resist and did a bit of a refactoring instead.

All remote sealing code was contained in a single giant function. Remote
sealing is now extracted into its own object, remoteSealer.
2019-12-30 16:11:02 -05:00
Martin Holst Swende 9c04887adb deps: update fastcache to 1.5.3 2019-12-30 16:11:02 -05:00
Péter Szilágyi e7a06d58c5 core/rawdb: fix reinit regression caused by the hash check PR 2019-12-30 16:11:02 -05:00
Guillaume Ballet 0046347a99 core: fix staticcheck warnings (#20384)
* core: fix staticcheck warnings

* fix goimports
2019-12-30 16:11:02 -05:00
Guillaume Ballet 37844995c6 les: fix staticcheck warnings (#20371) 2019-12-30 16:11:02 -05:00
zaccoding d534abffab cmd: fix command help messages in modules (#20203) 2019-12-30 16:11:02 -05:00
Péter Szilágyi 3b549fa8b9 params: begin v1.9.9 release cycle 2019-12-30 16:11:02 -05:00
Péter Szilágyi 572d244868 params: release go-ethereum v1.9.8 2019-12-30 16:11:02 -05:00
Felföldi Zsolt 946f88906a les: fix clientInfo deadlock (#20395) 2019-12-30 16:11:02 -05:00
Felix Lange 070afb0e06 p2p/discover: slow down lookups on empty table (#20389)
* p2p/discover: slow down lookups on empty table

* p2p/discover: wake from slowdown sleep when table is closed
2019-12-30 16:11:02 -05:00
Guillaume Ballet 809a085f84 accounts/keystore: fix staticcheck warnings (#20373)
* accounts/keystore: fix staticcheck warnings

* review feedback
2019-12-30 16:11:02 -05:00
gary rong 0d3bcbbdc5 accounts/abi/bind: avoid reclaring structs (#20381) 2019-12-30 16:11:02 -05:00
Felix Lange 397c3e20cd rlp: fix staticcheck warnings (#20368)
* rlp: fix staticcheck warnings

* rlp: fix ExampleDecode test
2019-12-30 16:11:02 -05:00
meows 8e352763ea cmd/geth: remove network id from version cmd
It was reflective only of the Default setting,
and not chain aware.
2019-12-30 16:11:02 -05:00
gary rong ab5e0e3986 trie: replace bigcache with fastcache (#19971) 2019-12-30 16:11:02 -05:00
Guillaume Ballet e3f254553c eth/tracers: fix staticcheck warnings (#20379) 2019-12-30 16:11:02 -05:00
Guillaume Ballet d6a0772f21 miner: fix staticcheck warnings (#20375) 2019-12-30 16:11:02 -05:00
Michael Forney fca48e2a9a core/asm: allow numbers in labels (#20362)
Numbers were already allowed when creating labels, just not when
referencing them.
2019-12-30 16:11:02 -05:00
Guillaume Ballet eaf136e19e tests, signer: remove staticcheck warnings (#20364) 2019-12-30 16:11:02 -05:00
Felix Lange 31cec2a54c p2p/discv5: add deprecation warning and remove unused code (#20367)
* p2p/discv5: add deprecation warning and remove unused code

* p2p/discv5: remove unused variables
2019-12-30 16:11:02 -05:00
Felix Lange 30af43fb7b trie: remove unused code (#20366) 2019-12-30 16:11:02 -05:00
Guillaume Ballet 747e4495fc metrics: fix issues reported by staticcheck (#20365) 2019-12-30 16:11:02 -05:00
Felix Lange 4c2ce942e4 core/state: fix staticcheck warnings (#20357)
Also remove dependency on gopkg.in/check.v1 in tests.
2019-12-30 16:11:02 -05:00
Felix Lange 9fa5359d3a accounts/abi: fix staticcheck warnings (#20358)
* accounts/abi: fix staticcheck warnings

* accounts/abi: restore unused field for test
2019-12-30 16:11:02 -05:00
Felix Lange 76efa9677a accounts/abi/bind/backends: remove unused assignment (#20359) 2019-12-30 16:11:02 -05:00
Péter Szilágyi 7be6449efe build: skip go clean on PPA, messes with the module trick 2019-12-30 16:11:02 -05:00
Felix Lange d58ad8d62a core/types: remove BlockBy sorting code (#20355) 2019-12-30 16:11:02 -05:00
Felix Lange 6ccf0a7304 common: improve GraphQL error messages (#20354) 2019-12-30 16:11:02 -05:00
Péter Szilágyi 3d46043304 build: pull in ci.go dependencies for the PPA builder 2019-12-30 16:11:02 -05:00
Felix Lange 62d423f75f common/hexutil: improve GraphQL error messages (#20353) 2019-12-30 16:11:02 -05:00
Martin Holst Swende 419268fa29 cmd/puppeth: make ssh prompt more user-friendly 2019-12-30 16:11:02 -05:00
meows 13b28f78cf cmd/puppeth: x-spec nonce data type, use types.BlockNonce
Refactors to use existing BlockNonce type instead of
hand-rolled bytes logic.
2019-12-30 16:11:02 -05:00
meowsbits 33837394d2 tests: enable TransactionTests Istanbul case (#20337) 2019-12-30 16:11:02 -05:00
Péter Szilágyi 1887cd7ece build, travis: use ephemeral debsrc GOPATH to get mod deps 2019-12-30 16:11:02 -05:00
meows c1dabf8df6 tests: refactor TestState to dedupe walk callback
Minor refactoring.
2019-12-30 16:11:02 -05:00
Péter Szilágyi fbc3611cc8 mobile: fix CopyFile switch to package cp 2019-12-30 16:11:02 -05:00
Péter Szilágyi 6f31c1ff72 travis: fake build ppa only for go module dependencies 2019-12-30 16:11:02 -05:00
Péter Szilágyi d83c9fa07d build, internal/build: drop own file/folder copier 2019-12-30 16:11:02 -05:00
Péter Szilágyi f024339063 go.mod: tidy up the modules to avoid xgo writes to go.sum 2019-12-30 16:11:02 -05:00
Péter Szilágyi f19cbb0662 travis, build: aggregate and upload go mod dependencies for PPA 2019-12-30 16:11:02 -05:00
Péter Szilágyi 0e8c205477 accounts/abi/bind: switch binding test to go modules 2019-12-30 16:11:02 -05:00
Péter Szilágyi 93bb6c3539 travis: explicitly enable go modules in Go 1.11 and 1.12 2019-12-30 16:11:02 -05:00
Péter Szilágyi 46496e876c go.mod, vendor: switch to Go modules 2019-12-30 16:11:02 -05:00
gary rong 01a625408b cmd/puppeth: update chain spec of parity (#20241) 2019-12-30 16:11:00 -05:00
gary rong af3806f520 miner: fix data race in tests (#20310)
* miner: fix data race in tests

miner: fix linter

* miner: address comment
2019-12-30 16:11:00 -05:00
Felix Lange 0cc6974834 core: fix staticcheck warnings (#20323) 2019-12-30 16:11:00 -05:00
Felix Lange 06df38e9ee rpc: remove 'exported or builtin' restriction for parameters (#20332)
* rpc: remove 'exported or builtin' restriction for parameters

There is no technial reason for this restriction because package reflect
can create values of any type. Requiring parameters and return values to
be exported causes a lot of noise in package exports.

* rpc: fix staticcheck warnings
2019-12-30 16:11:00 -05:00
Felix Lange 81d1bfdc81 internal/web3ext, les: update clique JS and make it work with the light client (#20318)
Also fix the input formatter on clique_getSnapshot and clique_getSigners
so that integers as well as hex number strings are accepted.
2019-12-30 16:11:00 -05:00
Felix Lange 67e9f391db p2p/simulations: fix staticcheck warnings (#20322) 2019-12-30 16:11:00 -05:00
Felix Lange 2b8f3c4b0c p2p: remove unused code (#20325) 2019-12-30 16:11:00 -05:00
Felix Lange b01dccba05 whisper/whisperv6: fix staticcheck warnings (#20328) 2019-12-30 16:11:00 -05:00
Guillaume Ballet 2153dbe8b0 .github: remove 'nonsense' from CODEOWNERS (#20329) 2019-12-30 16:11:00 -05:00
Felix Lange 88e51543e0 event: remove unused field 'closed' (#20324) 2019-12-30 16:11:00 -05:00
Felix Lange b1e2868e36 cmd/wnode: remove uses of common.ToHex (#20327) 2019-12-30 16:11:00 -05:00
Felix Lange 736422999f ethclient: remove use of common.ToHex (#20326) 2019-12-30 16:11:00 -05:00
Guillaume Ballet c0428c4e1f travis: deactivate arm build during push (#20321) 2019-12-30 16:11:00 -05:00
gary rong a2ea532f68 core/rawdb: check hash before return data from ancient db (#20195)
* core/rawdb: check hash before return data from ancient db

* core/rawdb: fix lint

* core/rawdb: calculate the hash in the fly
2019-12-30 16:11:00 -05:00
Felix Lange 756ed51875 p2p/netutil: fix staticcheck warning (#20315) 2019-12-30 16:11:00 -05:00
Felix Lange db93da53e1 cmd/ethkey: fix file permissions in changepassword command (#20313)
Found by staticcheck.
2019-12-30 16:11:00 -05:00
Felix Lange 5fd94614a4 consensus/clique: fix struct tags for status API (#20316)
Also unexport the status struct.
2019-12-30 16:11:00 -05:00
Martin Holst Swende 40a8484292 consensus/clique: add clique_status API method (#20103)
This PR introduces clique_status which gives info about the health of
the clique network.

It's currently a bit PITA to find out how a clique network is
performing, and it can easily happen that sealers drop off -- and
everything is 'fine' until one more signer drops off, and the network
suddenly halts.

The new method provides the following stats:

- Which signers are currently active, and have signed blocks in the last
  N (set to 64) blocks?
- How many blocks has each signer signed?
- What is the difficulty in the last N blocks, compared to the
  theoretical maximum?
2019-12-30 16:11:00 -05:00
Felix Lange 38888acb5f cmd/clef: fix staticcheck warnings (#20314) 2019-12-30 16:11:00 -05:00
meowsbits efc8f80260 build: add test cmd flag -v for verbose logs (#20298)
Adds flags akin to -coverage flag enabling the test runner
to use go test's -v flag, signaling verbose test log output.
2019-12-30 16:11:00 -05:00
Guillaume Ballet 0f3164d1a6 travis: use travis_wait for both install and build (#20309) 2019-12-30 16:11:00 -05:00
Felföldi Zsolt 4f9d21d5d9 les: rename UpdateBalance to AddBalance and simplify return format (#20304) 2019-12-30 16:11:00 -05:00
meowsbits 3e06a5559b core: s/isEIP155/isHomestead/g (fix IntrinsicGas signature var name) (#20300)
* core: s/isEIP155/isEIP2/ (fix)

This signature variable name reflects a spec'd change
in gas cost for creating contracts as documented in EIP2 (Homestead HF).

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md#specification

* core: s/isEIP2/sIsHomestead/g

Use isHomestead since Homestead is what the caller
and rest of the code uses.
2019-12-30 16:11:00 -05:00
Guillaume Ballet ef276069a8 travis: remove traces and use travis_wait in ARM build (#20296)
* travis: remove debug traces

* travis: Add travis_wait to the test run

* travis: increase travis_wait time
2019-12-30 16:11:00 -05:00
Felix Lange cb1ba11d9f build: use golangci-lint (#20295)
* build: use golangci-lint

This changes build/ci.go to download and run golangci-lint instead
of gometalinter.

* core/state: fix unnecessary conversion

* p2p/simulations: fix lock copying (found by go vet)

* signer/core: fix unnecessary conversions

* crypto/ecies: remove unused function cmpPublic

* core/rawdb: remove unused function print

* core/state: remove unused function xTestFuzzCutter

* core/vm: disable TestWriteExpectedValues in a different way

* core/forkid: remove unused function checksum

* les: remove unused type proofsData

* cmd/utils: remove unused functions prefixedNames, prefixFor

* crypto/bn256: run goimports

* p2p/nat: fix goimports lint issue

* cmd/clef: avoid using unkeyed struct fields

* les: cancel context in testRequest

* rlp: delete unreachable code

* core: gofmt

* internal/build: simplify DownloadFile for Go 1.11 compatibility

* build: remove go test --short flag

* .travis.yml: disable build cache

* whisper/whisperv6: fix ineffectual assignment in TestWhisperIdentityManagement

* .golangci.yml: enable goconst and ineffassign linters

* build: print message when there are no lint issues

* internal/build: refactor download a bit
2019-12-30 16:11:00 -05:00
Felix Lange f3fa942f9f rpc, p2p/simulations: use github.com/gorilla/websocket (#20289)
* rpc: improve codec abstraction

rpc.ServerCodec is an opaque interface. There was only one way to get a
codec using existing APIs: rpc.NewJSONCodec. This change exports
newCodec (as NewFuncCodec) and NewJSONCodec (as NewCodec). It also makes
all codec methods non-public to avoid showing internals in godoc.

While here, remove codec options in tests because they are not
supported anymore.

* p2p/simulations: use github.com/gorilla/websocket

This package was the last remaining user of golang.org/x/net/websocket.
Migrating to the new library wasn't straightforward because it is no
longer possible to treat WebSocket connections as a net.Conn.

* vendor: delete golang.org/x/net/websocket

* rpc: fix godoc comments and run gofmt
2019-12-30 16:11:00 -05:00
Michael Forney 3c1fbf998a cmd/evm: Allow loading input from file (#20273)
Make it possible to load input from a file. Simlar to `--code` / `--codefile`, have `--input`/`--inputfile`.
2019-12-30 16:11:00 -05:00
Martin Holst Swende cc8661707a internal/ethapi: don't query wallets at every execution of gas estimation 2019-12-30 16:11:00 -05:00
nebojsa94 d946ff04ac core/vm: fix tracer interface parameter name (#20294) 2019-12-30 16:11:00 -05:00
meowsbits 3c889e71e0 params: finish sentence in comment (#20291) 2019-12-30 16:11:00 -05:00
Guillaume Ballet 0e3e9676cb build: gather info to investigate why builds fail on ARM (#20281) 2019-12-30 16:11:00 -05:00
Guillaume Ballet a74795357f whisper/whisperv6: fix staticcheck issues (#20288) 2019-12-30 16:11:00 -05:00
Felix Lange 6329ba896a dashboard: remove the dashboard (#20279)
This removes the dashboard project. The dashboard was an experimental
browser UI for geth which displayed metrics and chain information in
real time. We are removing it because it has marginal utility and nobody
on the team can maintain it.

Removing the dashboard removes a lot of dependency code and shaves
6 MB off the geth binary size.
2019-12-30 16:11:00 -05:00
Felix Lange e2198a1bb6 cmd/faucet: use github.com/gorilla/websocket (#20283)
golang.org/x/net/websocket is unmaintained, and we have already
switched to using github.com/gorilla/websocket for package rpc.
2019-12-30 16:11:00 -05:00
Jorropo a672c10630 rpc: fix typo example code (#20284) 2019-12-30 16:11:00 -05:00
gary rong e2482ae2e3 accounts/abi/bind, cmd/abigen: implement alias for abigen (#20244)
* accounts/abi/bind, cmd/abigen: implement alias for abigen

* accounts/abi/bind: minor fixes

* accounts/abi/bind: address comments

* cmd/abigen: address comments

* accounts/abi/bind: print error log when identifier collision

* accounts/abi/bind: address comments

* accounts/abi/bind: address comment
2019-12-30 16:11:00 -05:00
Felföldi Zsolt c255367058 les: implement server priority API (#20070)
This PR implements the LES server RPC API. Methods for server
capacity, client balance and client priority management are provided.
2019-12-30 16:11:00 -05:00
Guillaume Ballet ff0b463113 miner: increase worker test timeout (#20268)
TestEmptyWork* occasionally fails due to timeout. Increase the timeout.
2019-12-30 16:11:00 -05:00
Kurkó Mihály 539ca8c791 dashboard: send current block to the dashboard client (#19762)
This adds all dashboard changes from the last couple months.
We're about to remove the dashboard, but decided that we should
get all the recent work in first in case anyone wants to pick up this
project later on.

* cmd, dashboard, eth, p2p: send peer info to the dashboard
* dashboard: update npm packages, improve UI, rebase
* dashboard, p2p: remove println, change doc
* cmd, dashboard, eth, p2p: cleanup after review
* dashboard: send current block to the dashboard client
2019-12-30 16:11:00 -05:00
Rick 8489a29645 p2p: fix bug in TestPeerDisconnect (#20277) 2019-12-30 16:10:58 -05:00
Guillaume Ballet 8a6bd87d40 travis: enable test suite on ARM64 (#20219)
* travis: Enable ARM support

* Include fixes from 20039

* Add a trace to debug the invalid lookup issue

* Try increasing the timeout to see if the arm test passes

* Investigate the resolver issue

* Increase arm64 timeout for clique test

* increase timeout in tests for arm64

* Only test the failing tests

* Review feedback: don't export epsilon

* Remove investigation tricks+include fjl's feeback

* Revert the retry ahead of using the mock resolver

* Fix rebase errors
2019-12-30 16:10:58 -05:00
Felix Lange 03a3783b2b p2p/enode: mock DNS resolver in URL parsing test (#20252) 2019-12-30 16:10:58 -05:00
Péter Szilágyi 92e94dc002 params: begin v1.9.8 release cycle 2019-12-30 16:10:58 -05:00
Péter Szilágyi e00e187403 params: release Geth v1.9.7 2019-12-30 16:10:58 -05:00
Martin Holst Swende 8c2f200743 core: add blockchain test too for revert cornercase 2019-12-30 16:10:58 -05:00
Ian Norden a87a06f445 relay receipts with the rest of the data + review fixes/changes 2019-12-30 16:10:58 -05:00
Ian Norden 7096c9c0c5 adjust buffering to improve stability; doc.go; fix notifier
err handling
2019-12-30 16:10:58 -05:00
Ian Norden f682030eb0 review fixes; proper method signature for api; adjust service so that statediff processing is halted/paused until there is at least one subscriber listening for the results 2019-12-30 16:10:58 -05:00
Ian Norden bed68d4c0e review fixes and fixes for issues ran into in integration 2019-12-30 16:10:58 -05:00
Ian Norden ea34704a2c cli parameter to limit statediffing to select account addresses + test 2019-12-30 16:10:58 -05:00
Ian Norden 2cf3403b2c make state diff rlp serializable 2019-12-30 16:10:58 -05:00
Ian Norden adf43ecd9a option to process intermediate nodes 2019-12-30 16:10:58 -05:00
Ian Norden 4e8d8129c2 make proofs and paths optional + compress service loop into single for loop (may be missing something here) 2019-12-30 16:10:58 -05:00
Ian Norden e69ab97782 refactoring state diff service and adding api which allows for streaming state diff payloads over an rpc websocket subscription 2019-12-30 16:10:58 -05:00
Ian Norden df1bfbae8c refactoring statediff builder and types and adjusted to relay proofs and paths (still need to make this optional) 2019-12-30 16:10:58 -05:00
Ian Norden e18f462667 refactoring/reorganizing packages 2019-12-30 16:10:58 -05:00
Elizabeth 2b684301cf Statediff for full node (#6)
* Open a trie from the in-memory database

* Use a node's LeafKey as an identifier instead of the address

It was proving difficult to find look the address up from a given path
with a full node (sometimes the value wouldn't exist in the disk db).
So, instead, for now we are using the node's LeafKey with is a Keccak256
hash of the address, so if we know the address we can figure out which
LeafKey it matches up to.

* Make sure that statediff has been processed before pruning

* Use blockchain stateCache.OpenTrie for storage diffs

* Clean up log lines and remove unnecessary fields from builder

* Apply go fmt changes

* Add a sleep to the blockchain test

* Address PR comments

* Address PR comments
2019-12-30 16:10:58 -05:00
Elizabeth 2f34966f72 Gracefully exit geth command(#4) 2019-12-30 16:10:33 -05:00
Elizabeth Engelman db01237d37 Apply gosimple changes to statediff 2019-12-30 16:10:33 -05:00
Elizabeth Engelman ddb53ad1c2 Apply goimports to statediff 2019-12-30 16:10:33 -05:00
Elizabeth Engelman 837a66a2ea Apply go fmt changes to statediff 2019-12-30 16:10:33 -05:00
Elizabeth 00e0056b8c Write state diff to CSV (#2)
* port statediff from https://github.com/jpmorganchase/quorum/blob/9b7fd9af8082795eeeb6863d9746f12b82dd5078/statediff/statediff.go; minor fixes

* integrating state diff extracting, building, and persisting into geth processes

* work towards persisting created statediffs in ipfs; based off github.com/vulcanize/eth-block-extractor

* Add a state diff service

* Remove diff extractor from blockchain

* Update imports

* Move statediff on/off check to geth cmd config

* Update starting state diff service

* Add debugging logs for creating diff

* Add statediff extractor and builder tests and small refactoring

* Start to write statediff to a CSV

* Restructure statediff directory

* Pull CSV publishing methods into their own file

* Reformatting due to go fmt

* Add gomega to vendor dir

* Remove testing focuses

* Update statediff tests to use golang test pkg

instead of ginkgo

- builder_test
- extractor_test
- publisher_test

* Use hexutil.Encode instead of deprecated common.ToHex

* Remove OldValue from DiffBigInt and DiffUint64 fields

* Update builder test

* Remove old storage value from updated accounts

* Remove old values from created/deleted accounts

* Update publisher to account for only storing current account values

* Update service loop and fetching previous block

* Update testing

- remove statediff ginkgo test suite file
- move mocks to their own dir

* Updates per go fmt

* Updates to tests

* Pass statediff mode and path in through cli

* Return filename from publisher

* Remove some duplication in builder

* Remove code field from state diff output

this is the contract byte code, and it can still be obtained by querying
the db by the codeHash

* Consolidate acct diff structs for updated & updated/deleted accts

* Include block number in csv filename

* Clean up error logging

* Cleanup formatting, spelling, etc

* Address PR comments

* Add contract address and storage value to csv

* Refactor accumulating account row in csv publisher

* Add DiffStorage struct

* Add storage key to csv

* Address PR comments

* Fix publisher to include rows for accounts that don't have store updates

* Update builder test after merging in release/1.8

* Update test contract to include storage on contract intialization

- so that we're able to test that storage diffing works for created and
deleted accounts (not just updated accounts).

* Factor out a common trie iterator method in builder
2019-12-30 16:10:33 -05:00