Commit Graph

452 Commits

Author SHA1 Message Date
Denis Granha 44f088bb47
v3 release version strings and track stable (#11680)
Co-authored-by: Denis Granha <denis@gnosis.io>
2020-05-05 19:29:29 +02:00
David 4b5e9ddfa6
Fix ecrecover builtin (#11623)
* Upgrade parity-crypto to 0.6

* More fixes

* Upgrade ethabi and ethabi-derive

* Fix lockfile

* Patch ethabi from master

* quickfix for ethash

* Update forkid

* Add secret store back

* Fetch ethabi from crates

* fetch secret-store from the right place

* update to keccak-hash 0.5.1

* ethash: upgrade keccak-hash

* ethash: sneaky spaces

* ethash: use overlapping bytes after all

* revert submodule update

* wip

* Use new method to impl ecrecover builtin

* Fetch patches from git

* Sort out todo

* Remove patches

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-04-14 10:12:40 +02:00
David 1b23af3fa9
Upgrade parity-common deps to latest (#11620)
* Upgrade parity-crypto to 0.6

* More fixes

* Upgrade ethabi and ethabi-derive

* Fix lockfile

* Patch ethabi from master

* quickfix for ethash

* Update forkid

* Add secret store back

* Fetch ethabi from crates

* fetch secret-store from the right place

* update to keccak-hash 0.5.1

* ethash: upgrade keccak-hash

* ethash: sneaky spaces

* ethash: use overlapping bytes after all

* revert submodule update

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-04-11 13:16:37 +02:00
Andronik Ordian 51e4a6dcbc
deps: switch to upstream ctrlc (#11617) 2020-04-09 18:24:27 +02:00
Valentin Shergin a5820b6ef9
Deduplicating crate dependencies (part 3 of n) (#11614)
* Deduplicating crate dependencies (part 3 of n, `tiny_keccak`, `tokio-timer`, and co) (#11613)

The change includes:
```
tiny-keccak
tokio-timer
textwrap
winapi
rand
rand_xorshift
scopeguard
url
```

* Update rpc/src/v1/helpers/secretstore.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Update util/network-devp2p/src/connection.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-04-09 11:03:27 +02:00
Eduardo Antuña Díez d4b5720df0
Update version to 3.0.0-alpha.1 (#11592) 2020-04-01 11:07:09 +02:00
marktoda 2a3217d8d8
Replace deprecated tempdir dependency with tempfile (#11588)
`Tempdir` is deprecated, but the functionality has been merged into
another crate: `tempfile`. This commit removes all `tempdir` dependencies
and replaces them with `tempfile` and the equivalent bindings.

Fixes #11560
2020-03-29 22:31:17 +02:00
Artem Vorotnikov 4f26ffd447
Fix project name, links, rename the binaries (#11580)
* Fix project name, links, rename binary

* Update util/version/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

* Update updater/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

* Update util/version/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

Co-authored-by: David <dvdplm@gmail.com>
2020-03-25 17:16:51 +01:00
Andronik Ordian 70c4ed7fa0
informant: display I/O stats (#11523)
* informant: collect I/O stats for state_db

* informat: debug i/o log

* informat: remove unused cache hit ratio

* Cargo.lock: cargo update -p librocksdb-sys

* [deps]: upgrade kvdb-rocksdb to 0.6

* Update ethcore/types/src/client_types.rs

Co-Authored-By: David <dvdplm@gmail.com>

Co-authored-by: David <dvdplm@gmail.com>
2020-03-17 16:44:27 +01:00
Andronik Ordian 10d82ef119
initial cleanup (#11542)
* cleanup

* upbork

* review grumble: rename client id prefix

* rpc-tests: make one of the clients open-ethereum

* fix doctest

* README: mention clang version and that our wiki is old
2020-03-09 15:07:15 +01:00
Artem Vorotnikov 597cbc2d6c
Drop IPFS support (#11532) 2020-02-29 11:57:43 +01:00
Niklas Adolfsson 2018f5b0ab
[dependencies]: unify `rustc-hex` (#11506)
* [dependency]: unify `rustc-hex`

* [private tx]: fix upgrade to `rustc hex 2.1.0`
2020-02-21 15:10:00 +01:00
Artem Vorotnikov 06df521eff
Implement eth/64 (EIP-2364) and drop support for eth/62 (#11472)
* sync: make code friendlier to future conditional parsing

* Implement eth/64 (EIP-2364) and drop support for eth/62
2020-02-19 14:42:52 +01:00
Niklas Adolfsson 4e2010f2d9
[ci benches]: use `all-features` (#11496)
* [ci benches]: use `all-features`

Our benches are hidden behind feature flags, this PR enables to type check on those.

`--all` is deprecated

* [bench verification]: remove block_family_partial

* [global allocator]: rm `feature=memory_profiling`

The `memory_profiling` feature doesn't work because `parity_util_mem` crate configures it globally.
2020-02-17 12:25:07 +01:00
Anton Gavrilov 9477bae6dc
Switch usage of Secret Store to the external lib (#11487) 2020-02-12 18:37:34 +01:00
Anton Gavrilov 3357cfb3e5
Switch from the internal runtime lib to external one from crates.io (#11480)
* Parity runtime switched to the version from crates

* Tests fixed
2020-02-11 22:02:25 +01:00
David 99271db9d3
Use parity-crypto updated to use upstream rust-secp256k1 (#11406)
* Use parity-crypto updated to use upstream rust-secp256k1

* Fetch dependency from git

* Missed a session ID

* Add free-standing inversion function that uses `libsecp256k1`

* fixed tests

* Update deps

* Use parity-crypto 0.5.0
Use libsecp256k1 0.3.5

* Review grumble

Co-authored-by: Svyatoslav Nikolsky <svyatonik@gmail.com>
2020-02-10 18:29:21 +01:00
Andronik Ordian 654632264b
upgrade some of the dependencies (#11467)
* bump parity-util-mem and related deps

* upgrade some of the dependencies

* deduplicate static_assertions
2020-02-07 17:23:45 +01:00
Artem Vorotnikov 090c3322a5
Implement EIP-2124 (#11456)
* Implement EIP-2124

* Implement ForkFilter

* ForkId deserialization

* Derive RLP for ForkId

* docs

* comments by @dvdplm

* docs

* clippy

* period
2020-02-06 14:40:19 +01:00
Andronik Ordian ccaa514eec
update kvdb-rocksdb to 0.4 (#11442) 2020-02-03 19:00:23 +01:00
s3krit ceda9d95de
update master/nightly version: v2.8.0 (#11419) 2020-01-29 15:07:24 +01:00
Demi Obenour b8d9b6f826
Rip out the C and Java bindings (#11346)
* Remove the C and Java bindings

* update Cargo.lock

* [ci]: don't build removed `parity-clib`

* [ci]: fix grumbles

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2020-01-07 15:53:02 +00:00
Anton Gavrilov 424b38a8d7
Encapsulate access to the client for secret store (#11232)
* Move all client usages into trusted_client

* Move confirmed hash method to trusted client

* Tree route and logs encapsuluted

* Remove not used method for keys sharing

* NodeKeyPair renamed and moved to trusted client

* Use public key error in trusted client

* Move contract address definition into trusted client

* Block id and number types from ethcore wrapped

* Trusted client renamed to more general Blockchain

* Trusted client implementation moved to parity code

* Move node key pair under secret store feature as well

* Registar crate removed from deps

* Accounts feature removed from secret store

* Fix after merge

* Blockchain renamed to SecretStoreChain

* Module documentations added
2020-01-07 14:37:02 +01:00
David b9f9d11929
Update to latest `kvdb-*`: no default column, DBValue is Vec (#11312)
* Only use kvdb "column families"

This PR contains the changes necessary to use the `kvdb-*` crates from https://github.com/paritytech/parity-common/pull/278 (so a synchronized merge is required) which drops support for the old-style rocksdb "default" column to get a smaller and less complex API.

As it stands this PR is working correctly except for secret-store; we need to migrate it to use a new column family.

* Fix secretstore build

* Fix secretstore build: include ethkey when building with the "accounts" feature

* typos

* Restore state test commit

* Override all of parity-common from git

* Be precise about version requirement to migrate secretstore code

* Update ethcore/db/src/db.rs

Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Address review grumbles

* Review grumbles

* Cleanup

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2019-12-20 12:27:38 +01:00
David f6c3d4c695 Use upstream rocksdb (#11248)
* Use upstream rocksdb

…by way of https://github.com/paritytech/parity-common/pull/257 by @ordian.

* Hint at how `parity db reset` works in the error message

* migration-rocksdb: fix build

* Cargo.toml: use git dependency instead of path

* update to latest kvdb-rocksdb

* fix tests

* saner default for light client

* rename open_db to open_db_light

* update to latest kvdb-rocksdb

* moar update to latest kvdb-rocksdb

* even moar update to latest kvdb-rocksdb

* use kvdb-rocksdb from crates.io

* Update parity/db/rocksdb/helpers.rs

* add docs to memory_budget division
2019-12-03 16:59:11 +01:00
David 2c97bcc1a4 Upgrade jsonrpc to latest (#11206) 2019-10-26 11:26:04 +02:00
Anton Gavrilov 834585d61b
Crypto primitives removed from ethkey (#11174)
* Crypto utils removed from ethkey

* Fix ethkey lib

* Switch ethsore to new crypto

* Accounts crate fixed

* Secret store crate switched to new crypto

* Ethcore builtin fixed

* Accounts crate fixed

* Ethcore crate fixed

* Util network fixed

* Util network-devp2p fixed

* Private tx fixed

* Ethcore sync fixed

* Secret store fixed

* Rpc fixed

* Parity fixed

* Ethkey cli fixed

* Local store fixed

* Ethcore blockchain fixed

* Cargo.lock pushed; doc comment added for reversed nonce

* Ethstore tests fixed

* Ethstore cli fixed

* Miner fixed

* Snapshot tests are fixed

* Single brackets removed

* Machine fixed

* Verification fixed

* Executive state fixed

* More single brackets removed

* Update version of parity-crypto

* Use published version 0.4.2 of parity-crypto

* New test in tx_filter fixed
2019-10-23 13:03:46 +02:00
Niklas Adolfsson 6960d35abb [dependencies]: jsonrpc `14.0.1` (#11183)
Closing #11169
2019-10-19 14:14:25 +02:00
David 9d313e31e6 Upgrade to jsonrpc v14 (#11151)
* Upgrade to jsonrpc v14

Contains https://github.com/paritytech/jsonrpc/pull/495 with good bugfixes to resource usage.

* Bump tokio & futures.

* Bump even further.

* Upgrade tokio to 0.1.22

* Partially revert "Bump tokio & futures."

This reverts commit 100907eb91907aa124d856d52374637256118e86.
2019-10-10 15:56:22 +01:00
Anton Gavrilov f48780c29b
Update ethereum types to 0.8.0 version (#11139)
* Ethereum types updated to 0.8 version

* Fix for rand usage in rpc

* Cargo lock fixed after rebase

* TODO added
2019-10-08 14:18:44 +02:00
Toby Dimmick 79a17dedd0 Deduplicate registrar contract & calling logic (#11110)
* Rename RegistryInfo -> RegistryInfoDeprecated

* Add BlockId parameter to Registrar::get_address and RegistrarClient::call_contract

* Remove RegistrarClient::Call (use async for now); add RegistrarClient::get_address

* Remove Registrar type in favour of naked trait

* Use CallContract trait bound instead of separate call_contract method

* Make RegistrarClient::get_address and URLHint::resolve synchronous

* RegistrarClient::get_address: return check if address is zero

* Modify RegistryInfo::registry_address to take &str

* return Result from RegistryInfo::registry_address

* Replace RegistryInfo with RegistrarClient

- Modifed RegistrarClient::registrar_address to return Option
- Removed BlockChainClient::registrar_address

* Fix other build configs

* Fix unit test builds

* Remove local RegistrarClient type from run::execute_impl

* Remove registrar.json from ethcore

* Formatting/line breaks

* Update RegistrarClient docs, remove explicit lifetime

* Weak ref to ethcore client from hash fetch client

* Fix unit tests
2019-10-03 15:15:25 +02:00
David fcd042a487
Update to latest jsonrpc (#11111)
* Update to latest jsonrpc

* Fix percent_encoding not re-exported from url anymore
2019-10-02 10:25:51 +02:00
David 2b8b8851ab Update `kvdb`, `kvdb-rocksdb` and `h2` (#11091)
* Update a few dependencies

Updates two dependencies: `kvdb-rocksdb` and `h2`. Brings in `parking_lot 0.9` which is unintended but possibly fine.

* Bump parking_lot to 0.9
Bump kvdb-memorydb to 0.2 (from git atm)

* New kvdb-memorydb is not breaking

* Remove [patch]
2019-09-27 23:29:14 +02:00
David d9201aa6f2
Update JSON tests to d4f86ecf4aa7c (#11054)
* new ethereum consensus tests, #10908

* Update JSON tests to 725dbc73a

This PR reverts the controversial changes of the previous PR and skips the failing tests.

Maybe I misunderstand the suggested workaround of putting the fix under `#[cfg(test)]` but it seems odd to run different code in production than we run in tests. Instead here I suggest we skip the failing tests with the argument that we do not wish to fix this issue (at least not at this time) because it does not affect us. If I am wrong, and I likely am, I look forward to hearing why and what a better approach to updating the state tests is.

Branched off https://github.com/paritytech/parity-ethereum/pull/10923

ref #10908

* Update json test commit to 1dc9d20e97165708f7db0bbf2d1a87a6b4285827

* Fail with error message

* Handle missing r, s, v params in json tests
Light cleanup of json test runner

* Include the path to the test file

* Handle new `postState` format: string or map
Sort out tests
Missing docs

* WIP

* Include test-helpers from ethjson

* Sort out new paths

* Remove dead code

* Fix warnings stemming from code called only from macros
Skip failing tests in stRevert/ and stTransactionTest/ (too course a filter!)
Docs and light touch refactorings for readability

* Skip all failing tests

* Document the single-test-skipping madness

* Update tests to latest commit on the `develop` branch

* Rename test skipping types to reflect actual purpose

* Switch to skipping individual tests in currents.json
Add some logging to help debug skipping

* Fix rpc test by curve fitting to new json test source file

* Add refs to all issues for fixing failing&skipped json tests

* Sort out the need for Clone for tests

* [json-tests] populate state from genesis pod state (#11083)

* [json-tests] populate state from genesis pod state

* [json-tests] #11075 is resolved as well

* [json-tests] #11076 hopefully too

* [json-tests] #11077 🎉

* [json-tests] fix trailing comma

* Update ethcore/src/json_tests/chain.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Add issue numbers to TODOs

* Apply @ordians fix for wrong state_root

* Warn on invalid RLP

* Remove the `ci-skip-tests` feature
2019-09-25 10:02:04 +02:00
David d193ddde19
Extract snapshot to own crate (#11010)
* Move snapshot to own crate
Sort out imports

* WIP cargo toml

* Make snapshotting generic over the client
Sort out tests

* Sort out types from blockchain and client

* Sort out sync

* Sort out imports and generics

* Sort out main binary

* Fix sync test-helpers

* Sort out import for secret-store

* Sort out more imports

* Fix easy todos

* cleanup

* Cleanup

* remove unneded workspace member

* cleanup

* Sort out test-helpers dependency on account-db

* Update ethcore/client-traits/src/lib.rs

Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Update ethcore/snapshot/Cargo.toml
2019-09-03 11:29:25 +02:00
David cd26526868
Make ClientIoMessage generic over the Client (#10981)
* Add client-traits crate
Move the BlockInfo trait to new crate

* New crate `machine`
Contains code extracted from ethcore that defines `Machine`, `Externalities` and other execution related code.

* Use new machine and client-traits crates in ethcore

* Use new crates machine and client-traits instead of ethcore where appropriate

* Fix tests

* Don't re-export so many types from ethcore::client

* Fixing more fallout from removing re-export

* fix test

* More fallout from not re-exporting types

* Add some docs

* cleanup

* import the macro edition style

* Tweak docs

* Add missing import

* remove unused ethabi_derive imports

* Use latest ethabi-contract

* Move many traits from ethcore/client/traits to client-traits crate
Initial version of extracted Engine trait

* Move snapshot related traits to the engine crate (eew)

* Move a few snapshot related types to common_types
Cleanup Executed as exported from machine crate

* fix warning

* Gradually introduce new engine crate: snapshot

* ethcore typechecks with new engine crate

* Sort out types outside ethcore

* Add an EpochVerifier to ethash and use that in Engine.epoch_verifier()
Cleanup

* Document pub members

* Sort out tests
Sort out default impls for EpochVerifier

* Add test-helpers feature and move EngineSigner impl to the right place

* Sort out tests

* Sort out tests and refactor verification types

* Fix missing traits

* More missing traits
Fix Histogram

* Fix tests and cleanup

* cleanup

* Put back needed logger import

* Don't rexport common_types from ethcore/src/client
Don't export ethcore::client::*

* Remove files no longer used
Use types from the engine crate
Explicit exports from engine::engine

* Get rid of itertools

* Move a few more traits from ethcore to client-traits: BlockChainReset, ScheduleInfo, StateClient

* Move ProvingBlockChainClient to client-traits

* Don't re-export ForkChoice and Transition from ethcore

* Address grumbles: sort imports, remove commented out code

* Fix merge resolution error

* Extract the Clique engine to own crate

* Extract NullEngine and the block_reward module from ethcore

* Extract InstantSeal engine to own crate

* Extract remaining engines

* Extract executive_state to own crate so it can be used by engine crates

* Remove snapshot stuff from the engine crate

* Put snapshot traits back in ethcore

* cleanup

* Remove stuff from ethcore

* Don't use itertools

* itertools in aura is legit-ish

* More post-merge fixes

* Re-export less types in client

* cleanup

* Extract spec to own crate

* Put back the test-helpers from basic-authority

* Fix ethcore benchmarks

* Reduce the public api of ethcore/verification

* WIP

* Add Cargo.toml

* Fix compilation outside ethcore

* Audit uses of import_verified_blocks() and remove unneeded calls
Cleanup

* cleanup

* Remove unused imports from ethcore

* Cleanup

* remove double semi-colons

* Add missing generic param

* More missing generics

* Update ethcore/block-reward/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/basic-authority/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/ethash/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/clique/src/lib.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* signers is already a ref

* Add an EngineType enum to tighten up Engine.name()

* Introduce Snapshotting enum to distinguish the type of snapshots a chain uses

* Rename supports_warp to snapshot_mode

* Missing import

* Update ethcore/src/snapshot/consensus/mod.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* missing import

* Fix import

* double semi

* Fix merge problem

* cleanup

* Parametrise `ClientIoMessage` with `()` for the light client

* Add impl Tick for ()

* Address review feedback

* Move ClientIoMessage to common-types

* remove superseeded fixme

* fix merge conflict errors
2019-08-28 10:09:42 +02:00
David fbf425c4e2 Extract spec to own crate (#10978)
* Add client-traits crate
Move the BlockInfo trait to new crate

* New crate `machine`
Contains code extracted from ethcore that defines `Machine`, `Externalities` and other execution related code.

* Use new machine and client-traits crates in ethcore

* Use new crates machine and client-traits instead of ethcore where appropriate

* Fix tests

* Don't re-export so many types from ethcore::client

* Fixing more fallout from removing re-export

* fix test

* More fallout from not re-exporting types

* Add some docs

* cleanup

* import the macro edition style

* Tweak docs

* Add missing import

* remove unused ethabi_derive imports

* Use latest ethabi-contract

* Move many traits from ethcore/client/traits to client-traits crate
Initial version of extracted Engine trait

* Move snapshot related traits to the engine crate (eew)

* Move a few snapshot related types to common_types
Cleanup Executed as exported from machine crate

* fix warning

* Gradually introduce new engine crate: snapshot

* ethcore typechecks with new engine crate

* Sort out types outside ethcore

* Add an EpochVerifier to ethash and use that in Engine.epoch_verifier()
Cleanup

* Document pub members

* Sort out tests
Sort out default impls for EpochVerifier

* Add test-helpers feature and move EngineSigner impl to the right place

* Sort out tests

* Sort out tests and refactor verification types

* Fix missing traits

* More missing traits
Fix Histogram

* Fix tests and cleanup

* cleanup

* Put back needed logger import

* Don't rexport common_types from ethcore/src/client
Don't export ethcore::client::*

* Remove files no longer used
Use types from the engine crate
Explicit exports from engine::engine

* Get rid of itertools

* Move a few more traits from ethcore to client-traits: BlockChainReset, ScheduleInfo, StateClient

* Move ProvingBlockChainClient to client-traits

* Don't re-export ForkChoice and Transition from ethcore

* Address grumbles: sort imports, remove commented out code

* Fix merge resolution error

* Extract the Clique engine to own crate

* Extract NullEngine and the block_reward module from ethcore

* Extract InstantSeal engine to own crate

* Extract remaining engines

* Extract executive_state to own crate so it can be used by engine crates

* Remove snapshot stuff from the engine crate

* Put snapshot traits back in ethcore

* cleanup

* Remove stuff from ethcore

* Don't use itertools

* itertools in aura is legit-ish

* More post-merge fixes

* Re-export less types in client

* cleanup

* Extract spec to own crate

* Put back the test-helpers from basic-authority

* Fix ethcore benchmarks

* Reduce the public api of ethcore/verification

* Update ethcore/block-reward/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/basic-authority/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/ethash/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/clique/src/lib.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* signers is already a ref

* Add an EngineType enum to tighten up Engine.name()

* Introduce Snapshotting enum to distinguish the type of snapshots a chain uses

* Rename supports_warp to snapshot_mode

* Missing import

* Update ethcore/src/snapshot/consensus/mod.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* missing import

* Fix import

* double semi
2019-08-23 15:32:58 +02:00
David 2af3140a26
Extract engines to own crates (#10966)
* Add client-traits crate
Move the BlockInfo trait to new crate

* New crate `machine`
Contains code extracted from ethcore that defines `Machine`, `Externalities` and other execution related code.

* Use new machine and client-traits crates in ethcore

* Use new crates machine and client-traits instead of ethcore where appropriate

* Fix tests

* Don't re-export so many types from ethcore::client

* Fixing more fallout from removing re-export

* fix test

* More fallout from not re-exporting types

* Add some docs

* cleanup

* import the macro edition style

* Tweak docs

* Add missing import

* remove unused ethabi_derive imports

* Use latest ethabi-contract

* Move many traits from ethcore/client/traits to client-traits crate
Initial version of extracted Engine trait

* Move snapshot related traits to the engine crate (eew)

* Move a few snapshot related types to common_types
Cleanup Executed as exported from machine crate

* fix warning

* Gradually introduce new engine crate: snapshot

* ethcore typechecks with new engine crate

* Sort out types outside ethcore

* Add an EpochVerifier to ethash and use that in Engine.epoch_verifier()
Cleanup

* Document pub members

* Sort out tests
Sort out default impls for EpochVerifier

* Add test-helpers feature and move EngineSigner impl to the right place

* Sort out tests

* Sort out tests and refactor verification types

* Fix missing traits

* More missing traits
Fix Histogram

* Fix tests and cleanup

* cleanup

* Put back needed logger import

* Don't rexport common_types from ethcore/src/client
Don't export ethcore::client::*

* Remove files no longer used
Use types from the engine crate
Explicit exports from engine::engine

* Get rid of itertools

* Move a few more traits from ethcore to client-traits: BlockChainReset, ScheduleInfo, StateClient

* Move ProvingBlockChainClient to client-traits

* Don't re-export ForkChoice and Transition from ethcore

* Address grumbles: sort imports, remove commented out code

* Fix merge resolution error

* Extract the Clique engine to own crate

* Extract NullEngine and the block_reward module from ethcore

* Extract InstantSeal engine to own crate

* Extract remaining engines

* Extract executive_state to own crate so it can be used by engine crates

* Remove snapshot stuff from the engine crate

* Put snapshot traits back in ethcore

* cleanup

* Remove stuff from ethcore

* Don't use itertools

* itertools in aura is legit-ish

* More post-merge fixes

* Re-export less types in client

* cleanup

* Update ethcore/block-reward/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/basic-authority/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/ethash/Cargo.toml

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update ethcore/engines/clique/src/lib.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* signers is already a ref

* Add an EngineType enum to tighten up Engine.name()

* Introduce Snapshotting enum to distinguish the type of snapshots a chain uses

* Rename supports_warp to snapshot_mode

* Missing import

* Update ethcore/src/snapshot/consensus/mod.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* remove double-semicolons
2019-08-22 18:25:49 +02:00
David 6a9de9b11e
Extract the Engine trait (#10958)
* Add client-traits crate
Move the BlockInfo trait to new crate

* New crate `machine`
Contains code extracted from ethcore that defines `Machine`, `Externalities` and other execution related code.

* Use new machine and client-traits crates in ethcore

* Use new crates machine and client-traits instead of ethcore where appropriate

* Fix tests

* Don't re-export so many types from ethcore::client

* Fixing more fallout from removing re-export

* fix test

* More fallout from not re-exporting types

* Add some docs

* cleanup

* import the macro edition style

* Tweak docs

* Add missing import

* remove unused ethabi_derive imports

* Use latest ethabi-contract

* Move many traits from ethcore/client/traits to client-traits crate
Initial version of extracted Engine trait

* Move snapshot related traits to the engine crate (eew)

* Move a few snapshot related types to common_types
Cleanup Executed as exported from machine crate

* fix warning

* Gradually introduce new engine crate: snapshot

* ethcore typechecks with new engine crate

* Sort out types outside ethcore

* Add an EpochVerifier to ethash and use that in Engine.epoch_verifier()
Cleanup

* Document pub members

* Sort out tests
Sort out default impls for EpochVerifier

* Add test-helpers feature and move EngineSigner impl to the right place

* Sort out tests

* Sort out tests and refactor verification types

* Fix missing traits

* More missing traits
Fix Histogram

* Fix tests and cleanup

* cleanup

* Put back needed logger import

* Don't rexport common_types from ethcore/src/client
Don't export ethcore::client::*

* Remove files no longer used
Use types from the engine crate
Explicit exports from engine::engine

* Get rid of itertools

* Move a few more traits from ethcore to client-traits: BlockChainReset, ScheduleInfo, StateClient

* Move ProvingBlockChainClient to client-traits

* Don't re-export ForkChoice and Transition from ethcore

* Address grumbles: sort imports, remove commented out code

* Fix merge resolution error

* merge failure
2019-08-15 17:59:22 +02:00
cheme 5807402a0b Update to latest trie version. (#10972)
* Switch to 'trie' crates, there is an unpublished deps to staging
parity-common triehash still.

* Use crates.io dependency.

* indentation

* Update util/journaldb/src/traits.rs

indentation

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>

* Rem import braces

* switch deps to simple-codec branch (code broken)

* painfull update of trie and memdb, plus rework codec to be compatible
with simple_codec changes

* Removed useless implementation from trait.

* Remove some malloc size until update and patch triehash, seems ok
otherwhise.

* Update parity-util-mem.

* Switch to published triehash 0.8.

* Avoid redundancy in encode_partial functions.
Use better namings.

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Restore previous child rlp header length check.
Better comments and formatting.

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: David <dvdplm@gmail.com>

* Update util/patricia-trie-ethereum/src/rlp_node_codec.rs

Co-Authored-By: David <dvdplm@gmail.com>
2019-08-15 15:36:48 +02:00
David 73f4564b66
Extract Machine from ethcore (#10949)
* Add client-traits crate
Move the BlockInfo trait to new crate

* New crate `machine`
Contains code extracted from ethcore that defines `Machine`, `Externalities` and other execution related code.

* Use new machine and client-traits crates in ethcore

* Use new crates machine and client-traits instead of ethcore where appropriate

* Fix tests

* Don't re-export so many types from ethcore::client

* Fixing more fallout from removing re-export

* fix test

* More fallout from not re-exporting types

* Add some docs

* cleanup

* import the macro edition style

* Tweak docs

* Add missing import

* remove unused ethabi_derive imports

* Use latest ethabi-contract
2019-08-13 12:33:34 +02:00
Marek Kotewicz cfe826fae9
whisper is no longer a part of parity-ethereum repo (#10855)
* whisper is no longer a part of parity-ethereum repo

* fix failing tests

* update whisper help with the link to the new repo

* Removed AttachedProtocols

* updated whisper info in README.md files

* Update parity/deprecated.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>
2019-07-12 14:15:30 +02:00
Marek Kotewicz d5584a01c7
update parking-lot to 0.8 (#10845) 2019-07-05 15:19:38 +02:00
s3krit d83798db62
Update version to 2.7.0 (#10846) 2019-07-05 11:49:51 +02:00
Andronik Ordian 4bb517ec94 update jsonrpc to 12.0 (#10841)
* update jsonrpc to 12.0

* use reexported ws error
2019-07-05 16:24:23 +08:00
David 9f96fa0a73 Extricate PodAccount and state Account to own crates (#10838)
* WIP move errors, pod_account and state account to own crates

* Sort out dependencies, fix broken code and tests
Remove botched ethcore-error crate

* remove template line

* fix review feedback

* Remove test-only AccountDBMut::new
2019-07-04 15:20:44 +02:00
Marek Kotewicz 1887080990 updated project to ansi_term 0.11 (#10799) 2019-06-27 13:34:40 +02:00
cheme 6fc5014b4d
Remove calls to heapsize (#10432)
* update memorydb trait
* use malloc_size_of instead of heapsize_of
* use jemalloc as default allocator for parity client.
2019-06-19 13:54:05 +02:00
David 7827cc048e
Use RUSTFLAGS to set the optimization level (#10719)
* Use RUSTFLAGS to set the optimization level

Cargo has a [quirk]() in how configuration settings are propagated when `cargo test` runs: local code respect the settings in `[profile.test]` but all dependencies use the `[profile.dev]` settings. Here we force `opt-level=3` for all dependencies.

* Remove unused profile settings

* Maybe like this?

* Turn off incremental compilation

* Remove colors; try again with overflow-checks on

* Use quiet CI machine

* Turn overflow checking back on

* Be explicit about what options we use

* Remove "quiet machine" override
2019-06-07 11:25:45 +02:00
David f7dae48c17
Revert "enable lto for release builds (#10717)" (#10721)
This reverts commit 44161874ff.
2019-06-05 11:57:09 +02:00