Commit Graph

11379 Commits

Author SHA1 Message Date
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 9b7fd9af80/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
gary rong
b9bac1f384 les: fix and slim the unit tests of les (#20247)
* les: loose restriction of unit tests

* les: update unit tests

* les, light: slim the unit tests
2019-11-06 22:09:37 +01:00
Péter Szilágyi
fc3661f89c
Merge pull request #20248 from karalabe/cht-1.9.7
params: hard-code new CHTs for the 1.9.7 release
2019-11-06 17:54:39 +02:00
Péter Szilágyi
9948724deb
params: hard-code new CHTs for the 1.9.7 release 2019-11-06 17:47:13 +02:00
Péter Szilágyi
c702bd70ed
travis: bump linter to Go 1.13.x 2019-11-05 15:35:51 +02:00
Péter Szilágyi
734e00af9e
travis, build, internal: use own Go bundle for PPA builds (#20240)
* build: bump PPAs to Go 1.13 (via longsleep), keep Trusty on 1.11

* travis, build, vendor: use own Go bundle for PPA builds

* travis, build, internal, vendor: smarter Go bundler, own untar

* build: updated ci-notes with new Go bundling, only make, don't test
2019-11-05 15:32:42 +02:00
Martin Holst Swende
b566cfdffd core/evm: avoid copying memory for input in calls (#20177)
* core/evm, contracts: avoid copying memory for input in calls + make ecrecover not modify input buffer

* core/vm: optimize mstore a bit

* core/vm: change Get -> GetCopy in vm memory access
2019-11-04 11:31:09 +02:00
gary rong
7a6d5d0cce cmd/puppeth: integrate istanbul into puppeth (#19926)
* cmd/puppeth: integrate istanbul into puppeth

* cmd/puppeth: address comment

* cmd/puppeth: use hexutil.Big for fork indicator

* cmd/puppeth: finalize istanbul fork

* cmd/puppeth: fix 2200 for parity, rename is to eip1283ReenableTransition

* cmd/puppeth: fix eip1108

* cmd/puppeth: add blake2f for parity

* cmd/puppeth: add aleth istanbul precompiled

* cmd/puppeth: use hexutil.Big

* cmd/puppeth: fix unit tests

* cmd/puppeth: update testdata
2019-11-04 10:41:29 +02:00
Péter Szilágyi
0ff7380465
Merge pull request #20231 from SamuelMarks/go1.13.4
appveyor: bump to Go 1.13.4
2019-11-04 10:38:10 +02:00
gary rong
0ce5e113be les: rework clientpool (#20077)
* les: rework clientpool
2019-11-02 13:02:35 +01:00
Samuel Marks
86fe283d19
appveyor: bump to Go 1.13.4 2019-11-02 18:54:04 +11:00
gary rong
44b74cfc40 accounts/abi: add internalType information and fix issues (#20179)
* accounts/abi: fix various issues

The fixed issues include:

(1) If there is no return in a call function, unpack should
return nil error

(2) For some functions which have struct array as parameter,
it will also be detected and generate the struct definition

(3) For event, if it has non-indexed parameter, the parameter
name will also be assigned if empty. Also the internal struct
will be detected and generate struct defition if not exist.

(4) Fix annotation generation in event function

* accounts/abi: add new abi field internalType

* accounts: address comments and add tests

* accounts/abi: replace strings.ReplaceAll with strings.Replace
2019-10-31 14:17:51 +01:00
Martin Holst Swende
9278951a62 params, core/forkid: configure mainnet istanbul block 9069K (#20222)
* params: configure mainnet istanbul block 9069K

* core/forkid: add some more test items for mainnet istanbul
2019-10-31 11:04:26 +02:00
Péter Szilágyi
12f2a25d5e
Merge pull request #20225 from karalabe/forkid-eth-handshake-verification-plus
cmd/devp2p, core/forkid: make forkid.Filter API uniform
2019-10-31 10:58:28 +02:00