Commit Graph

2990 Commits

Author SHA1 Message Date
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
lihuafeng
9436e88d27 remove the clone operation of code_cache (#8334)
* Some tiny modifications.
1. fix some typo in the comment.
2. sort the order of methods in 'impl state::Backend for StateDB`

* Remove the clone of code_cache, as it has been done in clone_basic.
2018-04-09 11:35:54 +02:00
Pierre Krieger
27c32d3629
Tweaks and add a Dockerfile for Android (#8036) 2018-04-05 14:38:50 +02:00
Kwang Yul Seo
0d2993e46d Use associated type M::Error instead of Error (#8308) 2018-04-05 11:31:58 +02:00
Wei Tang
e4168c2985 Remove InvalidParentHash in favor of assert! (#8300)
* Remove InvalidParentHash in favor of assert!

* Typo: assert test true case
2018-04-05 11:03:25 +02:00
Wei Tang
ff0ce70169 Decouple timestamp open-block-assignment/verification to Engine (#8305) 2018-04-05 10:11:21 +02:00
Andronik Ordian
811d165458 Validate if gas limit is not zero (#8307) 2018-04-05 00:14:59 +09:00
East Coin
d57944ffb9 Implement Easthub chain spec (#8295) 2018-04-04 23:00:21 +09:00
Dmitry Kashitsyn
b2d338bf35 Ethcore now uses Rayon 1.0 as a dependency (#8296) (#8304) 2018-04-04 21:05:21 +09: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
Dmitry Kashitsyn
0455aa96bf Ethcore now uses rayon to 0.9 as a dependency (#8296) (#8302) 2018-04-04 11:50:01 +02:00
Wei Tang
9aaedad64f Include suicided accounts in state diff (#8297)
* Include suicided accounts in state diff

* Shorten form match -> if let

* Test suicide trace diff in State
2018-04-04 18:49:43 +09: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
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
ellaismer
99a13c4e66 Cleanup Ellaism bootnodes (#8276)
Removed several bootnodes known not to be running anymore. Added two new ones.
2018-04-03 21:58:24 +09:00
Tomasz Drwięga
9f775a7673 Remove RefCell from Header (#8227)
* Cache RLP and header hashes.

* Refactor header - WiP

* Avoid decoding laster header.

* Pre-compute hashes for Sealed/Locked block.

* Use accrue bloom. Closes ##8241
2018-04-03 17:01:28 +09:00
Wei Tang
d477670cb9 Typo fix: todo with no content (#8292) 2018-04-03 09:32:38 +02:00
Tomasz Drwięga
9108a3bb50 Bump ethabi & ethereum-types. (#8258)
* Bump ethabi & ethereum-types.

* Fix test.

* Fix hex encodings.
2018-04-02 12:12:52 +01:00
Tomasz Drwięga
5ea4c22868 Supress TemporaryInvalid verification failures. (#8256) 2018-04-02 11:30:26 +01:00
Ryan Leung
9c9ddaccec use constant durations (#8278)
* use constant durations

* fix CI

* address comments
2018-04-02 10:47:56 +02:00
Wei Tang
68a08df9c3 Typo fix: Mode doc - RLP should be client (#8283) 2018-03-31 15:41:53 +02:00
Sergey Pepyakin
cab073ba00 Add missing license header for runtime.rs (#8252)
* Add missing license header for runtime.rs

* Update year
2018-03-29 13:48:57 +01:00
Andrew Jones
e3f7b70c38 Replace all Rlp usages with UntrustedRlp except for ethcore views (#8233)
* Replace Rlp with UntrustedRlp and unsafely unwrap

All Rlp methods return Result<_,DecoderError> now, so for this first
pass each will be marked with `expect("TODO")`. In the next pass we can
categorise figure out how to handle each case.

* Handle DecoderError for tendermint message

* Unwrap rlp results in TestBlockcChainClient

Rlp should be valid since created manually in tests

* Replace `use rlp::*` with explicit imports

* Remove rlp decode unwraps from light cli request

* Structured rlp encoding for curr best and latest in header chain

* Propogate decoder errors from send_packet

* Fix body uncles rlp index

* Use BodyView in sync and `expect` rlp errors

* Revert bbf28f removing original Rlp for this phase

This can be done again in the next phase, in order that we can leave the ethcore views unchanged

* Restore legacy Rlp and UntrustedRlp

Use legacy Rlp for ethcore views. Will redo replacing Rlp with UntrustedRlp in  a subsequent PR

* Fix tests

* Replace boilerplate Encodable/Decodable with derive

* Use BlockView instead of Rlp, remove unwrap

* Remove rlp test_cli unwraps by using BlockView instead of Rlp directly

* Remove unneccesary change to use borrowed hash

* Construct sync block using new_from_header_and_body
2018-03-29 11:19:45 +02:00
Varunram Ganesh
0c7f998c25 Update musicoin spec in line with gmc v2.6.2 (#8242) 2018-03-28 14:11:49 +02:00
Marek Kotewicz
23ea4798e0 fixed ethcore tx_filter (#8200) 2018-03-28 10:59:16 +01: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
Pierre Krieger
dbc4d85f0a Update some of the dependencies for WASM (#8223) 2018-03-27 11:35:51 +09:00
Nikolay Volf
bd45cd4a5e
bump wasmi version (#8209) 2018-03-26 16:55:48 +08:00
James Ray
ca0045482c Returns number of topcis to take fr.. (#8199) 2018-03-23 17:16:20 +09:00
Nikolay Volf
a60d0e440d bump wasm libs (#8171) 2018-03-21 10:47:25 +01:00
lihuafeng
1b4d9c2d39 Some tiny modifications. (#8163)
1. fix some typo in the comment.
2. sort the order of methods in 'impl state::Backend for StateDB`
2018-03-20 15:46:03 +01:00
Denis S. Soldatov aka General-Beck
e25a660a11
fix wasmi x32 builds (#8155)
* fix wasmi x32 builds

* Update Cargo.toml
2018-03-19 18:42:51 +03:00
André Silva
a7887fa9f1 Postpone Kovan hard fork (#8137)
* ethcore: postpone Kovan hard fork

* util: update version fork metadata
2018-03-19 11:23:12 +01:00
Alexey
acd7192b17 Fix comment for fn gas() in wasm/runtime (#8122)
* Update runtime.rs

* Update runtime.rs
2018-03-15 15:34:11 +03:00
Marek Kotewicz
0e548ce7c5
fix trace filter returning returning unrelated reward calls, closes #8070 (#8098) 2018-03-14 20:27:57 +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
Nikolay Volf
1bad20ae38
more dos protection (#8104) 2018-03-14 15:27:56 +03:00
Pierre Krieger
113c35af0a Remove the time dependency where possible (#8100) 2018-03-14 12:29:52 +01:00
Alexey
5c47116889 fix comment for gas extern in Wasm runtime (#8101) 2018-03-14 12:27:18 +01:00
Niklas Adolfsson
23fc5517b5 Replace std::env::temp_dir with tempdir in tests (#8103)
* std::env::temp_dir -> tempdir in test context

* fix lifetime issue so tempdir removes tmpfiles
2018-03-14 12:26:20 +01:00
Tomasz Drwięga
102bc7809f Additional data in EVMTestClient (#7964)
* Small changes to allow better re-use of EvmTestClient

* Expose logs.

* add outcome to TransactResult

* Fix submodule.

* Fix json tests.

* Fix evmbin.
2018-03-13 12:54:17 +01:00
Marek Kotewicz
de72643898
ethcore-service (#8089)
* ethcore test::helpers cleanup

* ethcore-service
2018-03-13 11:49:57 +01: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
Marek Kotewicz
373fdb65e9
ethcore test::helpers cleanup (#8086) 2018-03-12 18:05:52 +01:00
Nikolay Volf
58a1671076
add some dos protection (#8084) 2018-03-12 15:55:28 +03:00
Nikolay Volf
e0a21e5aae WASM libraries bump (#7970)
* update wasmi, parity-wasm, wasm-utils to latest version

* Update to new wasmi & error handling

* also utilize new stack limiter

* fix typo

* replace dependency url

* Cargo.lock update
2018-03-12 11:37:32 +00:00
Nikolay Volf
06fa900504 Add Kovan WASM activation blocknumber (#8057) 2018-03-12 10:55:44 +01:00