Commit Graph

3795 Commits

Author SHA1 Message Date
Nikolay Volf 34d5db0de6 Another state machine test (#5875)
* another state machine test

* add more asserts and remove 'remov_then_append'
2020-05-03 15:30:42 +02:00
Shawn Tabrizi 92d0c0b769 Remove Old Migration Code (#5870)
* remove old migration code

* Remove old staking

* Remove indices migration

* Remove upgrade test in transaction-payment

* oops

* Revert "Remove old staking"

This reverts commit 95262b1ac43c9b5bcf49d2ae80800feabcbbbaa0.

* remove migration test in staking

* fix warnings
2020-05-03 10:54:21 +02:00
Shawn Tabrizi b913dfebb7 New weights using i7 machine (#5848)
* i7 weights

* fix full block test

* fix merge

* fix priority
2020-05-01 14:14:43 +02:00
Bastian Köcher 5b4497efcd Don't disable default-features of sc-service in node-template (#5859)
We need to keep the features enabled to have rocksdb enabled as db
backend.
2020-04-30 22:15:48 +02:00
André Silva d2967ba4b6 grandpa: update to finality-grandpa v0.12.0 (#5853)
* grandpa: update to v0.12.0

* grandpa: fix tests

* grandpa: better validation of authority set invariants

* grandpa: avoid duplicating invalid authority list check

* grandpa: add missing doc

* grandpa: better validation of expect proofs

* grandpa: fix test compilation

* grandpa: fix tests

* grandpa: add test for AuthoritySet invariants

* grandpa: bump finality-grandpa to v0.12.0
2020-04-30 20:03:30 +00:00
André Silva 43e8268ae1 docs: update codeowners (#5856) 2020-04-30 20:33:52 +02:00
Pierre Krieger 2d9e6dc18e Include the network overhead in the request-in-time metric (#5854) 2020-04-30 17:38:28 +00:00
Nikolay Volf 5bd448f812 empty block benchmark (#5852) 2020-04-30 18:18:46 +02:00
Kian Paimani d88720d916 minor fixes for elections-phragmen (#5850)
* minor fixes for elections-phragmen

* Update frame/elections-phragmen/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update frame/elections-phragmen/src/lib.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
2020-04-30 18:14:21 +02:00
Joshy Orndorff 313288208d Update docs for BeforeBestBlockBy (#5849) 2020-04-30 16:07:25 +01:00
Shawn Tabrizi b301451c85 Frame System Benchmarking (#5834)
* Frame System Benchmarking

* Add to substrate node, avoid divide by zero errors in analysis

* reduce features

* some fixes

* copy pasta
2020-04-30 15:46:44 +02:00
Bastian Köcher 5b8d3607e9 Adds export-state subcommand (#5842)
* Export state cli

* More work

* Fix tests

* Make it work

* Fix compilation

* Apply suggestions from code review
2020-04-30 15:44:40 +02:00
Pierre Krieger 929bd07bef Move around stuff in sc_network (#5847) 2020-04-30 13:08:38 +00:00
Nikolay Volf c09bb1f350 Use mem::take instead of mem::replace where appropriate (#5846)
* replace replace with take

* Update client/api/src/cht.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update client/api/src/cht.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-04-30 12:53:36 +00:00
Arkadiy Paronyan c3a6d8a881 Fix purge-chain and print DB info on startup (#5840)
* purge-chain accepts --db option

* print DB info on startup

* Small refactoring

* Added back &self

* Add DatabaseParams for PurgeChain, ImportParams and ExportBlocks

* Don't force default value

* Remove unused fields

* Update client/cli/src/commands/export_blocks_cmd.rs

* Fix stuff

Co-authored-by: Cecile Tonglet <cecile@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-04-30 14:53:04 +02:00
Bastian Köcher db2e916904 We should panic on division by zero (#5844) 2020-04-30 14:01:48 +02:00
cheme c05ec630ff Avoid changing overlay committed layer. (#5839)
* Avoid changing overlay committed layer.

* basic test

* Add some tx in the test.

* only update from backend value on missing entry in both layer.
deleted entry is replace by empty vec.

* test and review changes

* additional test and review change

* remove test on changing existing value, it does not always panic
depending on existing content

* Update primitives/state-machine/src/overlayed_changes.rs

* Update primitives/state-machine/src/overlayed_changes.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-04-30 13:59:21 +02:00
Alexander Popiak 71d7dc1dfc Timestamp weights (#5775)
* calculate weight for timestamp::set

* reduce db count in kill_identity weight calculation

* return weight of on_finalize in on_initialize

* add comment

* import Weight

* address review comments to update db weight count

* fix full block import test

* update weights and benchmark info to latest benchmark data

* update identity pallet weights and benchmark info

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-04-30 11:43:58 +00:00
Nikolay Volf a9261cf0ef use background task to batch for optimum size (#5832) 2020-04-30 12:22:52 +02:00
Xiliang Chen 339b09002b add missing features for runtime-benchmarks (#5833) 2020-04-30 11:55:18 +02:00
Arkadiy Paronyan fdde90077b Optimize collecting pending block requests (#5829)
* Optimized collecting pending block requests

* Make sure request iterator is consumed
2020-04-30 09:50:08 +02:00
Nikolay Volf 48832fedc3 Add parity-db variant for trie benchmarks (#5827)
* parity-db bench

* use arkady suggestion
2020-04-30 07:33:31 +00:00
pscott 71d3863a78 Remove background_tasks field in ServiceBuilder (#5830)
* Spawn tasks instead of pushing them to background_tasks

* Remove unnecessary mut keyword for self

* Remove background_tasks field in ServiceBuilder
2020-04-29 20:47:42 +02:00
Saqib Rokadia aff24d6fbb Adding optional public addresses for proxying (#5807)
* Adding optional public addresses for use in network configurations to allow for proxies in front of a node.

* Apply suggestions from code review

Co-Authored-By: Cecile Tonglet <cecile.tonglet@cecton.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-04-29 19:08:30 +02:00
Seun Lanlege 1fd18dd260 Drop ClientProvider (#5823) 2020-04-29 18:48:24 +02:00
pscott 0f401e4699 Move spawning tasks from thread pools to Service's TaskManager for block importing (#5647)
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-04-29 18:46:39 +02:00
Benjamin Kampmann bb94695a4e Fixup package releasing (#5821)
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
2020-04-29 18:44:12 +02:00
Denis S. Soldatov aka General-Beck c0daa9a47c Add build substrate and subkey binaries for MacOS (#5538) 2020-04-29 14:45:02 +02:00
Benjamin Kampmann 0ca88bbb18 activate compat feature on futures 2020-04-29 14:23:38 +02:00
Wei Tang 521f8ff427 Add support for modules to require inherent to be present (#5792)
* Add support for modules to require inherent to be present

* Bump node impl version

* Allow is_inherent_required itself to return error

This handles the case if runtime fails to check the inherent data (if the
inherent data is invalid, etc).

* typo: &module -> $module

* fix: iter
2020-04-29 12:05:35 +02:00
Arkadiy Paronyan ba50664fea Reputation penalty for sending empty block response (#5814) 2020-04-29 10:12:23 +02:00
Shawn Tabrizi 6b35ac6fe6 Update Weights for Vesting Pallet (#5708)
* Update vesting weights

* Update weight numbers
2020-04-29 07:53:54 +00:00
Shawn Tabrizi d9d80dffe8 Update Weights for Utility Pallet (#5787) 2020-04-29 09:35:41 +02:00
André Silva 29c127a082 babe: fix overflow in check_equivocation (#5818) 2020-04-29 00:17:16 +02:00
thiolliere 8b69609397 Update treasury weights. (#5723)
* treasury weight formula

* use max tippers count

* doc

* Fix upper bound

* rounding a bit

* remove unused + doc

* as u64 -> as Weight

* 2 significative digits rounded up

* rename ContainsCountUpperBound -> ContainsLengthBound

* add doc

* sender account -> origin account

* fix
2020-04-28 17:55:56 +02:00
s3krit 2d73ccd65b [CI] Add check for draft PRs (#5800)
* Add check for draft PRs

* Add necessary gitlab-ci boilerplate

* fix github API url (oops!)

* Add github action to retrigger pipeline

* fix workflow trigger

* rename trigger job

Co-authored-by: Benjamin Kampmann <ben@parity.io>
2020-04-28 17:55:09 +02:00
Nikolay Volf 986246a102 Replace Condvars with blocking channel (#5815)
* remove condvars

* return false on lost sender

* fix

* Update primitives/io/src/batch_verifier.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-04-28 17:54:52 +02:00
Pierre Krieger 1be634da85 Add metrics about block requests (#5811)
* Add metrics about block requests

* Apply suggestions from code review

Co-Authored-By: Max Inden <mail@max-inden.de>

Co-authored-by: Gavin Wood <i@gavwood.com>
Co-authored-by: Max Inden <mail@max-inden.de>
2020-04-28 17:47:40 +02:00
Stanislav Tkach d870eb23e1 Remove sp-runtime dependency from sp-phragmen (#5786)
* Remove sp-runtime dependency from sp-phragmen

* Use regular derive(Debug) instead of RuntimeDebug
2020-04-28 17:21:10 +02:00
Seun Lanlege 4fa5941f44 Move sc-client into sc-service (#5502)
* Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api

* move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa

* drop sc-service from sc-rpc

* drop sc-service from sc-consensus-aura

* drop sc-client from manual-seal and babe

* drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli

* drop sc-client from bin/node and bin/node-template

* drop sc-client

* fix tests

* remove check -p sc-client from gitlab.yml

* fix warnings

* fixes ui test

* fix light client tests

* adds associated Client type to AbstractService

* adds UsageProvider to Client

* fixed ui test, again

* tried and failed to get node-cli to compile for wasm

* thanks to tomaka for helping me get node-cli to compile for wasmm

* ui test pls pas 🙏🏾

* all tests passing 🪄

* no_run documentation code

* rm -f documentation code

* ClientProvider

* fix mega trait

* move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client

* adds license to sc-consensus

Co-authored-by: Benjamin Kampmann <ben@parity.io>
2020-04-28 11:59:31 +00:00
Wei Tang 7784bdeffe Versioned NextConfigDescriptor for BABE (#5789) 2020-04-28 11:50:40 +01:00
Benjamin Kampmann 99ad328419 add std feature to newly added dependency in contracts pallet (#5801)
* remove unnecessary re-export

* enable unleash

* Revert "enable unleash"

This reverts commit 30f11d7befea904d5e9c8c117a1b79eb3e184150.

* Revert "remove unnecessary re-export"

This reverts commit 74229f99587d1e17985b5e7f656f70d32b0e9ebe.

* fix missing std def

* Revert "Revert "enable unleash""

This reverts commit 323fb913c38c8f1ac7424dd22e5f918ff6a0b596.

* Revert "Revert "Revert "enable unleash"""

This reverts commit 3f199674ae024edc32a2ab7ce3a15013d2b285a1.
2020-04-28 12:49:09 +02:00
Bastian Köcher 02f1772023 pallet-sudo: Store DispatchResult in Sudid event (#5804) 2020-04-28 12:25:36 +02:00
Kian Paimani 00378d4092 Fix flaky staking test (#5812)
* Fix flaky staking test

* Better doc

* Update frame/staking/src/tests.rs

Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
2020-04-28 12:04:23 +02:00
Cecile Tonglet 8ae3ecf3cd Fix remaining issues with unsafe_pruning (#5810)
* Initial commit

Forked at: bf61cece1c
Parent branch: origin/master

* Fix remaining issues with unsafe_pruning

* Revert "Fix remaining issues with unsafe_pruning"

This reverts commit 9c42c2f9b361b13ee19f39b264e52dfaa46cfcbb.

* Just remove is_dev
2020-04-28 11:44:44 +02:00
zjb0807 eca9ebc8ad delete duplicates runtime-benchmarks (#5806) 2020-04-28 10:55:59 +02:00
Arkadiy Paronyan bf61cece1c Fixed race in batch signature verification (#5805) 2020-04-28 00:10:21 +02:00
André Silva 5662501258 cli: fix unused unsafe-pruning flag (#5803) 2020-04-27 22:01:35 +02:00
thiolliere dc09f76189 Update weight for im-online (#5771)
* implementation using Keys::decode_len

* add heartbeat new param

* address issues

* improve doc

* fix test

* fix overflow
2020-04-27 21:46:37 +02:00
Kian Paimani ee54eff488 Enable Offchain Equalise (#5683)
* Master.into()

* Remove debug stuff

* Better license

* Migrate away from SimpleDispatchInfo

* Fix test

* Revert "Migrate away from SimpleDispatchInfo"

This reverts commit dbdd27fa19948f16bd17defdc01d3dd32986df11.

* Move to offchain randomness

* Fix tests

* Fix tests more
2020-04-27 18:51:46 +02:00