Commit Graph

7907 Commits

Author SHA1 Message Date
Felix Lange
056f15aa53 accounts/abi/bind/backends: remove nil and remote backends
The remote backend is superseded by ethclient.

The nil backend's stated purpose was to enable testing of
accounts/abi/bind. None of its methods actually worked. A much simpler
way to get a crashing backend is to simply pass nil as the backend. With
a one-line change to the generator (removing two explicit interface
assertions), passing nil actually works.

Removing these backends means that less changes are required later.
2016-08-21 17:06:25 +02: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
Jordan Cohen
b3d7a5c5d0 README: docker run example 2016-08-18 12:49:42 -04: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
Felix Lange
46621fd2c3 ethclient: add initial implementation of the typed RPC client
ethclient implements the proposed Ethereum Go API. There are no tests at
the moment, a suite that excercises all implementations of the API will
be added later.
2016-08-10 00:01:13 +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
8d9141ed9a ethereum: add new Go API interfaces 2016-08-05 13:25:52 +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
b0d9f7372a internal/ethapi: add missing output fields
- returned headers didn't include mixHash
- returned transactions didn't include signature fields
- empty transaction input was returned as "", but should be "0x"
- returned receipts didn't include the bloom filter
- "root" in receipts was missing 0x prefix
2016-08-04 01:40:50 +02:00
Felix Lange
704fde01e8 core/types, core/vm: improve docs, add JSON marshaling methods
In this commit, core/types's types learn how to encode and decode
themselves as JSON. The encoding is very similar to what the RPC API
uses. The RPC API is missing some output fields (e.g. transaction
signature values) which will be added to the API in a later commit. Some
fields that the API generates are ignored by the decoder methods here.
2016-08-04 03:55:33 +02:00
Felix Lange
0c9a858f2d eth: don't call ValidateFields
ValidateFields was introduced before the rlp decoder disallowed nil
values. Decoding RLP will never return nil values, there is no need
to check for them.
2016-08-04 03:30:05 +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