Commit Graph

3778 Commits

Author SHA1 Message Date
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
Nikolay Volf 33d00692d8 Add append api and use it to deposit events (#5795)
* use append api to deposit events

* use optimized append

* one more optimization

* fix bug

* fix issues

* address review
2020-04-27 18:06:59 +02:00
Cecile Tonglet 9e4901f3d5 Add method with_default_block_announcer to ServiceBuilder (#5797)
* Initial commit

Forked at: 64ed36d093
Parent branch: origin/master

* Add method with_default_block_announcer to ServiceBuilder
2020-04-27 15:05:11 +00:00
Arkadiy Paronyan 64ed36d093 Support reference-counting state backend. (#5769)
* Optimize pinning

* Ref counting state backend

* Style

Co-Authored-By: Wei Tang <hi@that.world>

* Update Cargo.lock

* Handle empty node

Co-authored-by: Wei Tang <hi@that.world>
2020-04-27 12:24:50 +02:00
Pierre Krieger 636ddd95d2 Extra timeout handling in block_requests (#5794) 2020-04-27 12:17:26 +02:00
Xiliang Chen fbc4e7f055 fix Fixed64 (#5784)
* fix fixed64

* improve

* bump version
2020-04-26 19:39:16 +02:00
Bastian Köcher 15e33c46f3 Add support for custom runtime upgrade logic (#5782)
This adds support for registering custom runtime upgrade logic that can
be implemented in the runtime directly instead of putting it into a module.
2020-04-25 17:59:58 +02:00
Xiliang Chen 74bc141f4f expose constants for identity pallet (#5783)
* expose constants

* bump version
2020-04-25 15:17:53 +02:00
Tomasz Drwięga ef1c2d0615 Compute weight only once. (#5780) 2020-04-25 12:01:21 +00:00
Joshy Orndorff a08bf89662 Support Justification and FinalityProof import in pow import queue. (#5781) 2020-04-25 10:57:06 +00:00
Shawn Tabrizi 8a33c297b4 Introduce BlockExecutionWeight and ExtrinsicBaseWeight (#5722)
* Introduce `BlockExectionWeight` and `ExtrinsicBaseWeight`

* Add new traits everywhere

* Missed one update

* fix tests

* Update `check_weight` logic

* introduce `max_extrinsic_weight` function

* fix + add tests

* format nits

* remove println

* make test a bit more clear

* Remove minimum weight

* newlines left over from find/replace

* Fix test, improve clarity

* Fix executor tests

* Extrinsic base weight same as old `MINIMUM_WEIGHT`

* fix example test

* Expose constants

* Add test for full block with operational and normal

* Initiate test environment with `BlockExecutionWeight` weight

* format nit

* Update frame/system/src/lib.rs

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

* Replace `TransactionBaseFee` with `ExtrinsicBaseWeight` (#5761)

* Replace `TransactionBaseFee` with `ExtrinsicBaseFee`

* Fix stuff

* Fix and make tests better

* Forgot to update this test

* Fix priority number in test

* Remove minimum weight from merge

* Fix weight in contracts

* remove `TransactionBaseFee` from contract tests

* Let `register_extra_weight_unchecked` go past `MaximumBlockWeight`

* address feedback

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2020-04-25 05:59:54 +00:00
André Silva 3793fbf9cc babe: remove error fallback from threshold calculation (#5764)
* babe: remove error fallbacks from threshold calculation

* babe: fix indent

* babe: fix domain

* babe: fix compilation

* babe: improve expect

* babe: add one more note about p's limit
2020-04-24 17:56:41 -04:00
parity-processbot[bot] 51d68b6d6e Merge 324e51fbbf into master 2020-04-24 18:34:36 +00:00
thiolliere a564cafae3 Update weight formula for session (with new_session taking full block) (#5738)
* weight formula for session except on_initialize

* fix typo and set on_initialize to MaxWeight

* Add note
2020-04-24 18:49:36 +02:00
s3krit d974df243a Increase check-gitlab-pipeline timeout (#5774) 2020-04-24 17:42:49 +02:00
Max Inden 324e51fbbf client/authority-discovery: Reduce log level replaced by metrics
Instead of logging value-found-event-handling failures or value-put
failures on error level, log them on debug level only additionally
recording them via Prometheus.

Motivation is that both events can happen in "normal" operations and
thus clutter the logs.
2020-04-24 17:40:48 +02:00
Wei Tang 969720c2ad babe: secondary blocks with VRF (#5501)
* babe: secondary blocks with VRF

* Fix node runtime compile

* Fix test-utils runtime interface

* Fix babe tests

* typo: v == 2

* babe: support online configuration upgrades

* Fix rpc tests

* Fix runtime version tests

* Switch to use NextConfigDescriptor instead of changing runtime interface

* Fix tests

* epoch-changes: map function that allows converting with different epoch types

* Add migration script for the epoch config change

* Fix docs for PrimaryAndSecondaryVRFSlots

* Add docs of `SecondaryVRF` in babe crate

* babe-primitives: Secondary -> SecondaryPlain

* babe-client: Secondary -> SecondaryPlain

* Fix migration tests

* test-utils-runtime: Secondary -> SecondaryPlain

* Fix missing name change in test-utils-runtime

* Fix migration: Epoch should be EpochV0

* Update client/consensus/babe/src/lib.rs

Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com>

* Fix new epochChanges version

* Fix babe-primitives naming changes

* Fix merge issues in babe-client

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: André Silva <andre.beat@gmail.com>
2020-04-24 16:03:03 +01:00
Alexander Popiak 8a3dcd6862 Calculate and refund weight for identity pallet (#5680)
* add old_registrar_count as param to estimate weight

* cast count to Weight

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* add weight calculation for set_identity

* remove superfluous weight comment

* add detailed weight estimation for set_subs

* adjust benchmarking code to the new API

* add second parameter to set_subs benchmark

* rename o to p

* calculate weight based on benchmarks

* use try_mutate for registrars

* fix weight number typo

* update weights for set_subs + add weights for clear_identity and request_judgement

* improve naming and docs

* add weight calculation for cancel_request

* fix benchmark

* fix tests

* fix arithmetic overflow in balances triggered by tests

* add weight calcluations for more dispatchables

* add weight calculation for provide_judgement

* mark param as unused

* add MaxRegistrars associated type used for weight estimation

* check that MaxRegistrars is not exceeded

* add remaining weight calculations

* use weight refunds to use more constants in weight estimation

* adjust usage of clear_identity

* refund request_judgement weights and remove param

* refund weights for cancel_request and remove param

* add remaining refunds and remove params

* refund weight for set_subs and remove param

* make comment more specific

* add range note to benchmarking docs

* fix inconsistencies before review

* fix actual weight calculation for add_registrar

* remove duplicate balance ops weights + refund on all dispatchables

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-04-24 16:46:58 +02:00