Commit Graph

543 Commits

Author SHA1 Message Date
Péter Szilágyi d51a9fd6b7
cmd, core, params: add --rinkeby flag for fast connectivity 2017-05-04 12:36:20 +03:00
Bas van Kervel 81d6ec908a
cmd/geth: migrate dumpconfig command/flags 2017-05-03 14:39:07 +02:00
Bas van Kervel 38b4fc8069
cmd/geth: migrate bug command/flags 2017-05-03 14:33:08 +02:00
Bas van Kervel 11ab73f6d8
cmd/geth: migrate metric command/flags 2017-05-03 14:33:08 +02:00
Bas van Kervel 18e9cb1187
cmd/geth: reorganise misc commands/flags 2017-05-03 14:33:07 +02:00
Bas van Kervel 502a2bd69f
cmd/geth: reorganise console/attach commands/flags 2017-05-03 14:33:07 +02:00
Bas van Kervel 8b517d7f00
cmd/geth: reorganise chain commands/flags 2017-05-03 14:33:03 +02:00
Péter Szilágyi 181a3309df
cmd/geth, cmd/utils: init/removedb on light/full dbs simultaneously 2017-05-03 13:35:47 +03:00
Bas van Kervel f6c0f76cc5
cmd/geth: reorganise account/wallet command/flags 2017-04-28 14:01:54 +02:00
Péter Szilágyi 6430e672c9
cmd, node: add --nosub and node.Config.NoUSB to disable hw wallets 2017-04-20 14:01:51 +03:00
Péter Szilágyi 6876e92f8d
Merge remote-tracking branch 'fjl/license-update-1.6' 2017-04-14 12:33:10 +03:00
Felix Lange 0cc492f815 all: update license information 2017-04-14 10:29:00 +02:00
Péter Szilágyi 97f38ce4d6
cmd/geth: update flag groups in the geth command usage 2017-04-13 17:12:37 +03:00
bas-vk 5e29f4be93 cmd/utils, node: remove unused solc references and improve RPC config (#14324)
Currently http cors and websocket origins are a comma separated string in the
config object. These are replaced with string arrays that are more expressive in
case of a config file.
2017-04-12 23:04:14 +02:00
Felix Lange 30d706c35e cmd/geth: add --config file flag (#13875)
* p2p/discover, p2p/discv5: add marshaling methods to Node

* p2p/netutil: make Netlist decodable from TOML

* common/math: encode nil HexOrDecimal256 as 0x0

* cmd/geth: add --config file flag

* cmd/geth: add missing license header

* eth: prettify Config again, fix tests

* eth: use gasprice.Config instead of duplicating its fields

* eth/gasprice: hide nil default from dumpconfig output

* cmd/geth: hide genesis block in dumpconfig output

* node: make tests compile

* console: fix tests

* cmd/geth: make TOML keys look exactly like Go struct fields

* p2p: use discovery by default

This makes the zero Config slightly more useful. It also fixes package
node tests because Node detects reuse of the datadir through the
NodeDatabase.

* cmd/geth: make ethstats URL settable through config file

* cmd/faucet: fix configuration

* cmd/geth: dedup attach tests

* eth: add comment for DefaultConfig

* eth: pass downloader.SyncMode in Config

This removes the FastSync, LightSync flags in favour of a more
general SyncMode flag.

* cmd/utils: remove jitvm flags

* cmd/utils: make mutually exclusive flag error prettier

It now reads:

   Fatal: flags --dev, --testnet can't be used at the same time

* p2p: fix typo

* node: add DefaultConfig, use it for geth

* mobile: add missing NoDiscovery option

* cmd/utils: drop MakeNode

This exposed a couple of places that needed to be updated to use
node.DefaultConfig.

* node: fix typo

* eth: make fast sync the default mode

* cmd/utils: remove IPCApiFlag (unused)

* node: remove default IPC path

Set it in the frontends instead.

* cmd/geth: add --syncmode

* cmd/utils: make --ipcdisable and --ipcpath mutually exclusive

* cmd/utils: don't enable WS, HTTP when setting addr

* cmd/utils: fix --identity
2017-04-12 17:27:23 +03:00
Péter Szilágyi bfe5eb7f8c eth: accept transactions when starting CPU mining (#13882) 2017-04-10 10:43:01 +02:00
Péter Szilágyi cc13d576f0 Merge pull request #13870 from karalabe/miners-fixes
all: clean up various error handling in core and the miner
2017-04-07 11:03:11 +03:00
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 702bef8493
cmd/geth, eth: drop bad block reporting, its offline anyway 2017-04-06 14:25:05 +03:00
Péter Szilágyi 24b9860c1b cmd/geth, node: surface geth architecture into version (#13866) 2017-04-05 21:51:01 +02: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
Martin Holst Swende 544247c918 * cmd/geth: add --nocompaction flag + multiple import files
* main,import: Add --nocompaction flag + multiple import files

* geth/import: documentation

* import: Added more info to err message

* fix :P
2017-03-08 13:26:19 +02: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 aca066f337
cmd/geth: drop upgradedb subcommand since it's unfeasible
This command was meant as a hackish way to upgrade our chain database way back
when nobody cared for live updates and the size of the database along with its
import times was small. With the current database weighing hundreds of GBs and
processing times of many days, this command is just ludicrous.
2017-02-23 16:49:50 +02:00
Péter Szilágyi 1ca20a2697
cmd, whisper/mailserver: revert to utils.Fatalf 2017-02-23 12:16:46 +02:00
Péter Szilágyi 23a5d64fd0
accounts, cmd: port packages over to the new logging system 2017-02-23 12:16:46 +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
Jeffrey Wilcke 94334c233e cmd/geth: added 'geth bug' command (#3684)
* cmd/geth: added 'geth bug' command

Added bug command to geth, which will open a browser window
with an issue template and some additional system information.

* cmd/geth: update bug with better infos

* cmd/geth: added browser fallback

* cmd/geth: govet yo momma
2017-02-20 15:26:21 +02:00
Jeffrey Wilcke c12f4df910 params: core, core/vm, miner: 64bit gas instructions
Reworked the EVM gas instructions to use 64bit integers rather than
arbitrary size big ints. All gas operations, be it additions,
multiplications or divisions, are checked and guarded against 64 bit
integer overflows.

In additon, most of the protocol paramaters in the params package have
been converted to uint64 and are now constants rather than variables.

* common/math: added overflow check ops
* core: vmenv, env renamed to evm
* eth, internal/ethapi, les: unmetered eth_call and cancel methods
* core/vm: implemented big.Int pool for evm instructions
* core/vm: unexported intPool methods & verification methods
* core/vm: added memoryGasCost overflow check and test
2017-02-13 21:44:25 +01:00
Jeffrey Wilcke 57f4e90257 Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"
This reverts commit 8b57c49490.
2017-02-13 15:15:12 +01:00
Péter Szilágyi e99c788155
accounts: ledger and HD review fixes
- Handle a data race where a Ledger drops between list and open
- Prolong Ledger tx confirmation window to 30 days from 1 minute
- Simplify Ledger chainid-signature calculation and validation
- Simplify Ledger USB APDU request chunking algorithm
- Silence keystore account cache notifications for manual actions
- Only enable self derivations if wallet open succeeds
2017-02-13 14:00:12 +02:00
Péter Szilágyi 26cd41f0c7
accounts/usbwallet: make wallet responsive while Ledger is busy 2017-02-13 14:00:10 +02:00
Péter Szilágyi 205ea95802
accounts, cmd, internal, node: implement HD wallet self-derivation 2017-02-13 14:00:09 +02:00
Péter Szilágyi c5215fdd48
accounts, cmd, internal, mobile, node: canonical account URLs 2017-02-13 14:00:08 +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
Jeffrey Wilcke 8b57c49490 params: core, core/vm, miner: 64bit gas instructions (#3514)
Reworked the EVM gas instructions to use 64bit integers rather than
arbitrary size big ints. All gas operations, be it additions,
multiplications or divisions, are checked and guarded against 64 bit
integer overflows.

In additon, most of the protocol paramaters in the params package have
been converted to uint64 and are now constants rather than variables.

* common/math: added overflow check ops
* core: vmenv, env renamed to evm
* eth, internal/ethapi, les: unmetered eth_call and cancel methods
* core/vm: implemented big.Int pool for evm instructions
* core/vm: unexported intPool methods & verification methods
* core/vm: added memoryGasCost overflow check and test
2017-02-02 15:25:42 +01:00
Shintaro Kaneko 355a42f36d cmd/geth, cmd/swarm: Fix to close file handler appropriately 2017-01-30 01:10:19 +09: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
Bas van Kervel 745a3adebd
core: remove support for Olympic network 2017-01-12 09:50:54 +01:00
Felix Lange b9b3efb09f all: fix ineffectual assignments and remove uses of crypto.Sha3
go get github.com/gordonklaus/ineffassign
ineffassign .
2017-01-09 16:24:42 +01:00
Felix Lange 13e3b2f433 logger, pow/dagger, pow/ezp: delete dead code 2017-01-06 18:18:07 +01:00
Felix Lange f2da6581ba all: fix issues reported by honnef.co/go/simple/cmd/gosimple 2017-01-06 18:18:07 +01:00
Péter Szilágyi b63138c3ec
cmd/geth: drop legacy android code 2016-12-13 18:17:49 +02:00
Péter Szilágyi 86f9e836be cmd/geth: tidied up the source (#3385)
cmd/geth: tidied up the source
2016-11-30 13:34:24 +02:00
Péter Szilágyi 7267f796e6
cmd: drop DAO related choice flags since ETC diverged 2016-11-29 15:50:27 +02:00
Péter Szilágyi 4c8c5e2f74 cmd, ethstats, les, mobile, params: native netstats (#3336) 2016-11-25 16:55:06 +01:00
Felix Lange d1a95c643e Merge pull request #3325 from fjl/p2p-netrestrict
Prevent relay of invalid IPs, add --netrestrict
2016-11-25 13:59:18 +01:00
Jeffrey Wilcke a8ca75738a core: implemented new ropsten testnet 2016-11-23 09:34:01 +01:00
Jeffrey Wilcke aad4890082 cmd/geth, core, light, mobile: removed state account StartingNonce
All account's nonce start at 0.
2016-11-23 09:34:01 +01:00
Felix Lange e5edd3b983 cmd/bootnode, cmd/geth, cmd/bzzd: add --netrestrict 2016-11-22 22:21:18 +01:00
Kenji Siu 80ea44c485 cmd/geth: improve command help messages (#3227) 2016-11-10 13:00:09 +02:00
Péter Szilágyi 4cd2617848
cmd/geth: reinstate dropped --cache flag 2016-11-09 19:18:20 +02:00
xiekeyang 5b31794dfe cmd/geth: use a loop in TestDAOForkBlockNewChain (#3222) 2016-11-09 03:15:48 +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
Felix Lange 87670a7ac1 all: remove weird files 2016-10-30 11:02:34 +01:00
Péter Szilágyi f0dbec0c93
cmd, params: only set default fork configs for test and mainnet 2016-10-29 17:07:07 +03: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 1291778032
cmd/geth, code, eth/downloader: tune import logs and mem stats 2016-10-21 12:23:39 +03:00
Péter Szilágyi 88a593d559
cmd/geth, trie: report on trie cache unloads, also add debug log 2016-10-19 17:31:19 +03:00
Péter Szilágyi 4f46bd19d0
cmd, core/state: allow configurable trie cache generations 2016-10-19 14:55:13 +03:00
Péter Szilágyi 2bb5ec1e41
cmd/geth, trie: track and report trie cache misses 2016-10-19 14:12:35 +03:00
Péter Szilágyi a1c63e8be6
cmd/geth: compact and print database stats after an import 2016-10-18 13:45:16 +03:00
Felix Lange eeb322ae64 node: ensure datadir can be co-inhabited by different instances
This change ensures that nodes started with different Name but same
DataDir values don't use the same nodekey and IPC socket.
2016-09-16 15:24:31 +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 de54273f51 cmd/geth: fix port clash in genesis test 2016-09-05 13:24:11 +02:00
Felix Lange 6b727c0440 cmd/evm, cmd/geth, cmd/utils: move version handling to cmd/utils 2016-09-05 13:24:11 +02:00
Felix Lange 1d7d1a3499 contracts/release: move package release to contracts/
This change also deletes generator.go, moving the only interesting line
in it into release.go. The binding has been regenerated with abigen from
develop and solc v0.3.6.
2016-08-29 19:25:05 +02:00
Hellsegga 6bd9008025 cmd/geth: set correct initial nonce on testnet for import/init subcommands (#2924) 2016-08-23 11:36:40 +03:00
Jeffrey Wilcke 5fff491bbd cmd/geth: added copyright and license information
As per GNU GPL requirement I've added the copyright and the license
information as a subcommand as well as a copyright notice when
displaying the help command.
2016-08-22 11:17:23 +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 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
Péter Szilágyi 2c2e389b77 cmd, core, eth, miner, params, tests: finalize the DAO fork 2016-07-15 16:52:55 +03:00
Péter Szilágyi a87089fd2d cmd, core, miner: add extradata validation to consensus rules 2016-07-15 16:52:55 +03:00
Péter Szilágyi 1e24c2e4f4 cmd/geth, miner, params: special extradata for DAO fork start 2016-07-15 16:52:55 +03:00
Péter Szilágyi 9e56811a37 core: gracefully handle missing homestead block config 2016-07-15 16:52:55 +03: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
Matthew Di Ferrante 68b48cc045 cmd/geth: print version on geth start (#2622) 2016-07-12 14:43:15 +02:00
Péter Szilágyi 96dc42d99c cmd, common, console, eth, release: drop redundant "full"s 2016-06-30 13:03:26 +03:00
Péter Szilágyi 1e50f5dd28 Merge pull request #2159 from zsfelfoldi/light-backend
eth: separate common and full node-specific API and backend service
2016-06-30 12:57:50 +03:00
Péter Szilágyi f127799d79 Merge pull request #2750 from sybiload/develop
cmd/geth: fix the import error message
2016-06-29 14:12:46 +03:00
Yohann LEON 6b1d73446d cmd/geth: fix the import error message
cmd/geth: include the error message on import failure
2016-06-29 13:08:32 +02:00
Péter Szilágyi 67e9d33486 Revert "core: update DAO soft-fork number, clean up the code"
This reverts commit ba784bdf36.
2016-06-29 11:44:29 +03:00
Péter Szilágyi ba784bdf36 core: update DAO soft-fork number, clean up the code 2016-06-23 17:16:43 +03:00
zsfelfoldi 3a97280ae8 eth: separate common and full node-specific API and backend service 2016-06-16 17:36:38 +02:00
Jeffrey Wilcke a38be3eb48 Merge pull request #2455 from zsfelfoldi/chaindb
core: improved chain db performance by using sequential keys
2016-06-13 15:16:09 +02:00
Péter Szilágyi 90e07b19ab cmd: fix CLI package deprecation warnings 2016-06-10 11:23:00 +03:00
Bas van Kervel 861add3d72 cmd/geth: codegansta/cli package renamed to urfave/cli 2016-06-09 15:37:13 +02:00
Péter Szilágyi 7c0eb47dfb cmd/geth: fix the keystore path in the accounts help text 2016-06-08 17:00:18 +03:00
Péter Szilágyi 32258af87b cmd/geth: truly randomize console test RPC endpoints 2016-06-08 13:53:07 +03:00
zsfelfoldi f9917c8c7b core: improved chainDb using sequential keys 2016-06-07 16:38:56 +02:00
Felix Lange b57b6e341e cmd/geth: make console tests more robust
* use --port 0 to avoid p2p port conflicts
* use --maxpeers 0 so it doesn't connect to bootstrap nodes
* use geth.expectExit() to wait for termination
2016-06-03 11:08:55 +02:00
Péter Szilágyi da729e5b38 cmd/geth, console: fix reviewer issues 2016-05-31 10:59:38 +03:00
Péter Szilágyi ffaf58f0a9 cmd, console: split off the console into a reusable package 2016-05-30 17:25:23 +03:00