Commit Graph

616 Commits

Author SHA1 Message Date
Bas van Kervel 19b2640e89 rpc: migrated the RPC insterface to a new reflection based RPC layer 2016-01-26 13:51:50 +01:00
Bas van Kervel 6e7620afe0 eth: changed NodeInfo Genesis and Head types 2016-01-18 13:28:03 +01:00
Péter Szilágyi 9e011ff1cd core, eth/downloader: ensure state presence in ancestor lookup 2016-01-04 16:27:23 +02:00
Péter Szilágyi 1f39746886 eth/downloader: throttling tests are time-sensitive, don't run parallel 2015-12-30 14:42:21 +02:00
Felix Lange e6fb69296e common: remove old RLP implementation, Value and ExtPackage
In order to make this happen, kill all remaining trivial uses of
common/{rlp,value}.go. The non-trivial ones have been updated earlier.
2015-12-18 12:09:10 +01:00
Felix Lange 9be5d5cd90 eth/downloader: fix negative balance issue in tests
The test chain generated by makeChainFork included invalid uncle
headers, crashing the generator during the state commit.

The headers were invalid because they used the iteration counter as the
block number, even though makeChainFork uses a block with number > 0 as
the parent. Fix this by introducing BlockGen.Number, which allows
accessing the actual number of the block being generated.
2015-12-18 12:09:10 +01:00
Jeffrey Wilcke 82a024d425 Merge pull request #1997 from zsfelfoldi/gasprice2
core: tx pool skip price validation for "owned" transactions
2015-12-17 12:45:45 +01:00
Péter Szilágyi e51eeb8104 eth: fix #2076, where end of hash query was interpreted number query 2015-12-16 08:44:13 +02:00
zsfelfoldi 975c591261 core: tx pool skip price validation for "owned" transactions 2015-12-16 03:21:17 +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
Bas van Kervel 61ca14bc44 eth: use global event mux instead 2015-12-01 11:01:40 +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
Péter Szilágyi b6f5523bdc eth/downloader: fetch data proportionally to peer capacity 2015-11-19 17:01:39 +02:00
Jeffrey Wilcke 7399b138a8 Merge pull request #1923 from karalabe/cleanup-receipt-data-access
core, eth, miner, xeth: clean up tx/receipt db accessors
2015-11-19 15:28:15 +01:00
Jeffrey Wilcke 65bb07fb4e Merge pull request #1980 from fjl/downloader-deliver-hang
eth/downloader: don't hang for spurious deliveries
2015-11-19 15:19:21 +01:00
Péter Szilágyi e86e0ecdc8 core, eth, miner, xeth: clean up tx/receipt db accessors 2015-11-19 16:03:32 +02:00
Felix Lange dd09af27af eth/downloader: run tests in parallel 2015-11-19 14:18:35 +01:00
Felix Lange b7b62d4b3c eth/downloader: also drain stateCh, receiptCh in eth/61 mode
State and receipt deliveries from a previous eth/62+ sync can hang if
the downloader has moved on to syncing with eth/61. Fix this by also
draining the eth/63 channels while waiting for eth/61 data.

A nicer solution would be to take care of the channels in a central
place, but that would involve a major rewrite.
2015-11-19 14:18:35 +01:00
Felix Lange db52a6a0ff eth: remove workaround for asynchronous processing in the downloader 2015-11-19 14:18:34 +01:00
Felix Lange 900da3d800 eth/downloader: don't hang for spurious deliveries
Unexpected deliveries could block indefinitely if they arrived at the
right time. The fix is to ensure that the cancellation channel is
always closed when the sync ends, unblocking any deliveries. Also remove
the atomic check for whether a sync is currently running because it
doesn't help and can be misleading.

Cancelling always seems to break the tests though. The downloader
spawned d.process whenever new data arrived, making it somewhat hard to
track when block processing was actually done. Fix this by running
d.process in a dedicated goroutine that is tied to the lifecycle of the
sync. d.process gets notified of new work by the queue instead of being
invoked all the time. This removes a ton of weird workaround code,
including a hairy use of atomic CAS.
2015-11-19 14:18:34 +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
Jeffrey Wilcke 2334ee97d0 Merge pull request #1963 from karalabe/fix-database-regression
eth: fix error casting regression during database open
2015-11-05 20:27:11 +01:00
Péter Szilágyi 5d89bbdda1 eth: fix error casting regression during database open 2015-11-05 16:59:16 +02:00
Jeffrey Wilcke e3f36d9728 Merge pull request #1960 from karalabe/fix-peer-ignore-list
eth/downloader: fix dysfunctional ignore list hidden by generic set
2015-11-04 14:43:58 +01:00
Péter Szilágyi b658a73ed5 eth/downloader: fix dysfunctional ignore list hidden by generic set 2015-11-04 13:11:52 +02:00
Jeffrey Wilcke e165c2d23c Merge pull request #1934 from karalabe/polish-protocol-infos
eth, p2p, rpc/api: polish protocol info gathering
2015-11-04 11:59:31 +01:00
Jeffrey Wilcke 016ad3e962 Merge pull request #1952 from obscuren/testnet-peers
eth: added new testnet peers
2015-10-30 11:00:31 +01: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
Jeffrey Wilcke 1bc789553a eth: added new testnet peers 2015-10-30 10:01:19 +01:00
Jeffrey Wilcke fc46cf337a Merge pull request #1946 from fjl/xeth-oom
Fix for xeth OOM issue
2015-10-29 17:42:55 +01: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
Péter Szilágyi 2019ed71b4 eth: don't block sync goroutines that short circuit 2015-10-28 16:41:01 +02:00
Péter Szilágyi e46ab3bdcd eth, p2p, rpc/api: polish protocol info gathering 2015-10-28 12:44:15 +02:00
Jeffrey Wilcke 05f74077fb Merge pull request #1919 from ethersphere/getnatspec
rpc api: eth_getNatSpec
2015-10-28 10:49:53 +01:00
Jeffrey Wilcke 2e4fdce743 Merge pull request #1932 from fjl/gpo-defootgunize
eth, xeth: fix GasPriceOracle goroutine leak
2015-10-28 10:32:35 +01:00
Felix Lange ae1b5b3ff2 eth, xeth: fix GasPriceOracle goroutine leak
XEth.gpo was being initialized as needed. WithState copies the XEth
struct including the gpo field. If gpo was nil at the time of the copy
and Call or Transact were invoked on it, an additional GPO listenLoop
would be spawned.

Move the lazy initialization to GasPriceOracle instead so the same GPO
instance is shared among all created XEths.

Fixes #1317
Might help with #1930
2015-10-27 18:43:47 +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
Felix Lange 3cf74336c9 eth: time out status message exchange after 5s 2015-10-22 22:22:04 +02: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
Péter Szilágyi 5b0ee8ec30 core, eth, trie: fix data races and merge/review issues 2015-10-21 16:49:55 +03: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 a9d8dfc8e7 core, eth: roll back uncertain headers in failed fast syncs 2015-10-19 10:03:10 +03:00
Péter Szilágyi b97e34a8e4 eth/downloader: concurrent receipt and state processing 2015-10-19 10:03:10 +03:00
Péter Szilágyi ab27bee25a core, eth, trie: direct state trie synchronization 2015-10-19 10:03:09 +03:00
Péter Szilágyi 832b37c822 core, eth: receipt chain reconstruction 2015-10-19 10:03:09 +03:00
Péter Szilágyi 42c8afd440 core: differentiate receipt concensus and storage decoding 2015-10-19 10:03:09 +03:00
Péter Szilágyi f186b39018 eth/downloader: add fast and light sync strategies 2015-10-19 10:03:09 +03:00