Commit Graph

11902 Commits

Author SHA1 Message Date
Sočik 33860c3f32
2.4.3 beta backports (#10508)
* version: bump beta

* Add additional request tests (#10503)
2019-03-22 10:23:45 +01:00
Sočik e1c1ecf0a5
2.4.2 beta backports (#10488)
* version: bump beta

* Сaching through docker volume (#10477)

* _old codebase_ before docker update

* before docker update, testing runnr

* docker update, testing the caching

* distributed job cargo homes

* distributed job cargo homes 2

* distributed job cargo homes 3

* dockerfile with gitlab checkout, audit uses template

* dockerfile gets repo in volume

* change builds_dir

* trying docker cache for repo

* repo cached automatically

* after script is not concatenated

* check sccache non-cacheable reasons nature

* watch cache

* log sccache

* log sccache 2

* debug log sccache

* fix debug log sccache

* fix debug log sccache 2

* debug log cache 3

* debug log cache 3

* trace log all sccache

* test wo cargo cache

* test w removed cargo cache

* report non-cacheable reasons, cargo cache is back and empty

* report non-cacheable reasons, cargo cache is back and empty 2

* report non-cacheable reasons, cargo cache is back and empty 3

* wrap into after_script

* restore CI tags

`qa` -> `linux-docker`

* return to main runners, this will fail until config on runners And Dockerfile won't be updated

* typo fix CI lint

* return to docker tag

* fix win&mac build (#10486)

add CARGO_HOME:                      "${CI_PROJECT_DIR}/.cargo"

* fix(extract `timestamp_checked_add` as lib) (#10383)

* fix(extract `timestamp_checked_add` as lib)

* fix(whisper types): remove unused `EmptyTopics`

* fix(time-lib): feature-flag to use time-lib or std

This commit adds conditional compilation checks that falls back to `our time-lib` when
`time_checked_add` is not available in the standard library

Note, `time_checked_add` covers both `checked_add` and `checked_sub`

* fix(grumble): use cfg_attr to define rustc feature
2019-03-20 09:17:30 +01:00
Sočik 72c8b79035
2.4.1 beta backports (#10471)
* version: bump beta

* Implement parity_versionInfo & parity_setChain on LC; fix parity_setChain (#10312)

* Light client: implement parity_versionInfo RPC

* Light client: implement set_exit_handler & parity_setChain RPC

* parity_setChain RPC: return an error if failed (instead of `true`)

* Implement eth_subscribe('syncing') RPC for full node & light node

* Fix indentation

* Revert commit: Implement eth_subscribe('syncing')

* Revert change to Cr callback function

* CI publish to aws (#10446)

* move publish aws from gitlab.yml to gitlab scripts

* gitlab.yml cleaning
move publish AWS to gitlab scripts
remove dependencies from android build

* CI aws git checkout (#10451)

* Updating the CI system with the publication of releases and binary files on github

Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>

* move publish aws from gitlab.yml to gitlab scripts

Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>

* gitlab.yml cleaning
move publish AWS to gitlab scripts
remove dependencies from android build

Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>

* Revert "Updating the CI system with the publication of releases and binary files on github"

This reverts commit da87e06f2e4751dbca08a898b52926aef5ad0aba.

* remove no-git for aws

* microfix

* no need in no_git then

* Revert "CI aws git checkout (#10451)" (#10456)

* Revert "CI aws git checkout (#10451)"

This reverts commit 3e1d73126c.

* Update .gitlab-ci.yml

revert aws script with small fixes

* Delete publish-aws.sh

* Tests parallelized (#10452)

* tests splitted, phase 1

* typo

* fix wrong launch commands

* typos

* rearrangements

* use `nproc` function for threads

* use nproc for threads

* let theads be auto, build-andriod no more in regular run

* split val chain and cargo check

* renamed some files

* wrong phase

* check rust files before test jobs

* lint error

* rust files modivied var

* test except changes

* add rust_changes except

* lint error

* fixes

* .gitlab-ci.yml can't be excluded

* pipeline shouldn't start

* pipeline must go

* pipeline must go 2

* pipeline must go 3

* pipeline must go 4

* pipeline must go 5

* pipeline must go 6

* pipeline must go 7

* pipeline must not go 1

* pipeline must go 8

* avoid skippng tests yet, reintroducing them after the caching

* test theory

* parallelized cargo check with combusting helicopters

* less uploads

* alias for cargo checks

* nice template

* Ensure static validator set changes are recognized (#10467)
2019-03-19 09:10:36 +01:00
Hernando Castano c7d8ee1dd7
More Backports for Beta 2.4.0 (#10431)
* revert some changes, could be buggy (#10399)

* 10000 > 5000 (#10422)

addresses #10418

* fix panic when logging directory does not exist, closes #10420 (#10424)

* fix underflow in pip, closes #10419 (#10423)

* ci: clean up gitlab-ci.yml leftovers from previous merge (#10429)

* Update hardcoded headers for Foundation, Ropsten, Kovan and Classic (#10417)

* update foundation to #7262209

* update kovan to #10434561

* update ropsten to #5027841

* update classic to #7555073

* Update Ropsten headers to #5101569
2019-02-27 16:33:29 +01:00
Hernando Castano ce9f4c65d3
Backports for Beta 2.4.0 (#10416)
* no-git for publish jobs, empty artifacts dir (#10393)

* no-git for publish jobs, empty artifacts dir

* fix syntax

* prettiness

* fix prettiness

* should get rid of git in publishing

* Fix to_pod storage trie value decoding (#10368)

* snap: reenable i386, arm64, armhf architecture publishing (#10386)

* snap: reenable i386, arm64, armhf architecture publishing

* gitlab: fix indent

* gitlab: fix yml syntax

* Linker for crosscomile

* fix target to linker

* new docker image

* fix lint, add build to this PR

* calc SHA3 using rhash

* add new images for i386, armhf

* show snap target & artifacts

* set CARGO_TARGET for publish snap

* move detect Version to publish snap

* rm libc6 dep from snap-template up pub-snap script

* clean up cargo config before add linker

* move linker config to docker images
2019-02-25 15:24:51 +01:00
5chdn ab0ad1925b
version: mark 2.4.0 beta 2019-02-21 11:25:29 +01:00
cheme 6bb106a784 Update to latest mem-db, hash-db and trie-db. (#10314)
* 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>

* Update ethcore/src/snapshot/tests/state.rs

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>
2019-02-20 21:09:34 +03:00
Andrew Jones 4e0ec4e66b
tx pool: always accept local transactions (#10375)
* tx pool: always accept local transactions

* tx pool: `choose` local txs with same sender and nonce
2019-02-20 16:49:39 +00:00
Niklas Adolfsson b58a3ed0ad fix(trace_main! macro): don't re-export (#10384) 2019-02-20 10:52:28 +01:00
felix b803f57db6 exchanged old(azure) bootnodes with new(ovh) ones (#10309)
* exchanged old(azure) bootnodes with new(ovh) ones

* Fix indent
2019-02-20 10:06:26 +01:00
André Silva b457f46c81 ethash: implement Progpow (#9762)
* ethash: initial implementation of progpow

* progpow: use wrapping arithmetic

* progpow: cleanup comments

* progpow: fix keccak_f800

* progpow: reorder definitions

* progpow: general fixing

* progpow: add basic tests from geth

* progpow: generate c_dag and add test

* progpow: fix progpow_init and progpow_loop

* progpow: fix and add new test

* progpow: tabify

* progpow: add shared testvectors from geth and aleth

* progpow: add benchmarks

* progpow: don't read bytes from dag

* ethash: use criterion for progpow benchmarks

* progpow: dont borrow hash on fnv1a_hash

* progpow: don't borrow operand on progpow merge

* progpow: hardcode dag lookup function

we only support light verification anyway

* progpow: read double words directly from the dag

* progpow: inline some small functions

* progpow: remove some bounds checking from the main loop

* progpow: remove unreachable match cases

* progpow: remove bounds check in keccak_f800_round

* progpow: fix ptr::swap

* progpow: force loop unroll in keccak_f800_round

* progpow: remove unnecessary branching in progpow_loop

* progpow: force loop unroll in fill_mix

* progpow: silence unused warning

* progpow: dont run last keccak_f800_round out of the loop

rustc generates the same assembly, it unrolls the loop

* progpow: fix output of keccak_f800_short

* ethcore: support progpow in ethash engine

* ethash: fix typo

* ethcore, ethash: fix tests

* json: fix ethash spec tests

* ethash: update quick_get_difficulty for progpow

* ethash: drop light cache on progpow transition block

* ethash: fix quick_get_difficulty tests

* progpow: update to spec v0.9.0

* progpow: update to spec v0.9.1

* progpow: update to spec v0.9.2

* ethash: rename progpow benchmarks

* fix Cargo.lock bad merge

* ethash: only export modules for benchmarks

* ethash: progpow: remove unsafe unchecked indexing

* ethash: create enum for pow algorithm

* ethash: box the progpow cdag

* ethash: skip slow progpow test vectors on ci

* ethash: don't skip progpow test vectors

they don't take too long when running in release mode which is the case
for CI.

* ethash: progpow: update copyright date

Co-Authored-By: andresilva <andre.beat@gmail.com>

* ethcore: remove verification of ci-skip-tests on non-test builds
2019-02-20 10:05:11 +01:00
Leo Arias b4520c5886 snap: add the removable-media plug (#10377)
This interface allows the snap to access the directories in /media. This is needed when the storage is in a separate disk, not part of home.
2019-02-20 09:49:54 +01:00
Psilon ca67dc251f Add message to IO errors (#10324) 2019-02-18 20:39:38 +03:00
Niklas Adolfsson aea289e79e chore(bump parity-daemonize): require rust >= 1.31 (#10359) 2019-02-18 13:38:46 +01:00
Svyatoslav Nikolsky ef0eda0c39 SecretStore: use in-memory transport in cluster tests (#9850)
* fixing SS tests

* removed some redundant clones

* fixed grumbles

* replaced hash.clone() with *hash + fixed comment

* lost files
2019-02-18 13:38:19 +01:00
Hernando Castano af7dc3676b
Add fields to `memzero`'s Cargo.toml (#10362)
* Add fields to Cargo.toml before publishing to crates.io

* Change license from MIT to GPL-3.0

* Add docs page
2019-02-15 12:32:33 +01:00
Afri Schoedon fa570f297e snap: release untagged versions from branches to the candidate snap channel (#10357) 2019-02-14 17:24:52 +01:00
Niklas Adolfsson 9cce6a47d4 fix(compilation warns): `no-default-features` (#10346) 2019-02-14 17:54:44 +03:00
TriplEight bff0bedfa9 no volumes are needed, just run -v volume:/path/in/the/container (#10345) 2019-02-14 12:45:56 +01:00
Dan Acristinii d6c80c1672 Fixed misstype (#10351)
* Fixed misstype

BadTransactonType => BadTransactionType

* fixed other insances of transacton
2019-02-14 12:25:44 +01:00
Afri Schoedon 512343003d
snap: prefix version and populate candidate channel (#10343)
* snap: populate candidate releases with beta snaps to avoid stale channel

* snap: prefix version with v*
2019-02-13 15:50:02 +01:00
elferdo 3adb640d2b
Bundle protocol and packet_id together in chain sync (#10315)
Define a new `enum` where devp2p subprotocol packet ids (currently eth and par) are defined. Additionally provide functionality to query id value and protocol of a given id object.
2019-02-13 09:20:33 +01:00
gabriel klawitter ea589a17a4
role back docker build image and docker deploy image to ubuntu:xenial based (#10338) 2019-02-12 20:52:30 +01:00
gabriel klawitter a3883ca5d9
change docker image based on debian instead of ubuntu due to the chan… (#10336)
* change docker image based on debian instead of ubuntu due to the changes of the build container
2019-02-12 19:00:52 +01:00
Kirill Pimenov 5be0163cde Don't add discovery initiators to the node table (#10305)
* Don't add discovery initiators to the node table

* Use enums for tracking state of the nodes in discovery

* Dont try to ping ourselves

* Fix minor nits

* Update timeouts when observing an outdated node

* Extracted update_bucket_record from update_node

* Fixed typo

* Fix two final nits from @todr
2019-02-12 16:57:53 +01:00
Shude Li 55454b2f2d fix(docker): fix not receives SIGINT (#10059)
* fix(docker): fix not receives SIGINT

* fix: update with reviews

* update with review

* update

* update
2019-02-12 16:57:07 +01:00
TriplEight a4dc85543b
snap: official image / test (#10168)
* official image / test

* fix / test

* bit more necromancy

* fix paths

* add source bin/df /test

* add source bin/df /test2

* something w paths /test

* something w paths /test

* add source-type /test

* show paths /test

* copy plugin /test

* plugin -> nil

* install rhash

* no questions while installing rhash

* publish snap only for release
2019-02-12 15:37:54 +01:00
Niklas Adolfsson d8394bded7 fix(add helper for timestamp overflows) (#10330)
* fix(add helper timestamp overflows)

* fix(simplify code)

* fix(make helper private)
2019-02-12 14:16:23 +00:00
cheme d89b8d904f Additional error for invalid gas (#10327)
* Tag sensible place (ECHECH)

* Additional overflows checks.
2019-02-11 22:20:51 +00:00
Hernando Castano 8e866ee551
Revive parity_setMinGasPrice RPC call (#10294)
* Add function to update minimum gas price

* Update TestMinerService to handle min_gas_price changes

* Place minimum gas price test behind feature flag

* Update check for fixed gas pricer to be more explicit

* Use errors::unsupported instead of errors::request_rejected

* Add test that fails to set minimum gas price

* Fix test that should fail when setting new gas price

* Put dev dependencies behind feature flag

* Fix deadlock in set_minimal_gas_price()

* Update RPC tests with mocked error response

* Remove unnecessary cfg flag

* Remove duplicate crate imports
2019-02-11 18:08:12 +01:00
Hernando Castano 6dfc1bd474 Add Statetest support for Constantinople Fix (#10323)
* Update Ethereum tests repo to v6.0.0-beta.3 tag

* Add spec for St.Peter's / ConstantinopleFix statetests
2019-02-11 17:13:36 +01:00
Niklas Adolfsson c84e5745fa fix(parity-clib): grumbles that were not addressed in #9920 (#10154)
* fix(remove needless unsafe blocks)

* style(nits)

* fix(parity-clib): eliminate repetitive event loops

* revert(java bindings): safe rust -> unsafe rust

These functions can still end up with `UB` thus should be unsafe

* fix(grumbles): make Callback trait `pub (crate)`
2019-02-11 15:27:46 +01:00
Niklas Adolfsson 751d15e4be fix(light-rpc): Make `light_sync` generic (#10238)
* fix(light-rpc): Make `light_sync` generic

The motivation behind this change is to easily mock `light-sync` to make it possible to enable `rpc-integration` tests
for the light-client.

Currently the `rpc's` requires the concrete type `sync::LightSync` which makes it very hard to do so

* fix(bad merge)
2019-02-11 10:33:16 +00:00
TriplEight 8b6c5be6a9
fix publish job (#10317)
* fix publish job

* dashes and colonels
2019-02-08 18:22:08 +01:00
Axel Chalon 3502b36232 Secure WS-RPC: grant access to all apis (#10246) 2019-02-08 14:11:55 +01:00
elferdo 046b8bbc8a
Make specification of protocol in SyncRequester::send_request explicit (#10295)
* Make the specification of the protocol to which a packet_id belongs to
  explicit when calling "SyncRequester::send_packet".

* Remove "SyncIO::send" and leave only "SyncIO::send_protocol"

* Adapt tests to new code.

* Strengthen tests to check if packet_id and protocol match when sending
a devp2p packet.
2019-02-08 13:01:29 +01:00
Alexander Arlt 6fa4b2dec5 fix: parity-clib/examples/cpp/CMakeLists.txt (#10313)
* use of ${CMAKE_SHARED_LIBRARY_PREFIX} &
${CMAKE_SHARED_LIBRARY_SUFFIX} to support other operating systems.
2019-02-08 12:01:29 +03:00
TriplEight 83bcb819da
CI optimizations (#10297)
* CI optimizations

* fix stripping

* new dockerfile

* no need n submodule upd

* review

* moved dockerfile

* it becomes large

* onchain update depends on s3

* fix dependency

* fix cache status

* fix cache status

* new cache status
2019-02-07 18:49:50 +01:00
elferdo b7e8621846 Increase number of requested block bodies in chain sync (#10247)
* Increase the number of block bodies requested during Sync.

* Increase the number of block bodies requested during Sync.

* Check if our peer is an older parity client with the bug
  of not handling large requests properly

* Add a ClientVersion struct and a ClientCapabilites trait

* Make ClientVersion its own module

* Refactor and extend use of ClientVersion

* Replace strings with ClientVersion in PeerInfo

* Group further functionality in ClientCapabilities

* Move parity client version data from tuple to its own struct.

* Implement accessor methods for ParityClientData and remove them
from ClientVersion.

* Minor fixes

* Make functions specific to parity return types specific to parity.

* Test for shorter ID strings

* Fix formatting and remove unneeded dependencies.

* Roll back Cargo.lock

* Commit last Cargo.lock

* Convert from string to ClientVersion

* * When checking if peer accepts service transactions just check
  if it's parity, remove version check.

* Remove dependency on semver in ethcore-sync

* Remove unnecessary String instantiation

* Rename peer_info to peer_version

* Update RPC test helpers

* Simplify From<String>

* Parse static version string only once

* Update RPC tests to new ClientVersion struct

* Document public members

* More robust parsing of ID string

* Minor changes.

* Update version in which large block bodies requests appear.

* Update ethcore/sync/src/block_sync.rs

Co-Authored-By: elferdo <elferdo@gmail.com>

* Update util/network/src/client_version.rs

Co-Authored-By: elferdo <elferdo@gmail.com>

* Update util/network/src/client_version.rs

Co-Authored-By: elferdo <elferdo@gmail.com>

* Update tests.

* Minor fixes.
2019-02-07 15:27:09 +01:00
Tomasz Drwięga d5c19f8719 Deprecate account management (#10213)
* Extract accounts from ethcore.

* Fix ethcore.

* Get rid of AccountProvider in test_helpers

* Fix rest of the code.

* Re-use EngineSigner, fix tests.

* Simplify EngineSigner to always have an Address.

* Fix RPC tests.

* Add deprecation notice to RPCs.

* Feature to disable accounts.

* extract accounts in RPC

* Run with accounts in tests.

* Fix RPC compilation and tests.

* Fix compilation of the binary.

* Fix compilation of the binary.

* Fix compilation with accounts enabled.

* Fix tests.

* Update submodule.

* Remove android.

* Use derive for Default

* Don't build secretstore by default.

* Add link to issue.

* Refresh Cargo.lock.

* Fix miner tests.

* Update rpc/Cargo.toml

Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com>

* Fix private tests.
2019-02-07 14:34:24 +01:00
Wei Tang 8fa56add47 Properly handle check_epoch_end_signal errors (#10015)
* Make check_epoch_end_signal to only use immutable data

* Move check_epoch_end_signals out of commit_block

* Make check_epoch_end_signals possible to fail

* Actually return the error from check_epoch_end_signals

* Remove a clone

* Fix import error
2019-02-07 14:34:07 +01:00
Niklas Adolfsson e45ee6cd72 fix(osx and windows builds): bump parity-daemonize (#10291) 2019-02-07 12:53:12 +01:00
Julien Bouteloup e344286c32 Add missing step for Using `systemd` service file (#10175)
* Add missing step for  Using `systemd` service file

Copy Parity release from target folder to bin, write `cp -R ./target/release/parity /usr/bin/` to match `ExecStart=/usr/bin/parity --config /etc/parity/config.toml` from `https://github.com/paritytech/parity-ethereum/blob/master/scripts/parity.service`

* Copy release to bin folder using sudo install

`sudo install ./target/release/parity /usr/bin/parity`
2019-02-07 12:50:15 +01:00
Anton Gavrilov 45d7c60608 Call private contract methods from another private contract (read-only) (#10086)
* Patch available private contracts during private transaction

* Key acl ABI added

* Work with secret store keys moved to the separate struct

* Private tx test refactored

* Revert "Private tx test refactored"

This reverts commit 476c132d692c7a886bc7b7cd7fe47b3d7692bd63.

* Test for calling private contract from another one added

* Test fixed

* Redundant tab removed

* ACL contract processing fixed, test added

* Merge with head

* Expect replaced with closure
2019-02-07 12:39:04 +01:00
Andronik Ordian a3e39c9858 update ring to 0.14 (#10262)
* cargo upgrade hyper-rustls --all

* cargo upgrade parity-crypto --all

* update Cargo.lock

* propagate NonZeroU32

* use NonZeroU32::new_unchecked for crypto::KEY_ITERATIONS

* update Cargo.lock

* replace unsafe code with lazy_static
2019-02-06 17:53:34 +01:00
Niklas Adolfsson 8ab6d89810 fix(secret-store): deprecation warning (#10301)
use of deprecated item 'core::str::<impl str>::trim_left_matches': superseded by `trim_start_matches`
2019-02-06 16:54:35 +03:00
Andrew Jones 1b3b9b2887
Update to jsonrpc-derive 10.0.2, fixes aliases bug (#10300) 2019-02-05 14:47:25 +00:00
Andrew Jones 89ae0f0ea0 Convert to jsonrpc-derive, use jsonrpc-* from crates.io (#10298)
* Use jsonrpc crates on local path

* Convert all RPC traits to use jsonrpc-derive

* Use local jsonrpc at top level

* Upgrade remaining jsonrpc dependencies

* Checkout Cargo.lock to master HEAD

* Use jsonrpc-* 10.0.1 from crates.io

* Attribute after docs
2019-02-05 14:31:19 +01:00
Pierre Krieger 06cae8a535 Fix Windows build (#10284) 2019-02-03 13:32:06 +01:00
Pierre Krieger 12ac992ffb Don't run the CPP example on CI (#10285)
* Don't run the CPP example on CI

* Add comment
2019-02-03 13:23:07 +01:00