Commit Graph

1594 Commits

Author SHA1 Message Date
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
Niklas Adolfsson 3231454bb1
[devp2p discovery]: remove `deprecated_echo_hash` (#11564)
Removes support for `deprecated_echo_hash` ping/pong in devp2p-discovery.
It will not work with nodes prior to `stable 2.0.5` (#9526)
2020-03-17 16:43:48 +01:00
Niklas Adolfsson b7c97f90b6
[devp2p discovery]: cleanup (#11547)
* [devp2p discovery]: cleanup

* [devp2p]: remove lifetime from Discovery

This commit it removes the lifetime on type `Discovery` by making `request_backoff: &'static [Duration]`
instead.

* [devp2p discovery]: pass SockAddr by value

* [devp2p discovery]: remove needless clones

* [devp2p discovery]: take payload by value
2020-03-10 18:35:49 +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
Andronik Ordian 3ccfe735aa
license update (#11543)
* update license_header

* run ./scripts/add_license.sh

* update eip-152 license
2020-03-05 12:19:39 +01:00
David 6c0134f2ee
Less cloning when importing blocks (#11531)
* WIP

* cleanup

* check_and_lock_block() only needs reference

* Cleanup&docs

* Push uncles by ref to clone at the last possible time.

* Missing import

* Review grumbles

* Update util/journaldb/src/overlayrecentdb.rs

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

* Update ethcore/types/src/client_types.rs

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

* deref U256 before adding

* More review grumbles

* review grumbles: pass by value

* cleanup

* Move the block

* Don't clone the header

* Update ethcore/src/client/client.rs

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

* Update ethcore/src/client/client.rs

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

* Add comment

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Andronik Ordian <write@reusable.software>
2020-03-04 18:34:29 +01:00
Niklas Adolfsson 0c385de921
[journaldb]: cleanup (#11534)
I was annoyed by the manual `clone` implementations which this removes and I fixed a few of clippy warnings.
2020-03-03 12:18:26 +01:00
s3krit 62b73a6460
Remove references to parity-ethereum (#11525)
* update all the changelogs

* update only github URLs in README.md

* sed magic

find . -type f -exec sed -i 's_paritytech/parity-ethereum_OpenEthereum/open-ethereum_g' {} \;
2020-03-01 23:40:59 +01:00
Andronik Ordian ec8dbb36e6
fix compilation warnings (#11522) 2020-02-26 12:58:09 +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 a49950e9c0
[dependencies]: remove `util/macros` (#11501)
* [dependencies]: remove `util/macros`

* fix typo: `flish` -> flush`

* [json tests]: add log if `write` or `flush` fails

`write` is performed to `stdout`
`logging` is performed to `stderr`

* [rocksdb-migration]: remove unused `Progress`

* [rpc test]: BTreeMap -> `btreemap!`
2020-02-19 13:07:33 +01:00
Andronik Ordian ea9322f9c1
fix compilation warnings (#11492) 2020-02-14 17:04:19 +01:00
Andronik Ordian 3424697313
update to published rlp-derive (#11489) 2020-02-13 15:34:50 +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 626543326d
backwards compatible call_type creation_method (#11450)
* rlp_derive: update syn & co

* rlp_derive: remove dummy_const

* rlp_derive: remove unused attirubutes

* rlp-derive: change authors

* rlp_derive: add rlp(default) attribute

* Revert "Revert "[Trace] Distinguish between `create` and `create2` (#11311)" (#11427)"

This reverts commit 5d4993b0f8.

* trace: backwards compatible call_type and creation_method

* trace: add rlp backward compatibility tests

* cleanup

* i know, i hate backwards compatibility too

* address review grumbles
2020-02-05 15:30:45 +01:00
David 49f338a173
Avoid copies (#11451)
* Avoid copies

* Unused import
2020-02-04 23:38:05 +01:00
David cf6fa63f55
Avoid long state queries when serving GetNodeData requests (#11444)
* Remove dead bootnodes, add new geth bootnodes

* More granular locking when fetching state
Finish GetDataNode requests early if queries take too long

* typo

* Use latest kvdb-rocksdb

* Cleanup

* Update ethcore/sync/src/chain/supplier.rs

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

* Address review grumbles

* Fix compilation

* Address review grumbles

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-02-04 20:59:16 +01:00
Andronik Ordian e4a4a3cb55
rlp_derive: cleanup (#11446)
* rlp_derive: update syn & co

* rlp_derive: remove dummy_const

* rlp_derive: remove unused attirubutes

* rlp-derive: change authors
2020-02-04 17:35:48 +01:00
Niklas Adolfsson 1b96f98296
chore: remove unused dependencies (#11432)
* fix: compiler warnings

* chore: remove unused dependencies
2020-02-03 23:26:43 +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
Niklas Adolfsson a9d337f7f3 dependencies: bump `derive_more v0.99` (#11405)
* engine error: remove faulty/unused `From`

* dependencies: bump `derive_more v0.99`

The primilary motivation behind this is to have hard errors on `From` conversions that are ignored by
duplicated `variants` with the same value type
2020-01-24 14:52:50 +01:00
Denis S. Soldatov aka General-Beck e1d06efe60 Switching to stable-track (#11377)
* sccache "stop server" - > "show stats"

* remove testing and beta from update, cli, etc.

* Beta->Nigthly updater

* Beta->Nightly

* ->Nightly and fix

* updater ->Stable

* Testing->Nightly

* Update scripts/gitlab/test-linux.sh

Co-Authored-By: Denis Pisarev <denis.pisarev@parity.io>

* sccache "stop server" - > "show stats"

* remove testing and beta from update, cli, etc.

* Beta->Nigthly updater

* Beta->Nightly

* ->Nightly and fix

* updater ->Stable

* Testing->Nightly

* Update scripts/gitlab/test-linux.sh

Co-Authored-By: Denis Pisarev <denis.pisarev@parity.io>

* Update CHANGELOGs and version

* temporarily allow darwin and windows to be built on any branch

* fix check-benches job

* Revert "temporarily allow darwin and windows to be built on any branch"

This reverts commit 45c72f69e99cbe891f694e528a53eb3c3bd8f331.

* fix check-benches job

* Revert changing track from `nightly` to `stable`

* fix test: rpc_parity_upgrade_ready

* fix tests: rpc_parity_version_info, rpc_parity_releases_info

Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
Co-authored-by: s3krit <pugh@s3kr.it>
2020-01-22 17:34:34 +01:00
s3krit 77643c13e8
Update copyright notice 2020 (#11386)
* Update copyright noticed 2020

* Update copyright in two overlooked files
2020-01-17 14:27:28 +01:00
Andronik Ordian e95bbe36cb fix cargo audit (#11378)
* Cargo.lock: cargo update -p http

* fetch: cargo upgrade hyper-rustls@0.18 --all
2020-01-10 17:43:49 +01:00
Niklas Adolfsson 9d8e6ee4c9 [util/migration]: remove needless `static` bounds (#11348) 2019-12-30 14:43:38 -08: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
joshua-mir f8f22245ec update autoupdate fork blocks for nightly (#11308) 2019-12-19 13:05:04 +01:00
Cho e14d68e559 Add Nat PMP method to P2P module (#11210)
* Add Nat PMP method to P2P module

* Add test fn

* Use closure

* print richer error messages.

* reformat long code line

* remove closures
2019-12-19 09:01:39 +01:00
Boqin Qin f1f64930cf Fix atomicity violation in network-devp2p (#11277) 2019-12-10 07:46:32 +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 4c3be46f93 Add benchmarks and tests for RlpNodeCodec decoding (#11287) 2019-12-03 12:30:07 +01:00
Andronik Ordian 71f4f61146 upgrade vergen to 3.0 (#11293)
* version: upgrade vergen to 3.0

* version: use vergen for target triple
2019-12-02 22:18:44 +01:00
Jim Posen c7219aae30
Upgrade trie-db to 0.16.0. (#11274)
* Upgrade trie-db to 0.16.0.

* Respond to review comments.
2019-11-21 11:08:49 +01:00
David 93f700d961 Return Ok(None) when the registrar contract returns empty slice (#11257) 2019-11-15 14:27:34 +01:00
David e194a2c6e3 Fix misc compile warnings (#11258) 2019-11-14 00:01:21 +01:00
David 8c2199dd2a
Snapshot restoration overhaul (#11219)
* Comments and todos
Use `snapshot_sync` as logging target

* fix compilation

* More todos, more logs

* Fix picking snapshot peer: prefer the one with the highest block number
More docs, comments, todos

* Adjust WAIT_PEERS_TIMEOUT to be a multiple of MAINTAIN_SYNC_TIMER to try to fix snapshot startup problems
Docs, todos, comments

* Tabs

* Formatting

* Don't build new rlp::EMPTY_LIST_RLP instances

* Dial down debug logging

* Don't warn about missing hashes in the manifest: it's normal
Log client version on peer connect

* Cleanup

* Do not skip snapshots further away than 30k block from the highest block seen

Currently we look for peers that seed snapshots that are close to the highest block seen on the network (where "close" means withing 30k blocks). When a node starts up we wait for some time (5sec, increased here to 10sec) to let peers connect and if we have found a suitable peer to sync a snapshot from at the end of that delay, we start the download; if none is found and --warp-barrier is used we stall, otherwise we start a slow-sync.
When looking for a suitable snapshot, we use the highest block seen on the network to check if a peer has a snapshot that is within 30k blocks of that highest block number. This means that in a situation where all available snapshots are older than that, we will often fail to start a snapshot at all. What's worse is that the longer we delay starting a snapshot sync (to let more peers connect, in the hope of finding a good snapshot), the more likely we are to have seen a high block and thus the more likely we become to accept a snapshot.
This commit removes this comparison with the highest blocknumber criteria entirely and picks the best snapshot we find in 10sec.

* lockfile

* Add a `ChunkType::Dupe` variant so that we do not disconnect a peer if they happen to send us a duplicate chunk (just ignore the chunk and keep going)
Resolve some documentation todos, add more

* tweak log message

* Don't warp sync twice
Check if our own block is beyond the given warp barrier (can happen after we've completed a warp sync but are not quite yet synced up to the tip) and if so, don't sync.
More docs, resolve todos.
Dial down some `sync` debug level logging to trace

* Avoid iterating over all snapshot block/state hashes to find the next work item

Use a HashSet instead of a Vec and remove items from the set as chunks are processed. Calculate and store the total number of chunks in the `Snapshot`  struct instead of counting pending chunks each time.

* Address review grumbles

* Log correct number of bytes written to disk

* Revert ChunkType::Dup change

* whitespace grumble

* Cleanup debugging code

* Fix docs

* Fix import and a typo

* Fix test impl

* Use `indexmap::IndexSet` to ensure chunk hashes are accessed in order

* Revert increased SNAPSHOT_MANIFEST_TIMEOUT: 5sec should be enough
2019-10-31 16:07:21 +01:00
David ffeaee778c
Pause pruning while snapshotting (#11178)
* WIP. Typos and logging.

* Format todos

* Pause pruning while a snapshot is under way
Logs, docs and todos

* Allocate memory for the full chunk

* Name snapshotting threads

* Ensure `taking_snapshot` is set to false whenever and however `take_snapshot`returns
Rename `take_at` to `request_snapshot_at`
Cleanup

* Let "in_progress" deletion fail
Fix tests

* Just use an atomic

* Review grumbles

* Finish the sentence

* Resolve a few todos and clarify comments.

* Calculate progress rate since last update

* Lockfile

* Fix tests

* typo

* Reinstate default snapshotting frequency
Cut down on the logging noise

* address grumble

* Log memory use with `journal_size()` and explain why.
2019-10-24 16:46:32 +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 2d2513b35a [dependencies] bump rand 0.7 (#11022)
* network-devp2p: bump rand `0.7`

* updater: bump rand `0.7`

* hash-fetch: bump rand `0.7`

* ethcore-sync: bump rand `0.7`

* rpc: dont work yet

* [private-tx] remove unused rand

* [ethcore-snapshot] bump rand 0.7

* [engine clique]: bump rand 0.7

* [engine authority-round]: remove rand

* [ethcore-blockchain]: bump rand 0.7

* [ethcore]: bump rand 0.7

* [ethcore-light]: bump rand 0.7

* [ethstore]: bump rand 0.7

* Fix for rand usage in rpc

* [rpc]: fix test build

* [ethcore-sync]: fix test build

* [snapshot tests]: rand 0.7

* [ethkey]: bump rand 0.7

* [rpc]: resolve TODO incompatible `rand versions`

* [ethkey] use `rust-secp256k1` master branch

* fix(bad merge): ethcoore-light remove itertools

* [rpc tests]: revert rpc test changes in #11139

`#11139` makes use a different `RNG/seed`, not `H64::random_using(&mut self.rand)`

This commit reverts the changed tests (the generated id by `Subscribers::next_id`)

* [ethkey/random]: resolve introduced `TODO`
2019-10-18 15:12:16 +02:00
Boqin Qin f99819d326 util Host: fix a double Read Lock bug in fn Host::session_readable() (#11175) 2019-10-17 10:59:37 +02:00
Niklas Adolfsson 4f25d43516
[keccak-hasher]: rust2018 (#11163) 2019-10-10 19:43:33 +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