Commit Graph

3804 Commits

Author SHA1 Message Date
Wei Tang a00a4ca551 Correct BABE randomness by calculating InOut bytes directly in pallet (#5876)
* vrf: remove Raw* types

* babe: remove Raw* types

* pallet-babe: switch representation of RawVRFOutput to Randomness

* pallet-babe: calculate inout within the pallet

* Remove make_transcript duplication

* Bump spec version

* Fix frame tests

* and_then -> map

* Always enable u64_backend

* Fix nostd compile

* fix import: should not use std

* Remove unused definition of RawVRFOutput

* Remove unused import of RuntimeDebug

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-05-04 19:51:47 +02:00
Bastian Köcher 9c5536e01a Expose that BasicQueue expects blocking spawn (#5860)
* Expose that `BasicQueue` expects blocking spawn

Up to now `BasicQueue` expected a closure that to spawn a `Future`.
This was expected to be a closure that spawns a blocking future.
However, this wasn't documented anywhere. This pr introduces a new trait
`SpawnBlocking` that exposes this requirement to the outside.

* Feedback
2020-05-04 19:40:29 +02:00
ddorgan 8549cf5899 Update chain spec for flaming fir 7 (#5882)
* Update chain spec for flaming fir 7

* Update sudo key

* Use fir7 for protocol

* Bump spec version

* Revert sudo change

* Rebuilt spec after all the changes. Flaming fir has been reset with this.
2020-05-04 16:03:11 +01:00
Arkadiy Paronyan 4151dc6bfe Use header cache when creating state. (#5868)
* Use header cache for state_at

* Fixed warnings

* Update client/db/src/lib.rs

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-05-04 13:47:23 +00:00
Nikolay Volf e5163380e7 Update wasmtime (#5822)
* update wasmtime

* update tests

* Update client/executor/wasmtime/src/host.rs

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

* wip

* use master-candidate

* update with patches

* update versions

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-05-04 15:24:05 +02:00
Pierre Krieger ccc3f9767c Report tasks panics in metrics (#5878)
* Report tasks panics in metrics

* Renames

* Renames
2020-05-04 13:43:54 +02:00
Bastian Köcher 3d188ef17d Fix sync logging (#5879) 2020-05-04 13:43:08 +02:00
Shawn Tabrizi f37927d37d node-bench no-op block import (#5869)
* start to try and implement noop

* txs as input

* better comment

* Add transfer reaping

* rename to avoid filter matching

* Update base weights based on results

* fix priority

* fix logic on reaping transfer

* Update bin/node/bench/src/import.rs

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

* Update bin/node/bench/src/main.rs

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

* add back size type (in-progress)

* bring back size type with custom

* update comment

* nit

* block type then size

* Use `transfer_keep_alive`

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
2020-05-03 15:33:11 +02:00
Bastian Köcher 51db82bdb9 Fix clippy warnings in generated runtime api code (#5874) 2020-05-03 15:31:31 +02:00
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