Commit Graph

2072 Commits

Author SHA1 Message Date
Andronik Ordian 93e42fb213 approval votes checking logs (#3233)
* approval-voting: logs for invalid votes

* proper errors for assignment checks

* proper errors for approval checks
2021-06-13 15:34:05 +00:00
Robert Habermeier 4797fb7dfb use fresh_start in rolling window error (#3229) 2021-06-13 14:26:36 +00:00
Robert Habermeier 428a4178ff add metric for timing recovery and approval (#3228) 2021-06-13 11:55:21 +00:00
Robert Habermeier 5bc2b2779d Dispute Coordinator Subsystem (#3150)
* skeleton for dispute-coordinator

* add coordinator and participation message types

* begin dispute-coordinator DB

* functions for loading

* implement strongly-typed DB transaction

* add some tests for DB transaction

* core logic for pruning

* guide: update candidate-votes key for coordinator

* update candidate-votes key

* use big-endian encoding for session, and implement upper bound generator

* finish implementing pruning

* add a test for note_current_session

* define state of the subsystem itself

* barebones subsystem definition

* control flow

* more control flow

* implement session-updating logic

* trace

* control flow for message handling

* Update node/core/dispute-coordinator/src/lib.rs

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

* Update node/subsystem/src/messages.rs

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

* some more control flow

* guide: remove overlay

* more control flow

* implement some DB getters

* make progress on importing statements

* add SignedDisputeStatement struct

* move ApprovalVote to shared primitives

* add a signing-payload API to explicit dispute statements

* add signing-payload to CompactStatement

* add relay-parent hash to seconded/valid dispute variatns

* correct import

* type-safe wrapper around dispute statements

* use checked dispute statement in message type

* extract rolling session window cache to subsystem-util

* extract session window tests

* approval-voting: use rolling session info cache

* reduce dispute window to match runtime in practice

* add byzantine_threshold and supermajority_threshold utilities to primitives

* integrate rolling session window

* Add PartialOrd to CandidateHash

* add Ord to CandidateHash

* implement active dispute update

* add dispute messages to AllMessages

* add dispute stubs to overseer

* inform dispute participation to participate

* implement issue_local_statement

* implement `determine_undisputed_chain`

* fix warnings

* test harness for dispute coordinator tests

* add more helpers to test harness

* add some more helpers

* some tests for dispute coordinator

* ignore wrong validator indices

* test finality voting rule constraint

* add more tests

* add variants to network bridge

* fix test compilation

* remove most dispute coordinator functionality

as of #3222 we can do most of the work within the approval voting subsystem

* Revert "remove most dispute coordinator functionality"

This reverts commit 9cd615e8eb6ca0b382cbaff525d813e753d6004e.

* Use thiserror

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>

* Update node/core/dispute-coordinator/src/lib.rs

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>

* extract tests to separate module

* address nit

* adjust run_iteration API

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2021-06-13 06:35:18 -05:00
Shawn Tabrizi 7f344df160 Companion for #9085 (pub calls) (#3214)
* update to use pub dispatchables

* update Substrate

* Update claims.rs

* remove warning

Co-authored-by: parity-processbot <>
2021-06-12 19:13:16 +01:00
André Silva 097cadca19 create newtype for ValidationCodeHash (#3212)
* create newtype for ValidationCodeHash

* pvf: fix tests compilation

* primitives: fix test compilation
2021-06-12 16:44:07 +00:00
Shaun Wang 693302bee0 Update claims pallet to FRAME v2 (#3032)
* Migrate claims pallet to pallet attribute macro.

* Trigger CI.

* Update runtime/common/src/claims.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2021-06-12 16:26:52 +00:00
Andronik Ordian b79f0ae6af fix connections leak (#3219)
* fix connections leak

* fix compilation
2021-06-12 17:35:14 +02:00
Andronik Ordian c864f2165d small refactoring (#3221) 2021-06-12 17:00:31 +02:00
Andronik Ordian cbeb7d0afd tabify tests (#3220)
* tabify tests

* move mod tests; up
2021-06-12 15:39:18 +02:00
Shawn Tabrizi 7e7b40d11c Bump Substrate (#3215)
* fix warning

* Update lib.rs
2021-06-12 12:41:38 +02:00
André Silva 8c3bc2b2bb replace HistoricalValidationCode usages with ValidationCodeByHash (#3210)
* replace HistoricalValidationCode usages with ValidationCodeByHash

* runtime-api: tabify tests file

* update implementers guide
2021-06-11 18:00:57 +00:00
Bastian Köcher c8cf749aab Substrate companion #9074 (#3204)
* Substrate companion #9074

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-11 17:52:31 +00:00
Shawn Tabrizi d7213d33ba Companion for #9018 (transfer_all) (#3184)
* update weights

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-11 16:32:41 +00:00
Bastian Köcher 9a66a597af Companion for Substrate#9082 (#3208)
* Companion for Substrate#9082

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-11 15:39:02 +00:00
dependabot[bot] 73f368904b Bump pin-project from 1.0.4 to 1.0.7 (#3199)
Bumps [pin-project](https://github.com/taiki-e/pin-project) from 1.0.4 to 1.0.7.
- [Release notes](https://github.com/taiki-e/pin-project/releases)
- [Changelog](https://github.com/taiki-e/pin-project/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/pin-project/compare/v1.0.4...v1.0.7)

---
updated-dependencies:
- dependency-name: pin-project
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-11 16:55:44 +02:00
Bernhard Schuster be32325af7 chore: spellcheck config update (#3207) 2021-06-11 13:05:12 +00:00
Bernhard Schuster f698bf8548 chore: move tests into separate files (#3206)
Moves tests into separate files
in order to limit the loc per file.
2021-06-11 12:50:19 +00:00
Folyd 1d3a9d81d6 Companion to substrate#8943: Disable color-eyre default features (#3203)
* Disable color-eyre default features

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-10 18:03:30 +00:00
Shaun Wang 1a9dc0d8e9 Migrate mmr pallet to pallet attribute macro. (#3061) 2021-06-09 23:27:53 +00:00
Zeke Mostov b2c9305d77 Companion to #8966 (#3186)
* update rustls to be compat with jsronrpsee 0.2.0

* Stub try-cli when feat not enabled

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-09 22:40:04 +00:00
dependabot[bot] 4de30aa5d9 Bump futures from 0.3.14 to 0.3.15 (#3178)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.14...0.3.15)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 16:37:25 +02:00
Xiliang Chen 8f4b5c3f18 update pvf heap page limit (#3198) 2021-06-09 16:35:23 +02:00
Andronik Ordian 29b531f4ec remove tracing::intrument annotations (#3197)
* remove tracing::intrument annotations

* remove unused param and leftover

* more leftovers
2021-06-09 10:35:18 +00:00
Keith Yeung 99d49ad7c9 Companion for #8990 (#3194)
* Use new naming scheme for all Event enums generated by construct_runtime

* Use new naming scheme for all GenesisConfig fields generated by construct_runtime

* Fix overlooked GenesisConfig field renaming

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-09 10:07:04 +00:00
Bastian Köcher f6cbe8e8d8 polkadot-service: Make native runtime configurable (#3189)
* polkadot-service: Make native runtime configurable

This pull requests adds support for configuring the native runtimes used
by polkadot-service. While this whole pr doesn't change that much for
polkadot, besides not having the light-node enabled for the default
polkadot binary. However, downstream projects (parachains) will have a
much better compile time. In cumulus for example the `cargo test --all
--release` is about 4m faster to compile.

* Fixes

* Fix

* Enable rococo-native

* Fix light client

* 🤦

* Fixes
2021-06-08 22:05:20 +02:00
Lldenaurois 2abaca3a8c Remove candidate selection (#3148)
* Create validator_side module

* Subsume Candidate Selection

* Add test to ensure candidate backing logic is correct

* Ensure secondings are adequately cleaned up and address test flakyness

* Address Feedback
2021-06-08 14:07:19 -04:00
Niklas Adolfsson 6b1f457078 Companion for #9036 (#3191)
* deps: cargo update -p rustls

* fix build

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-08 16:47:06 +00:00
Martin Pugh 6087e0e47f bump spec_version (#3195) 2021-06-08 12:20:08 +00:00
André Silva 6f29754cce node: fix grandpa voting rule (#3190)
* node: fix grandpa voting rule

* node: cleanup find_target
2021-06-07 14:45:27 -05:00
Robert Habermeier a87df9d854 Fix historical validation code runtime API (#3187)
* remove some 'allow(unused)'

* fix historical validation code runtime API
2021-06-05 11:47:37 -05:00
André Silva 9c014f7c8b node: fix babe worker params (#2956)
* node: fix babe worker params

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-04 22:01:09 +00:00
Robert Habermeier 3bc3856544 impose minimum limitation on explicit votes too (#3181) 2021-06-04 18:05:23 +00:00
Andronik Ordian ab018944a9 approval-distribution: send all messages on unify (#3179)
* approval-distribution: send all messages on unify

* update the guide
2021-06-04 12:20:53 -05:00
Robert Habermeier 736d0a48fe better logging for approval voting failures (#3180) 2021-06-04 11:50:38 -05:00
Robert Habermeier b5e49c03ec put a cap on finality lag (#3175)
* put a cap on finality lag

* Update node/service/src/grandpa_support.rs

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

* apply lag to best, not to current vote

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2021-06-04 15:49:27 +00:00
dependabot[bot] 15d6399a37 Bump wasm-bindgen-futures from 0.4.19 to 0.4.23 (#3177)
Bumps [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen) from 0.4.19 to 0.4.23.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: wasm-bindgen-futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-04 13:31:05 +02:00
Gavin Wood 3d6df31cbe Named reserve companion (#3176)
* fix build

* fix tests

* update

* fix

* update

* Bump

Co-authored-by: Bryan Chen <xlchen1291@gmail.com>
2021-06-04 11:17:59 +02:00
Arkadiy Paronyan 8223d3ae71 Update for the new substrate client API (#2890)
* Update for the new substrate client API

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-04 07:21:46 +00:00
Zeke Mostov 127771ba38 Cleanup unused errors & events in lease coordination pallets (#3174)
* Cleanup unused errors & events in lease cordination modules

* Spelling
2021-06-04 00:01:30 -04:00
Martin Pugh 5fcf3e0cea bump spec version (#3171)
* bump spec version

* bump beefy
2021-06-03 18:30:49 +00:00
Martin Pugh b63184e4ec Bump version, substrate, beefy in prep for v0.9.4 (#3169)
* bump version, substrate, beefy

* bump substrate
2021-06-03 17:05:31 +02:00
Andronik Ordian bd66121324 validator-discovery: some extra logs (#3157)
* remove duplicate logging

* validator-discovery: add extra logging
2021-06-03 14:17:24 +00:00
Gavin Wood 53de6871e0 Fix teleport accounting and add some events (#3167)
* Stuff to help inspect the DMP activity

* Fix teleport accounting

* Fixes

* Fixes

* Fixes

* Fixes
2021-06-03 15:39:08 +02:00
Shaun Wang 88e25f1669 Companion PR for Substrate #8824 (Migrate pallet-democracy to pallet attribute macro) (#3030)
* Add type parameter for democracy genesis config.

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-03 06:28:00 -04:00
Alexander Popiak a28d4a5c5d XCM docs and tests (#2948)
* WIP

* add tests and docs for DoubleEncoded

* reformat parent_count

* add test for match_and_split

* fix append_with docs and add tests

* move Parachain enum variant to tuple

* Fix stuff

* add to append test

* simplify match

* formatting

* format and extend doc comments (including examples)

* fix typo

* add some doc comments

* add test for location inverter

* Add more tests/docs

* Fix build

* matches fungibles

* currency adapter.

* add more tests for location inverter

* extract max length magic number into constant

* adapters.

* Apply suggestions from code review

* Final touches.

* Repot and fixes

* Remove last todo

* Apply suggestions from code review

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-builder/src/barriers.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-builder/src/barriers.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-builder/src/currency_adapter.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-builder/src/filter_asset_location.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-builder/src/matches_fungible.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-executor/src/traits/conversion.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-executor/src/traits/conversion.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-executor/src/traits/transact_asset.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update xcm/xcm-executor/src/traits/should_execute.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-06-03 02:01:25 +00:00
Shaun Wang 512b366280 Update purchase pallet to FRAME v2 (#3075)
* Migrate purchase wrapper pallet to pallet attribute macro.

* Apply review suggestions.

* Update runtime/common/src/purchase.rs

* Update runtime/common/src/purchase.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-06-02 18:30:55 -04:00
Gavin Wood cac84659a2 Bump Substrate (#3153) 2021-06-02 00:17:47 +02:00
Shaun Wang 22f076c6d3 Update para sudo wrapper pallet to FRAME v2 (#3074)
* Migrate para sudo wrapper pallet to pallet attribute macro.

* Apply review suggestions.
2021-06-01 20:34:47 +00:00
Shaun Wang ca10e33788 Migrate registrar pallet to pallet attribute macro. (#3063) 2021-06-01 20:32:31 +00:00