Commit Graph

513 Commits

Author SHA1 Message Date
Svyatoslav Nikolsky c9ce25c8f3 Added peers details to ethcore_netPeers RPC (#2580)
* added peers details to ethcore_netPeers RPC

* fixed build (traits autoimplemented)

* - documentation fixes
- spaces -> tabs
- Rust-way Option's handling

* prepare for new protocols in ethcore_netPeers

* commas & documentation
2016-10-12 20:18:59 +02:00
keorn 271bcf4d5d Return errors from eth_call RPC (#2498)
* propagate call errors

* add error code for execution error
2016-10-09 11:45:12 +02:00
Tomasz Drwięga 4655fd04a5 Using pending block only if not old (#2514) 2016-10-07 11:13:15 +01:00
Robert Habermeier b7814fa65c Port a couple more RPC APIs to the new auto args (#2325)
* add auto-args deserialization for RPC

* make block param member public

* change BlockParam to a more generic Trailing<T> mechanism

* define work type

* build_rpc_trait macro, implement eth protocol

* fix up tests

* move eth_filter API to new macro

* port ethcore module to new rpc macro

* port ethcore_set to auto_args

* port net RPC to auto_args

* port rpc meta api to new

* skeleton for async RPC auto_args

* macro implementations for strongly-typed async RPC wrapper

* clarify docs

* reflect new required Rust version in README

[ci skip]
2016-10-04 19:05:46 +02:00
Marek Kotewicz 06fe768ac2 Polishing Actually enable fat db pr (#1974) (#2048)
* Actually enable fat db, and do RPCs for it.

* Implement HashDB traits for AccountDB.

* user defaults

* finished user defaults

* user defaults are network-dependent

* added tests for newly added functions, logger is initialized first

* dir cleanup in progress

* user_file is placed next to snapshots

* fixing requested change
2016-10-03 11:13:10 +02:00
Tomasz Drwięga d7bbc5cc3f Hash Content RPC method (#2355)
* Moving file fetching to separate crate.

* ethcore_hashContent

* Tests running on mocked fetch.

* Limiting size of downloadable assets
2016-09-27 16:27:06 +02:00
Gav Wood 3fb3f1f54e Reorder transaction_by_hash to favour canon search (#2332)
* Reorder transaction_by_hash to favour canon search

* Fix build.

* Slightly cleaner function.

* Fix test.
2016-09-27 12:17:02 +02:00
Tomusdrw 4acd6cbe3b Fixing tests 2016-09-26 12:24:52 +02:00
Tomasz Drwięga 3e474216ac Peek transaction queue via RPC (#2270)
* Handle RLP to string UTF-8 decoding errors (#2217)

* pending transactions

Conflicts:
	rpc/src/v1/impls/ethcore.rs
	rpc/src/v1/traits/ethcore.rs
2016-09-23 20:53:21 +02:00
Robert Habermeier ff0be9f361 Separate RPC serialization from implementation (#2072)
* add auto-args deserialization for RPC

* make block param member public

* change BlockParam to a more generic Trailing<T> mechanism

* define work type

* build_rpc_trait macro, implement eth protocol

* fix up tests

* move eth_filter API to new macro
2016-09-23 19:42:33 +02:00
Tomasz Drwięga 368aca521b Fails when deserializing non-hex uints (#2247) 2016-09-22 18:02:47 +02:00
Gav Wood 07b5e9a5c7 Encryption, decryption and public key RPCs. (#1946)
* Fix up pending receipts details.

* Add support for additional params and registry over RPC.

* Fix tests.

* Add test, additional fix.

Fixes #1932.

* Fix up tests.

* Fix test.

* Fix test.

* Remove unused use.

* Add encryption, decryption and public-key RPCs.

* Remove &
2016-09-22 14:48:22 +02:00
Tomasz Drwięga 8c111da70b Limit for logs filter. (#2180)
* Limit for logs filter.

* Moving limit inside the filter object

* Fixing tests
2016-09-21 11:51:10 +01:00
Tomasz Drwięga b7e2afd5c0 New signer token RPC & Initial signer connection without token. (#2096)
* Allowing signer to use initial token

* Generating new tokens via RPC

* Fixing RPC tests

* Fixing signer doctest

* whitespace

[ci:skip]

* whitespace

[ci:skip]
2016-09-21 11:44:49 +01:00
Tomasz Drwięga 9ed9857fba Logs limit & log_index bug (#2073)
* Limiting number of logs

* Test for logs

* Fixing logs ordering and indexing

* Fixing sort

* unwrap -> expect

* Revert "unwrap -> expect"

This reverts commit e99e6e77f37692fe568448e768aa72775de8d0cd.
2016-09-14 12:02:30 +02:00
Arkadiy Paronyan 5c5d9c8ccd Snapshot sync (#2047)
* PV64 sync

* Tests

* Client DB restore

* Snapshot restoration over IPC

* Upating test

* Minor tweaks

* Upating test
2016-09-06 15:31:13 +02:00
Robert Habermeier bb6243c550 merge with master 2016-09-01 15:07:06 +02:00
Robert Habermeier d763664d16 port network, sync, rpc 2016-09-01 14:49:12 +02:00
Tomasz Drwięga b4f3c4bd7a Asynchronous RPC support (#2017)
* Async RPC

* Limiting number of transactions in queue

* Fixing tests

* Bumping serde and jsonrpc-core

* serde updated to 0.8

* fixed failing tests

* Bumping ipc server

* Fixing API for endpoints

* Experimenting with tests without --release mode
2016-09-01 12:00:00 +02:00
Nipunn Koorapati 4389742ca3 Make the block header struct's internals private (#2000)
* Make the block header struct's internals private

Currently, this involves a lot of explicit cloning, but we
could migrate the return types of the get_* functions to
be copies rather than references since they are mostly copy
types anyway.

I opted to eliminate the constructor in favor of using
Default::default() plus calling a bunch of setters. This
is similar to the model that a Google Protobuf client uses
and I think it looks fine.

* Drop some unnecessary cloning by comparing references

* Fix compiler errors from callsites in tests.
2016-08-29 11:35:23 +02:00
Marek Kotewicz b0d462c6c9 Signature cleanup (#1921)
* Address renamed to H160 at bigint library level

* moved uint specific test from util to bigint library

* naming

* unifing hashes in progress

* unifing hashes

* cleanup redundant unwraps in tests

* Removing util/crypto in progress.

* fixed compiling

* signature cleanup in progress

* new module - ethcrypto used by ethstore and ethcore-network

* fixed compiling

* fixed compiling

* fixed merge
2016-08-24 18:35:21 +02:00
Nipunn Koorapati 2a550c2adf Add timeout for eth_getWork call (#1975) 2016-08-23 17:07:00 +02:00
Gav Wood ccdf80f4dc Fix several RPCs (#1926)
* Fix up pending receipts details.

* Add support for additional params and registry over RPC.

* Fix tests.

* Add test, additional fix.

Fixes #1932.

* Fix up tests.

* Fix test.

* Fix test.
2016-08-17 19:25:02 +02:00
Gav Wood ca54b8e493 RPC for importing geth keys (#1916)
* Address book for local addresses.

* Simple disk-backed address book.

* Add test and keep file with keys.

* View and import Geth keys.

* Fix test.

* Fix up author info.

[ci:skip]
2016-08-11 18:31:28 +02:00
Tomasz Drwięga f114a933a3 Peers RPC + UI displaying active/connected/max peers (#1915)
* Peers API

* Bumping Parity-UI

* Fixing tests
2016-08-11 17:19:20 +02:00
Gav Wood 6ab78a0091 RPC for deriving address from phrase.
Fixed #1911
2016-08-10 21:23:17 +02:00
Gav Wood 286b67d54b Wallet rpcs (#1898)
* Add wallet RPCs.

* Add wordlist file.

* Add standard brain wallet tests.

* Allow import of JSON wallets.

* Address grumble.
2016-08-10 17:57:40 +02:00
Tomasz Drwięga a427208f79 Purging .derefs, fixing clippy warnings. (#1890)
* Fixing clippy warnings

* Purging derefs

* Simplifying engine derefs

* Simplifying more engine derefs
2016-08-10 16:29:40 +02:00
debris 974d537849 Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-09 09:58:18 +02:00
Tomasz Drwięga 59b0f8c7a3 RPC errors & logs (#1845)
* Refactoring errors in RPC

* Updating jsonrpc-core

* Fixing code_at

* Avoid mentioning obvious segments in proof

[ci:skip]
2016-08-08 17:25:15 +02:00
debris 88c5f555a9 Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-06 00:03:07 +02:00
Arkadiy Paronyan 2f52425387 Unlock account with timeout for geth compatibility (#1854)
* Unlock account with timeout for geth compatibility

* Fixed test
2016-08-05 23:33:14 +02:00
debris 316c9093db Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-05 10:53:34 +02:00
Arkadiy Paronyan 05bfdc508e Split IO and network crates (#1828)
* Abort on panic

* Split IO and network crates

* Restore panic handler

* Fixed doc tests
2016-08-05 10:32:04 +02:00
debris 1ed2de1d9b Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-05 09:30:01 +02:00
Tomasz Drwięga 25aabe6e52 Supporting blockid in eth_call and trace_call/trace_raw (#1837)
* Supporting blockid in eth_call and trace_call/trace_raw

* Nicer state diff handling

* Purging deref.deref
2016-08-04 18:17:21 +02:00
Tomasz Drwięga 979f4e0617 eth_checkTransaction renamed to eth_checkRequest (#1817)
* Making ConfirmationsQueue a bit more generic [WiP]

* Generalizing cofirmations

* New confirmations types - tests

* Separating transaction type in queue. Closes #1310

* Handling sign requests

* Speeding up tests

* Renaming methods

* eth_postSign

* Bumping ui

* Renaming checkRequest methods, adding tests

* Removing duplicate method [ci skip]

* Remove `_posted`

[ci:skip]

* Remove `_posted`
2016-08-04 16:42:29 +02:00
debris 4051524462 improved naming 2016-08-04 08:52:31 +02:00
debris e8c451ac82 cleaning up hash reexports 2016-08-03 18:05:17 +02:00
Tomasz Drwięga c5ffb5af79 No block number in get work while in geth-compat mode. (#1821) 2016-08-03 15:31:00 +02:00
Tomasz Drwięga 9fb5623569 Supporting eth_sign in Signer (#1787)
* Making ConfirmationsQueue a bit more generic [WiP]

* Generalizing cofirmations

* New confirmations types - tests

* Separating transaction type in queue. Closes #1310

* Handling sign requests

* Speeding up tests

* Renaming methods

* eth_postSign

* Bumping ui
2016-08-03 10:36:54 +02:00
Gav Wood 9de579366a Miner tweaks (#1797)
* Mining fixes.

- Use queue to determine whether we're mining
- Kick stale hash rates

Fixes #1794
Fixes #1641

* Fix tests.

* Address grumbles.
2016-08-02 17:53:32 +01:00
debris 489722b83f dynamic keys pickup 2016-07-31 10:46:28 +02:00
Gav Wood b29329c3c5 Return storage as H256 from RPC. (#1774)
* Return storage as H256 from RPC.

* Fix test.
2016-07-30 14:42:52 -07:00
Gav Wood eaa41ea568 Add RPC & client call to replay a transaction. (#1734)
* Add RPC & client call to replay a transaction.

* Address grumbles
2016-07-27 21:34:32 +02:00
Gav Wood 7cf807d1b4 Various improvements to tracing & diagnostics. (#1707)
* Various improvements to tracing & diagnostics.

- Manage possibility of `Account` not having code for `PodAccount`
- New RPC: `trace_sendRawTransaction`
- See raw transaction dump when inspecting over RPC

* Fix test

* Remove one of the dupe error messages

* Remove unneeded `&`s

* Reformat and extremely minor optimisation

* Minor optimisation

* Remove unneeded let

* Fix tests.

* Additional fix.

* Minor rename.

[ci:skip]

* Bowing to the pressure.
2016-07-26 16:48:50 +02:00
Gav Wood 3f841cc578 Name and meta in accounts (#1695)
* Introduce persistent name() and meta() in SecretStore.

* Quick stash.

* Fix build.

* Add ethcore_set methods.

* Bug fixes for default values.

* Move to personal to ensure set API exposed.

* Add UUID to accounts info.

* Add tests.
2016-07-24 17:38:21 +02:00
Tomasz Drwięga aafb014d01 Returning error when transaction is rejected (for consistency) (#1667) 2016-07-22 14:48:05 +02:00
Tomasz Drwięga 9c7395a6be Fixing errors returned by sendTransaction* method family (#1665) 2016-07-20 12:37:49 +02:00
gregg dourgarian d67369a01c fix typos (#1644) 2016-07-19 20:42:23 +02:00
Gav Wood 861c8d0701 Size for blocks (#1668)
* Add size field for blocks.

* Ignore invalid test.
2016-07-19 20:40:18 +02:00
Gav Wood 3ba3dd3805 Asynchronous transactions (polling based for now). (#1652)
* Asynchronous transactions (polling based for now).

- Alter eth_sendTransaction to be async, returning one of:
  - Transaction hash (signed and submitted).
  - Transaction promise ID (< 32 bytes).
  - Zero hash (will never be signed).
- Introduce new JSONRPC eth_checkTransaction.

The new API call takes a single argument - a promise ID. It returns
either:
- Transaction hash (signed and submitted).
- null (still pending, call again later),
- Zero hash (will never be signed).

* New RPC eth_postTransaction

- Restore previous semantics of sendTransaction.
- Introduce eth_postTransaction.
- Some refactoring.

* Fix minor lockup.

* Use TransientHashMap to prevent leak.
2016-07-19 09:19:58 +02:00
NikVolf 028d6f6853 Merge branch 'master' into sync-svc 2016-07-18 15:20:57 +02:00
Gav Wood 0d2f516ad7 Multi-mode logging. (#1643)
* Multi-mode logging.

Better for miners (they get immediate notification of new block).
Better for general use (less superfluous information shown).

* Remove comment.

[ci:skip]

* Minor string change

[ci:skip]

* Minor message tweak.

* Minor tweaks and indentation fix.
2016-07-17 23:00:57 +02:00
Arkadiy Paronyan 5dba43178b Removed DAO soft fork traces (#1639) 2016-07-16 19:49:52 +02:00
NikVolf be25e930e5 Merge branch 'master' into sync-svc 2016-07-16 15:57:30 +02:00
NikVolf 4cb1c906b0 rpc dependencies relayout 2016-07-16 15:51:06 +02:00
Gav Wood 2b193f00d4 Allow RPC to use solc to compile solidity (#1607)
* Allow use to use solc to compile solidity.

* Remove unneeded commemt.

[si:skip]

* Address grumble and disable incorrect tests.
2016-07-14 14:25:44 +02:00
Nikolay Volf 44bc8a08fb Sync IPC interface (#1584)
* chain notify trait

* replaced network service with io service

* fix ethcore crate warnings

* refactored network service without generic

* ethcore fix

* ethsync refactoring

* proper linking of notify

* manage network interface

* rpc crate rebinding

* full rewire

* sync internal io service

* fix deadlock

* fix warnings and removed async io

* sync imported message propagation

* fix rpc warnings

* binart warnings

* test fixes

* rpc mocks and tests

* fix util doctest

* fix message name and removed empty notifier

* pointers mess & dark mode fixed

* fixed sync doctest

* added few warnings

* fix review

* new convention match

* fix error unwraps

* doctest fix

* basic library re-layout

* missing files to relayout

* duplicating network config on sync level

* binary serializers for config

* ipc endpoint for manage

* ipc endpoint for sync

* handshake sorting out

* sorting out the multi-interface dispatch scenario

* fixing tests

* fix doctest
2016-07-14 12:07:33 +02:00
Robert Habermeier 36d3d0d7d7 replace synchronization primitives with those from parking_lot (#1593)
* parking_lot in cargo.toml

* replace all lock invocations with parking_lot ones

* use parking_lot synchronization primitives
2016-07-13 19:59:59 +02:00
Robert Habermeier 7200cfcbc9 expunge &Vec<T> pattern (#1579)
* expunge &Vec<T> pattern

* fix travis
2016-07-12 10:28:35 +02:00
Nikolay Volf d3695d0b72 Major sync <-> client interactions refactoring (#1572)
* chain notify trait

* replaced network service with io service

* fix ethcore crate warnings

* refactored network service without generic

* ethcore fix

* ethsync refactoring

* proper linking of notify

* manage network interface

* rpc crate rebinding

* full rewire

* sync internal io service

* fix deadlock

* fix warnings and removed async io

* sync imported message propagation

* fix rpc warnings

* binart warnings

* test fixes

* rpc mocks and tests

* fix util doctest

* fix message name and removed empty notifier

* pointers mess & dark mode fixed

* fixed sync doctest

* added few warnings

* fix review

* new convention match

* fix error unwraps

* doctest fix
2016-07-11 17:02:42 +02:00
Tomasz Drwięga d7caae2241 Fixing clippy warnings (#1568)
* Fixing clippy warnings

* Fixing more warnings
2016-07-10 13:18:33 +02:00
Gav Wood 9f43526c88 Merge branch 'master' into kill_unwraps 2016-07-07 09:40:12 +02:00
Nikolay Volf 8282c7dd50 Client IPC Interface (#1493)
* btree map serializer

* serde tests

* state diff serialization

* basic layout

* more missing serializaers

* uncle returns rlp

* block queue info

* sorting with transaction result

* sorting out util imports

* transaction import result sorting also

* sorting filters & ranges

* error sorting out

* deriving ipc service compiling

* rpc & sync recompile

* sorting rpc using uncles

* fix compilation

* fix merging bugs

* fix unused imports

* fix all warnings

* tests stub

* some merge bugs

* ethcore compilation

* fix rpc compilation

* deriving attribute

* tests (and fixes)

* rpc test working

* fix warnings again

* rs.in -> rs

* missing attribute

* refactored tree changes

* paste reformat mess fix

* pub mod actually

* intendation fix
2016-07-07 09:39:32 +02:00
Gav Wood 456ad9e21b Remove .lock().unwrap() idiom into locked(). 2016-07-06 19:52:34 +02:00
Nipunn Koorapati 4a9b9dc305 Update sealing just once when externally importing many blocks (#1541)
Fixes Issue #1372
2016-07-06 17:15:59 +02:00
Marek Kotewicz bcb63bce12 serde is no longer util dependency (#1534)
* removed old json-tests

* simplify folds in triehash.rs

* removed unused json_aid

* removed unused squeeze.rs

* json branching tests for trie

* removing todos from util

* separated UsingQueue and Table

* further cleanup, removing unused code

* serde serialization of hash moved to rpc module

* uint wrapper for rpc in progress

* serialization of uint moved to rpc module

* updated eth-secp256k1

* updated igd, serde is no longer dependency of util

* loading trie consensus tests

* renamed aliases in rpc imports
2016-07-06 11:23:29 +02:00
Gav Wood c26cfc1c5a Silent running operating modes (#1477)
* Command=line options.

* Keep alive for the eth protocol.

* Wire up final pieces.

* No network when dark.

* Passive and dark mode work.

* Ensure all RPCs keep alive.

* Fix tests.

* Fix minor bug.

* Minor whitespace.

* Split out some of the sleep-state.

* Fix help text.
2016-07-05 17:50:46 +02:00
Nikolay Volf 8102fb9306 Client api cleaning - uncles are returned as rlp (#1516)
* uncle as rlp in the api

* uncle rlp in block view

* fix warning
2016-07-01 19:37:17 +01:00
Gav Wood dc24448900 Include number in eth_getWork. 2016-06-29 20:09:13 +02:00
Gav Wood c096c087df Ensure we don't reject our own transactions for gasprice. (#1485)
* Ensure we don't reject our own transactions for gasprice.

* Add test.
2016-06-29 15:23:41 +02:00
Gav Wood a3758161ac Ensure we always get the latest work when mining on submitted. (#1469)
* Ensure we always get the latest work when mining on submitted.

* Build fix.

* Smaller timeslices for the wait.
2016-06-28 18:46:09 +02:00
Arkadiy Paronyan 39307b2bea Merge pull request #1460 from ethcore/miner-improvements
Allow configuration of when to reseal blocks.
2016-06-28 13:11:24 +02:00
Tomasz Drwięga 6895a56099 Adding default for value (#1465) 2016-06-28 11:10:39 +02:00
Gav Wood 31de739122 U256 instead of Option<U256>. Fix up tests. 2016-06-28 10:21:29 +02:00
Gav Wood 10aa32b0f5 Include RPC configurability for max tx gas limit.
Also Move the gas limit into the transaction queue from the miner.
2016-06-27 20:19:01 +02:00
Gav Wood 516b015325 Don't mine without --author (#1436)
Requires --author to be set before mining is allowed to happen.
2016-06-26 22:02:17 +02:00
Gav Wood 8fcec20398 Gas limit ceiling option. 2016-06-23 14:29:16 +02:00
Tomasz Drwięga 9a1e1b7c89 Signer with Unlocked Account (#1398) 2016-06-22 21:32:26 +02:00
Robert Habermeier f947a9cb71 Optional gas price in transactions come from statistics (#1388)
* use gas price statistics for default transaction gas price

* create new signing queue client properly

* replace one more usage of sensible_gas_price

* fill_optional_fields as a free function

* keep test client alive
2016-06-22 15:55:07 +02:00
Tomasz Drwięga a8bc86151e Merge branch 'master' into txcount-rpc
Conflicts:
	rpc/src/v1/tests/mocked/ethcore.rs
2016-06-21 15:13:41 +02:00
Tomasz Drwięga 7cfb9a2b0b RPC for number of unconfirmed transactions 2016-06-21 14:57:35 +02:00
Robert Habermeier 951512f9c9 Reserved peers rpc API (#1360)
* reserved peers: lock them, use a hashset, and provide to networkcontext

* adding and removing reserved peer service API

* add NonReservedPeerMode, and setters in host

* setting non reserved mode, restriction accepted connections

* implement RPC apis

* fix deadlock

* fix rpc tests
2016-06-21 13:56:33 +02:00
Robert Habermeier 7a6fa97d98 Revert "Revert "Reserved peers, reserved-only flag"" 2016-06-20 14:13:33 +02:00
Robert Habermeier 3d3041d418 Revert "Reserved peers, reserved-only flag" 2016-06-20 14:09:41 +02:00
Marek Kotewicz a6713467a7 Merge pull request #1347 from rphmeier/reserved-peers
Reserved peers, reserved-only flag
2016-06-20 14:03:47 +02:00
Robert Habermeier 06a3557e3e reserved_only CLI flag 2016-06-20 12:17:06 +02:00
Marek Kotewicz 6b074e8fb2 secret store separated from util (#1304)
* bump rust-crypto

* initial version of account provider utilizing secret store

* update lazy_static to latest version

* AccountProvider accounts method

* new AccountProvider tests in progress

* basic tests for new AccountProvider

* ethcore compiles with new account provider and secret store

* ethcore-rpc build now compiling with new AccountProvider

* most rpc tests passing with new accounts_provider

* fixed basic_authority tests

* fixed eth_transaction_count rpc test

* fixed mocked/eth.rs tests

* fixed personal tests

* fixed personal signer rpc tests

* removed warnings

* parity compiling fine with new sstore

* fixed import direction

* do not unlock temporarily when we have the password

* removed TODO in account import

* display warning on auto account import failure

* fixed compiling of ethstore on windows

* ethstore as a part of parity repo

* added ethkey
2016-06-20 00:10:34 +02:00
Gav Wood 08522eec37 --geth prevent getTransactionReceipt from using pending. (#1325)
This mimics the fucntionality of Geth and the current unratified
JSONRPC spec (but not the functionality of eth and the ratified
spec).
2016-06-19 14:51:51 +02:00
Tomasz Drwięga 5e1e3ce857 Filling-in optional fields of TransactionRequest... (#1305)
* More meaningful errors when sending transaction

* Fixing returned value

* Consolidating all RPC error codes

* Fixed loosing peers on incoming connections. (#1293)

* Deactivate peer if it has no new data

* Fixed node table timer registration

* Fixed handshake timeout expiration

* Extra trace

* Fixed session count calculation

* Only deactivate incapable peers in ChainHead state

* Timer registration is not needed

* x64 path

* firewall rules

* Fix read-ahead bug.

Re-ahead 8 bytes rather than 3 to ensure large blocks import fine.

* Refactor to use a const.

* Update README.md

* Gas price statistics. (#1291)

* Gas price statistics.

Affects eth_gasPrice.
Added ethcore_gasPriceStatistics.

Closes #1265

* Fix a bug in eth_gasPrice

* Fix tests.

* Revert minor alteration.

* Tests for gas_price_statistics.

- Tests;
- Additional infrastructure for generating test blocks with
transactions.

* Key load avoid warning (#1303)

* avoid warning with key

* fix intendations

* more intendation fix

* ok() instead of expect()

* Filling-in optional fields of TransactionRequest.

* Adding reference to miner
2016-06-18 14:55:46 +02:00
Marek Kotewicz 75a7cf2860 fixed #1180 (#1282) 2016-06-18 12:09:29 +02:00
Arkadiy Paronyan 591fa9625d Merge pull request #1313 from ethcore/net
Network start/stop
2016-06-18 11:04:24 +02:00
Gav Wood 42478add64 DAO Rescue soft fork (#1309)
* DAO Rescue soft fork

* Address minor issues.

* Fix tests.
2016-06-18 10:54:15 +02:00
Tomasz Drwięga 1baa150086 Consolidating all RPC error codes 2016-06-18 10:54:15 +02:00
Tomasz Drwięga defe688797 Fixing returned value 2016-06-18 10:54:15 +02:00
Tomasz Drwięga 2c9a5fc0a9 More meaningful errors when sending transaction 2016-06-18 10:54:12 +02:00
Gav Wood 335bce85e8 Gas price statistics. (#1291)
* Gas price statistics.

Affects eth_gasPrice.
Added ethcore_gasPriceStatistics.

Closes #1265

* Fix a bug in eth_gasPrice

* Fix tests.

* Revert minor alteration.

* Tests for gas_price_statistics.

- Tests;
- Additional infrastructure for generating test blocks with
transactions.
2016-06-18 10:52:50 +02:00
arkpar b38488dd07 Network shutdown 2016-06-17 12:58:28 +02:00
debris dac387fac1 changed rpc error message to Still Syncing, when mining is not ready 2016-06-15 01:12:46 +02:00
debris 7610d308e8 fixed #1255 2016-06-14 15:17:17 +02:00
Tomasz Drwięga e5e238746b Bumping sysui & topbar. personal_signerEnabled returns port 2016-06-10 15:39:34 +02:00
Tomasz Drwięga be435cde99 Splitting RPC Apis into more fine-grained sets (#1234) 2016-06-07 13:52:48 -07:00
Tomasz Drwięga fdc22db3f4 Signer RPC method to check if signer is enabled (#1238)
* API to check if signer is enabled

* Fixing compilation warnings
2016-06-07 10:33:32 -07:00
Tomasz Drwięga bf9173e673 Fixing signer behaviour when confirming transaction with wrong password. (#1237)
* Avoid removing transactions when trying to confirm and the password is invalid

* Fix order
2016-06-07 08:25:01 -07:00
Gav Wood 3db2328f52 Merge branch 'txtracingforcall' into serdestatediff 2016-06-06 19:24:07 -07:00
Gav Wood 4efd658577 Merge branch 'master' into txtracingforcall 2016-06-06 19:19:32 -07:00
Gav Wood 0cb1affd48 Use serialize framework for VMTrace JSON. 2016-06-06 15:18:38 -07:00
Tomasz Drwięga 18ffd94674 Fixing warnings 2016-06-06 12:18:17 +02:00
Gav Wood 1fa8f108d9 StateDiff uses serde preprocessor. 2016-06-06 00:24:21 +02:00
Gav Wood bbd024d646 Merge branch 'master' into switchrpcns 2016-06-05 21:37:56 +02:00
Marek Kotewicz c8c47ebe32 Merge pull request #1206 from ethcore/diffing
Integrate state diffing into the ethcore JSONRPC
2016-06-05 21:35:36 +02:00
Gav Wood 4dc9aedfb5 Merge branch 'master' into txtracingforcall 2016-06-03 12:06:39 +02:00
Tomasz Drwięga 18dac64abb Simple WebSockets notification about new request (#1202)
* Splitting methods requiring signing into separate trait

* Single place where RPC apis are created.

* Separating eth_filter

* Separating eth_signing

* Stubs for Personal Signer methods

* Test for EthSigningQueueClient

* TransactionConfirmation API

* Exposing PersonalSigner API

* Defining ApiSets dependent on context

* Removing types

* Supporting sending notification to WS connected SystemUIs

* Sending a notification on every new messages

* Adding logs to signing queue

* Shutting down broadcaster

* Refactoring the signing queue

* Fixing wait loop in case of spurious wake-ups.
2016-06-02 17:05:13 +02:00
Gav Wood f357274ced Merge branch 'master' into txtracingforcall 2016-06-02 16:44:11 +02:00
Gav Wood 7dc05f1bcc Unify tracing interface into a single call. 2016-06-02 16:30:28 +02:00
Nikolay Volf c3404c9b59 Merge pull request #1205 from ethcore/fixed_1204
fixed #1204
2016-06-02 14:06:08 +02:00
Gav Wood a132fefcc7 Transaction tracing for eth_call. 2016-06-02 13:50:50 +02:00
Gav Wood c202abe09d Switch RPC namespace form ethcore_ to trace_ 2016-06-02 13:14:49 +02:00
debris 9a626c84bc fixed #1204 2016-06-02 12:44:05 +02:00
Gav Wood b17581d7de VM tracing and JSON RPC endpoint for it. (#1169)
* Groundwork for basic VM tracing.

* RPC endpoint for VM tracing and ser/de types ready.

* Create VMTracer trait.

* Rearchitected VM tracing to reflect existing tracing.

Should more or less work now.

* Integrated VM tracing into JSONRPC.

* Fix ethcore module tests.

* Add tests for VM tracing.

* Fix consensus test code.

* Fix mock tests.

* Added VM trace information for post-execution stuff.

* Fix max-value calls and add "creates" field to getTransaction.

* Tests for VM tracing.

* Don't implement the trait with unimplemented.

* Remove invlaid comment.

* Fix tests.
2016-06-02 12:40:31 +02:00
Gav Wood b9ec87548d Minor renaming diff -> state_diff 2016-06-02 12:39:25 +02:00
Gav Wood bc5c3da2af Merge branch 'vmtracing' into diffing 2016-06-02 12:28:09 +02:00
Gav Wood 26da38a439 Merge remote-tracking branch 'origin/master' into vmtracing 2016-06-02 11:40:39 +02:00
Nikolay Volf c370bcaded merge fixes 2016-06-01 19:57:34 +02:00
Nikolay Volf 6676c6cf7e Merge branch 'master' into client-refact 2016-06-01 19:42:32 +02:00
Tomasz Drwięga 99e26b8480 Simple signing queue, confirmation APIs exposed in signer WebSockets. (#1182)
* Splitting methods requiring signing into separate trait

* Single place where RPC apis are created.

* Separating eth_filter

* Separating eth_signing

* Stubs for Personal Signer methods

* Test for EthSigningQueueClient

* TransactionConfirmation API

* Exposing PersonalSigner API

* Defining ApiSets dependent on context

* Removing types

* Fixing default impl

* Fixing un-mocked tests

* Update signing_queue.rs

[ci skip]

* Removing unused import [ci skip]
2016-06-01 19:37:34 +02:00
Nikolay Volf 77cef76518 rpc bindings resolved 2016-05-31 21:31:42 +02:00
Gav Wood 34edecd59d State diffing, exposed through JSONRPC. 2016-05-31 21:03:44 +02:00
Gav Wood 649767b911 Merge remote-tracking branch 'origin/master' into vmtracing 2016-05-31 12:05:23 +02:00
Robert Habermeier b036f1de98 stop eth_syncing from returning true forever (#1181) 2016-05-31 10:31:36 +02:00
Gav Wood 8082fdb3ff Fix max-value calls and add "creates" field to getTransaction. 2016-05-30 22:27:28 +02:00
Gav Wood 79503e4f14 Added VM trace information for post-execution stuff. 2016-05-30 17:19:15 +02:00
Gav Wood 11f4e8cb73 Fix mock tests. 2016-05-30 11:53:20 +02:00
Robert Habermeier 89659606dd add mocked test for eth_sendRawTransaction 2016-05-29 17:07:39 +02:00
Robert Habermeier be1ec93271 implement eth_sign 2016-05-29 15:46:57 +02:00
Robert Habermeier 7cea3eb5ed move rpc_unimplemented into impls module 2016-05-29 15:21:23 +02:00
Robert Habermeier 191bae5cd4 add stubs for missing eth_* rpc methods 2016-05-29 15:21:23 +02:00
Gav Wood a5808833b1 Merge remote-tracking branch 'origin/master' into vmtracing 2016-05-29 11:13:48 +02:00
Gav Wood cd16828fef Integrated VM tracing into JSONRPC. 2016-05-29 00:58:52 +02:00
Gav Wood d4a06b27ed Create VMTracer trait. 2016-05-28 17:50:20 +02:00
Gav Wood c1ed520de0 RPC endpoint for VM tracing and ser/de types ready. 2016-05-28 16:52:33 +02:00
Robert Habermeier 5197ca87ee merge with master 2016-05-27 18:55:01 +02:00
Robert Habermeier 56b020987e refine tests for call deserialization 2016-05-27 18:09:32 +02:00
Robert Habermeier b28a8411a4 refactor dispatch_transaction and sign_and_dispatch into impls module
this has the added benefit of allowing the removal of redundant upgrades.
2016-05-27 16:50:25 +02:00
Robert Habermeier c9efb56e19 move sign_and_send_transaction implementation to personal 2016-05-27 16:45:26 +02:00
Robert Habermeier a272f8570c correct indentation 2016-05-27 16:35:42 +02:00
Robert Habermeier 3f89362630 rename x_latest to latest_x in BlockChainClient 2016-05-27 16:35:42 +02:00
Robert Habermeier 30eee76767 use new nonce function in eth_TransactionCount 2016-05-27 16:35:42 +02:00
Robert Habermeier 86eab79d9d consolidate [balance/storage]_at and _at_id functionality 2016-05-27 16:35:41 +02:00
Robert Habermeier 3405f3eab1 implement storage_at_id 2016-05-27 16:35:41 +02:00
Robert Habermeier 2b7fae8fa6 add state_at_id and balance_at_id, integrate with RPC 2016-05-27 16:35:41 +02:00
debris 6fd9780e60 do not clone pending transaction hashes 2016-05-26 12:44:17 +02:00
debris f811fdc2cd fixed pending transactions 2016-05-26 11:42:27 +02:00
Marek Kotewicz ebd0cdbc7a Fixpending (#1074)
* Fix --geth IPC for MacOS.

* fix pending_* methods in MinerService, add pending_receipts

* pending logs

* include pending logs when polling

* fixed returning pending logs multiple timees

* log type

* transactionHash is supplied to pending logs

* miner returns receipts together with hashes

* bring back miners all_transactions used by sync module
2016-05-24 21:56:32 +02:00
Tomasz Drwięga 5579582a52 Sign and send transaction 2016-05-23 11:30:11 +02:00
Gav Wood 0c4cd00c1f Fix styling - don't mix spaces with tabs!!! 2016-05-22 12:42:22 +02:00
Gav Wood c8d2237f0a Fix is_syncing so it's false as long as the update is trivial. (#1122) 2016-05-22 11:47:17 +02:00
Gav Wood b53d0050dd Relock unlocked accounts after first use (#1120)
* Add `SecretStore::unlock_account_temp` function.

* Test for relocking accounts.
2016-05-21 22:23:16 +02:00
Marek Kotewicz 852155959d Merge pull request #1098 from ethcore/trace_err
pretty print trace error
2016-05-19 18:00:39 +02:00
arkpar ca6c91f591 New sync algorithm 2016-05-19 16:16:11 +02:00
debris 5ec096d57e Fixed ethcore-rpc compilation errors. 2016-05-19 15:48:40 +02:00
debris 95365670e4 Merge branch 'master' of github.com:ethcore/parity into trace_err 2016-05-19 14:15:05 +02:00
debris 634679966e Make Id/ID and db/Db/DB usage consistent 2016-05-19 11:00:32 +02:00
debris 55ebab2392 Merge branch 'master' of github.com:ethcore/parity into trace_err 2016-05-19 01:03:55 +02:00
Gav Wood 46f3b5f913 Fix up the seal fields in RPC output. (#1096)
Make Ethash::extra_info() work.
Seal fields now decode the RLP.
2016-05-19 00:41:41 +02:00
debris 14b6b389f2 propagate trace error to the top 2016-05-18 11:34:15 +02:00
Gav Wood 56c705968b Fix typo. 2016-05-16 13:33:29 +02:00
Gav Wood f4d5c7b48e Fix uncle getter
Uncle blocks don't necessarily have BlockDetails, so can't get total
difficulty directly.
Closes #1057
2016-05-16 12:46:09 +02:00
Tomasz Drwięga 49cc40708d Fixing formatter for defaultExtraData (#1060) 2016-05-08 21:34:15 +01:00
Tomasz Drwięga c3f33aefdd Fixing RPC modules compatibility 2016-05-04 14:03:29 +02:00
Tomasz Drwięga 2ac438a82d Exposing default extra data 2016-05-02 16:12:01 +02:00
Marek Kotewicz 7c2adc4137 Tracedb interface && cli (#997)
* traces cli and jsonrpc api

* missing if in docs

* adding traces to modules
2016-05-02 12:17:30 +02:00
Tomasz Drwięga e942f86bd7 Modules RPC (#1019) 2016-04-29 19:52:08 +01:00
Arkadiy Paronyan 8f7624f5cb Support 'pending' block in RPC (#1007)
* Support `pending` block in RPC

* Forward calls from miner to client in case no pending block is available
2016-04-28 20:47:44 +01:00
Tomasz Drwięga ea669ac6b6 Enable pending block when there is local transaction pending. (#1005)
* Enabling sealing while importing own transaction

* Fixing import transaction deadlock

* Checking if there are local transactions in queue

* Updating hyper-mio

* Switching to rust-url#1.0.0
2016-04-28 16:36:53 +01:00
debris d4a0ad0a60 make jsonrpc api engine agnostic 2016-04-25 16:06:08 +02:00
Tomasz Drwięga 8b84b4f128 Merge branch 'master' into rpc-shared-miner
Conflicts:
	parity/main.rs
2016-04-22 12:16:15 +02:00
Tomasz Drwięga 0458a3378c Additional RPC methods for settings 2016-04-21 19:24:10 +02:00
Tomasz Drwięga f5c2bea134 Shared instance of ExternalMiner 2016-04-21 17:32:53 +02:00
Tomasz Drwięga f2a08d57e4 Merge branch 'master' into rpc-logs
Conflicts:
	rpc/src/v1/tests/ethcore.rs
	rpc/src/v1/traits/ethcore.rs
2016-04-19 19:59:50 +02:00
Tomasz Drwięga 407ab30503 Using ArrayVec to store logs 2016-04-19 19:22:14 +02:00
Tomasz Drwięga a21f2a0998 Exposing loggin via RPC 2016-04-19 18:27:12 +02:00
Tomasz Drwięga 98b3962412 RPC methods to set the limits 2016-04-18 23:13:38 +02:00
Tomasz Drwięga d093c5755e Moving own transaction tracing to miner create 2016-04-17 20:36:37 +02:00
Tomasz Drwięga 8389f771e9 Tracing whole transaction 2016-04-17 18:36:07 +02:00
Tomasz Drwięga 5086880093 Additional logging for transactions 2016-04-17 18:26:15 +02:00
Gav Wood d909bc05c4 Sensible gas limits for eth_sendTransaction (#953)
* Sensible gas limits for eth_sendTransaction

Fixes #859

* Compile fix.

* Remove !.
2016-04-14 12:01:12 -07:00
Tomasz Drwięga fbc28ce493 Additional methods for ethcore-specific rpc. Altering miner parameters (#934) 2016-04-12 15:04:40 -07:00
Tomasz Drwięga 3fe21f5931 Ethcore-specific RPC methods (#923)
* Ethcore-specific rpc methods

* Initializing ethcore-rpc
2016-04-11 12:06:32 -07:00
Gav Wood c48374dbc6 Parameter to allow user to force the sealing mechanism (#918)
* Allow block sealing mechanism to be forced, even when not mining.

* Fix deadlock in dispatch_transaction. Fix tests.

* Horrible workaround for transaction importing.

* Reduce tracing. Cleanups.

* Remove logging.

* Remove broken code inherited from dodgy implementation.

* pre-query tx queue nonce also if any

* remove outside nonce queries

* remove queue nonces
2016-04-11 11:52:33 -07:00
debris dc6ade4ae3 fixed transaction deadlock 2016-04-11 12:44:57 +02:00
Gav Wood 6c35c5e604 --unlock is comma-delimited. (#916) 2016-04-10 14:01:41 -07:00
Marek Kotewicz fed853593b fixed eth_getLogs (#915)
* fixed eth_getLogs

* removed empty lines
2016-04-10 11:42:03 -07:00
arkpar 3438cda432 Propagate transaction queue 2016-04-06 23:03:07 +02:00
Arkadiy Paronyan 5685fde606 Merge pull request #890 from ethcore/fix_875
fixed #875 and added tests for eth_sendTransaction
2016-04-06 16:24:32 +02:00
arkpar 9b7c48110a Fixed eth_call nonce and gas handling 2016-04-06 13:05:58 +02:00
debris d14d590c2b fixed #875 and added tests for eth_sendTransaction 2016-04-06 12:15:20 +02:00
Gav Wood 5d626c7dd3 Use sensible gas price. 2016-03-28 18:53:33 +02:00
Gav Wood 9592ccc0df Publish locally-made transactions to peers. 2016-03-28 18:11:00 +02:00