Commit Graph

309 Commits

Author SHA1 Message Date
Felföldi Zsolt
9aca9e6deb cmd, les, eth, eth/gasprice: using new gas price oracle (#13853)
* cmd, les, eth, eth/gasprice: using new gas price oracle

* eth/gasprice: renamed source file

* eth/gasprice: added security checks for gpo params

* eth/gasprice: fixed naming issues

* eth/gasprice: max limit, maxEmpty
2017-04-06 17:20:42 +03:00
Péter Szilágyi
09777952ee core, consensus: pluggable consensus engines (#3817)
This commit adds pluggable consensus engines to go-ethereum. In short, it
introduces a generic consensus interface, and refactors the entire codebase to
use this interface.
2017-04-05 00:16:29 +02:00
Felix Lange
37dd9086ec core: refactor genesis handling
This commit solves several issues concerning the genesis block:

* Genesis/ChainConfig loading was handled by cmd/geth code. This left
  library users in the cold. They could specify a JSON-encoded
  string and overwrite the config, but didn't get any of the additional
  checks performed by geth.
* Decoding and writing of genesis JSON was conflated in
  WriteGenesisBlock. This made it a lot harder to embed the genesis
  block into the forthcoming config file loader. This commit changes
  things so there is a single Genesis type that represents genesis
  blocks. All uses of Write*Genesis* are changed to use the new type
  instead.
* If the chain config supplied by the user was incompatible with the
  current chain (i.e. the chain had already advanced beyond a scheduled
  fork), it got overwritten. This is not an issue in practice because
  previous forks have always had the highest total difficulty. It might
  matter in the future though. The new code reverts the local chain to
  the point of the fork when upgrading configuration.

The change to genesis block data removes compression library
dependencies from package core.
2017-03-23 15:58:43 +01:00
Péter Szilágyi
b7d93500f1 all: finish integrating Go ethash, delete C++ vendor 2017-03-09 15:50:14 +01:00
Péter Szilágyi
023670f6ba cmd, eth, les, node, pow: disk caching and progress reports 2017-03-09 15:50:14 +01:00
Péter Szilágyi
567d41d936 all: swap out the C++ ethash to the pure Go one (mining todo) 2017-03-09 15:50:14 +01:00
Péter Szilágyi
9184249b39 Logger updates 3 (#3730)
* accounts, cmd, eth, ethdb: port logs over to new system

* ethdb: drop concept of cache distribution between dbs

* eth: fix some log nitpicks to make them nicer
2017-03-02 14:06:16 +01:00
Péter Szilágyi
46bcd9a92c
core, eth: drop database block splitting upgrader 2017-02-28 13:41:02 +02:00
Péter Szilágyi
d4fd06c3dc
all: blidly swap out glog to our log15, logs need rework 2017-02-23 12:16:44 +02:00
Péter Szilágyi
fad5eb0a87
accounts, cmd, eth, internal, miner, node: wallets and HD APIs 2017-02-13 14:00:07 +02:00
Péter Szilágyi
833e4d1319
accounts, cmd, eth, internal, mobile, node: split account backends 2017-02-13 14:00:02 +02:00
Zsolt Felfoldi
12379c697a les: remove delayed les server starting 2017-01-26 04:23:53 +01:00
Péter Szilágyi
d63752ef4d Merge pull request #3579 from bas-vk/natspec
cmd,eth,les,internal: remove natspec support
2017-01-17 14:38:57 +02:00
Nick Johnson
17d92233d9 cmd/geth, core: add support for recording SHA3 preimages (#3543) 2017-01-17 12:19:50 +01:00
Bas van Kervel
54a65e6d87
cmd,eth,les,internal: remove natspec support 2017-01-17 12:13:50 +01:00
Péter Szilágyi
2ce30382d9
cmd/utils, eth, les: bubble --fakepow flag into eth/les too 2017-01-04 10:42:41 +02:00
Zsolt Felfoldi
c57c54ce96 eth, les: defer starting LES service until ETH initial sync is finished 2016-12-10 09:53:25 +01:00
Jeffrey Wilcke
b8c766a9c5 eth: removed http doc backend api 2016-11-25 12:17:10 +01:00
Felix Lange
18d51d1de8 common/registrar: delete the old registrar code
The registrar was broken, unmaintained and there is a much better
replacement: ENS.

(cherry picked from commit 6ca8f57b08d550613175260cab7633adcacbe6ab)
2016-11-25 12:15:28 +01:00
Jeffrey Wilcke
c04c8f10f0 core: improved bad block error reporting (#3320) 2016-11-23 13:32:25 +01:00
Jeffrey Wilcke
445feaeef5 core, core/state, trie: EIP158, reprice & skip empty account write
This commit implements EIP158 part 1, 2, 3 & 4

1. If an account is empty it's no longer written to the trie. An empty
  account is defined as (balance=0, nonce=0, storage=0, code=0).
2. Delete an empty account if it's touched
3. An empty account is redefined as either non-existent or empty.
4. Zero value calls and zero value suicides no longer consume the 25k
  reation costs.

params: moved core/config to params

Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
2016-11-13 10:44:04 +01:00
Zsolt Felfoldi
49da42983a p2p/discv5: added new topic discovery package 2016-11-09 02:12:53 +01:00
zsfelfoldi
7db7109a5b cmd, eth: added light client and light server modes 2016-11-09 02:12:53 +01:00
Zsolt Felfoldi
9f8d192991 les: light client protocol and API 2016-11-09 02:12:53 +01:00
Péter Szilágyi
289b30715d Godeps, vendor: convert dependency management to trash (#3198)
This commit converts the dependency management from Godeps to the vendor
folder, also switching the tool from godep to trash. Since the upstream tool
lacks a few features proposed via a few PRs, until those PRs are merged in
(if), use github.com/karalabe/trash.

You can update dependencies via trash --update.

All dependencies have been updated to their latest version.

Parts of the build system are reworked to drop old notions of Godeps and
invocation of the go vet command so that it doesn't run against the vendor
folder, as that will just blow up during vetting.

The conversion drops OpenCL (and hence GPU mining support) from ethash and our
codebase. The short reasoning is that there's noone to maintain and having
opencl libs in our deps messes up builds as go install ./... tries to build
them, failing with unsatisfied link errors for the C OpenCL deps.

golang.org/x/net/context is not vendored in. We expect it to be fetched by the
user (i.e. using go get). To keep ci.go builds reproducible the package is
"vendored" in build/_vendor.
2016-10-28 19:05:01 +02:00
Péter Szilágyi
30860491ba cmd, eth: drop the blockchain version from cli/eth configs 2016-09-15 14:09:47 +03: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
Péter Szilágyi
6060e098c9 cmd, core, eth, params: implement flags to control dao fork blocks 2016-07-15 16:52:55 +03:00
Péter Szilágyi
96dc42d99c cmd, common, console, eth, release: drop redundant "full"s 2016-06-30 13:03:26 +03:00
zsfelfoldi
3a97280ae8 eth: separate common and full node-specific API and backend service 2016-06-16 17:36:38 +02:00
zsfelfoldi
f9917c8c7b core: improved chainDb using sequential keys 2016-06-07 16:38:56 +02:00
Bas van Kervel
64a6c2c1b6 eth: add new RPC method (personal.) SignAndSendTransaction 2016-05-20 15:54:18 +02:00
Felix Lange
56ed6152a1 core, eth, miner: improve shutdown synchronisation
Shutting down geth prints hundreds of annoying error messages in some
cases. The errors appear because the Stop method of eth.ProtocolManager,
miner.Miner and core.TxPool is asynchronous. Left over peer sessions
generate events which are processed after Stop even though the database
has already been closed.

The fix is to make Stop synchronous using sync.WaitGroup.

For eth.ProtocolManager, in order to make use of WaitGroup safe, we need
a way to stop new peer sessions from being added while waiting on the
WaitGroup. The eth protocol Run function now selects on a signaling
channel and adds to the WaitGroup only if ProtocolManager is not
shutting down.

For miner.worker and core.TxPool the number of goroutines is static,
WaitGroup can be used in the usual way without additional
synchronisation.
2016-05-09 13:03:08 +02:00
Péter Szilágyi
586eddfd09 release, all: integrate the release service into geth 2016-05-02 16:20:21 +03:00
Felix Lange
24cdac41f3 core, core/types, eth: add and use Block.Body
This fixes a few uses of unkeyed Body literals which go vet was
complaining about.
2016-04-15 10:57:37 +02:00
Péter Szilágyi
1e9b504ee7 Merge pull request #2284 from fjl/accounts-addr-cache
accounts: cache key addresses
2016-04-12 17:51:09 +03:00
Felix Lange
46e8940b19 accounts: streamline API
- Manager.Accounts no longer returns an error.
- Manager methods take Account instead of common.Address.
- All uses of Account with unkeyed fields are converted.
2016-04-12 15:58:01 +02:00
Péter Szilágyi
aceaaa5178 eth: gracefully fail if chain config is missing 2016-04-12 16:48:43 +03:00
Bas van Kervel
aa9fff3e68 rpc: various fixes/enhancements
rpc: be less restrictive on the request id
rpc: improved documentation
console: upgrade web3.js to version 0.16.0
rpc: cache http connections
rpc: rename wsDomains parameter to wsOrigins
2016-04-12 11:02:39 +02:00
Jeffrey Wilcke
ed92f116f7 Merge pull request #2407 from bas-vk/rpc-notifications
RPC pub sub
2016-04-05 09:43:32 +02:00
Felix Lange
cf842b3fe5 cmd/geth, eth: move --genesis deprecation warning to cmd/geth
This prevents display of the warning for --dev and --olympic.
2016-04-01 21:59:35 +02:00
Bas van Kervel
f7328c5ecb rpc: add pub/sub support 2016-04-01 18:26:35 +02:00
Jeffrey Wilcke
f0cbebb19f core: added basic chain configuration
Added chain configuration options and write out during genesis database
insertion. If no "config" was found, nothing is written to the database.

Configurations are written on a per genesis base. This means
that any chain (which is identified by it's genesis hash) can have their
own chain settings.
2016-04-01 01:01:10 +02:00
Jeffrey Wilcke
0cfa21fc7f core, eth, cmd: temporary work around for enabling the jit
This commit serves as a temporary workaround for enabling the jit until
the block customisation PR is merged in.
2016-03-23 23:02:44 +01:00
Péter Szilágyi
e90958cd29 cmd, eth, ethdb, node: prioritise chaindata for resources, bump cache 2016-03-09 10:33:39 +02:00
Péter Szilágyi
0a5ee08e2b Godeps, eth, tests: update ethash, used shared for testing 2016-02-24 13:29:47 +02:00
Péter Szilágyi
537774e049 Merge pull request #2195 from obscuren/gpo-rpc
eth: Added GPO to suggest default gas prices
2016-02-11 10:36:37 +02:00
Jeffrey Wilcke
725f2a4cf7 eth: Added GPO to suggest default gas prices
This PR fixes a regression of the RPC where the default gas price that
was being used for transaction wasn't properly using the GPO. This PR
adds the GPO back to suggest gas prices rather than the hardcoded
default of 10000000000000.

Closes #2194
2016-02-10 16:50:50 +01:00