Commit Graph

11590 Commits

Author SHA1 Message Date
Martin Holst Swende
2ca89ea479 cmd/evm: evm input minor fixes (#19740)
* cmd/evm: evm input minor fixes, handle prefix, validate length, fixes #18041

* cmd/evm: remove whitespace
2019-06-25 11:03:04 +03:00
Martin Holst Swende
1da5e0ebb0 core/state, cmd/geth: streaming json output for dump command (#15475)
* core/state, cmd/geth: streaming json output dump cmd + optional code+storage

* dump: add option to continue even if preimages are missing

* core, evm: lint nits

* cmd: use local flags for dump, omit empty code/storage

* core/state: fix state dump test
2019-06-24 17:16:44 +03:00
salanfe
e4a1488b2f abi: adding the method EventByID and its test (#19359)
This function searches for an event+parameters in the ABI and returns it if found.

Co-authored-by: Victor Tran <vu.tran54@gmail.com>
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
2019-06-24 12:52:50 +02:00
Rob Mulholand
98099d6fa7 rpc: fix subscription buffer documentation and test (#19747)
This PR updates a comment about the maximum client subscription buffer
to reflect changes made previously, and fixes a test that wouldn't fail
when wantError == true but execution did not return an error.
2019-06-24 12:43:18 +02:00
Kurkó Mihály
92a90d7578 graphql: check the integrity of the CDN files (#19742)
* graphql: check the integrity of the cdn files

* graphql: omit go-bindata
2019-06-24 11:56:55 +03:00
Martin Holst Swende
f578d41ee6 core/vm, internal/ethapi: fail on eth_call when it times out, fixes #19186 (#19737) 2019-06-24 11:54:06 +03:00
lash
cdadf57bf9 p2p/simulations: Enable access to MsgEvents with execadapter (#19749) 2019-06-21 13:45:32 +02:00
Felix Lange
60c062e17d core: move TxPool reorg and events to background goroutine (#19705)
* core: move TxPool reorg and events to background goroutine

This change moves internal queue re-shuffling work in TxPool to a
background goroutine, TxPool.runReorg. Requests to execute runReorg are
accumulated by the new scheduleReorgLoop. The new loop also accumulates
transaction events.

The motivation for this change is making sends to txFeed synchronous
instead of sending them in one-off goroutines launched by 'add' and
'promoteExecutables'. If a downstream consumer of txFeed is blocked for
a while, reorg requests and events will queue up.

* core: remove homestead check in TxPool

This change removes tracking of the homestead block number from TxPool.
The homestead field was used to enforce minimum gas of 53000 for
contract creations after the homestead fork, but not before it. Since
nobody would want configure a non-homestead chain nowadays and contract
creations usually take more than 53000 gas, the extra correctness is
redundant and can be removed.

* core: fixes for review comments

* core: remove BenchmarkPoolInsert

This is useless now because there is no separate code path for
individual transactions anymore.

* core: fix pending counter metric

* core: fix pool tests

* core: dedup txpool announced events, discard stales

* core: reorg tx promotion/demotion to avoid weird pending gaps
2019-06-21 11:29:14 +03:00
Martin Holst Swende
25c3282cf1
mobile: fix comment typos (#19741) 2019-06-20 11:38:31 +02:00
Péter Szilágyi
1eddd332d2
Merge pull request #19680 from holiman/bootnode_update
params: add new bootnodes
2019-06-20 12:09:37 +03:00
Péter Szilágyi
c94068a8bb
Merge pull request #19700 from karalabe/cleanup-graphql
cmd, graphql, node: graphql flag polishes, les integration
2019-06-20 09:54:53 +03:00
Péter Szilágyi
e3ec77f50e
cmd, graphql, node: graphql flag polishes, les integration 2019-06-20 09:40:26 +03:00
Felix Lange
8d815e365c rpc: fix rare deadlock when canceling HTTP call context (#19715)
When cancelling the context for a call on a HTTP-based client while the
call is running, the select in requestOp.wait may hit the <-context.Done()
case instead of the <-op.resp case. This doesn't happen often -- our
cancel test hasn't caught this even though it ran thousands of times
on CI since the RPC client was added.

Fixes #19714
2019-06-20 09:36:27 +03:00
Martin Holst Swende
3271a5afa0 miner: don't update pending state when no transactions are added (#19734)
* miner: don't update pending state when no transactions are added

* miner: avoid transaction processing when pending block is already full
2019-06-19 14:09:28 +03:00
Guillaume Ballet
2b303e7d62 clef: fix stutter in warning message (#19736) 2019-06-19 11:43:04 +02:00
Péter Szilágyi
96f8be36ad
Merge pull request #19732 from karalabe/simulated-eip155
accounts/abi/bind/backends: use EIP155 on the simulated chain
2019-06-18 12:14:00 +03:00
Péter Szilágyi
38c914be64
accounts/abi/bind/backends: use EIP155 on the simulated chain 2019-06-18 11:49:30 +03:00
Péter Szilágyi
cf47ee5339
Merge pull request #19731 from holiman/fix_19707
accounts/keystore: fix #19707, avoid keyword as variable name
2019-06-18 11:24:11 +03:00
Martin Holst Swende
2046d66fe5
accounts/keystore: fix #19707, avoid keyword as variable name 2019-06-18 09:46:56 +02:00
Péter Szilágyi
d6ccfd92f7
Merge pull request #19725 from karalabe/goroutine-metrics
metrics: gather and export threads and goroutines
2019-06-17 10:58:44 +03:00
Péter Szilágyi
5298eb7519
metrics: gather and export threads and goroutines 2019-06-17 10:53:17 +03:00
Samuel Marks
79c90dce20 appveyor: bump to Go 1.12.6 (#19709)
* appveyor: bump to Go 1.12.6

* vendor/vendor.json: govendor fetch github.com/karalabe/usb/^
2019-06-13 22:48:04 +03:00
Giulio
2da6d1e047 README.md: update formatting (#19532) 2019-06-13 15:23:22 +02:00
Felix Lange
f213ceb83f p2p: add more info to peer addition and removal logs (#19712) 2019-06-13 11:51:11 +02:00
gary rong
c8c3ebd593 les: reject client if it makes too many invalid requests (#19691)
* les: reject client connection if it makes too much invalid req

* les: address comments

* les: use uint32

* les: fix variable name

* les: add invalid counter for duplicate invalid req
2019-06-12 14:09:40 +03:00
Marius van der Wijden
b3f7609d7d accounts/abi/bind: rename NewKeystoreTransactor (#19703)
renamed NewKeyStoreFromTransactor to NewKeystoreTransactor
fixed godoc
2019-06-12 14:06:37 +03:00
Péter Szilágyi
32dafea1f0
Merge pull request #19701 from holiman/fixles
les/handler: avoid lookup missing state
2019-06-12 13:08:42 +03:00
Péter Szilágyi
3d7d7384ca
Merge pull request #19702 from karalabe/txprop-stricter-limiting
eth: enforce stricter known limits on idle peers
2019-06-12 13:07:56 +03:00
Péter Szilágyi
fc4fee8649
eth: enforce stricter known limits on idle peers 2019-06-12 12:30:06 +03:00
Martin Holst Swende
3675b8545d
les/handler: avoid lookup missing state 2019-06-12 11:18:49 +02:00
Felix Lange
50e3795eef core/types: document RawSignatureValues (#19695) 2019-06-12 10:22:33 +03:00
Kurkó Mihály
c4e8806d9b dashboard: update yarn.lock (#19697) 2019-06-12 10:01:57 +03:00
Felix Lange
2b54666018 ethclient, internal/ethapi: add support for EIP-695 (eth_chainId) (#19694)
EIP-695 was written in 2017. Parity and Infura have support for this
method and we should, too.
2019-06-11 14:12:33 +03:00
Felix Lange
c420dcb39c
p2p: enforce connection retry limit on server side (#19684)
The dialer limits itself to one attempt every 30s. Apply the same limit
in Server and reject peers which try to connect too eagerly. The check
against the limit happens right after accepting the connection.

Further changes in this commit ensure we pass the Server logger
down to Peer instances, discovery and dialState. Unit test logging now
works in all Server tests.
2019-06-11 12:45:33 +02:00
gary rong
c0a034ec89 eth, les: reject stale request (#19689)
* eth, les: reject stale request

* les: reuse local head number
2019-06-11 10:40:32 +03:00
Péter Szilágyi
3d3e83ecff
Merge pull request #19692 from karalabe/metrics-extensions
core, ethdb, metrics, p2p: expose various counter metrics for grafana
2019-06-11 10:07:41 +03:00
Péter Szilágyi
b02958b9c5
core, ethdb, metrics, p2p: expose various counter metrics for grafana 2019-06-11 09:49:13 +03:00
Frank Szendzielarz
f9c0e093ed core/rawdb: avoid O_APPEND (#19676)
* Fix file system access for Windows

* Encapsulate file accesses

* Style fixes
2019-06-10 12:45:12 +03:00
Marius van der Wijden
6f80629383 accounts: added transactorFromKeyStore (#19685) 2019-06-08 15:19:26 +02:00
Felix Lange
afb9e6513f vendor: remove unused dependencies (#19683)
* vendor: remove unused dependencies

These were used by swarm code, which has now migrated to its own repository.

* travis.yml: remove sudo requirement for test builders

These needed sudo to run FUSE tests for swarm.
2019-06-07 17:51:18 +03:00
Felix Lange
e83c3ccc47
p2p/enode: improve IPv6 support, add ENR text representation (#19663)
* p2p/enr: add entries for for IPv4/IPv6 separation

This adds entry types for "ip6", "udp6", "tcp6" keys. The IP type stays
around because removing it would break a lot of code and force everyone
to care about the distinction.

* p2p/enode: track IPv4 and IPv6 address separately

LocalNode predicts the local node's UDP endpoint and updates the record.
This change makes it predict IPv4 and IPv6 endpoints separately since
they can now be in the record at the same time.

* p2p/enode: implement base64 text format
* all: switch to enode.Parse(...)

This allows passing base64-encoded node records to all the places that
previously accepted enode:// URLs. The URL format is still supported.

* cmd/bootnode, p2p: log node URL instead of ENR

...and return the base64 record in NodeInfo.
2019-06-07 15:31:00 +02:00
Felix Lange
896322bf88
cmd/devp2p: add devp2p debug tool (#19657)
* p2p/discover: export Ping and RequestENR

These two are useful for checking the status of a node.

* cmd/devp2p: add devp2p debug tool

This is a new tool for debugging p2p issues. It supports a few
basic tasks for now, but many more things can and will be added
in the near future.

   devp2p enrdump            -- prints ENRs readably
   devp2p discv4 ping        -- checks if a node is up
   devp2p discv4 requestenr  -- gets a node's record
   devp2p discv4 resolve     -- finds a node through the DHT
2019-06-07 15:29:16 +02:00
Guillaume Ballet
1b15c6da33 accounts/scwallet: Disable macos support (#19679) 2019-06-07 12:41:54 +03:00
Péter Szilágyi
ce43c2366d
Merge pull request #19681 from karalabe/fix-libusb-docker
vendor: pull in USB fix for docker (alpine/musl)
2019-06-07 12:37:32 +03:00
Péter Szilágyi
9805288cdd
vendor: pull in USB fix for docker (alpine/musl) 2019-06-07 12:30:50 +03:00
Martin Holst Swende
a4eeeedb37
params: add new bootnodes 2019-06-07 10:55:45 +02:00
Ethan Heilman
19fa9064d7 SECURITY.md: create security policy (#19666)
Github has started supporting SECURITY.md to contain a project's security policy. Adding this information to the repository makes it easier to determine how to disclosure a vulnerability as SECURITY.md becomes a standard.

The pgp fingerprint and key is taken from bounty.ethereum.org.
2019-06-06 14:40:52 +02:00
Péter Szilágyi
f01f3f266c
Merge pull request #19674 from karalabe/usb-ios-fixup
vendor: pull fixed usb library for nocgo builds
2019-06-06 12:50:03 +03:00
Péter Szilágyi
c52390d078
vendor: pull fixed usb library for nocgo builds 2019-06-06 12:25:32 +03:00
Nguyen Kien Trung
2823ce0086 eth: check for DefaultConfig.NetworkId in test (#17599)
This makes the test work if NetworkId is changed in forks of go-ethereum.
2019-06-06 10:49:35 +02:00