Commit Graph

11573 Commits

Author SHA1 Message Date
Felix Lange
9438438a0a trie: remove unused code (#20366) 2019-12-03 13:54:39 +01:00
Guillaume Ballet
566dfcf8f4 metrics: fix issues reported by staticcheck (#20365) 2019-12-03 13:54:15 +01:00
Felix Lange
756bf779e4 core/state: fix staticcheck warnings (#20357)
Also remove dependency on gopkg.in/check.v1 in tests.
2019-12-03 13:54:05 +01:00
Felix Lange
6fc749ccf9 accounts/abi: fix staticcheck warnings (#20358)
* accounts/abi: fix staticcheck warnings

* accounts/abi: restore unused field for test
2019-12-03 13:52:35 +01:00
Felix Lange
4afc0ecb76 accounts/abi/bind/backends: remove unused assignment (#20359) 2019-12-03 13:51:49 +01:00
Péter Szilágyi
d0ea0833f3 build: skip go clean on PPA, messes with the module trick 2019-12-03 13:51:28 +01:00
Felix Lange
0ad91599b5 core/types: remove BlockBy sorting code (#20355) 2019-12-03 13:51:21 +01:00
Felix Lange
bbea24b5f2 common: improve GraphQL error messages (#20354) 2019-12-03 13:50:58 +01:00
Péter Szilágyi
de319f1173 build: pull in ci.go dependencies for the PPA builder 2019-12-03 13:50:47 +01:00
Felix Lange
9f9126f9e8 common/hexutil: improve GraphQL error messages (#20353) 2019-12-03 13:50:16 +01:00
Martin Holst Swende
47fe645fb9 cmd/puppeth: make ssh prompt more user-friendly 2019-12-03 13:50:06 +01:00
meows
b1d5f7c1d4 cmd/puppeth: x-spec nonce data type, use types.BlockNonce
Refactors to use existing BlockNonce type instead of
hand-rolled bytes logic.
2019-12-03 13:49:51 +01:00
meowsbits
3783dd50dc tests: enable TransactionTests Istanbul case (#20337) 2019-12-03 13:49:23 +01:00
Péter Szilágyi
ca19429585 build, travis: use ephemeral debsrc GOPATH to get mod deps 2019-12-03 13:49:15 +01:00
meows
d9b7d4aacd tests: refactor TestState to dedupe walk callback
Minor refactoring.
2019-12-03 13:49:06 +01:00
Péter Szilágyi
c63030fbd7 mobile: fix CopyFile switch to package cp 2019-12-03 13:48:16 +01:00
Péter Szilágyi
26d96e849d travis: fake build ppa only for go module dependencies 2019-12-03 13:48:01 +01:00
Péter Szilágyi
2075c3f501 build, internal/build: drop own file/folder copier 2019-12-03 13:47:50 +01:00
Péter Szilágyi
36b44ed1dc go.mod: tidy up the modules to avoid xgo writes to go.sum 2019-12-03 13:47:28 +01:00
Péter Szilágyi
1dea28a9b1 travis, build: aggregate and upload go mod dependencies for PPA 2019-12-03 13:47:02 +01:00
Péter Szilágyi
4296dc90a9 accounts/abi/bind: switch binding test to go modules 2019-12-03 13:46:54 +01:00
Péter Szilágyi
3e6d939e55 travis: explicitly enable go modules in Go 1.11 and 1.12 2019-12-03 13:46:44 +01:00
Péter Szilágyi
a2b2f58d65 go.mod, vendor: switch to Go modules 2019-12-03 13:46:36 +01:00
gary rong
157a52dd45 cmd/puppeth: update chain spec of parity (#20241) 2019-12-03 13:45:56 +01:00
gary rong
43eb7f7aee miner: fix data race in tests (#20310)
* miner: fix data race in tests

miner: fix linter

* miner: address comment
2019-12-03 13:45:42 +01:00
Felix Lange
b48ec1de03 core: fix staticcheck warnings (#20323) 2019-12-03 13:45:11 +01:00
Felix Lange
d6f144ceb0 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-03 13:44:56 +01:00
Felix Lange
3a558d2460 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-03 13:44:43 +01:00
Felix Lange
037ffe84b4 p2p/simulations: fix staticcheck warnings (#20322) 2019-12-03 13:44:24 +01:00
Felix Lange
dbb37473bc p2p: remove unused code (#20325) 2019-12-03 13:44:16 +01:00
Felix Lange
3101dbdee6 whisper/whisperv6: fix staticcheck warnings (#20328) 2019-12-03 13:44:07 +01:00
Guillaume Ballet
af843d59d3 .github: remove 'nonsense' from CODEOWNERS (#20329) 2019-12-03 13:43:48 +01:00
Felix Lange
ee5bab7d92 event: remove unused field 'closed' (#20324) 2019-12-03 13:43:40 +01:00
Felix Lange
8478708f11 cmd/wnode: remove uses of common.ToHex (#20327) 2019-12-03 13:43:32 +01:00
Felix Lange
870e96ef8a ethclient: remove use of common.ToHex (#20326) 2019-12-03 13:43:13 +01:00
Guillaume Ballet
f8e5f21086 travis: deactivate arm build during push (#20321) 2019-12-03 13:43:05 +01:00
gary rong
215f99b49e 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-03 13:42:54 +01:00
Felix Lange
686292a7c1 p2p/netutil: fix staticcheck warning (#20315) 2019-12-03 13:41:34 +01:00
Felix Lange
121cc658b4 cmd/ethkey: fix file permissions in changepassword command (#20313)
Found by staticcheck.
2019-12-03 13:41:22 +01:00
Felix Lange
289f4bed9d consensus/clique: fix struct tags for status API (#20316)
Also unexport the status struct.
2019-12-03 13:41:13 +01:00
Martin Holst Swende
fac347e655 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-03 13:40:58 +01:00
Felix Lange
38143122a0 cmd/clef: fix staticcheck warnings (#20314) 2019-12-03 13:40:28 +01:00
meowsbits
fd0c320435 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-03 13:40:18 +01:00
Guillaume Ballet
5f56e8bdf0 travis: use travis_wait for both install and build (#20309) 2019-12-03 13:40:08 +01:00
Felföldi Zsolt
2e7608ed59 les: rename UpdateBalance to AddBalance and simplify return format (#20304) 2019-12-03 13:39:59 +01:00
meowsbits
01fc57807c 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-03 13:39:28 +01:00
Guillaume Ballet
4515ef530c 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-03 13:39:18 +01:00
Felix Lange
1314aeebdb 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-03 13:38:59 +01:00
Felix Lange
2167e1455e 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-03 13:37:18 +01:00
Michael Forney
1f01ebb26c 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-03 13:36:01 +01:00