Commit Graph

1427 Commits

Author SHA1 Message Date
Niklas Adolfsson
8f56606cac ´main.rs´ typo (#8629)
* Typo

* Update main.rs
2018-05-15 07:46:37 +02:00
Wei Tang
272ebc1ef7 Fix account list double 0x display (#8596)
* Remove unused self import

* Fix account list double 0x display
2018-05-14 10:10:28 +02:00
Tomasz Drwięga
08abf67a51 Fix packet count when talking with PAR2 peers (#8555)
* Support diferent packet counts in different protocol versions.

* Fix light timeouts and eclipse protection.

* Fix devp2p tests.

* Fix whisper-cli compilation.

* Fix compilation.

* Fix ethcore-sync tests.

* Revert "Fix light timeouts and eclipse protection."

This reverts commit 06285ea8c1d9d184d809f64b5507aece633da6cc.

* Increase timeouts.
2018-05-14 10:09:05 +02:00
Pierre Krieger
ac3de4c5fc Parity as a library (#8412)
* Parity as a library

* Fix concerns

* Allow using a null on_client_restart_cb

* Fix more concerns

* Test the C library in test.sh

* Reduce CMake version to 3.5

* Move the clib test before cargo test

* Add println in test
2018-05-09 08:47:21 +02:00
Wei Tang
528497b86a Keep all enacted blocks notify in order (#8524)
* Keep all enacted blocks notify in order

* Collect is unnecessary

* Update ChainNotify to use ChainRouteType

* Fix all ethcore fn defs

* Wrap the type within ChainRoute

* Fix private-tx and sync api

* Fix secret_store API

* Fix updater API

* Fix rpc api

* Fix informant api

* Eagerly cache enacted/retracted and remove contain_enacted/retracted

* Fix indent

* tests: should use full expr form for struct constructor

* Use into_enacted_retracted to further avoid copy

* typo: not a function

* rpc/tests: ChainRoute -> ChainRoute::new
2018-05-07 12:58:25 +02:00
Wei Tang
2a829b1f1a Show imported messages for light client (#8517) 2018-05-01 14:16:03 +02:00
Niklas Adolfsson
e36c4ecc98 duration_ns: u64 -> duration: Duration (#8457)
* duration_ns: u64 -> duration: Duration

* format on millis {:.2} -> {}
2018-04-27 15:04:27 +02:00
Niklas Adolfsson
b0cc44aabb ParityShell::open Return result (#8377)
* start

* add error handling for winapi

* fix typo

* fix warnings and windows errors

* formatting

* Address review comments
2018-04-21 12:54:48 +02:00
Wei Tang
92b5b5644f Use forked app_dirs crate for reverted Windows dir behavior (#8438)
* Remove unused appdirs dependency in CLI

* Use forked app_dirs crate for reverted Windows dir behavior
2018-04-20 08:38:30 +00:00
Andrew Jones
14361cc7b1 Move ethcore::Error to error_chain (#8386)
* WIP

* Convert Ethcore error to use error_chain

* Use error_chain for ImportError and BlockImportError

* Fix error pattern matches for error_chain in miner

* Implement explicit From for AccountsError

* Fix pattern matches for ErrorKinds

* Handle ethcore error_chain in light client

* Explicitly define Result type to avoid shadowing

* Fix remaining Error pattern matches

* Fix tab space formatting

* Helps if the tests compile

* Fix error chain matching after merge
2018-04-19 11:52:54 +02:00
Andrew Jones
a04c5b180a Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316)
* WIP

* Replace Rlp with UntrustedRlp in views, explicity unwrap with expect

First pass to get it to compile. Need to figure out whether to do this or to propogate Errors upstream, which would require many more changes to dependent code. If we do this way we are assuming that the views are always used in a context where the rlp is trusted to be valid e.g. when reading from our own DB. So need to fid out whether views are used with data received from an untrusted (e.g. extrernal peer).

* Remove original Rlp impl, rename UntrustedRlp -> Rlp

* Create rlp views with view! macro to record debug info

Views are assumed to be over valid rlp, so if there is a decoding error we record where the view was created in the first place and report it in the expect

* Use $crate in view! macro to avoid import, fix tests

* Expect valid rlp in decode functions for now

* Replace spaces with tabs in new file

* Add doc tests for creating views with macro

* Update rlp docs to reflect removing of UntrustedRlp

* Replace UntrustedRlp usages in private-tx merge
2018-04-16 15:52:12 +02:00
Pierre Krieger
fac356c701 More code refactoring to integrate Duration (#8322)
* More code refactoring to integrate Duration

* Fix typo

* Fix tests

* More test fix
2018-04-14 21:35:58 +02:00
Wei Tang
897a94641e Unify and limit rocksdb dependency places (#8371)
* secret_store: remove kvdb_rocksdb dependency

* cli: init db mod for open dispatch

* cli: move db, client_db, restoration_db, secretstore_db to a separate mod

* migration: rename to migration-rocksdb and remove ethcore-migrations

* ethcore: re-move kvdb-rocksdb dep to test

* mark test_helpers as test only and fix migration mod naming

* Move restoration_db_handler to test_helpers_internal

* Fix missing preambles in test_helpers_internal and rocksdb/helpers

* Move test crates downward

* Fix missing docs

* cli, db::open_db: move each argument to a separate line

* Use featuregate instead of dead code for `open_secretstore_db`

* Move pathbuf import to open_secretstore_db

Because it's only used there behind a feature gate
2018-04-13 21:14:53 +02:00
Tomasz Drwięga
1cd93e4ceb New Transaction Queue implementation (#8074)
* Implementation of Verifier, Scoring and Ready.

* Queue in progress.

* TransactionPool.

* Prepare for txpool release.

* Miner refactor [WiP]

* WiP reworking miner.

* Make it compile.

* Add some docs.

* Split blockchain access to a separate file.

* Work on miner API.

* Fix ethcore tests.

* Refactor miner interface for sealing/work packages.

* Implement next nonce.

* RPC compiles.

* Implement couple of missing methdods for RPC.

* Add transaction queue listeners.

* Compiles!

* Clean-up and parallelize.

* Get rid of RefCell in header.

* Revert "Get rid of RefCell in header."

This reverts commit 0f2424c9b7319a786e1565ea2a8a6d801a21b4fb.

* Override Sync requirement.

* Fix status display.

* Unify logging.

* Extract some cheap checks.

* Measurements and optimizations.

* Fix scoring bug, heap size of bug and add cache

* Disable tx queueing and parallel verification.

* Make ethcore and ethcore-miner compile again.

* Make RPC compile again.

* Bunch of txpool tests.

* Migrate transaction queue tests.

* Nonce Cap

* Nonce cap cache and tests.

* Remove stale future transactions from the queue.

* Optimize scoring and write some tests.

* Simple penalization.

* Clean up and support for different scoring algorithms.

* Add CLI parameters for the new queue.

* Remove banning queue.

* Disable debug build.

* Change per_sender limit to be 1% instead of 5%

* Avoid cloning when propagating transactions.

* Remove old todo.

* Post-review fixes.

* Fix miner options default.

* Implement back ready transactions for light client.

* Get rid of from_pending_block

* Pass rejection reason.

* Add more details to drop.

* Rollback heap size of.

* Avoid cloning hashes when propagating and include more details on rejection.

* Fix tests.

* Introduce nonces cache.

* Remove uneccessary hashes allocation.

* Lower the mem limit.

* Re-enable parallel verification.

* Add miner log. Don't check the type if not below min_gas_price.

* Add more traces, fix disabling miner.

* Fix creating pending blocks twice on AuRa authorities.

* Fix tests.

* re-use pending blocks in AuRa

* Use reseal_min_period to prevent too frequent update_sealing.

* Fix log to contain hash not sender.

* Optimize local transactions.

* Fix aura tests.

* Update locks comments.

* Get rid of unsafe Sync impl.

* Review fixes.

* Remove excessive matches.

* Fix compilation errors.

* Use new pool in private transactions.

* Fix private-tx test.

* Fix secret store tests.

* Actually use gas_floor_target

* Fix config tests.

* Fix pool tests.

* Address grumbles.
2018-04-13 17:34:27 +02:00
Pierre Krieger
03b96a7c0a
Some tweaks to main.rs for parity as a library (#8370)
* Some tweaks to main.rs for parity as a library

* Remove pub from PostExecutionAction
2018-04-13 14:21:15 +02:00
Pierre Krieger
16f435b906 Fix config test by adding no-hardcodec-sync (#8380) 2018-04-12 12:05:45 +01:00
Marek Kotewicz
0a170efaa5 fixed unsafe shell call on windows (#8372) 2018-04-11 17:21:29 +01:00
Marek Kotewicz
1356d6d8d5
parity uses winapi 0.3.4 (#8366)
* parity uses winapi 0.3.4

* remove redundant unsafe
2018-04-11 15:22:48 +02:00
Marek Kotewicz
dd2c27958c use atty instead of isatty (#8365) 2018-04-11 11:56:37 +01:00
Tomasz Drwięga
8348147a4f Enable UI by default, but only display deprecation notice (#8262)
* Enable UI by default, but only display info page.

* Fix test.

* Fix naming and remove old todo.

* Change "wallet" with "browser UI"

* Update text, its not deprecated, its moved
2018-04-10 16:14:15 +02:00
Wei Tang
692cd10d4a Use hyper 0.11 in ethcore-miner and improvements in parity-reactor (#8335)
* parity-reactor: Pass over Handle in spawning fn to allow normal tokio ops

* Allow fetch to work with arbitrary requests

* typo: Fix missing handler closure

* miner, work_notify: use fetch and parity-reactor

* Fix work_notify pushing in parity CLI
2018-04-10 13:51:29 +02:00
Marek Kotewicz
86446d713a ethcore-sync (#8347) 2018-04-10 12:13:49 +02:00
Svyatoslav Nikolsky
0d75d01c84 SecretStore: get rid of engine.signer dependency (#8173)
* SecretStore: get rid of engine.signer dependency

* SecretStore: fixed self for transact_contract

* SecretStore: fixed pending requests + 1-of-1 sessions completion

* SecretStore: fixed completion signal in 1-of-1 case

* fixed test(s)

* removed obsolete TODO && redundant statement

* ok_or -> ok_or_else
2018-04-09 16:38:59 +02:00
Wei Tang
431b27d3e1 replace_home for password_files, reserved_peers and log_file (#8324)
* replace_home for password_files, reserved_peers and log_file

* typo: arg_log_file is Option
2018-04-09 16:34:47 +02:00
Akira Takizawa
d97cf34138 Add Ethereum Social support (#8325) 2018-04-09 16:18:00 +02:00
Anton Gavrilov
e6f75bccfe Private transactions integration pr (#6422)
* Private transaction message added

* Empty line removed

* Private transactions logic removed from client into the separate module

* Fixed compilation after merge with head

* Signed private transaction message added as well

* Comments after the review fixed

* Private tx execution

* Test update

* Renamed some methods

* Fixed some tests

* Reverted submodules

* Fixed build

* Private transaction message added

* Empty line removed

* Private transactions logic removed from client into the separate module

* Fixed compilation after merge with head

* Signed private transaction message added as well

* Comments after the review fixed

* Encrypted private transaction message and signed reply added

* Private tx execution

* Test update

* Main scenario completed

* Merged with the latest head

* Private transactions API

* Comments after review fixed

* Parameters for private transactions added to parity arguments

* New files added

* New API methods added

* Do not process packets from unconfirmed peers

* Merge with ptm_ss branch

* Encryption and permissioning with key server added

* Fixed compilation after merge

* Version of Parity protocol incremented in order to support private transactions

* Doc strings for constants added

* Proper format for doc string added

* fixed some encryptor.rs grumbles

* Private transactions functionality moved to the separate crate

* Refactoring in order to remove late initialisation

* Tests fixed after moving to the separate crate

* Fetch method removed

* Sync test helpers refactored

* Interaction with encryptor refactored

* Contract address retrieving via substate removed

* Sensible gas limit for private transactions implemented

* New private contract with nonces added

* Parsing of the response from key server fixed

* Build fixed after the merge, native contracts removed

* Crate renamed

* Tests moved to the separate directory

* Handling of errors reworked in order to use error chain

* Encodable macro added, new constructor replaced with default

* Native ethabi usage removed

* Couple conversions optimized

* Interactions with client reworked

* Errors omitting removed

* Fix after merge

* Fix after the merge

* private transactions improvements in progress

* private_transactions -> ethcore/private-tx

* making private transactions more idiomatic

* private-tx encryptor uses shared FetchClient and is more idiomatic

* removed redundant tests, moved integration tests to tests/ dir

* fixed failing service test

* reenable add_notify on private tx provider

* removed private_tx tests from sync module

* removed commented out code

* Use plain password instead of unlocking account manager

* remove dead code

* Link to the contract changed

* Transaction signature chain replay protection module created

* Redundant type conversion removed

* Contract address returned by private provider

* Test fixed

* Addressing grumbles in PrivateTransactions (#8249)

* Tiny fixes part 1.

* A bunch of additional comments and todos.

* Fix ethsync tests.

* resolved merge conflicts

* final private tx pr (#8318)

* added cli option that enables private transactions

* fixed failing test

* fixed failing test

* fixed failing test

* fixed failing test
2018-04-09 16:14:33 +02:00
Wei Tang
c039ab79b5 Decouple rocksdb dependency from ethcore (#8320)
* Move client DB opening logic to CLI

* Move restoration db open logic to CLI

This adds KeyValueDBHandler which handles opening a new database, thus allow us to move the restoration db open logic
out of ethcore.

* Move rocksdb's compactionprofile conversion to CLI

* Move kvdb_rocksdb as test dependency for ethcore

* Fix tests due to interface change

* Fix service tests

* Remove unused migration dep for ethcore
2018-04-09 14:21:37 +02:00
Pierre Krieger
652f5032a2 Fix the JSONRPC API not running with the light client (#8326) 2018-04-08 18:29:25 +02:00
Pierre Krieger
27c32d3629
Tweaks and add a Dockerfile for Android (#8036) 2018-04-05 14:38:50 +02:00
East Coin
d57944ffb9 Implement Easthub chain spec (#8295) 2018-04-04 23:00:21 +09:00
Niklas Adolfsson
ef80698deb Upgrader remove raw unwrap and bump semver (#8251)
* remove raw unwrap and bump semver

* bump rustc_version

* Semver -> SemVer
2018-04-04 11:54:41 +02:00
Pierre Krieger
e12a5159a8 Cleaner binary shutdown system (#8284)
* Cleaner shutdown system when executing

* Simplify set_exit_handler for Client

* Minor change

* Fix submodule
2018-04-04 11:50:28 +02:00
Marek Kotewicz
ea6b0ec164
remove evmjit (#8229)
* removed not working evmjit, closes #8192 closes #6205

* removed evmjit from build scripts

* fixed parity compile error

* removed evmjit cli options

* fixed invalid test config files
2018-04-04 18:07:49 +09:00
Svyatoslav Nikolsky
ec96091369 SecretStore: generating and retrieving decryption keys via service contract (#8029)
* SecretStore: started document keys generation via contract

* fixed Cargo.lock

* SecretStore: doc key contract gen tests

* SecretStore: fixed log parsing

* SecretStore: flush

* SecretStore: secretstore_generateDocumentKey RPC

* SecretStore: return encrypted_key from secretstore_generateDocumentKey

* prepare to GenerateDocKey -> StoreDocKey

* SecretStore: ability to identify requester via Public/Address

* SecretStore: store author address instead of public in db

* flush

* SecretStore: flush

* SecretStore: fixed test

* SecretStore: flush

* SecretStore: flush

* SecretStore: flush

* SecretStore: flush

* SecretStore: start async generation session

* SecretStore: process StoreDocumentKey service tasks

* SecretStore: flush

* SecretStore: update service contact ABI

* SecretStore: flush

* SecretStore: flush

* SecretStore: fixed event

* SecretStore: flush

* SecretStore: fixed tests

* SecretStore: fix broadcast shadows decryption

* SecretStore: finally decryption via service contract works

* SecretStore: fix for updated contract

* SecretStore: restored pending requests reqding

* SecretStore: fixed some TODOs

* SecretStore: OnChainServiceContractAggregate

* SecretStore: different names for different contracts types

* SecretStore: updated contracts interfaces

* SecretStore: utilize aggregate service contract

* fixed compilation

* SecretStore: fixes for updated contract

* SecretStore: service fixes after testing

* fixed cli test compilation

* SecretStore: decryption_session_origin_is_known_to_all_initialized_nodes

* SecretStore: added new contract listener tests

* SecretStore: session_listener_works

* removed optional TODO

* SecretStore: fixed KeyServer shutdown

* fixed warn + grumble

* const durations
2018-04-03 16:54:34 +02:00
Niklas Adolfsson
0a535bf485 Honor --max-peers if --min-peers is not specified (#8087)
* Change interpretation min and max peers

* Only min specified -> Set min to that value and max to default
* Only max specified -> Set min and max to that value
* Both specified -> Set min the smallest value and max to the largest value

* simplify logic, new ParseError & add tests

* simplify code according to the review comments

* address review comments

* more fine-grained tests
2018-04-03 16:51:57 +02:00
André Silva
dcaff6f4c8 Auto-updater improvements (#8078)
* updater: refactor updater flow into state machine

* updater: delay update randomly within max range

* updater: configurable update delay

* updater: split polling and updater state machine step

* updater: drop state to avoid deadlocking

* updater: fix fetch backoff

* updater: fix overflow in update delay calculation

* updater: configurable update check frequency

* updater: fix update policy frequency comparison

* updater: use lazy_static for platform and platform_id_hash

* updater: refactor operations contract calls into OperationsClient

* updater: make updater generic over operations and fetch client

* updater: fix compilation

* updater: add testing infrastructure and minimal test

* updater: fix minor grumbles

* updater: add test for successful updater flow

* updater: add test for update delay

* updater: add test for update check frequency

* updater: mock time and rng for deterministic tests

* updater: test backoff on failure

* updater: add test for backoff short-circuit on new release

* updater: refactor to increase readability

* updater: cap maximum backoff to one month

* updater: add test for detecting already downloaded update

* updater: add test for updater disable on fatal errors

* updater: add test for pending outdated fetch

* updater: test auto install of updates

* updater: add test for capability updates

* updater: fix capability update

* updater: use ethabi to create event topic filter

* updater: decrease maximum backoff to 1 day

* updater: cap maximum update delay with upcoming fork block number

* updater: receive state mutex guard in updater_step

* updater: overload execute_upgrade to take state mutex guard

* updater: remove unnecessary clone of latest operations info

* updater: remove latest operations info clone when triggering fetch
2018-04-03 16:49:23 +02:00
Tomasz Drwięga
c1cced3662 Allow customization of max WS connections. (#8257)
* Allow customization of max WS connections.

* remove superflous line.

* Add test for CLI argument parsing.
2018-04-02 11:33:09 +01:00
Ryan Leung
9c9ddaccec use constant durations (#8278)
* use constant durations

* fix CI

* address comments
2018-04-02 10:47:56 +02:00
Pierre Krieger
7f9589d678 Fix warning about --no-hardcoded-sync being printed when it shouldn't (#8261) 2018-03-29 14:33:57 +02:00
Tomasz Drwięga
899c1a4b0e Warp-only sync with warp-barrier [blocknumber] flag. (#8228)
* Warp-only sync with warp-after [blocknumber] flag.

* Fix tests.

* Fix configuration tests.

* Rename to warp barrier.
2018-03-29 11:20:27 +02:00
Thibaut S
2632310b6a
Update CLI help for jsonrpc-apis, ws-apis and ipc-apis (#8234)
* jsonrpc-api,  ws-apis and ipc-apis update

* Better wording

* Clarify what "safe" has
2018-03-28 10:42:55 +02:00
Marek Kotewicz
06a7ca221c
node-filter does not use ChainNotify (#8231)
* node-filter does not use ChainNotify

* fixed failing test
2018-03-28 11:32:44 +09:00
Pierre Krieger
04931618ed
Implement hardcoded sync in the light client (#8075)
* Implement hardcoded sync

* Fix concerns

* Remove artifact

* Fix cli tests

* Fix compilation

* Update hardcoded sync block

* Don't use any data fetch for the light service
2018-03-27 13:56:59 +02:00
Amaury Martiny
eb18e7ade7 Change name Wallet -> UI (#8164)
* Change name Wallet -> UI

* Make warning bold
2018-03-23 14:33:23 +01:00
Tomasz Drwięga
9e294d577a Re-enable signer, even with no UI. (#8167)
* Re-enable signer, even with no UI.

* Fix message.
2018-03-20 17:57:37 +00:00
Tomasz Drwięga
beb6438ef5
Disable UI by default. (#8105) 2018-03-19 18:11:00 +01:00
Max Kaye
d27c36cf75 explicitly mention pruning_history uses RAM (#8130) 2018-03-16 09:11:54 +01:00
Toralf Wittner
322dfbcd78 Replace reqwest with hyper (#8099)
* Very primitive test of the Client API

* [WIP] getting rid of request

* Add support for redirects.

* Remove CpuPool from `fetch::Client`.

* Adapt code to API changes and fix tests.

* Use reference counter to stop background thread.

On `clone` the counter is incremented, on `drop` decremented. Once 0 we
send `None` over the channel, expecting the background thread to end.

* Fix tests.

* Comment.

* Change expect messages.

* Use local test server for testing fetch client.

* Ensure max_size also in BodyReader.

* Replace `Condvar` with `sync_channel`.

* Re-export `url::Url` from `fetch` crate.

* Remove spaces.

* Use random ports in local test server.
2018-03-14 13:40:54 +01:00
Pierre Krieger
113c35af0a Remove the time dependency where possible (#8100) 2018-03-14 12:29:52 +01:00
Marek Kotewicz
de72643898
ethcore-service (#8089)
* ethcore test::helpers cleanup

* ethcore-service
2018-03-13 11:49:57 +01:00
Niklas Adolfsson
e0f71b0c17 [contract-client] refactor (#7978)
* Refactor usage of registry contract

* remove unsed file

* Rename methods & fix comments

* refactor contract_client:

* Intoduced separate traits for asyncronous and syncronous contract clients
* Removed registrar from ethcore::client
* s/ContractClient/AsyncContractClient

* make the tests compile and pass

* omit changes in ethcore

* Use only one trait for ContractClient

* Use an associated type in the trait to determine syncronous or asyncronous communication
* Export the types from contract-client crate
* Document that "A" in the hash correspons to a DNS A Record A.K.A Address Record

* contract_client -> registrar

* address review feedback
2018-03-12 20:46:27 +00:00
Marek Kotewicz
66f3c50842 revert removing blooms (#8066)
* Revert "fix traces, removed bloomchain crate, closes #7228, closes #7167"

This reverts commit 1bf62038678295e5586f02a38a0c5aab9a9efe62.

* Revert "fixed broken logs (#7934)"

This reverts commit f8a2e53f3e.

* fixed broken logs

* bring back old lock order

* remove migration v13

* revert CURRENT_VERSION to 12 in migration.rs
2018-03-12 20:15:55 +00:00
Dmitry Kashitsyn
9d7d6f7108 Client refactoring (#7038)
* Improves `BestBlock` comment

* Improves `TraceDB` comment

* Improves `journaldb::Algorithm` comment.

Probably the whole enum should be renamed to `Strategy` or something alike.

* Comments some of the `Client`'s fields

* Deglobs client imports

* Fixes comments

* Extracts `import_lock` to `Importer` struct

* Extracts `verifier` to `Importer` struct

* Extracts `block_queue` to `Importer` struct

* Extracts `miner` to `Importer` struct

* Extracts `ancient_verifier` to `Importer` struct

* Extracts `rng` to `Importer` struct

* Extracts `import_old_block` to `Importer` struct

* Adds `Nonce` trait

* Adds `Balance` trait

* Adds `ChainInfo` trait

* Fixes imports for tests using `chain_info` method

* Adds `BlockInfo` trait

* Adds more `ChainInfo` imports

* Adds `BlockInfo` imports

* Adds `ReopenBlock` trait

* Adds `PrepareOpenBlock` trait

* Fixes import in tests

* Adds `CallContract` trait

* Fixes imports in tests using `call_contract` method

* Adds `TransactionInfo` trait

* Adds `RegistryInfo` trait

* Fixes imports in tests using `registry_address` method

* Adds `ScheduleInfo` trait

* Adds `ImportSealedBlock` trait

* Fixes imports in test using `import_sealed_block` method

* Adds `BroadcastProposalBlock` trait

* Migrates `Miner` to static dispatch

* Fixes tests

* Moves `calculate_enacted_retracted` to `Importer`

* Moves import-related methods to `Importer`

* Removes redundant `import_old_block` wrapper

* Extracts `import_block*` into separate trait

* Fixes tests

* Handles `Pending` in `LightFetch`

* Handles `Pending` in filters

* Handles `Pending` in `ParityClient`

* Handles `Pending` in `EthClient`

* Removes `BlockId::Pending`, partly refactors dependent code

* Adds `StateInfo` trait

* Exports `StateOrBlock` and `BlockChain` types from `client` module

* Refactors `balance` RPC using generic API

* Refactors `storage_at` RPC using generic API

* Makes `MinerService::pending_state`'s return type dynamic

* Adds `StateOrBlock` and `BlockChain` types

* Adds impl of `client::BlockChain` for `Client`

* Exports `StateInfo` trait from `client` module

* Missing `self` use

To be fixed up to "Adds impl of `client::BlockChain` for `Client`"

* Adds `number_to_id` and refactors dependent RPC methods

* Refactors `code_at` using generic API

* Adds `StateClient` trait

* Refactors RPC to use `StateClient` trait

* Reverts `client::BlockChain` trait stuff, refactors methods to accept `StateOrBlock`

* Refactors TestClient

* Adds helper function `block_number_to_id`

* Uses `block_number_to_id` instead of local function

* Handles `Pending` in `list_accounts` and `list_storage_keys`

* Attempt to use associated types for state instead of trait objects

* Simplifies `state_at_beginning`

* Extracts `call` and `call_many` into separate trait

* Refactors `build_last_hashes` to accept reference

* Exports `Call` type from the module

* Refactors `call` and `call_many` to accept state and header

* Exports `state_at` in `StateClient`

* Exports `pending_block_header` from `MinerService`

* Refactors RPC `call` method using new API

* Adds missing parentheses

* Refactors `parity::call` to use new call API

* Update .gitlab-ci.yml

fix gitlab lint

* Fixes error handling

* Refactors `traces::call` and `call_many` to use new call API

* Refactors `call_contract`

* Refactors `block_header`

* Refactors internal RPC method `block`

* Moves `estimate_gas` to `Call` trait, refactors parameters

* Refactors `estimate_gas` in RPC

* Refactors `uncle`

* Refactors RPC `transaction`

* Covers missing branches

* Makes it all compile, fixes compiler grumbles

* Adds casts in `blockchain` module

* Fixes `PendingBlock` tests, work on `MinerService`

* Adds test stubs for StateClient and EngineInfo

* Makes `state_db` public

* Adds missing impls for `TestBlockChainClient`

* Adds trait documentation

* Adds missing docs to the `state_db` module

* Fixes trivial compilation errors

* Moves `code_hash` method to a `BlockInfo` trait

* Refactors `Verifier` to be generic over client

* Refactors `TransactionFilter` to be generic over client

* Refactors `Miner` and `Client` to reflect changes in verifier and txfilter API

* Moves `ServiceTransactionChecker` back to `ethcore`

* Fixes trait bounds in `Miner` API

* Fixes `Client`

* Fixes lifetime bound in `FullFamilyParams`

* Adds comments to `FullFamilyParams`

* Fixes imports in `ethcore`

* Fixes BlockNumber handling in `code_at` and `replay_block_transactions`

* fix compile issues

* First step to redundant trait merge

* Fixes compilation error in RPC tests

* Adds mock `State` as a stub for `TestClient`

* Handles `StateOrBlock::State` in `TestBlockChainClient::balance`

* Fixes `transaction_count` RPC

* Fixes `transaction_count`

* Moves `service_transaction.json` to the `contracts` subfolder

* Fixes compilation errors in tests

* Refactors client to use `AccountData`

* Refactors client to use `BlockChain`

* Refactors miner to use aggregate traits

* Adds `SealedBlockImporter` trait

* Refactors miner to use `SealedBlockImporter` trait

* Removes unused imports

* Simplifies `RegistryInfo::registry_address`

* Fixes indentation

* Removes commented out trait bound
2018-03-03 18:42:13 +01:00
Tomasz Drwięga
9bcb589785 Support parity protocol. (#8035) 2018-03-02 10:26:49 +01:00
Pierre Krieger
d4205da484 Extract the hard dependency on rocksdb from the light client (#8034)
* Extract the hard dependency on rocksdb from the light client

* Remove TODO
2018-03-01 19:53:15 +01:00
Marek Kotewicz
ee93be80c0
removed old migrations (#7974)
* removed old migrations

* improve SimpleMigration

* fixed migration tests

* fixed redundant whitespace

* add ToV13 migration which removes bloom groups

* bump CURRENT_VERSION of db
2018-02-22 14:53:10 +01:00
André Silva
e0b4506474 Increase max download limit to 128MB (#7965)
* fetch: increase max download limit to 64MB

* parity: increase download size limit for updater service
2018-02-22 11:22:25 +01:00
Tomasz Drwięga
236a4aac22 Pending transactions subscription (#7906)
* Pending transactions subscription.

* Pending transactions Pub-Sub

* Add light client support.

* Remove redundant Ok
2018-02-16 16:51:34 +01:00
Marek Kotewicz
899dd0ff4b
removed redundant otry! macro from ethcore (#7916)
* removed redundant otry! macro from ethcore

* removed redundant otry! macro from parity
2018-02-16 16:37:12 +01:00
Tomasz Drwięga
226215eff6 Fix CSP for dapps that require eval. (#7867)
* Add allowJsEval to manifest.

* Enable 'unsafe-eval' if requested in manifest.
2018-02-15 11:05:20 +01:00
Lexi Brent
006b2f3564 Fix string typo: "develoopment" -> "development" (#7874) 2018-02-13 09:52:05 +03:00
Marek Kotewicz
c060d9584d
ethabi version 5 (#7723)
* Refactor updater to use ethabi-derive

* Grumble: do_call type alias

* Empty commit to trigger test re-run

* migration to ethabi-5.0

* migration to ethabi-5.0 in progress

* use ethabi_deriven to generate TransactAcl contract

* use ethabi_deriven to generate Registry contract

* hash-fetch uses ethabi_derive, removed retain cycle from updater, fixed #7720

* node-filter crate uses ethabi_derive to generate peer_set contract interface

* use LruCache in node-filter instead of HashMap

* validator_set engine uses ethabi_derive

* ethcore does not depend on native_contracts

* miner does no depend on native_contracts

* secret_store does not use native_contracts (in progress)

* removed native-contracts

* ethcore and updater does not depend on futures

* updated ethereum-types

* fixed all warnings caused by using new version of ethereum-types

* updated ethabi_derive && ethabi_contract to get rid of warnings

* removed another retain cycle in updater, fixed following minor version on update

* moved contracts out of native_contracts res

* updated ethabi_contract

* fixed failing test

* fixed failing test

* there is no need to create two contracts of the same kind any more

* simplify updater::ReleaseTrack conversion into u8 and add several tests for it

* applied review suggestions

* applied review suggestions
2018-02-09 09:32:06 +01:00
Svyatoslav Nikolsky
2cfc2b95d0 fixed API set in help (#7790) 2018-02-02 13:07:42 +01:00
André Silva
4763887a68 Fix client not being dropped on shutdown (#7695)
* parity: wait for client to drop on shutdown

* parity: fix grumbles in shutdown wait

* parity: increase shutdown timeouts
2018-01-31 11:41:29 +01:00
Axel Chalon
fee88d04d4 Wrap --help output to 120 characters (#7626)
* Update Clap dependency and remove workarounds

* WIP

* Remove line breaks in help messages for now

* Multiple values can only be separated by commas (closes #7428)

* Grumbles; refactor repeating code; add constant

* Use a single Wrapper rather than allocate a new one for each call

* Wrap --help to 120 characters rather than 100 characters
2018-01-31 09:50:52 +01:00
Chase Wright
afea11ede6 Reduce usd_per_tx (#7058)
* Update config.full.toml

* Update mod.rs

* Patch 1 (#1)

* Iterate over both buffered and unbuffered database entries

* Fix iterator issues

* no default uncles

* prepare cargo configuration for upload of crates

* update bigint version number

* update ethcore-bigint version

* rename hash crate to keccak-hash

* update memorydb

* update rlp

* update patricia-trie cargo.toml

* use error-chain in ethcore-network

* interleaved-ordered 0.1.1

* static linking for snappy

* removed redundant imports

* Add the desktop file for the snap

Now that we have added plugs to allow accessing the display, the snap needs
a desktop file. And bonus point, it will appear on the menu when it's
installed, and once you make a stable relase, it will appear in the gnome
software center app! So, one-click install for parity :)

Closes: #7056

* update icon for desktop

* Properly display Signer errors (Snackbar display popup) (#7053)

* Update to fixed @parity/ui (Errors component)

* Update ParityBar radius to align with Snackbar/Errors

* Update to latest @parity/ui

* Update dependencies @parity/signer-plugin-*

* Really pull in @parity/signer-plugin-* deps

* CHANGELOG for 1.7.8, 1.7.9, 1.8.2, and 1.8.3 (#7055)

* Update changelog for 1.7.8 stable

* Update changelog for 1.7.9 stable

* Improve wording in Changelog

* Update changelog for 1.8.2 beta

* Update changelog for 1.8.3 beta

* [ci skip] js-precompiled 20171115-103846

* ECIP-1039: Monetary policy rounding specification

Fix potential rounding errors between geth and parity in the long-term future.

* Change reward calculation to only use divide once

* SecretStore: servers set change session api (#6925)

* SecretStore: first key versions flush

* SecretStore: key versions in encryption session

* SecretStore: flush key versions negotiation session

* SecretStore: connected key version negotiation session to cluster

* SecretStore: cluster sessions container refactoring

* SecretStore: flush

* SecretStore: flush key versions

* SecretStore: flush

* SecretStore: delegation proto

* SecretStore: decryption_session_is_delegated_when_node_does_not_have_key_share

* SecretStore: fixed version in decryption session

* SecretStore: signing_session_is_delegated_when_node_does_not_have_key_share

* SecretStore: started restoring admin sessions

* SecretStore: restoring admin sessions

* SecretStore: removed obsolete ShareRemove && ShareMove sessions

* SecretStore: ShareAdd math tests only require old_t+1 nodes

* SecretStore: ShareAdd revamp using new math backend

* SecretStore: do not include isolated nodes into consensus_group

* SecretStore: ServersSetChange + ShareAdd revamp

* removed debug printlns

* SecretStore: key version negotiation tests

* SecretStore: removed debug/merge artifacts

* SecretStore: fixed master node selection

* SecretStore: cleanup + tests + fixes

* SecretStore: uncommented tests

* SecretStore: cleaning up

* SecretStore: cleaning up + tests

* SecretStore: cleaning up

* SecretStore: cleaning up && tests

* SecretStore: fixing TODOs

* SecretStore: fixing TODOs + cleanup

* SecretStore: fixing TODOs

* SecretStore: nodes_add_to_the_node_with_obsolete_version

* SecretStore: nodes_add_fails_when_not_enough_share_owners_are_connected

* SecretStore: tests

* SecretStore: signing && delegation tests

* SecretStore: signing && decryption tests when some nodes are isolated

* SecretStore: sessions_are_removed_when_initialization_fails

* SecretStore: ceaning up

* SecretStore: removed obsolete comments

* SecretStore: signing_session_completes_if_node_does_not_have_a_share

* SecretStore: initial ServersSetChange API

* SecretStore: added secretstore_signServersSet RPC

* SecretStore: ChangeServersSet parse tests

* SecretStore: fixes after manual ServersSetChange tests

* lost file

* fixed network ports overlap in tests

* lost files

* fix tests on patricia-trie

* updated eth-secp256k1

* Fix no-default-features.

* Parse payload from panic

Impl payload

empty str is none

Update tests

Clean

Update wasm-tests

* Allow localUrl in manifest

* Improve Github Issue Template: IT CROWD approved version.

* Remove seperator that causes issue descriptions to become headlines sometimes

* Add to all icon_url places

* Add appId as needed to local dapps

* localUrl only from manifest

* Update panic_payload.rs

* Use query-string for search parsing

* spaces to tabs.

* Add localUrl to serialization

* Make storage_read/write return nothing

* Update gas values

* Update wasm-tests

* Cleanup debug info

* Remove debug log

* Optimize & group dapp requests (#7083)

* Group similar methods in same grouping

* Add a shell_getMethodGroups API

* Small code clean changes

* Fix bug dapp.name not showing

* Additional error handling

* Store sources in own map

* Remove observable variables where not needed

* Refactor code and fix bug dapp not showing on approve

* [ci skip] js-precompiled 20171121-150329

* Remove unused and duplicated files in js-old (#7082)

* Cleanup v1 build process, application-only

* Remove built-in dapps from build (duplicated)

* User @parity/api instead of local version

* Update references to @parity/abi

* Remove unused js-old api/abi folders

* Remove duplicated v1 jsonrpc

* Cleanup unused routes

* Update manifest with wallet image

* Update wallet logo

* Re-add missing test.sh

* Update rpc mocks

* Update tests for Providers

* Use flex for iframe & status

* Additional cleanups (Home screen for embed)

* Keep statusbar fixed (and non-overallping with dapps)

* [ci skip] js-precompiled 20171121-164807

* Cleanup top bar, add Home icon for navigation (#7118)

* Localise images to config.js file

* Remove sample status plugin (commented)

* Update image references from config

* Remove Unknown capability & Capable (only display actions)

* Update to @parity/ui 2.2.14

* Add Home icon on statusbar (go back)

* 2.2.14 -> 2.2.x

* Builtin dapp icons where dappreg not available

* [ci skip] js-precompiled 20171122-140247

* fixed RotatingLogger after migrating to new arrayvec

* Update packages, pull in compiled-only repos (#7125)

* Update packages, pull in compiled-only repos

* Update js-precompiled to point to js-dist-paritytech

* Trigger both js & js-old builds to force update

* Update to bring scripts 100% in-sync

* Fixed build && test (#7128)

* fixed build && test

* fixed rpc tests

* Update js-precompiled ref, trigger JS build

* Add test for ECIP1017 at block 250000000

* Wrong era used in ECIP1017 test

It is era 49, and should correspond to ECIP1017/ECIP1039's era 50.

* [ci skip] js-precompiled 20171124-124119

* Push to correct shell branch (#7135)

* Push to correct shell branch

* Trigger both js & js-old builds

* [ci skip] js-precompiled 20171124-134823

* pwasm-run-test utility

* WASM Remove blockhash error (#7121)

* Remove blockhash error

* Update tests.

* Pull in new dapp-{methods,visible} dapps (#7150)

* [ci skip] js-precompiled 20171128-091552

* fixes typo in user config path (#7159)

* Cleanup JS build artifacts (#7164)

* Cleanup JS build artifacts

* Trigger js & js-old

* [ci skip] js-precompiled 20171129-135441

* Use git flag to remove old js artifacts (#7165)

* [ci skip] js-precompiled 20171129-144917

* Remove *.css.map & *.js.map (#7168)

* [ci skip] js-precompiled 20171129-172021

* Delete unused package.json (dist) (#7173)

* [ci skip] js-precompiled 20171130-103432

* Assorted improvements for ethstore and ethkey (#6961)

* Testing many passwords for presale wallet.

* Add multiple threads.

* WiP: ethkey brain wallets recover.

* Refactor pre-sale-wallet cracking.

* Generate in multiple threads. Brain with prefix.

* Validate bain wallet phrase.

* Brain wallet recovery.

* Self-review fixes.

* Fix tests.

* More docs.

* Bump versions.

* Remove cmd_find from borked merge.

* Update wasm submodules.

* Use threadpool.

* upper limit is gas limit * 10 in estimate gas

* React 16 (#7174)

* Update packages to use React 16

* Rollback to react-router v3

* Use component instead of pure one

* Remove warning about mobx

* Make webpack load css from @parity/ui

* Update enzyme to support react16

* Fix lint

* Use @parity/ui v3

* Update refs of plugin-signer-* deps

* Exclude plugin-signer-* from babel processing

* Reupdate refs to old method

* Update refs again

* [ci skip] js-precompiled 20171201-114538

* pwasm-run-test utility upgrade

* Removed ethcore-util dependency from ethcore-network (#7180)

* Removed ethcore-util dependency

* Removed snappy

* New account selector UI in top bar (#7179)

* Add a dropdown popup for account selector

* Install sui latest version for hideOnScroll bug fix

* Update ui

* Update package-lock after rebase

* Require parity/ui v3.0.3

* Pass accountStore as props

* Require parity/ui v3.0.4

* [ci skip] js-precompiled 20171204-115345

* Update mocha import stubs (#7191)

* Update mocha import stubs

* Add .md files to ignore list

* [ci skip] js-precompiled 20171205-084709

* Update FirstRun for UI-2 (#7195)

* WIP

* Update after @parity/ui update

* Update to latest

* Update semver for @parity

* Update & -> &

* [ci skip] js-precompiled 20171205-102703

* Maximum uncle count transition (#7196)

* Enable delayed maximum_uncle_count activation.

* Fix tests.

* Defer kovan HF.

* mistake comment in calc difficulty (#7154)

* Send each log as a separate notifications. (#7175)

* Update config.full.toml

* Revert "Patch 1 (#1)" (#2)

This reverts commit 2fa0af6392f75cf9f7dd5f8250906e3767da8a5b.

* Update usd_per_tx test

* Fix tests

* Fix initial_minimum
2018-01-30 16:10:12 +01:00
Marek Kotewicz
f43e355254
Replace RandomTempDir with tempdir::Tempdir (#7624)
* Remove GuardedTempResult

* Remove RandomTempPath

* ethcore does not depend on devtools
2018-01-19 17:32:53 +01:00
Tomasz Drwięga
58645d3908 Hardening of CSP (#7621) 2018-01-19 10:38:00 +01:00
Marek Kotewicz
0c01db4a49
separated ethcore_migrations from ethcore (#7586)
* separated ethcore_migrations from ethcore

* fixed authorship nitpick

* make ethcore_migrations related exports and imports more consistent
2018-01-17 22:11:13 +01:00
Tomasz Drwięga
f044b61f42 Extract some parts of miner from ethcore. (#7353)
* Move miner away from ethcore.

* Fix ethcore to use miner/transaction.

* Fix tests and warnings.

* fixed incorrect merge of the test in the documentation
2018-01-11 17:49:10 +01:00
Marek Kotewicz
e95b093483 dissolve util (#7460)
* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor finished

* removed obsolete util/src/lib.rs

* removed commented out code
2018-01-10 15:35:18 +03:00
Svyatoslav Nikolsky
b685b7fae3 SecretStore: tx retry pattern (#7323)
* SecretStore: auto migrate initial commit

* SecretStore: flush automigrate

* SecretStore: debug flush

* SecretStore: added migration to KeyServerSet contract

* SecretStore: flush automigrate

* SecretStore: flush before testing

* SecretStore: flush

* SecretStore: flush

* SecretStore: bunch of tests for simple ConnectionTrigger && KeyServerSet

* SecretStore: started work on TriggerWithMigration tests

* SecretStore: maintain_session tests

* SecretStore: updated some comments

* SecretStore pass migration_id to ServerSetChangeSession

* SecretStore: fixed lock scope

* SecretStore: fixed error response condition

* SecretStore: fixed ServerSetChange session auto-creation

* SecretStore: update active migration in connector

* removed commented code

* SecretStore: fixed tests compilation

* SecretStore: marked test-related unimplemented-s

* SecretStore: labeled all SS TODOs

* SecretStore: do not read auto-migration stuff when auto-migration is disabled + stripped KeyServerSet contract ABI

* SecretStore: ignore duplicated addresses in KeyServerSet

* fied compilation

* SecretStore: wait for N block confirmations before starting auto-migration

* SecretStore: more tests for migration delay

* SecretStore: clear current nodes set when KSS contract is uninstalled

* SecretStore: retry transaction interval
2018-01-10 11:33:45 +01:00
Tomasz Drwięga
69d7c4f519 Expose default gas price percentile configuration in CLI (#7497)
* Expose gas price percentile.

* Fix light eth_call.

* fix gas_price in light client
2018-01-09 12:43:36 +01:00
Marek Kotewicz
7316cb9d92 fixed panic when io is not available for export block, closes #7486 (#7495) 2018-01-08 14:46:29 +01:00
Afri Schoedon
36e230ee16
Expanse Byzantium update w/ correct metropolis difficulty increment divisor (#7463)
* Byzantium Update for Expanse

Here the changes go. Hope I didnt miss anything.

* expip2 changes - update duration limit

* Fix missing EXPIP-2 fields

* Format numbers as hex

* Fix compilation errors

* Group expanse chain spec fields together

* Set metropolisDifficultyIncrementDivisor for Expanse

* Revert #7437

* Add Expanse block 900_000 hash checkpoint
2018-01-05 13:49:07 +01:00
5chdn
27d8befbad
Remove expanse from available chains 2018-01-03 13:24:27 +01:00
Tomasz Drwięga
56311cf0b5
Merge branch 'master' into td-strict-config 2018-01-03 11:07:08 +01:00
Tomasz Drwięga
e439eae54f
Enable strict config parsing. 2018-01-03 11:05:53 +01:00
André Silva
e114b0b28d Upgrade to RocksDB 5.8.8 and tune settings to reduce space amplification (#7348)
* kvdb-rocksdb: update to RocksDB 5.8.8

* kvdb-rocksdb: tune RocksDB options

* Switch to level-style compaction
* Increase default block size (16K), and use bigger blocks for HDDs (64K)
* Increase default file size base (64MB SSDs, 256MB HDDs)
* Create a single block cache shared across all column families
* Tune compaction settings using RocksDB helper functions, taking into account
  memory budget spread across all columns
* Configure backgrounds jobs based on the number of CPUs
* Set some default recommended settings

* ethcore: remove unused config blockchain.db_cache_size

* parity: increase default value for db_cache_size

* kvdb-rocksdb: enable compression on all levels

* kvdb-rocksdb: set global db_write_bufer_size

* kvdb-rocksdb: reduce db_write_bufer_size to force earlier flushing

* kvdb-rocksdb: use master branch for rust-rocksdb dependency
2018-01-03 11:00:37 +01:00
Yurii Rashkovskii
9c0fceb192
Problem: sending any Whisper message fails
The error is "PoW too low to compete with other messages"

This has been previously reported in #7144

Solution: prevent the move semantics

The source of the error is in PoolHandle.relay
implementation for NetPoolHandle.

Because of the move semantics, `res` variable is in fact
copied (as it implements Copy) into the closure and for
that reason, the returned result is always `false.
2018-01-01 20:54:15 -08:00
Marek Kotewicz
5fee880fbb
Merge pull request #7409 from paritytech/dircrate2
standalone dir crate, replaces #7383
2017-12-29 11:44:26 +01:00
Marek Kotewicz
483480d7a1
Merge pull request #7336 from paritytech/secretstore_rpc_sign_raw_hash
SecretStore: secretstore_signRawHash method
2017-12-29 11:10:29 +01:00
debris
7b40f1cfe9 Merge branch 'master' into dircrate2 2017-12-29 10:45:11 +01:00
Marek Kotewicz
f8bd6b9f63
Merge pull request #7101 from paritytech/secretstore_kovan
SecretStore: Kovan integration initial version
2017-12-29 05:31:51 -04:00
Tomasz Drwięga
26e4fc680c Fix default CORS settings. (#7387)
* Fix default CORS settings.

* Add info regarding special options.
2017-12-27 18:56:06 +01:00
Svyatoslav Nikolsky
c0e7abcc81 Merge branch 'master' into secretstore_kovan 2017-12-27 11:44:28 +03:00
Nicolas Ochem
2e12a2db50 Fix #6209 - introduce standalone dir crate
* created the dir crate in util
* moved code from ethstore/src/dir/paths.rs to dir crate
* rename dir module in ethstore to accounts_dir to distinguish it
  from the dir crate
* changes after @tomusdrw on #6952
2017-12-26 00:54:34 -08:00
Marek Kotewicz
d80dd81d77
parity-version pr reopen (#7136)
* parity-version module split from util

removed unused util deps and features

trigger buildbot again

only kvdb links rocksdb

snappy linker issues

* rm snappy

* fixed old version imports
2017-12-22 09:37:39 -04:00
Marek Kotewicz
7c24d0665e
Merge pull request #7355 from paritytech/td-clippy
Get rid of clippy remainings.
2017-12-22 07:09:26 -04:00
Marek Kotewicz
6f516607a1
Merge pull request #7357 from paritytech/unwrap-or
Avoid using ok_or with allocated argument
2017-12-22 06:55:37 -04:00
Tomasz Drwięga
83447c201b Make accounts refresh time configurable. (#7345)
* Configurable accounts refresh time.

* Fix tests.
2017-12-22 06:33:49 +03:00
Tomasz Drwięga
a5a7c1827a
Some more. 2017-12-21 15:37:10 +01:00
NikVolf
516725abe4 ok_or -> ok_or_else 2017-12-21 16:50:58 +03:00
Tomasz Drwięga
00883e477a
Get rid of clippy remainings. 2017-12-21 11:27:26 +01:00
Svyatoslav Nikolsky
794de9f743 SecretStore: fixing grumbles (part1) 2017-12-20 14:50:46 +03:00
Svyatoslav Nikolsky
6e5c188eef SecretStore: secretstore_signRawHash RPC 2017-12-19 16:59:37 +03:00
Marek Kotewicz
53dce9ff98
Merge pull request #7222 from ellaismer/ellaism
Add Ellaism coin in chain config
2017-12-19 09:34:21 -04:00
Jaco Greeff
9202ccccf7
UI redirect to 127.0.0.1 when localhost requested (#7236)
* JS redirect from localhost -> 127.0.0.1

* ui-no-validation for 127.0.0.1

* Update with tests
2017-12-11 16:50:20 +01:00
Svyatoslav Nikolsky
5d792324e6 Merge branch 'master' into secretstore_kovan 2017-12-06 19:56:54 +03:00
Ellaismer
fb073583fe Add ellaism in --chain helper message 2017-12-06 20:51:34 +08:00
Ellaismer
fcd1f72806 Add Ellaism to SpecType 2017-12-06 20:48:32 +08:00
Arkadiy Paronyan
dde6baedec
Removed ethcore-util dependency from ethcore-network (#7180)
* Removed ethcore-util dependency

* Removed snappy
2017-12-02 10:08:04 +01:00
Svyatoslav Nikolsky
14686f2652 SecretStore: cli option to configure service contract 2017-11-24 12:33:33 +03:00
Svyatoslav Nikolsky
12e9c1cebc Merge branch 'master' into secretstore_kovan 2017-11-23 07:27:13 +03:00
Marek Kotewicz
309254348b
Merge pull request #7100 from paritytech/jg-dapp-localUrl
Local dapp development URL
2017-11-21 20:42:51 +01:00
Jaco Greeff
17df58b767 Add localUrl to serialization 2017-11-21 15:02:54 +01:00
Svyatoslav Nikolsky
b5fad300ba Merge branch 'master' into secretstore_kovan 2017-11-20 19:58:01 +03:00
Svyatoslav Nikolsky
3945a29ee6 SecretStore: mapping requests to KeyServer + requests retry 2017-11-20 19:03:31 +03:00
Tomasz Drwięga
4f5d73c945
Fix no-default-features. 2017-11-20 11:02:48 +01:00
Robert Habermeier
81212c5031 Merge branch 'master' into upload-crates 2017-11-17 16:42:41 +01:00
Marek Kotewicz
0230a44b15
Merge pull request #7040 from paritytech/squashed_network_error_chain
squashed ethcore-network changes which introduce error-chain
2017-11-15 18:18:25 +01:00
Marek Kotewicz
5a76d35ca8
Merge pull request #7051 from paritytech/td-jsonrpc-bump
Bump JSON-RPC version
2017-11-14 15:43:26 +01:00
Tomasz Drwięga
f7fa9f6e9d
Drop jsonrpc_core::Error 2017-11-14 12:17:48 +01:00
debris
3cf52dac59 use error-chain in ethcore-network 2017-11-13 16:48:58 +01:00
Tomasz Drwięga
72907da2ae
Garbage collect hashmap entries. 2017-11-12 12:50:13 +01:00
Robert Habermeier
ec5519ccd1 rename hash crate to keccak-hash 2017-11-10 20:08:28 +01:00
Nicolas Gotchac
8c6b89df72 Merge branch 'master' into fix-nonce-reservation 2017-11-10 17:36:12 +01:00
Nicolas Gotchac
15c97336a4 Create hashmap in RPC Apis 2017-11-10 17:11:04 +01:00
Marek Kotewicz
e13204c5c8
Merge pull request #6970 from paritytech/validate_node_url
Adds validate_node_url() and refactors boot node check (#6907)
2017-11-10 15:39:30 +01:00
Nicolas Gotchac
4c8780f188 Use nonce reservation per address 2017-11-09 19:49:34 +01:00
Axel Chalon
83e2fa3112 Make CLI arguments parsing more backwards compatible 2017-11-08 12:33:56 +01:00
Dmitry Kashitsyn
1516fc1c57 Adds validate_node_url() and refactors boot node check (#6907) 2017-11-06 12:46:11 +07:00
Tomasz Drwięga
ffee6aacff Creating pending block with all transactions from the queue (#6942)
* Allow to include all queue transactions in pending block.

* Fix tests.
2017-11-03 15:20:20 +01:00
Arkadiy Paronyan
60bb2d9c74
Set zero nonce and gasprice for calls by default (#6954) 2017-11-02 12:50:08 +01:00
Tomasz Drwięga
b861ad37a4 Reserve nonces for signing (#6834)
* Nonce future - reserve and dispatch

* Single thread nonce tests

* Track status of reserved nonces.

* Initialization of nonce reservations.

* Prospective Signer

* Fix cli tests.
2017-11-01 11:23:18 +01:00
arkpar
38652bd296
Restored rust-toolchain 2017-10-30 08:05:44 +01:00
arkpar
4b56f2530d
Don't create IPC dir on windows 2017-10-29 14:42:37 +01:00
Nicolas Ochem
542cee9ace fix #6228: do not display eth price in cli for etc (#6877)
* fix #6228: do not display eth price in cli for etc

Current behaviour:

When the client is started with defaults, the miner's gas calibrator
periodically queries the price of ether in usd and uses it to adjust
the wei_per_gas variable, displaying an info message in the cli each
time calibration happens. The info message mentions the price of ETH.

When started with the --min-gas-price option, the calibrator is inactive
and the price is not displayed.

Problem:

When running on an alternate chain such as ethereum classic, the info
message mentioning the ETH price is present, unless the --min-gas-price
option is used.

Solution:

if chain != foundation and --min-gas-price is not set,
don't use GasPricerConfig::Calibrated as default but rather fix
the minimum gas price to zero.

* self.chain() returns ChainType.

* match chain based on SpecType
2017-10-25 11:42:48 +02:00
Nicolas Ochem
54b14001fa fix mining help (#6885)
was
        --min-gas-price=[STRING]
	                Minimum amount of Wei per GAS to be paid for a
			transaction to be accepted for mining. Overrides
			--basic-tx-usd.

Issue: --basic-tx-usd does not exist. Author probably meant
--usd-per-tx.

New:
        --min-gas-price=[STRING]
	                Minimum amount of Wei per GAS to be paid for a
			transaction to be accepted for mining. Overrides
			--usd-per-tx.
2017-10-25 11:38:47 +02:00
David Dorgan
bdf1e6afcc Revert "Sync parity-ewf with parity"
This reverts commit f7ba063b22.
2017-10-24 13:31:58 +01:00
David Dorgan
f7ba063b22 Sync parity-ewf with parity 2017-10-24 12:31:50 +01:00
Tomasz Drwięga
dfccc3fb04 Allow force sealing and reseal=0 for non-dev chains. (#6878) 2017-10-24 12:25:34 +02:00
Tomasz Drwięga
025244e8b2 Return error on timed unlock attempt. (#6777) 2017-10-24 11:57:55 +02:00
Tomasz Drwięga
490f771faf
Fix tests. 2017-10-19 12:02:13 +02:00
Tomasz Drwięga
195305ce2e
Merge branch 'master' into td-ui-2 2017-10-18 16:45:37 +02:00
Tomasz Drwięga
48ac6cbcf8
Enable access to WebSockets for dapps. 2017-10-18 16:28:45 +02:00
Marek Kotewicz
5281e09828 Merge pull request #6801 from paritytech/refactoring/journal-6693
Refactors journaldb as a separate crate
2017-10-18 16:10:28 +02:00
Kirill Pimenov
86c2633280 Migrate to Futures in SigningQueue (#6689)
* oneshot channels instead of custom promises

* Future instead of handle_dispatch

* Even less copying

* Those explicit waits were a mistake, thanks, @tomusdrw

* No more unsafe polling

* Test for the new `is_done()` method

* Mark Futures as `#[must_use]`

* Solve most compilation warnings

* `try_ready!` is more ideomatic

* Turn spaces into tabs

* Documentation and visibility improvements

* Minor code style improvements

* Make Futures run on an explisit reactor

* Another round of code style issues

* Simplify ConfirmationReceiver type

* Flatten ConfirmationOutcome into a plain Result type

* Get rid of a separate `pending` set, it was a stupid idea

* Clarify `add_request` docs

* No need to reduce the scope of the mutex here
2017-10-17 14:50:53 +02:00
Dmitry Kashitsyn
7fe7b6d9a4 Fixes import in test 2017-10-17 12:12:46 +07:00
Dmitry Kashitsyn
f9e588dd7b Refactors parity/parity to use journaldb crate (#6693) 2017-10-17 11:46:54 +07:00
debris
95f0384510 Merge branch 'master' into ipc_cleanup 2017-10-16 18:19:41 +02:00
debris
16d84f8ecf finished removing ipc 2017-10-16 18:18:43 +02:00
debris
6dc50d01b5 KeyValueDB trait uses errors instead of strings 2017-10-16 12:11:35 +02:00
debris
b277c3810f Merge branch 'master' into kvdb_split 2017-10-13 16:27:12 +02:00
Axel Chalon
d77dabadbb CLI: Reject invalid argument values rather than ignore them (#6723)
* CLI: Reject invalid argument values rather than ignore them

* Fix grumbles
2017-10-13 12:20:57 +02:00
debris
5c220ab64b Merge branch 'master' into kvdb_split 2017-10-13 12:18:49 +02:00
Arkadiy Paronyan
f3ea2f354e v1.9.0 (#6727) 2017-10-12 23:44:02 +02:00
debris
eb526b7769 separated kvdb into 3 crates: kvdb, kvdb-memorydb && kvdb-rocksdb, #6693 2017-10-12 15:36:27 +02:00
Axel Chalon
a101a23ba3 Graceful exit when invalid CLI flags are passed (#6485) 2017-10-11 17:38:56 +02:00
Marek Kotewicz
e3fa460374 Merge pull request #6691 from paritytech/warp-options
Fix warp sync blockers detection
2017-10-10 21:51:18 +02:00
Marek Kotewicz
6279ff32f5 Separate migrations from util (#6690)
* separate migration from util and make its dependencies into libs:

* snappy
* kvdb
* error
* common

* renamed common -> macros

* util error does not depend on snappy module

* ethsync does not depend on util nor ethcore_error

* nibbleslice and nibblevec merged with patricia_trie crate

* removed unused dependencies from util

* util journaldb traits does not need to be public

* util_error

* fixed ethcore compile error

* ignore .swo files

* Update chain.rs
2017-10-10 20:01:27 +02:00
arkpar
007629464a
Fix warp sync blockers detection 2017-10-10 17:42:20 +02:00
Afri Schoedon
360ecd3728 Add Musicoin and MCIP-3 UBI hardfork. (#6621)
* Add musicoin chain spec.

* Add musicoin to parity node

* Add musicoin to the wallet

* Add i18n for musicoin

* Align musicoin chain spec with 1.8, ref #6134

* Update musicoin bootnodes

* Prepare MCIP-3 in musicoin chain spec.

* Update musicoin chain spec with contract addresses for MCIP-3

* Extend ethash params by MCIP-3

* Fix musicoin chain spec json

* Use U256 for block rewards.

* Update musicoin registrar

* Fix merge leftovers

* Update musicoin chain spec for latest master

* Bestow MCIP-3 block reward(s).

* Update musicoin registry once and for all

* Align MCIP-3 block reward with go implementation

* Remove mcip3 test chain spec from repository

* Update MCIP-3 block rewards

* Musicoin homestead transition is at 1_150_000

* Expect mcip3 transtion to be properly defined in chain spec.

* Panic handling for mcip to default to regular block rewards if not specified

* Giving mcip3 rewards a useful default value.

* Fix ethjson tests.

* Update musicoin chain spec

* Fix tests 0:)

* Add musicoin mcip3 era test spec.

* Update musicoin chain spec(s)

* Add tests for mcip3 era block rewards

* Fix tests

* Disable byzantium for musicoin

* Pass miner reward to the tracer.

* Allow modifying blockreward in MCIP-3 transition.
2017-10-08 18:17:59 +02:00
Tomasz Drwięga
e8b418ca03 Update jsonrpc dependencies and rewrite dapps to futures. (#6522)
* Bump version.

* Fix RPC crate.

* Fix BoxFuture in crates.

* Compiles and passes tests!

* Get rid of .boxed()

* Fixing issues with the UI.

* Remove minihttp. Support threads.

* Reimplement files serving to do it in chunks.

* Increase chunk size.

* Remove some unecessary copying.

* Fix tests.

* Fix stratum warning and ipfs todo.

* Switch to proper branch of jsonrpc.

* Update Cargo.lock.

* Update docs.

* Include dapps-glue in workspace.

* fixed merge artifacts

* Fix test compilation.
2017-10-05 12:35:01 +02:00
Svyatoslav Nikolsky
9a086face4 SecretStore: administrative sessions prototypes (#6605)
* generate random channel encryption key on restart

* session-level nonces

* fixed warning after rebase

* session_nonce -> nonce

* full_generation_math_session_with_refreshing_shares && full_generation_math_session_with_adding_new_node

* add serveral secret shares at once

* SecretStore: initial ShareAdd session prototype

* SecretStore: ServersSetChange jobs

* SecretStore: servers set change session continued

* SecretStore: servers set change session continued

* SecretStore: servers set change session continued

* SecretStore: known_sessions iterator

* SecretStore: implemented SessionsQueue

* SecretStore: UnknownSessionsJobTransport

* SecretStore: node_added_using_servers_set_change almost done

* SecretStore: continue adding tests

* SecretStore: node_added_using_servers_set_change + node_added_using_share_add

* SecretStore: node_added_using_server_set_change_from_this_node

* SecretStore: node_moved_using_share_move

* SecretStore: node_moved_using_servers_set_change

* SecretStore: node_removed_using_share_remove

* SecretStore: node_removed_using_servers_set_change

* SecretStore: different folders for client && admin sessions

* SecretStore: started adding share change consensus (flush)

* SecretStore: fixed spurious tests failures

* enum JobPartialRequestAction

* SecretStore: started adding consensus layer to ShareAdd session

* SecretStore: starting external consensus for ShareAdd

* SecretStore: started restoring node_added_using_servers_set_change

* SecretStore: node_added_using_servers_set_change works with external consensus

* SecretStore: node_added_using_server_set_change_from_this_node works with external consensus

* removed debug comments/printlns

* SecretStore: share move session supports consensus

* SecretStore: share remove with external consensus

* SecretStore: started adding basic ShareAdd tests

* SecretStore: added ShareAdd tests

* SecretStore: added ShareAdd session to cluster

* SecretStore: added share move && remove sessions to cluster

* SecretStore: ShareMove session tests cleanup

* SecretStore: ShareRemove session tests cleanup

* SecretStore: added check_secret_is_preserved check

* SecretStore: added servers set change to cluster

* SecretStore: cleaned up ServersSetChange session tests

* SecretStore: cleaning + added tests for ShareRemove

* SecretStore: cleaning up

* SecretStore: propagated admin_public

* SecretStore: fixed persistent_key_storage test

* SecretStore: upgrade_db_from_1

* SecretStore: fixed ServersSetChange session completion

* SecretStore: check polynom1 in ShareAdd sessions (error for pre-v2 shares)

* SecretStore: fixing TODOs

* SecretStore: fixing TODOs

* SecretStore: check share change plan on 'old' slave nodes

* SecretStore: fixing TODOs

* SecretStore: store all admin sessions in single container to avoid overlaps

* SecretStore: do not update nodes set during admin sessions

* SecretStore: moved TODOs to appropriate methods

* SecretStore: TODOs

* SecretStore: added admin_public arg && fixed warnigs

* SecretStore: added shares_to_move_reversed to ShareMove session

* SecretStore: additional checks during consensus establishing

* license

* SecretStore: added TODO about starting ServersSetChange session

* SecretStore: redundant clones + docs + lsot unimplemented-s

* SecretStore: generation_session_completion_signalled_if_failed_on_master

* SecretStore: updated obsolete comment

* SecretStore: added type alias for current DocumentKeyShare serialization format

* SecretStore: fixed typo

* SecretStore; fixed warnings for futures 0.1.15

* fixed warning
2017-10-02 15:27:31 +02:00
Robert Habermeier
bc167a211b Generalize engine trait (#6591)
* move common forks and parameters to common params

* port specs over to new format

* fix RPC tests

* parity-machine skeleton

* remove block type

* extract out ethereum-specific methods into EthereumMachine

* beginning to integrate Machine into engines. dealing with stale transitions in Ethash

* initial porting to machine

* move block reward back into engine

* abstract block reward logic

* move last hash and DAO HF logic into machine

* begin making engine function parameters generic

* abstract epoch verifier and ethash block reward logic

* instantiate special ethereummachine for ethash in spec

* optional full verification in verify_block_family

* re-instate tx_filter in a way that works for all engines

* fix warnings

* fix most tests, further generalize engine trait

* uncomment nullengine, get ethcore tests compiling

* fix warnings

* update a bunch of specs

* re-enable engine signer, validator set, and transition handler

* migrate basic_authority engine

* move last hashes into executedblock

* port tendermint

* make all ethcore tests pass

* json-tests compilation

* fix RPC tests: change in gas limit for new block changed PoW hash

* fix minor grumbles

* validate chainspecs

* fix broken import

* fix transaction verification for pre-homestead
2017-09-26 14:19:08 +02:00
Jef
5c08698fa0 Use memmap for dag cache (#6193)
* Rebase and fix compilation errors (tests not yet fixed)

* Use `debug_assert` over `assert`

* Fix tests

* Assert safety, clean up

* Fix up stale cache removal, move one assert to debug_assert

* Remove printlns

* Add licenses

* Fix benches

* Inline some no-ops in a hot loop that weren't being inlined

* Add spooky comment to make sure no-one removes the inlining annotations

* Minor cleanup

* Add option to switch between mmap and ram

* Flag ethash to use less memory when running light client

* Fix tests

* Remove todo comment (it's done)

* Replace assertion with error return

* Fix indentation

* Use union instead of `transmute`

* Fix benches

* Extract to constants

* Clean up and fix soundness holes

* Fix formatting

* Ignore missing-file errors

* Make incorrect cache size an error condition instead of a panic, remove dead code

* Fix compilation errors from rebase

* Fix compilation errors in tests

* Fix compilation errors in tests
2017-09-25 19:45:33 +02:00
Tomasz Drwięga
965e8ae74e
Use host as ws/dapps url if present. 2017-09-21 15:11:15 +02:00
Arkadiy Paronyan
684b142711 Sync progress and error handling fixes (#6560) 2017-09-21 10:12:27 +02:00
Hawstein
ade37be25b separate trie from util and make its dependencies into libs:
* bytes
* hashdb
* memorydb
* nibbleslice
* nibblevec
2017-09-15 11:03:53 +08:00
Robert Habermeier
375668bc40 Compatibility with whisper v6 (#6179)
* compatibility with whisper v6

* separate subprotocol for parity extensions

* kill version field
2017-09-10 18:02:14 +02:00
Robert Habermeier
ad39446e87 Revert "fixed master (#6465)"
This reverts commit 899538ae25.
2017-09-05 17:54:05 +02:00
Marek Kotewicz
899538ae25 fixed master (#6465)
* fixed master

* Revert "Merge pull request #6370 from paritytech/light-poa"

This reverts commit 3c60f99def, reversing
changes made to b731ccea18.
2017-09-05 14:53:09 +02:00
Axel Chalon
be745f711f Refactor and port CLI from Docopt to Clap (#2066) (#6356)
* Refactor and port CLI from Docopt to Clap (#2066)

* Add --can-restart and --force-direct to help

* Add flag support to subc & move import/export options to subcommand

* Reorder subcommand args (put positional args last in CLI help message)
2017-09-05 12:30:22 +01:00
Fredrik
2b39af1f09 Updating imports that were introduced with merge 2017-09-05 12:08:02 +02:00
Fredrik Harrysson
dccdedc001 Merge branch 'master' into fo-6418-dont-export-bigint 2017-09-05 10:48:54 +02:00
Fredrik
e54784bfeb Merge branch 'master' into fo-6418-dont-export-bigint
# Conflicts:
#	dapps/src/tests/helpers/registrar.rs
#	ethcore/evm/src/interpreter/shared_cache.rs
#	ethcore/light/src/client/header_chain.rs
#	ethcore/light/src/client/mod.rs
#	ethcore/light/src/net/mod.rs
#	ethcore/light/src/on_demand/request.rs
#	ethcore/light/src/on_demand/tests.rs
#	ethcore/light/src/provider.rs
#	ethcore/node_filter/src/lib.rs
#	ethcore/src/block.rs
#	ethcore/src/blockchain/blockchain.rs
#	ethcore/src/client/test_client.rs
#	ethcore/src/engines/authority_round/mod.rs
#	ethcore/src/engines/basic_authority.rs
#	ethcore/src/engines/mod.rs
#	ethcore/src/engines/tendermint/mod.rs
#	ethcore/src/engines/validator_set/contract.rs
#	ethcore/src/engines/validator_set/multi.rs
#	ethcore/src/engines/validator_set/safe_contract.rs
#	ethcore/src/engines/vote_collector.rs
#	ethcore/src/miner/external.rs
#	ethcore/src/miner/miner.rs
#	ethcore/src/miner/service_transaction_checker.rs
#	ethcore/src/miner/work_notify.rs
#	ethcore/src/pod_account.rs
#	ethcore/src/pod_state.rs
#	ethcore/src/snapshot/block.rs
#	ethcore/src/snapshot/consensus/work.rs
#	ethcore/src/snapshot/mod.rs
#	ethcore/src/snapshot/service.rs
#	ethcore/src/spec/spec.rs
#	ethcore/src/state/backend.rs
#	ethcore/src/trace/db.rs
#	ethcore/src/verification/queue/mod.rs
#	ethcore/src/verification/verification.rs
#	parity/informant.rs
#	rpc/src/v1/helpers/dispatch.rs
#	rpc/src/v1/helpers/light_fetch.rs
#	rpc/src/v1/helpers/signing_queue.rs
#	rpc/src/v1/impls/eth.rs
#	rpc/src/v1/impls/eth_filter.rs
#	rpc/src/v1/impls/eth_pubsub.rs
#	rpc/src/v1/impls/light/eth.rs
#	rpc/src/v1/impls/signing.rs
#	rpc/src/v1/tests/helpers/miner_service.rs
#	rpc/src/v1/tests/helpers/snapshot_service.rs
#	rpc/src/v1/tests/helpers/sync_provider.rs
#	rpc/src/v1/tests/mocked/eth.rs
#	stratum/src/lib.rs
#	sync/src/blocks.rs
#	sync/src/chain.rs
#	sync/src/light_sync/mod.rs
#	sync/src/tests/helpers.rs
#	sync/src/tests/snapshot.rs
#	updater/src/updater.rs
#	util/src/lib.rs
#	util/triehash/src/lib.rs
2017-09-04 18:32:55 +02:00
Fredrik
308f36a532 Don't reexport bigint from util 2017-09-04 16:36:49 +02:00
Robert Habermeier
06e97d107b fix rwlock import 2017-09-04 14:52:39 +02:00
Robert Habermeier
372779915f Merge branch 'master' into light-poa 2017-09-04 12:30:37 +02:00
Hawstein
7b8af30590 remove re-export of parking_lot in util (#6435) 2017-09-02 20:09:13 +02:00
Hawstein
cf366bdb29 util should not reexport ansi_term 2017-09-01 22:57:57 +08:00
debris
7849fff41e finished 2017-08-31 11:35:41 +02:00
Robert Habermeier
d3c3e0b164 Merge branch 'master' into light-poa 2017-08-29 15:14:58 +02:00
Arkadiy Paronyan
d520aa2633 Connection filter (#6359) 2017-08-29 14:38:01 +02:00
Tomasz Drwięga
3226e1ca33 Expose health status over RPC (#6274)
* Node-health to a separate crate.

* Initialize node_health outside of dapps.

* Expose health over RPC.

* Bring back 412 and fix JS.

* Add health to workspace and tests.

* Fix compilation without default features.

* Fix borked merge.

* Revert to generics to avoid virtual calls.

* Fix node-health tests.

* Add missing trailing comma.
2017-08-28 14:11:55 +02:00
Robert Habermeier
b953f9b66a glue for fetching epoch proofs from network 2017-08-24 15:17:48 +02:00
Arkadiy Paronyan
d41dd13918 Tweaked snapshot params (#6344) 2017-08-22 11:24:56 +02:00
Tomasz Drwięga
010be34660 Unexpose methods on UI RPC. (#6295) 2017-08-18 15:58:45 +02:00
Robert Habermeier
fefc756870 Merge pull request #6168 from paritytech/secretstore_stresstest
SecretStore: bunch of fixes and improvements
2017-08-16 21:20:22 +09:00
Tomasz Drwięga
10068cee72 Extension fixes (#6284)
* Fix token symbols in extension.

* Allow connections from firefox extension.
2017-08-13 17:41:50 +02:00
Tomasz Drwięga
65482c5e9d Fix dapps CSP when UI is exposed externally (#6178)
* Allow embeding on any page when ui-hosts=all and fix dev_ui

* Fix tests.
2017-08-10 18:32:10 +02:00
Craig O'Connor
7d17d77254 Dapp refresh (#5752)
* RwLock

* getting there

* argh

* parking_lot

* rpc

* wax on wax off

* almost there

* remove lock

* write over read

* works

* linting

* small updates

* dissapearing act

* router update

* complete

* one m

* grumbles1

* grumbles part II

* parking_lot->util

* missed test case

* fied package-lock.json

* small fixes

* 404 tests failing

* cleanup

* cleanup 2

* updates and the likes

* play

* simplify filter

* f-ing bugs

* read->write

* Address own grumbles.

* Fix test.
2017-08-09 19:06:40 +02:00
Svyatoslav Nikolsky
cc95edf4dc fixed grumbles 2017-08-09 18:17:28 +03:00
Svyatoslav Nikolsky
9b34c77f98 Merge branch 'master' into secretstore_stresstest 2017-08-09 12:29:29 +03:00
Svyatoslav Nikolsky
33ba5b63f3 SecretStore: encrypt messages using private key from key store (#6146)
* do not cache ACL storage contract

* when error comes before initialization

* initial KeyServerSet commit

* update_nodes_set in maintain

* do not connect to self

* fixed connection establishing

* removed println

* improved KeyServerSet tracing

* moved parsing to KeyServerSet

* re-read only when blockchain is changed

* do not try to connect if not a part of cluster

* improved logging

* fixed tests

* NodeKeyPAir trait

* fixed parity to use new trait

* continue integrating with parity

* updated parity for NodeKeyPair

* completed KeyStoreNodeKeyPair

* removed comment

* removed dependency && style
2017-08-09 11:09:40 +02:00
Tomasz Drwięga
e93466c897 Using multiple NTP servers (#6173)
* Small improvements to time estimation.

* Allow multiple NTP servers to be used.

* Removing boxing.

* Be nice.

* Be nicer.

* Update list of servers and add reference.
2017-08-09 08:45:07 +02:00
Tomasz Drwięga
8de1e92b99 Fix cache path when using --base-path (#6212) 2017-08-02 12:38:58 +02:00
Nicolas Ochem
f212ae6322 fix #6052. honor --no-color for signer command (#6100)
* fix #6052. honor --no-color for signer command

* replace call to paint closure with the body, apply to generate_new_token too
2017-07-28 19:07:38 +02:00
Joseph Mark
b5f1524e78 Refactor --allow-ips to handle custom ip-ranges (#6144)
* Add checks for additional reserved ip addresses

100.64.0.0/10 and 240.0.0.0/4 are both reserved but not currently
filtered.

* Add check for special purpose addresses

192.0.0.0/24 - Used for the IANA IPv4 Special Purpose Address Registry

* Refactor ip_utils (#5872)

* Add checks for all ipv4 special use addresses
* Add comprehensive ipv4 test cases

* Refactor Ipv6 address checks (#5872)

* Refactor AllowIP (#5872)

* Add IpFilter struct to wrap predefined filter (AllowIP) with custom
allow/block filters.
* Refactor parsing of --allow-ips to handle custom filters.
* Move AllowIP/IpFilter from ethsync to ethcore-network where they
are used.

* Revert Cargo.lock

* Tests for custom ip filters (#5872)

* Add "none" as a valid argument for --allow-ips to allow narrow
custom ranges, eg.: --allow-ips="none 10.0.0.0/8"
* Add tests for parsing filter arguments and node endpoints.
* Add ipnetwork crate to dev dependencies for testing.

* Add ipv6 filter tests (#5872)

* Revert parity-ui-precompiled to master

* Fix minor detail in usage.txt (#5872)

* Spaces to tabs

* Rename IpFilter::new() to ::default()

* Small readability improvements

* Test (#5872)

* Revert "Test (#5872)"

This reverts commit 7a8906430a6dad633fe29df3dca57f1630851fa9.
2017-07-28 19:06:39 +02:00
Tomasz Drwięga
9902714fb4 Don't display an overlay in case the time sync check fails. (#6164)
* Small improvements to time estimation.

* Temporarily disable NTP time check by default.
2017-07-27 17:36:23 +02:00
Robert Habermeier
d53028d0a8 Merge pull request #6162 from paritytech/fix-whisper-sub-name
fix subscription name
2017-07-27 15:51:47 +02:00
Svyatoslav Nikolsky
c345bc3d85 cli option to disable SS ACL check 2017-07-27 15:48:07 +03:00
Robert Habermeier
70ef33f6fe Light client improvements (#6156)
* no seal checking

* import command and --no-seal-check for light client

* fix eth_call

* tweak registry dapps lookup

* ignore failed requests to non-server peers
2017-07-27 13:50:12 +02:00
Robert Habermeier
18fbf3c174 only add pubsub if generic pubsub off 2017-07-27 12:55:08 +02:00
Svyatoslav Nikolsky
7c05a906d0 cli option to disable SS HTTP API 2017-07-27 13:29:09 +03:00
Svyatoslav Nikolsky
c466def1e8 improved logging 2017-07-27 11:33:09 +03:00
Svyatoslav Nikolsky
2e9df2c39d updated parity for NodeKeyPair 2017-07-25 16:30:24 +03:00
Svyatoslav Nikolsky
9e30d85fdc continue integrating with parity 2017-07-25 10:19:48 +03:00
Svyatoslav Nikolsky
fb68b0924a fixed parity to use new trait 2017-07-25 09:56:23 +03:00
Gav Wood
0b46cce95f Deduplicate help text. 2017-07-25 08:38:20 +02:00
Joseph Mark
8b3ec61151
Merge branch 'master' into issues/4673 2017-07-25 09:03:21 +07:00
Joseph Mark
c522f564a9
Update usage doc for --config (#4673) 2017-07-25 09:02:37 +07:00
Joseph Mark
17e6d2d51c
Descriptive error for invalid preset (#4673) 2017-07-22 11:09:59 +07:00
Joseph Mark
6ae93cf14e
Roll preset command into --config option (#4673)
* --config takes either toml file or bundled preset eg. '--config=dev'
* Maintains consistency with --chain arguments
2017-07-22 10:37:38 +07:00
Joseph Mark
0ec917e980
Merge branch 'master' into issues/4673 2017-07-21 19:47:14 +07:00
Arkadiy Paronyan
99f4bc76d7 Fix for building with --no-default-features (#6110) 2017-07-21 12:14:47 +02:00
Brian Anderson
6345b54034 Add custom panic hook
The panic hook prints a backtrace, the panic message, file, and line
number, and a plea to report bugs.
2017-07-19 17:50:48 +00:00
Robert Habermeier
298ea1d748 Bump snap version and tweak importing detection logic (#6079)
* bump last tick just before printing info and restore sync detection

* bump kovan snapshot version

* Fixed sync tests

* Fixed rpc tests
2017-07-18 16:59:33 +02:00
Giuseppe Bertone
319a01b34f User_defaults now contains serialization for is_first_launch parameter; (#6068)
Solved the "TraceDB resync required" issue when trying to use "--tracing on" option just after a DB kill operation;
2017-07-18 15:38:38 +02:00
Joseph Mark
fefeb50cae
Fix minor merge issue 2017-07-17 13:33:26 +07:00
Joseph Mark
d93a5d3da1
Merge branch 'master' into issues/4673 2017-07-17 13:07:00 +07:00
Joseph Mark
360f1fa34f
Add insecure presets and tests 2017-07-17 13:03:57 +07:00
Andre Silva
c7af702270 Refactor price_info (#6003)
* refactor PriceInfo to use Fetch and reuse the client

* forget Fetch future to keep it running in the background

* update Debug message for price_info::Client

* wrap underlying errors in price_info client

* use debug_struct in price_info client debug implementation

* use global fetch service in price_info client

* rename gas_pricer parameter in RunCmd

* move price_info to its own crate

* fix price_info tests

* replace rustc_serialize with serde_json in price_info

* add documentation for price_info

* remove unused rustc-serialize dependency from ethcore

* fix price_info formatting

* re-export fetch crate in price_info

* remove unused cfg attributes in price_info

* add tests for price_info
2017-07-16 18:22:45 +02:00
Robert Habermeier
fec4ccbbb8 acquire client report under lock in informant (#6072) 2017-07-16 17:43:43 +02:00
Robert Habermeier
99075ad22a Initial Whisper implementation (#6009)
* whisper skeleton

* basic message store

* rallying and message logic

* pass host info to network protocol handlers

* choose who starts rally based on node key

* module reshuffling

* mining messages

* prune messages by low PoW until below size target

* associated error type for ethkey generators and `OsRng` generator

* beginnings of RPC

* generic message handler for whisper

* reshuffle code order

* standard payload encoding and decoding

* basic crypto

* minor restructuring of net code

* implement shh_post

* merge?

* implement filters

* rand trait for hash types

* filter RPCs for whisper

* symmetric encryption of payload

* pub-sub

* filter tests

* use only secure random IDs

* attach arbitrary protocols to network

* basic integration of whisper into Parity

* eagerly prune low PoW entries

* broadcast messages with salted topics

* node info RPC

* fix import

* fix leading zeros calculation

* address minor grumbles
2017-07-14 20:40:28 +02:00
Joseph Mark
b975efa2bb
Add non-standard-ports preset and test 2017-07-14 10:42:56 +07:00
Joseph Mark
4fea18d945
Add mining preset and test 2017-07-14 10:15:39 +07:00
Joseph Mark
0f37261dbf
Change --min-gas-price to u64 2017-07-14 09:40:47 +07:00
Tomasz Drwięga
1aaafa2d11 Limit transaction queue memory & limit future queue (#6038)
* Remove confusing gas_limit in the pool.

* Change defaults

* Limit transaction queue by memory usage.

* Change defaults to something lower.

* Fix rpc test.

* Fix js issues.

* Renamed block_gas_limit
2017-07-13 15:12:25 +02:00
Joseph Mark
e0b15116a5
Replace dev chain special case with preset
Add --min-gas-price (does the same as legacy --gasprice) and tweak
gas_pricer_config() and test cases.  Dev preset will still be
overridden by CLI arguments, including --gasprice.
2017-07-13 19:25:41 +07:00
Joseph Mark
451ef7f09b
Add preset cmd/arg to test args 2017-07-12 16:31:28 +07:00
Joseph Mark
2d52c7b42f
Merge branch 'master' into issues/4673 2017-07-12 16:06:23 +07:00
Joseph Mark
d4175ca6c6
Add preset command to parity CLI
Preset configs are loaded from bundled toml files and overridden by
CLI options.
2017-07-12 16:03:21 +07:00
Tomasz Drwięga
a30f43b36c
Fix ui-no-validation. 2017-07-11 14:49:35 +02:00
Tomasz Drwięga
ba4d8ceaf3
Merge branch 'master' into csp-fix 2017-07-11 13:45:23 +02:00
Joseph Mark
9c1030878e
Add config preset files 2017-07-11 17:29:34 +07:00
Tomasz Drwięga
4936e99f30 Node Health warnings (#5951)
* Health endpoint.

* Asynchronous health endpoint.

* Configure time api URL via CLI.

* Tests for TimeChecker.

* Health indication on Status page.

* Adding status indication to tab titles.

* Add status to ParityBar.

* Fixing lints.

* Add health status on SyncWarning.

* Fix health URL for embed.

* Nicer messages.

* Fix tests.

* Fixing JS tests.

* NTP time sync (#5956)

* use NTP to check time drift

* update time module documentation

* replace time_api flag with ntp_server

* fix TimeChecker tests

* fix ntp-server flag usage

* hide status tooltip if there's no message to show

* remove TimeProvider trait

* use Cell in FakeNtp test trait

* share fetch client and ntp client cpu pool

* Add documentation to public method.

* Removing peer count from status.

* Remove unknown upgrade status.

* Send two time requests at the time.

* Revert "Send two time requests at the time."

This reverts commit f7b754b1155076a5a5d8fdafa022801fae324452.

* Defer reporting time synchronization issues.

* Fix tests.

* Fix linting.
2017-07-11 12:23:46 +02:00
Tomasz Drwięga
7fb46bff06 RPC cpu pool (#6023)
* RPC cpu pool.

* introduce optional thread pool when processing RPC requests.

* Bump jsonrpc.

* Removing boxes.

* Fix CLI tests.
2017-07-11 12:22:19 +02:00
Tomasz Drwięga
56c275b0cb Whitelist APIs for generic Pub-Sub (#5840)
* Whitelisting generic pub-sub APIs.

* Clone enums instead of allocating a vec.
2017-07-10 17:42:29 +02:00
Arkadiy Paronyan
15aebacbe7 --reseal-on-uncle (#5940)
* --reseal-on-uncle

* Optimized uncle check

* Additional uncle check

* Updated comment
2017-07-10 13:36:42 +02:00
Axel Chalon
7599e3998f Support comments in reserved nodes file (#6004) (#6012) 2017-07-10 13:24:40 +02:00
Robert Habermeier
67c1f71b6e Proper light client informant and more verification of imported headers (#5897)
* do more validation of imported headers in light client

* generalize informant with traits

* informant implementation for light client

* make comment into TODO

* fix broken test

* disable full checking of headers in light client in sync tests
2017-07-10 13:21:11 +02:00
Tomasz Drwięga
a24b6ad983 Use standard paths for Ethash cache (#5881)
* Use cache path to store ethash files.

* Fixing tests, more flexible API.

* Use AsRef<Path> everywhere.

* Fixing ethcore tests.

* Fix RPC tests.
2017-07-10 12:57:40 +02:00
debris
5f2cb5e52f push CI 2017-07-06 16:48:58 +02:00
debris
9e185030e6 push CI 2017-07-06 14:49:10 +02:00
debris
f4f8b411f5 fixed parity tests with new serde and toml 2017-07-06 14:10:41 +02:00
debris
1c2a4c116a Merge branch 'master' into serdeup 2017-07-06 11:43:46 +02:00
debris
61d8f90530 updated serde to version 1.0 2017-07-06 11:36:15 +02:00
Guanqun Lu
9241c6a9b5 config: don't allow dev chain with force sealing option 2017-07-01 23:20:49 +08:00
arkpar
826bf28196 Fixed build 2017-06-28 16:11:18 +02:00
Tomasz Drwięga
71c68cc000 Logs Pub-Sub (#5705)
* Logs subscription.

* Add test.

* lock -> write
2017-06-28 12:21:13 +02:00
Arkadiy Paronyan
57626b60e7 EIP-168, 169: Dust protection (#4757)
* Dust protection

* Track touched accounts in the substate

* Minor alterations
2017-06-28 09:10:57 +02:00
Arkadiy Paronyan
4a7bcfe4f0 CLI: Export error message and less verbose peer counter. (#5870)
* Removed numbed of active connections from informant

* Print error message when fatdb is required

* Remove peers from UI
2017-06-27 22:40:46 +02:00
Anton Gavrilov
f9033facd3 Information about used paths added to general output block (#5904)
* Information about used paths added to general output block

* Print was added into execute light also
2017-06-22 20:08:56 +02:00
Tomasz Drwięga
53609f703e Domain-locked web tokens. (#5894)
* Domain-locking web tokens.

* JS part.

* Fix linting issues.
2017-06-22 20:05:40 +02:00
Arkadiy Paronyan
4d5280e43c removed panic handlers (#5895) 2017-06-22 19:00:53 +02:00
Tomasz Drwięga
963bcba267
Merge branch 'master' into unlock 2017-06-14 12:06:27 +02:00
Tomasz Drwięga
efc46e78f1
Fix description of AccountProvider setting. 2017-06-14 12:06:15 +02:00
maciejhirsz
c7c05552f3 Fix rust, skip WASM till CI switches to Node 8+ 2017-06-12 17:43:23 +02:00