Commit Graph

342 Commits

Author SHA1 Message Date
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 6362a9d610 Revert "test, cmd/evm, core, core/vm: illegal code hash implementation"
This reverts commit 7a5b571c67.
2016-06-29 11:44:51 +03:00
Péter Szilágyi d55fc35df1 Revert "core: add voting and result tracking for the dao soft-fork"
This reverts commit c4de28938f.
2016-06-29 11:44:40 +03: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
Péter Szilágyi c4de28938f core: add voting and result tracking for the dao soft-fork 2016-06-23 16:43:35 +03:00
Jeffrey Wilcke 7a5b571c67 test, cmd/evm, core, core/vm: illegal code hash implementation
This implements a generic approach to enabling soft forks by allowing
anyone to put in hashes of contracts that should not be interacted from.
This will help "The DAO" in their endevour to stop any whithdrawals from
any DAO contract by convincing the mining community to accept their code
hash.
2016-06-22 11:38:25 +03:00
zsfelfoldi 3a97280ae8 eth: separate common and full node-specific API and backend service 2016-06-16 17:36:38 +02:00
Tosh Camille ac66d96c5a cmd/utils: add space between "to" and filename 2016-06-15 11:02:22 +03: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
Bas van Kervel 861add3d72 cmd/geth: codegansta/cli package renamed to urfave/cli 2016-06-09 15:37:13 +02:00
zsfelfoldi f9917c8c7b core: improved chainDb using sequential keys 2016-06-07 16:38:56 +02:00
Péter Szilágyi ffaf58f0a9 cmd, console: split off the console into a reusable package 2016-05-30 17:25:23 +03:00
Felix Lange f61e203c10 cmd/utils: fix build on *BSD 2016-05-09 13:13:44 +02:00
Felix Lange 130bccc763 cmd/utils: flush trace and CPU profile data when force-qutting
Also reduce log messages a little bit.
2016-05-06 11:16:47 +02:00
Péter Szilágyi 586eddfd09 release, all: integrate the release service into geth 2016-05-02 16:20:21 +03:00
Gustav Simonsson ecd7199c43 common/versions, cmd/utils: add geth version contract 2016-05-02 10:31:54 +03:00
Péter Szilágyi b06f44ecc2 cmd: add a `--fakepow` flag to help benchmarking database changes 2016-04-21 12:14:57 +03:00
Felix Lange 6fdd0893c3 all: fix go vet warnings 2016-04-15 11:17:27 +02:00
Felix Lange d04a2e7557 all: update license information 2016-04-15 09:48:05 +02:00
Bas van Kervel 529897ea2b cmd/utils: strip excessive whitespace from api command line arguments 2016-04-14 16:23:43 +02:00
Péter Szilágyi a1f1c404c3 cmd/utils: fix accounts merge error on console unlock 2016-04-12 18:01:37 +03:00
Felix Lange ea005a0295 cmd/utils: fix --password on Windows
Text files created on Windows typically have \r\n line endings.
Trim them when reading password files.
2016-04-12 15:59:18 +02: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
Felix Lange 85e6c40c00 accounts, crypto: move keystore to package accounts
The account management API was originally implemented as a thin layer
around crypto.KeyStore, on the grounds that several kinds of key stores
would be implemented later on. It turns out that this won't happen so
KeyStore is a superflous abstraction.

In this commit crypto.KeyStore and everything related to it moves to
package accounts and is unexported.
2016-04-12 15:56:49 +02:00
Felix Lange dff9b4246f cmd/geth, cmd/utils: improve input handling
These changes make prompting behave consistently on all platforms:

* The input buffer is now global.
  Buffering was previously set up for each prompt, which can cause weird
  behaviour, e.g. when running "geth account update <input.txt" where
  input.txt contains three lines. In this case, the first password
  prompt would fill up the buffer with all lines and then use only the
  first one.

* Print the "unsupported terminal" warning only once.
  Now that stdin prompting has global state, we can use it to track
  the warning there.

* Work around small liner issues, particularly on Windows.
  Prompting didn't work under most of the third-party terminal emulators
  on Windows because liner assumes line editing is always available.
2016-04-12 15:56:49 +02:00
Jeffrey Wilcke 8627680e24 Merge pull request #2359 from bas-vk/rpc-optional-args
rpc: several fixes and support for optional arguments
2016-04-12 14:03:21 +02: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 934f587bd5 Merge pull request #2431 from bas-vk/js-preload
cmd/geth: add JS preload parameter
2016-04-12 11:00:42 +02:00
Bas van Kervel 3c5329599c cmd/geth: add JS preload parameter 2016-04-11 13:32:26 +02:00
Bas van Kervel 4081868452 cmd/utils: bugfix where database is opened multiple times 2016-04-07 12:49:00 +02:00
Jeffrey Wilcke 52dc7cb452 Merge pull request #2378 from obscuren/enable-jit-a-b
cmd/utils, miner: A/B testing JIT VM. Disabled for miners
2016-04-04 11:15:23 +02:00
Felix Lange 78b70d79ec cmd/utils: fix geth startup with empty database 2016-04-01 21:59:23 +02:00
Jeffrey Wilcke bbeaab7e64 cmd/utils, miner: A/B testing JIT VM. Disabled for miners
This PR introduces a 10% probability that you'll run the client with the
JIT enabled testing the new client and helps us potentially catch
errors when reported.

This feature is **disabled** for miners (disabling the JIT completely).
The JIT can however be force for miners if they enable both --jitvm and
--forcejit.
2016-04-01 13:44:58 +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 75c86f8646 Merge pull request #2141 from obscuren/evm-init
core, core/vm, tests: changed the initialisation behaviour of the EVM
2016-03-23 23:20:51 +01: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
Jeffrey Wilcke 14013372ae core: Added EVM configuration options
The EVM is now initialised with an additional configured object that
allows you to turn on debugging options.
2016-03-23 23:02:42 +01:00
Jeffrey Wilcke 9866f19d6a Merge pull request #2371 from hiddentao/fix_prompt_passwd_input
Strip extraneous carriage return from end of entered password
2016-03-23 18:06:27 +01:00
Ramesh Nair 6f30034413 cmd/utils: removed password line endings when not using liner. 2016-03-23 22:53:20 +08:00
Jeffrey Wilcke 77d21e472d Merge pull request #2259 from bas-vk/http
rpc/http: improve request handling
2016-03-23 13:01:22 +01:00
Bas van Kervel a7bae3b2a6 rpc/http: improve request handling 2016-03-23 11:27:08 +01:00
Felix Lange c1343c8872 cmd/utils, internal/debug: show all stacks for 10x Ctrl-C induced panic
Go 1.6 only prints stacks for the current goroutine by default,
but for this panic we want to see all of them.
2016-03-12 00:59:37 +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
Bas van Kervel 0fd251c7f7 console: allow optional password on the command line 2016-03-08 15:02:21 +01:00
Kobi Gurkan 627c2311fb cmd/utils: add --keystore 2016-03-07 14:38:56 -08:00
Jeffrey Wilcke 0d89e6c2f1 cmd/utils, params: homestead block 2016-02-29 15:04:55 +01:00
Jeffrey Wilcke ab92678fb3 cmd/utils: lower the min accepted gas price for relay and GPO to 20 shannon 2016-02-29 14:45:47 +01:00
Péter Szilágyi 770b29fd80 Merge pull request #2175 from karalabe/refactor-http-rpc
cmd, common, node, rpc: move HTTP RPC into node, drop singleton aspect
2016-02-13 14:53:48 +02:00
Péter Szilágyi df75dbfd68 cmd, node, rpc: readd inproc RPC client, expose via node 2016-02-09 14:10:40 +02:00
Péter Szilágyi 900e124bee cmd, common, node, rpc: rework naming convention to canonical one 2016-02-09 13:24:42 +02:00
Péter Szilágyi 7486904b92 cmd, node, rpc: move websockets into node, break singleton 2016-02-05 16:53:47 +02:00
Isidoro Ghezzi cf47ef12d3 cmd/utils: fix jspath flag typo 2016-02-05 15:32:00 +01:00
Péter Szilágyi a13bc9d7a1 cmd, common, node, rpc: move HTTP RPC into node, drop singletone aspect 2016-02-05 13:45:36 +02:00
Péter Szilágyi 188ab928c3 cmd, common, node, rpc: move IPC into the node itself 2016-02-04 11:23:15 +02:00
Felix Lange 3750d835a1 internal/debug: APIs for profiling and tracing
The debug package provides an RPC wrapper for glog settings and the
debugging facilities of the Go runtime. They can be triggered through
both command line flags and the IPC listener.
2016-01-28 13:36:11 +01:00
Bas van Kervel 19b2640e89 rpc: migrated the RPC insterface to a new reflection based RPC layer 2016-01-26 13:51:50 +01:00
Péter Szilágyi d8370a4e15 core, eth, node, rpc: port the admin and debug API 2015-12-14 19:36:51 +02:00
Bas van Kervel eae81465c1 rpc: new RPC implementation with pub/sub support 2015-12-14 16:34:05 +01:00
Felix Lange d648e96b3d cmd/utils: restore starting geth without any accounts and etherbase
Also remove some duplication around address/index parsing.
2015-12-01 11:55:52 +01:00
Péter Szilágyi 3e1000fda3 cmd, eth, node, rpc, xeth: use single-instance services 2015-11-27 11:06:12 +02:00
Péter Szilágyi 1e806c4c77 cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacks 2015-11-27 11:06:12 +02:00
Jeffrey Wilcke 1c63d08ed1 cmd/geth, cmd/utils: removed legalese
Removed the legalese confirmation dialog. This closes #1992
2015-11-19 12:03:33 +01:00
Jeffrey Wilcke a1d9ef48c5 core, eth, rpc: split out block validator and state processor
This removes the burden on a single object to take care of all
validation and state processing. Now instead the validation is done by
the `core.BlockValidator` (`types.Validator`) that takes care of both
header and uncle validation through the `ValidateBlock` method and state
validation through the `ValidateState` method. The state processing is
done by a new object `core.StateProcessor` (`types.Processor`) and
accepts a new state as input and uses that to process the given block's
transactions (and uncles for rewords) to calculate the state root for
the next block (P_n + 1).
2015-11-18 14:24:42 +01:00
Péter Szilágyi 9aa77a3769 cmd/geth, cmd/utils: surface the light KDF flag to the CLI 2015-11-10 15:47:19 +02:00
Jeffrey Wilcke 98b036ddb6 Merge pull request #1949 from karalabe/update-command-usage
cmd/geth, cmd/utils, eth: group CLI flags by purpose
2015-10-30 10:59:36 +01:00
Péter Szilágyi 3c6e285d3b cmd/geth, cmd/utils, eth: group CLI flags by purpose 2015-10-30 11:33:12 +02:00
Felix Lange fbdb44dcc1 cmd/utils, rpc/comms: stop XEth when IPC connection ends
There are a bunch of changes required to make this work:

- in miner: allow unregistering agents, fix RemoteAgent.Stop
- in eth/filters: make FilterSystem.Stop not crash
- in rpc/comms: move listen loop to platform-independent code

Fixes #1930. I ran the shell loop there for a few minutes and didn't see
any changes in the memory profile.
2015-10-29 17:26:26 +01:00
Drake Burroughs 05ea8926c3 cmd/utils, crypto: add --lightkdf flag for lighter KDF 2015-10-28 18:46:39 +01:00
zelig 4d005a2c1d rpc api: eth_getNatSpec
* xeth, rpc: implement eth_getNatSpec for tx confirmations
* rename silly docserver -> httpclient
* eth/backend: httpclient now accessible via eth.Ethereum init-d via config.DocRoot
* cmd: introduce separate CLI flag for DocRoot (defaults to homedir)
* common/path: delete unused assetpath func, separate HomeDir func
2015-10-26 22:24:09 +01:00
zelig 8b81ad1fc4 console:
* lines with leading space are ommitted from history
* exit processed even with whitespace around
* all whitespace lines (not only empty ones) are ignored

add 7 missing commands to admin api autocomplete

registrar: methods now return proper error if reg addresses are not set. fixes #1457

rpc/console: fix personal.newAccount() regression. Now all comms accept interactive password

registrar: add registrar tests for errors

crypto: catch AES decryption error on presale wallet import + fix error msg format. fixes #1580

CLI: improve error message when starting a second instance of geth. fixes #1564

cli/accounts: unlock multiple accounts. fixes #1785
* make unlocking multiple accounts work with inline <() fd
* passwdfile now correctly read only once
* improve logs
* fix CLI help text for unlocking

fix regression with docRoot / admin API
* docRoot/jspath passed to rpc/api ParseApis, which passes onto adminApi
* docRoot field for JS console in order to pass when RPC is (re)started
* improve flag desc for jspath

common/docserver: catch http errors from response

fix rpc/api tests

common/natspec: fix end to end test (skipped because takes 8s)

registrar: fix major regression:
* deploy registrars on frontier
* register HashsReg and UrlHint in GlobalRegistrar.
* set all 3 contract addresses in code
* zero out addresses first in tests
2015-10-22 00:22:39 +02:00
Jeffrey Wilcke 58d0752fdd Merge pull request #1883 from obscuren/jit-vm-optimisations
core/vm: JIT segmentation
2015-10-21 12:34:32 -07:00
Péter Szilágyi aa0538db0b eth: clean out light node notions from eth 2015-10-19 10:03:10 +03:00
Péter Szilágyi 92f9a3e5fa cmd, eth: support switching client modes of operation 2015-10-19 10:03:09 +03:00
Jeffrey Wilcke b196278044 core/vm: added JIT segmenting / optimisations
* multi-push segments
* static jumps segments
2015-10-16 22:30:42 +02:00
Jeffrey Wilcke d5327ddc5f Merge pull request #1869 from Gustav-Simonsson/gpu_miner
all: Add GPU mining, disabled by default
2015-10-16 06:25:33 -07:00
Jeffrey Wilcke 315a422ba7 Merge pull request #1888 from obscuren/testnet
cmd, core, eth: added official testnet
2015-10-09 01:31:37 -07:00
Jeffrey Wilcke 1de796f101 cmd, core, eth: added official testnet 2015-10-08 22:01:39 +02:00
Péter Szilágyi 2547c9c9b7 cmd: properly initialize Olympic for all subcommands 2015-10-07 18:25:33 +03:00
Gustav Simonsson ec6a548ee3 all: Add GPU mining, disabled by default 2015-10-07 13:19:30 +02:00
Jeffrey Wilcke 7c7692933c cmd/geth, cmd/utils, core, rpc: renamed to blockchain
* Renamed ChainManager to BlockChain
* Checkpointing is no longer required and never really properly worked
when the state was corrupted.
2015-10-04 01:13:56 +02:00
Péter Szilágyi 74578ab22b common: fix #1818, secondary datadir paths to fall back to 2015-10-01 12:26:19 +03:00
Felix Lange 8c4dab77ba all: move common.Database to package ethdb 2015-09-14 23:36:30 +02:00
Jeffrey Wilcke f04b3a6f29 cmd/geth, cmd/utils, eth: added dev mode flag
Dev mode enabled some debugging flags such as:

* VM debugging mode
* Simpler proof of work
* Whisper enabled by default
* Datadir to a tmp datadir
* Maxpeers set to 0
* Gas price of 0
* Random listen port
2015-09-09 08:53:05 +02:00
Péter Szilágyi 47a7fe5d22 eth: port the synchronisation algo to eth/62 2015-08-25 17:48:47 +03:00
Péter Szilágyi 42f44dda54 eth, eth/downloader: handle header requests, table driven proto tests 2015-08-24 17:57:28 +03:00
Jeffrey Wilcke 28b14d3e6d Merge pull request #1635 from bas-vk/useragent
support for user agents
2015-08-13 16:25:33 -07:00
Bas van Kervel f9cbd16f27 support for user agents 2015-08-12 12:22:16 +02:00
Jeffrey Wilcke 9cacec70f9 cmd/evm, core/vm, tests: changed DisableVm to EnableVm 2015-08-11 18:43:22 +02:00
Jeffrey Wilcke 2fcf7f1241 Merge pull request #1604 from obscuren/db-merge
core, eth, trie, xeth: merged state, chain, extra databases in one
2015-08-09 05:16:37 -07:00
Jeffrey Wilcke 07cb8092e7 Merge pull request #1611 from obscuren/expdiff-olympic-fix
cmd/utils, core: disable exp diff for olympic net
2015-08-09 05:15:13 -07:00
Jeffrey Wilcke a23478c0be core, eth, trie, xeth: merged state, chain, extra databases in one 2015-08-07 22:29:02 +02:00
Jeffrey Wilcke 846f34f78b core/vm, tests: implemented semi-jit vm
* changed stack and removed stack ptr. Let go decide on slice reuse.
2015-08-07 12:52:17 +02:00
Felix Lange eae1191904 cmd/utils: fix path expansion on windows 2015-08-06 17:18:59 +02:00
Felix Lange 78b101e15d common: remove windows path functions
They were unused and their tests failed on Windows.
2015-08-06 16:43:43 +02:00
Jeffrey Wilcke 74f6d90153 cmd/utils, core: disable exp diff for olympic net 2015-08-06 13:29:06 +02:00
Gustav Simonsson 26c6e3b206 miner: gas limit strategy, target 3141592 & def gas price 50 Shannon 2015-08-04 15:20:28 +02:00
Jeffrey Wilcke dcdb7059cc cmd, core, eth: support for the olympic network
Added a --olympic flag which initialiser the olympic protocol settings
2015-08-03 18:15:48 +02:00
Jeffrey Wilcke ba15f9d282 cmd/util: lowered default gas price 2015-07-25 17:03:10 +02:00
Jeffrey Wilcke 0cff61beda Merge pull request #1510 from fjl/license-fixes
all: license fixes
2015-07-23 01:43:11 -07:00