Commit Graph

7552 Commits

Author SHA1 Message Date
Péter Szilágyi
f81cff539a Merge pull request #2923 from Arachnid/tracing
core: Refactor tracing to make Tracer the main interface
2016-08-22 12:31:47 +03:00
Nick Johnson
781915f183 core/vm: Refactor tracing to make Tracer the main interface
This CL makes several refactors:
 - Define a Tracer interface, implementing the `CaptureState` method
 - Add the VM environment as the first argument of
   `Tracer.CaptureState`
 - Rename existing functionality `StructLogger` an make it an
   implementation of `Tracer`
 - Delete `StructLogCollector` and make `StructLogger` collect the logs
   directly
 - Change all callers to use the new `StructLogger` where necessary and
   extract logs from that.
 - Deletes the apparently obsolete and likely nonfunctional 'TraceCall'
   from the eth API.

Callers that only wish accumulated logs can use the `StructLogger`
implementation straightforwardly. Callers that wish to efficiently
capture VM traces and operate on them without excessive copying can now
implement the `Tracer` interface to receive VM state at each step and
do with it as they wish.

This CL also removes the accumulation of logs from the vm.Environment;
this was necessary as part of the refactor, but also simplifies it by
removing a responsibility that doesn't directly belong to the
Environment.
2016-08-22 09:26:15 +01:00
Péter Szilágyi
37bda7e029 Merge pull request #2921 from karalabe/fix-fetcher-log
eth/fetcher: fix a log message formatting issue
2016-08-19 17:30:34 +03:00
Péter Szilágyi
454dc9b7c2 eth/fetcher: fix a log message formatting issue 2016-08-19 14:04:03 +03:00
Felix Lange
475521dd74 Merge pull request #2909 from fjl/account-manager-cleanup
all: clean up tech debt left behind by the API split
2016-08-17 20:59:59 +02:00
Felix Lange
3c09c5f12d core, miner: move Backend to miner
This ensures that package core doesn't depend on package accounts and
resolves an age-old TODO.
2016-08-17 17:39:04 +02:00
Felix Lange
1a9e66915b common/compiler: simplify solc wrapper
Support for legacy version 0.9.x is gone. The compiler version is no
longer cached. Compilation results (and the version) are read directly
from stdout using the --combined-json flag. As a workaround for
ethereum/solidity#651, source code is written to a temporary file before
compilation.

Integration of solc in package ethapi and cmd/abigen is now much simpler
because the compiler wrapper is no longer passed around as a pointer.

Fixes #2806, accidentally
2016-08-17 17:39:04 +02:00
Felix Lange
84d11c19fd eth: remove dapp database remains 2016-08-17 17:39:03 +02:00
Felix Lange
312263c7d9 cmd/utils, node: create account manager in package node
The account manager was previously created by packge cmd/utils as part
of flag processing and then passed down into eth.Ethereum through its
config struct. Since we are starting to create nodes which do not have
eth.Ethereum as a registered service, the code was rearranged to
register the account manager as its own service. Making it a service is
ugly though and it doesn't really fix the root cause: creating nodes
without eth.Ethereum requires duplicating lots of code.

This commit splits utils.MakeSystemNode into three functions, making
creation of other node/service configurations easier. It also moves the
account manager into Node so it can be used by those configurations
without requiring package eth.
2016-08-17 17:39:03 +02:00
Felix Lange
3369783e0a Merge pull request #2885 from bas-vk/subscriptions
rpc: refactor subscriptions and filters
2016-08-17 17:14:42 +02:00
Bas van Kervel
47ff813012 rpc: refactor subscriptions and filters 2016-08-17 12:59:58 +02:00
Nick Johnson
3b39d4d1c1 Merge pull request #2913 from karalabe/travis-go-1.7
TravisCI: add Go 1.7 targets, bump PPA to 1.7 too
2016-08-17 09:22:58 +01:00
Péter Szilágyi
2fab2b310b TravisCI: add Go 1.7 targets, bump PPA to 1.7 too 2016-08-17 10:05:59 +03:00
Felix Lange
c2ac4465cd Merge pull request #2873 from bas-vk/canonicalblock
core: ensure the canonical block is written before the canonical hash is set
2016-08-16 20:16:48 +02:00
Bas van Kervel
bb8059f6aa core: ensure the canonical block is written before the canonical hash is set 2016-08-16 15:21:22 +02:00
Péter Szilágyi
4c2cc32f2e Makefile: support building for the MIPS64 platforms (#2682) 2016-08-16 09:52:24 +02:00
Péter Szilágyi
89a3fbc0fb Merge pull request #2866 from karalabe/downloader-future-ancestors
eth/downloader: fewer headers and futures too in ancestor lookup
2016-08-16 10:01:52 +03:00
cdetrio
077353b47e console: fix return via callbacks (#2910)
Fixes #2872
2016-08-15 23:52:47 +02:00
Péter Szilágyi
d6625ac34d Merge pull request #2891 from fjl/rpc-client-fixes
rpc: client bug fixes
2016-08-09 11:51:01 +03:00
Péter Szilágyi
b46b36729f Merge pull request #2868 from karalabe/downloader-abort-master-drop
eth/downloader: abort sync if master drops (timeout prev)
2016-08-09 11:39:24 +03:00
Péter Szilágyi
893fabd336 Merge pull request #2867 from karalabe/dao-challenge-finish
eth, eth/downloader: don't forward the DAO challenge header
2016-08-09 11:39:13 +03:00
Péter Szilágyi
44ea0da2b0 Merge pull request #2861 from karalabe/track-peer-heads-properly
eth, eth/downloader: better remote head tracking
2016-08-09 11:38:34 +03:00
Felix Lange
4f4e1026f5 Merge pull request #2896 from karalabe/fix-xgo-crossbuilds
Makefile, build: move cross compilation into ci.go
2016-08-08 19:56:18 +02:00
Péter Szilágyi
8c23f20c68 Makefile, build: move cross compilation into ci.go 2016-08-08 13:45:44 +03:00
Felix Lange
4f65227971 Merge pull request #2892 from fjl/vm-hide-ecrecover-message
core/vm: hide ecrecover error message
2016-08-05 23:19:10 +02:00
Felix Lange
e4736fe469 core/vm: hide ecrecover error message
Fixes #2825
2016-08-05 23:12:52 +02:00
Felix Lange
e32925397b rpc: add context argument to EthSubscribe
It's inconsistent not to pass it and most callers will
work with contexts anyway.
2016-08-05 20:48:33 +02:00
Felix Lange
f5f042ffdc rpc: ensure client doesn't block for slow subscribers
I initially made the client block if the 100-element buffer was
exceeded. It turns out that this is inconvenient for simple uses of the
client which subscribe and perform calls on the same goroutine, e.g.

    client, _ := rpc.Dial(...)
    ch := make(chan int) // note: no buffer
    sub, _ := client.EthSubscribe(ch, "something")
    for event := range ch {
        client.Call(...)
    }

This innocent looking code will lock up if the server suddenly decides
to send 2000 notifications. In this case, the client's main loop won't
accept the call because it is trying to deliver a notification to ch.

The issue is kind of hard to explain in the docs and few people will
actually read them. Buffering is the simple option and works with close
to no overhead for subscribers that always listen.
2016-08-05 20:48:33 +02:00
Felix Lange
d445a9aafb Merge pull request #2889 from fjl/godeps-update-notify
Godeps: update github.com/rjeczalik/notify to f627deca7a51
2016-08-05 19:29:59 +02:00
Felix Lange
464660651d rpc: don't exceed context deadline while waiting for send lock 2016-08-05 13:27:02 +02:00
Felix Lange
4be37222ef Godeps: update github.com/rjeczalik/notify to f627deca7a51
Fixes #2829
2016-08-04 21:20:08 +02:00
Felix Lange
b8ba80bff7 Merge pull request #2740 from Firescar96/removepeer
node, p2p, internal: Add ability to remove peers via admin interface
2016-07-29 12:34:28 +02:00
Péter Szilágyi
8ec6ccc54d Merge pull request #2870 from lukeyeager/patch-1
Fix README typo
2016-07-27 10:49:04 +03:00
Luke Yeager
1ca9e552d9 README: Fix typo
"fine graned" -> "fine-grained"
2016-07-26 17:23:20 -07:00
Péter Szilágyi
8f0a4a25f8 eth/downloader: abort sync if master drops (timeout prev) 2016-07-26 13:07:12 +03:00
Péter Szilágyi
071af57bcf eth, eth/downloader: don't forward the DAO challenge header 2016-07-26 12:26:41 +03:00
Péter Szilágyi
d68865f3b1 eth/downloader: fewer headers and futures too un ancestor lookup 2016-07-26 11:15:38 +03:00
Péter Szilágyi
a724952f75 Merge pull request #2862 from yep/faster-git-clone
containers/docker: use shallow clone of single branch
2016-07-26 09:51:47 +03:00
yep
a4215f469c containers/docker: whitespace changes only, make future diffs more readable 2016-07-25 16:39:00 +02:00
yep
4c1abcb0ce containers/docker: use shallow clone of single branch 2016-07-25 16:38:46 +02:00
Péter Szilágyi
1dd272080d eth, eth/downloader: better remote head tracking 2016-07-25 15:14:14 +03:00
Felix Lange
3e3a79ea13 Merge pull request #2855 from karalabe/downloader-fix-stall-drop
eth/downloader: fix the stall checks/drops during sync
2016-07-25 12:56:11 +02:00
bas-vk
771655e3fe Merge pull request #2808 from fjl/rpc-client-3
rpc: add new client, use it everywhere
2016-07-25 10:07:05 +02:00
Felix Lange
60cd5bf939 Merge pull request #2842 from fjl/downloader-remove-eth61
eth, eth/downloader, eth/fetcher: delete eth/61 sync code
2016-07-22 23:23:30 +02:00
Felix Lange
91b7690428 rpc: add new client, use it everywhere
The new client implementation supports concurrent requests,
subscriptions and replaces the various ad hoc RPC clients
throughout go-ethereum.
2016-07-22 23:21:27 +02:00
Felix Lange
bb01bea4e2 rpc: fix bad method error for batch requests
If a batch request contained an invalid method, the server would reply
with a non-batch error response. Fix this by tracking an error for each
batch element.
2016-07-22 23:21:27 +02:00
Felix Lange
c145589f25 rpc: remove grace period when shutting down the server
The server delayed closing of connections for 3s when stopping. This was
supposed to allow for slow handlers, but it didn't really work. When
geth quits, it will just exit immediately after quitting the server.

Removing the timer makes testing easier because all connections will be
closed after Stop returns.
2016-07-22 23:21:27 +02:00
Péter Szilágyi
c7c82f1b44 eth/downloader: fix the stall checks/drops during sync 2016-07-22 17:55:46 +03:00
Péter Szilágyi
f58ac2b46b Merge pull request #2712 from bas-vk/sendtx
eth/api: rename signAndSendTransaction to sendTransaction
2016-07-22 14:28:21 +03:00
Felix Lange
016007bd25 eth, eth/downloader, eth/fetcher: delete eth/61 code
The eth/61 protocol was disabled in #2776, this commit removes its
message handlers and hash-chain sync logic.
2016-07-22 13:17:19 +02:00