Commit Graph

46 Commits

Author SHA1 Message Date
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
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
Marek Kotewicz de72643898
ethcore-service (#8089)
* ethcore test::helpers cleanup

* ethcore-service
2018-03-13 11:49:57 +01:00
Marek Kotewicz 373fdb65e9
ethcore test::helpers cleanup (#8086) 2018-03-12 18:05:52 +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
Tomasz Drwięga a15f62d907
Merge branch 'master' into td-future-blocks 2017-12-27 11:01:08 +01:00
Tomasz Drwięga d6f160e868
Don't check max. 2017-12-21 16:16:55 +01:00
Tomasz Drwięga 7d4e4c7a62
Mark future blocks as temporarily invalid. 2017-12-21 15:34:27 +01:00
Tomasz Drwięga 00883e477a
Get rid of clippy remainings. 2017-12-21 11:27:26 +01:00
Dmitry Kashitsyn 3df67b376b Removes redundant `mut` in ethcore 2017-10-15 20:10:20 +07: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
Fredrik a688370c9d Remove now unnecessary util glob imports 2017-09-05 10:18:07 +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
Hawstein 7b8af30590 remove re-export of parking_lot in util (#6435) 2017-09-02 20:09:13 +02:00
Axel Chalon 6b5ad69c22 Remove reexport of HeapSizeOf in util (#6419) 2017-08-30 16:04:47 +02:00
debris c4989ddc44 removed util::common 2017-07-29 22:49:10 +02:00
debris eecd823d32 util reexports less std 2017-07-29 21:10:14 +02:00
Robert Habermeier d365281cce Ethcore crate split part 1 (#6041)
* split out types into separate crate

* split out evm into its own crate
2017-07-12 13:09:17 +02:00
Arkadiy Paronyan 4d5280e43c removed panic handlers (#5895) 2017-06-22 19:00:53 +02:00
Gav Wood 8404edb656 Fix whitespace (#4299)
* Fix whitespace.

* Update copyright years/owner.

* Push release only for tags.
2017-01-25 18:51:41 +01:00
Arkadiy Paronyan 5a3c3bcb45 Sync reorg up to history size (#3874)
* Allow sync reorg up to pruning history size

* Peer difficulty tracking

* Abort downloading block if received with NewBlock

* Set pruning history to 1200

* Renamed history size field
2016-12-23 18:43:40 +01:00
Gav Wood 18965be047 Merge pull request #3903 from ethcore/test-mem-limit-deadlock
fix deadlock in queue drop
2016-12-19 22:23:56 +01:00
Robert Habermeier ae8f77bc7c fix deadlock in queue drop 2016-12-19 18:10:26 +01:00
arkpar d3486b45c5 Allow retry for future blocks 2016-12-19 14:47:48 +01:00
Gav Wood 58b72c521d
Rename ethcore -> parity in licenses. 2016-12-11 19:31:31 +01:00
Robert Habermeier 398b94e6e2 Merge branch 'master' into opt-in-verifier-scaling 2016-12-06 15:37:10 +01:00
Robert Habermeier 1b6ebe1a6d possible fix for queue drop deadlock (#3702)
* possible fix for #3686

* queue: simplify conclusion, don't block on joining

* queue: park verifiers with timeout to prevent race

* more robust verification loop

* queue: re-introduce wait for verifier joining
2016-12-05 18:18:56 +01:00
Robert Habermeier cd5b6fdf59 queue: CLI for auto-scaling and num verifiers 2016-12-02 18:21:54 +01:00
Robert Habermeier 53afb8d22d queue: park directly instead of through condvar 2016-11-21 14:48:25 +01:00
Robert Habermeier 133796b7ff queue: verifier scaling tests 2016-11-21 14:23:34 +01:00
Robert Habermeier 8c0e511ebe rewrite scaling logic 2016-11-17 18:10:09 +01:00
Robert Habermeier 546cd00659 allocate verifiers up front, hibernate when not needed 2016-11-17 16:00:23 +01:00
Robert Habermeier 44dcd6bc3b increase readjustment period 2016-11-17 13:10:33 +01:00
Robert Habermeier ada9d2b760 Merge branch 'master' into adaptive_queue_threads 2016-11-17 13:00:24 +01:00
Arkadiy Paronyan bccc56b6b0 mio version bump (#2982) 2016-10-30 09:56:34 +01:00
arkpar f543108cf5 Fixed tests 2016-10-24 16:31:37 +02:00
Arkadiy Paronyan 44a560e964 CLI option to skip seal check when importing (#2842) 2016-10-24 15:09:13 +02:00
Robert Habermeier 7359af8588 Incrementally calculate verification queue heap size (#2749)
* incrementally calculate queue heap size

* query the correct queue sizes
2016-10-20 17:19:31 +02:00
Arkadiy Paronyan 906dcd7bfe Block import optimization (#2748)
* Block import optimization

* whitespace

[ci:none]
2016-10-20 14:49:12 +02:00
Robert Habermeier 8a5576d133 balance rates of draining and importing 2016-10-05 12:10:28 +02:00
Robert Habermeier abbf3b3c58 verification-rate based thread scaling 2016-10-04 20:09:54 +02:00
Robert Habermeier 2d28c703d6 reuse add_verifier instrumentation, rolling sample of 5 ticks 2016-10-03 20:39:52 +02:00
Robert Habermeier 5e382602dd fix logging accuracy 2016-10-03 20:09:57 +02:00
Robert Habermeier 2d907f3322 auto-adjust number of verification threads 2016-10-03 19:41:00 +02:00
Robert Habermeier 9d4bee4922 make block queue into a more generic verification queue and fix block heap size calculation (#2095)
* move block queue to own module, a couple readability changes

* make block queue generic over verifiable data

also fixes heap size calculation

* make block queue into a more generic verification queue

* some module reoganization

* implement header queue

* clean up verification error messages
2016-09-27 16:50:24 +02:00