Commit Graph

658 Commits

Author SHA1 Message Date
Bas van Kervel eae81465c1 rpc: new RPC implementation with pub/sub support 2015-12-14 16:34:05 +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 6bb29aebee Merge pull request #1666 from obscuren/create-transaction
rpc/api, xeth: added signTransaction method
2015-11-20 21:36:56 +01:00
Jeffrey Wilcke ae37a8013d Merge pull request #1917 from obscuren/validator-interface
core, eth, rpc: split out block validator and state processor
2015-11-19 10:57:00 +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 53f28e71dc rpc/api: fix #1986, newIdentity autocomplete 2015-11-18 13:03:20 +02:00
Jeffrey Wilcke 6ea05f5a54 rpc/api, xeth: added signTransaction method
SignTransaction creates a transaction but does submit it to the
network. SignTransaction returns a structure which includes the
transaction object details as well as the RLP encoded transaction that
could possibly be submitted by the SendRawTransaction method.
2015-11-17 17:51:05 +01:00
Péter Szilágyi 6e5349880e rpc/api: fix #1972 api regression (nil eth panic) in attach 2015-11-06 11:47:57 +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 6dfbbc3e11 Merge pull request #1948 from bas-vk/rpcfix
Infinite loop in filters
2015-11-03 15:22:02 +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
Bas van Kervel 76410df6a2 rpc: return an unsupported error when "pending" was used to create a filter 2015-10-29 17:35:43 +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
Bas van Kervel c3c5f8b654 rpc: fixed params parsing problem which could lead to a panic
check argument type before parsing params
 recover from panic in ipc channel
2015-10-29 09:23:03 +01:00
Péter Szilágyi e46ab3bdcd eth, p2p, rpc/api: polish protocol info gathering 2015-10-28 12:44:15 +02: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
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 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 c33cc382b3 core: support inserting pure header chains 2015-10-19 10:03:09 +03: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
Gustav Simonsson 1b1f293082 core/state, core, miner: handle missing root error from state.New 2015-10-16 02:22:06 +02: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
Jeffrey Wilcke 361082ec4b cmd/evm, core/vm, test: refactored VM and core
* Moved `vm.Transfer` to `core` package and changed execution to call
`env.Transfer` instead of `core.Transfer` directly.
* core/vm: byte code VM moved to jump table instead of switch
* Moved `vm.Transfer` to `core` package and changed execution to call
  `env.Transfer` instead of `core.Transfer` directly.
* Byte code VM now shares the same code as the JITVM
* Renamed Context to Contract
* Changed initialiser of state transition & unexported methods
* Removed the Execution object and refactor `Call`, `CallCode` &
  `Create` in to their own functions instead of being methods.
* Removed the hard dep on the state for the VM. The VM now
  depends on a Database interface returned by the environment. In the
  process the core now depends less on the statedb by usage of the env
* Moved `Log` from package `core/state` to package `core/vm`.
2015-10-04 01:13:54 +02:00
Felix Lange 90cd8ae9f2 rpc/api: don't crash for unknown blocks
Most eth RPC calls that work with blocks crashed when the block was not
found because they called Hash on a nil block. This is a regression
introduced in cdc2662c40 (#1779).

While here, remove the insane conversions in get*CountBy*. There is no
need to construct a complete BlockRes and converting
int->int64->*big.Int->[]byte->hexnum->string to format the length of a
slice as hex.
2015-09-22 23:59:26 +02:00
Péter Szilágyi d4d3fc6a70 jsre, rpc/api: pull in new web3 and use hex numbers 2015-09-15 17:05:12 +03:00
Péter Szilágyi 0a7d059b6a eth, rpc: standardize the chain sync progress counters 2015-09-15 14:45:53 +03:00
Felix Lange 47b9c640f5 Merge pull request #1797 from karalabe/ensure-ipcpath-exists
rpc/comms: fix #1795, ensure IPC path exists before binding
2015-09-14 14:45:11 +02:00
Péter Szilágyi cdc2662c40 core: split out TD from database and all internals 2015-09-11 17:42:25 +03:00
Péter Szilágyi 3e6964b841 rpc/comms: fix #1795, ensure IPC path exists before binding 2015-09-11 17:03:31 +03:00
Hector Chu 4ea81f170a rpc/comms: fix bug attaching the console over http 2015-09-07 15:09:59 +01:00
Felix Lange 9dc23ce284 Merge pull request #1742 from fjl/rpc-receipt-root
rpc: add receiptRoot to getBlock* responses
2015-08-31 14:50:21 +02:00
Felix Lange 8b12bcc0ac rpc: add receiptRoot to getBlock* responses
Fixes #1679
2015-08-29 11:12:01 +02:00
Felix Lange e1037bd0cf Merge pull request #1724 from Gustav-Simonsson/get_work
rpc: return error code for eth_getWork when no work ready
2015-08-29 10:54:10 +02:00
Bas van Kervel 39e9560600 rpc/api allow empty password 2015-08-28 12:49:41 +02:00
Gustav Simonsson d9addf79fa Improve error string and remove unneeded else clause 2015-08-28 03:42:01 +02:00
Felix Lange 14370a2260 Merge pull request #1718 from caktux/develop
add missing shh_getMessages to RPC mappings
2015-08-26 18:55:51 +02:00
Felix Lange 3df6f3fc14 Merge pull request #1721 from bas-vk/console-error-parsing
Improved console error handling
2015-08-26 18:55:31 +02:00
Gustav Simonsson 829201382b rpc: return error code for eth_getWork when no work ready 2015-08-26 12:46:50 +02:00
Bas van Kervel 5dd2462816 rpc/api - remove personal.deleteAccount from RPC interface 2015-08-26 11:39:43 +02:00
Bas van Kervel f448310eef bugfix console error handling 2015-08-26 11:33:02 +02:00
caktux a1d8015817 add missing shh_getMessages to RPC mappings 2015-08-25 14:42:57 -04:00
Bas van Kervel d910148a96 Set ipc channel as user agent client 2015-08-24 12:41:34 +02:00
Jeffrey Wilcke e2d44814a5 Merge pull request #1694 from obscuren/hide-fdtrack
fdtrack: hide message
2015-08-19 13:50:54 -07:00
Bas van Kervel 9bf17eb05a rpc/comms reconnect ipc client after write error 2015-08-19 21:48:56 +02:00
Jeffrey Wilcke 269c5c7107 Revert "fdtrack: temporary hack for tracking file descriptor usage"
This reverts commit 5c949d3b3b.
2015-08-19 21:46:01 +02:00
Jeffrey Wilcke e1da124415 Merge pull request #1675 from obscuren/submithashrate-change
rpc/api: return boolean value for eth_submitHashrate
2015-08-17 11:49:15 -07:00