Commit Graph

3443 Commits

Author SHA1 Message Date
Robert Klotzner ca6297c853 Reduce dispute coordinator load (#5785)
* Don't import backing statements directly

into the dispute coordinator. This also gets rid of a redundant
signature check. Both should have some impact on backing performance.
In general this PR should make us scale better in the number of parachains.

Reasoning (aka why this is fine):

For the signature check: As mentioned, it is a redundant check. The
signature has already been checked at this point. This is even made
obvious by the used types. The smart constructor is not perfect as
discussed [here](https://github.com/paritytech/polkadot/issues/3455),
but is still a reasonable security.

For not importing to the dispute-coordinator: This should be good as the
dispute coordinator does scrape backing votes from chain. This suffices
in practice as a super majority of validators must have seen a backing
fork in order for a candidate to get included and only included
candidates pose a threat to our system. The import from chain is
preferable over direct import of backing votes for two reasons:

1. The import is batched, greatly improving import performance. All
   backing votes for a candidate are imported with a single import.
   And indeed we were able to see in metrics that importing votes
   from chain is fast.
2. We do less work in general as not every candidate for which
   statements are gossiped might actually make it on a chain. The
   dispute coordinator as with the current implementation would still
   import and keep those votes around for six sessions.

While redundancy is good for reliability in the event of bugs, this also
comes at a non negligible cost. The dispute-coordinator right now is the
subsystem with the highest load, despite the fact that it should not be
doing much during mormal operation and it is only getting worse
with more parachains as the load is a direct function of the number of statements.

We'll see on Versi how much of a performance improvement this PR

* Get rid of dead code.

* Dont send approval vote

* Make it pass CI

* Bring back tests for fixing them later.

* Explicit signature check.

* Resurrect approval-voting tests (not fixed yet)

* Send out approval votes in dispute-distribution.

Use BTreeMap for ordered dispute votes.

* Bring back an important warning.

* Fix approval voting tests.

* Don't send out dispute message on import + test

+ Some cleanup.

* Guide changes.

Note that the introduced complexity is actually redundant.

* WIP: guide changes.

* Finish guide changes about dispute-coordinator

conceputally. Requires more proof read still.

Also removed obsolete implementation details, where the code is better
suited as the source of truth.

* Finish guide changes for now.

* Remove own approval vote import logic.

* Implement logic for retrieving approval-votes

into approval-voting and approval-distribution subsystems.

* Update roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md

Co-authored-by: asynchronous rob <rphmeier@gmail.com>

* Review feedback.

In particular: Add note about disputes of non included candidates.

* Incorporate Review Remarks

* Get rid of superfluous space.

* Tidy up import logic a bit.

Logical vote import is now separated, making the code more readable and
maintainable.

Also: Accept import if there is at least one invalid signer that has not
exceeded its spam slots, instead of requiring all of them to not exceed
their limits. This is more correct and a preparation for vote batching.

* We don't need/have empty imports.

* Fix tests and bugs.

* Remove error prone redundancy.

* Import approval votes on dispute initiated/concluded.

* Add test for approval vote import.

* Make guide checker happy (hopefully)

* Another sanity check + better logs.

* Reasoning about boundedness.

* Use `CandidateIndex` as opposed to `CoreIndex`.

* Remove redundant import.

* Review remarks.

* Add metric for calls to request signatures

* More review remarks.

* Add metric on imported approval votes.

* Include candidate hash in logs.

* More trace log

* Break cycle.

* Add some tracing.

* Cleanup allowed messages.

* fmt

* Tracing + timeout for get inherent data.

* Better error.

* Break cycle in all places.

* Clarified comment some more.

* Typo.

* Break cycle approval-distribution - approval-voting.

Co-authored-by: asynchronous rob <rphmeier@gmail.com>
2022-08-16 08:16:30 +02:00
Muharem Ismailov 219fd5a3ed Transaction payment runtime apis: query call info and fee details (#5871) 2022-08-15 14:39:01 +02:00
Alexander Samusev fae75b9382 [ci] Improve cancel-pipeline job (#5874)
* [ci] test-linux-stable and cancel-pipelines improvements

* fail check-try-runtime

* import changes from master

* fix needs

* fix check-try-runtime

* remove cancel pipeline from check-try-runtime

* return before_script to check-try-runtime
2022-08-15 13:59:54 +02:00
dependabot[bot] 6f0722169e Bump wasmtime from 0.38.1 to 0.38.3 (#5802)
Bumps [wasmtime](https://github.com/bytecodealliance/wasmtime) from 0.38.1 to 0.38.3.
- [Release notes](https://github.com/bytecodealliance/wasmtime/releases)
- [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-some-possible-changes.md)
- [Commits](https://github.com/bytecodealliance/wasmtime/compare/v0.38.1...v0.38.3)

---
updated-dependencies:
- dependency-name: wasmtime
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-15 07:58:21 +00:00
Sudip Ghimire 6fce9240ac Incorporate changes from substrate PR #11908 (#5815)
* Incorporate changes in kusama runtime

* Incorporate changes in polkdot runtime

* cargo update -p sp-io

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2022-08-14 19:53:31 +01:00
Kian Paimani 47de4b3738 Add nomination pools to Polkadot runtime (#5582)
* Add nomination poools to Polkadot runtime

* fmt + spellcheck

* cargo run --quiet --profile=production --features runtime-benchmarks -- benchmark pallet --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --header=./file_header.txt --output=./runtime/polkadot/src/weights/

* fiux

* ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_nomination_pools

* ".git/.scripts/fmt.sh" 1

* Update runtime/polkadot/src/lib.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fix

* fmt

* Update runtime/polkadot/src/lib.rs

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-08-14 17:00:09 +00:00
Dmitry Markin 4def0da0dc Change request-response protocol names to include genesis hash & fork id (#5870) 2022-08-12 15:07:13 +03:00
Alexander Samusev 596b5df747 [ci] Run check-runtime only for PRs (#5858)
* [ci] Run check-runtime only for PRs

* fix refs

* remove pr ref from check-runtime

* adjust dependent jobs

* fix dependency
2022-08-11 15:23:43 +02:00
dependabot[bot] 6aef4711dc Bump tokio from 1.18.2 to 1.19.2 (#5678)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.18.2 to 1.19.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.18.2...tokio-1.19.2)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-11 13:12:03 +02:00
Andrei Sandu 4db5bbc49a Zombienet: test disputes with malus garbage candidates (#5857)
* 1/3 validators suggest garbage candidates,
but paras should make progress

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* scale down test a bit

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Use docker paths and more paras

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* dispute finality lag < 2

* scale down

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* scale down more

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* attempt fix

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* one malus node

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Update zombienet_tests/functional/0003-parachains-garbage-candidate.toml

Co-authored-by: Andronik <write@reusable.software>

* Update zombienet_tests/functional/0003-parachains-garbage-candidate.toml

Co-authored-by: Andronik <write@reusable.software>

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Andronik <write@reusable.software>
2022-08-11 10:31:01 +00:00
Kian Paimani 1ad7de583f add unit tests to run runtime migrations (#5865)
* add unit tests to run runtime migrations

* Update runtime/westend/src/lib.rs

Co-authored-by: Mara Robin B. <mara@broda.me>

* fix

* fmt

* Update runtime/westend/src/lib.rs

Co-authored-by: Mara Robin B. <mara@broda.me>
2022-08-11 06:24:11 +00:00
Nazar Mokrynskyi f1dce2f548 Trivial networking changes for Substrate PR #11940 (#5841)
* Trivial networking changes for Substrate PR https://github.com/paritytech/substrate/pull/11940

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-08-09 19:37:31 +00:00
Nikos Kontakis 8a947d4c5d Renaming CLI prunning and keep-blocks flags (#5863)
* Renaming CLI prunning and keep-blocks flags

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-08-08 10:15:08 +00:00
Bastian Köcher a196b1618b Update yamux to fix a potential crash (#5861) 2022-08-05 20:05:40 +02:00
Dmitry Markin 43107b5391 Update RequestResponseConfig interface to match substrate (#5849)
* Update RequestResponseConfig interface

* minor: Bump CI

* update lockfile for {"substrate"}

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-08-05 10:37:19 +00:00
Javier Viola 023c70badd [Zombienet] update the image to the version 1.2.51 globally (#5856)
* rollback global version and use new version for beefy test

* move zombienet to v1.2.51

* use global version in all tests

* add image value to tests
2022-08-04 12:42:04 +00:00
ZhiYong 27747b4d1a Companion for substrate#11962 (#5852)
* Companion for substrate#11962

* update lockfile

Co-authored-by: acatangiu <adrian@parity.io>
2022-08-04 13:24:34 +03:00
Adrian Catangiu 8d1bba18af zombienet: BEEFY and MMR test (#5840)
Signed-off-by: acatangiu <adrian@parity.io>
2022-08-04 10:27:17 +03:00
Oliver Tale-Yazdi b065b4364c Run benchmarks with --steps=2 (#5853)
The benchmarks have been run internally with at least two values
even when called with --steps=1. substrate/#11890 changed this
to explicitly require at least --steps=2.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-08-03 21:00:35 +00:00
Alexandru Vasile d84433bd7f Companion for #11939 (#5846)
* Bump jsonrpsee to v0.15.1

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update cargo.lock

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Minimal update to Cargo.lock

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* update substrate

* update lockfile for {"substrate"}

* update substrate master

* Allow benchmark checks to fail

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-08-03 12:23:16 +02:00
dependabot[bot] fcb938873f Bump tracing from 0.1.34 to 0.1.35 (#5737)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.34 to 0.1.35.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.34...tracing-0.1.35)

---
updated-dependencies:
- dependency-name: tracing
  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>
2022-08-01 22:19:33 +00:00
Oliver Tale-Yazdi 5c89040f67 Co #11952: Remove remove_member_wrong_refund from phragmen weights (#5848)
* Remove 'remove_member_wrong_refund' from phragmen weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-08-01 19:52:59 +00:00
Alexander Samusev c65c0d64fc Add release-v* rule to common-refs (#5847) 2022-08-01 15:26:50 +02:00
Mara Robin B cb82d21708 update weights (#5844)
* westend: update weights

* kusama: update weights

* polkadot: update weights

* rococo: update weights

* update BlockExecutionWeight

* kusama: readd phragmen remove_member_wrong_refund weight

* polkadot: readd phragmen remove_member_wrong_refund weight
2022-08-01 13:13:21 +00:00
Shawn Tabrizi 8dbbf5dd5a Use Saturating Math in XCM (#5845)
* saturating xcm

* Even more saturating

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-08-01 10:55:51 +00:00
Mara Robin B 95b2976df1 Remove already executed calls to nompools MigrateToV2 migration (#5836) 2022-08-01 11:45:51 +02:00
Adrian Catangiu 302c337861 companion for #11821: node/service: add BEEFY to block import (#5796)
* node/service: add BEEFY to block import

BEEFY block import implementation is basically noop for runtimes
with dummy `BeefyApi`, therefore we can safely add it to all chains.

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-07-29 16:38:08 +00:00
Xavier Lau 4687a419eb Remove Unused Trait Bound (#5838) 2022-07-29 12:34:12 +00:00
Koute faeb3d944d Companion for substrate#11523 (#5702)
* Bump `parity-scale-codec` to 3.1.5

* Align tests to changes in substrate

* Apply rustfmt

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-07-29 09:07:11 +00:00
Xavier Lau 88cee48d1e Remove Useless Inherent Data Provider (#5750)
* Remove Useless Inherent Data Provider

* Remove Unused Deps
2022-07-29 00:27:26 +02:00
Mara Robin B 1a8b087129 update weights (#5767)
* polkadot: update weights

* kusama: update weights

* westend: update weights

* rococo: update weights

* Reduce testing constants (#5787)

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-07-28 19:35:39 +00:00
Chevdor bfc9efc944 bump transcation_version for rococo (#5760) (#5830)
* bump transcation_version

* revert back transaction version for kusama and plokadot as they were bumped in the previous release

Co-authored-by: Egor_P <egor@parity.io>
2022-07-28 11:57:41 +00:00
Chevdor 85dabbd850 Backport crate version bumps to 0.9.27 (#5826)
* Bump crate versions

* Update cargo.lock
2022-07-28 10:03:27 +00:00
Chevdor f14cda36cc Fix GHA (#5825) 2022-07-28 11:04:20 +02:00
Alexander Samusev 2c5c37e8b2 [ci] Add timeout to benchmark jobs (#5822) 2022-07-27 15:31:25 +02:00
Andrei Sandu 5221fd667e Parachains db column "migration" (#5797)
* Column migration for parityDB

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* fmt

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* fix

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Remove columns

* warn

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* bump paritydb

* use clear_column

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* fix

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* logs

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* paritydb 0.3.16

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Update node/service/Cargo.toml

Co-authored-by: Andronik <write@reusable.software>

* ParityDB versioning

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* cargo lock

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* review + proper version constants

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Add test

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

Co-authored-by: Andronik <write@reusable.software>
2022-07-27 09:34:27 +00:00
Sergej Sakac c2df8308d7 Companion for #11831 (#5784)
* Companion for #11831

* commti

* fix

* fix

* commit

* fix?

* added rpc extension

* fmt

* add dependency

* added NominationPools to runtimes

* implement np

* implement for kusama & westend

* remove np-rpc from rococco

* fmt

* add np-rpc to the client

* fix wrong dependency in client

* remove from client

* remove from rpc

* fix?

* switch back

* fix?

* .

* add rpc extension

* fmt

* fix dependency

* commit

* only implement the api in the runtimes

* update

* update runtimes

* update sp-io

* update

* Update Cargo.toml

* Update Cargo.toml

* Update Cargo.toml

* commit

* Revert "Merge branch 'rpc-pending-rewards' of github.com:Szegoo/polkadot into rpc-pending-rewards"

This reverts commit dd260820641060b6106b238081d674e902267f24, reversing
changes made to 8f3b58dbe28132a95c4d595700214f886da22e5e.

Co-authored-by: kianenigma <kian@parity.io>
2022-07-27 09:32:31 +00:00
Alexander Samusev a9e41ed5b5 [ci] Return production image (#5818) 2022-07-27 10:13:36 +02:00
Kian Paimani 85b909a0b2 add migration for staking v10 (#5817) 2022-07-27 08:02:09 +00:00
Sebastian Kunert 88d9aca202 Prepare for rust 1.62.1 (#5811)
* Update update-rust-stable script

* Update UI tests for rust-1.62.1

* Use staging CI image

* pin ci image

Co-authored-by: alvicsam <alvicsam@gmail.com>
2022-07-26 14:37:02 +02:00
Sebastian Kunert 9afc93cbd1 Bump strum to 0.24.1 (#5816) 2022-07-26 14:02:43 +02:00
Alexander Theißen cf18868afd Bump substrate (#5814)
* Bump substrate

* Bump spec version
2022-07-25 16:59:37 +00:00
Chevdor 7b02a55a11 Add missing trigger wildcards for some CI workflows (#5812) 2022-07-25 16:42:47 +02:00
Andronik b1f8445d62 malus: add finality_delay cli flag (#5770)
* add malus_finality_delay flag

* cargo update -p sp-io

* no warnings when malus is disabled

* subpar workaround for feature unification problem

* remove malus_finality_delay from regular cli

* document finality_delay param, rename cli arg
2022-07-22 23:24:33 +00:00
Alexander Samusev d6334447ae [ci] publish parachain-implementers-guide (#5806)
* [Do not merge] [ci] publish parachain-implementers-guide

* fix .cancel-pipeline

* rename build-implementers-guide

* fix

* debig docs

* fix needs

* debug publish

* change image for impl guide job

* fix mdbook

* add folder

* remove mdbook-graphviz

* fix publish

* fix publish

* debug publish

* remove debug

* fix script order

* return pipeline

* remove test ref from publish
2022-07-22 15:22:15 +02:00
Muharem Ismailov 7ad9cb90aa westend xcm: collectives parachain is trusted teleporter (#5798) 2022-07-21 11:50:00 +00:00
Dmitry Markin b30b7c6022 Cleanup light client leftovers (#5794)
* Cleanup light client leftovers

* Remove light clent leftovers in test-parachains

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-07-21 12:31:12 +03:00
Oliver Tale-Yazdi 54cbfa0afd Fix benchmarking tests (#5791)
* Re-add tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Test with release profile

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Re-add tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Test with diener

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "Test with release profile"

This reverts commit d5384c5b603e1f8b7d14871ee57d2661e61bdb75.

* Revert "Test with diener"

This reverts commit 9e035759c780c2dfaf431456c8d0ff1a78e68d64.

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update tests/benchmark_block.rs

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
2022-07-20 18:32:02 +02:00
Bernhard Schuster 26fa161ece allow re-use and avoid compiling kusama parachain code (#5792)
* allow re-use and avoid compiling kusama parachain code

* fixup removed trailing ;

* make it compat with rustfmt +nightly
2022-07-20 13:53:11 +02:00
Sebastian Kunert 72bde2889f Introduce async runtime calling trait for runtime-api subsystem (#5782)
* Implement OverseerRuntimeClient

* blockchainevents

* Update patches

* Finish merging rntime-api subsystem

* First version that is able to produce blocks

* Make OverseerRuntimeClient async

* Move overseer notification stream forwarding to cumulus

* Remove unused imports

* Add more logging to collator-protocol

* Lockfile

* Use hashes in OverseerRuntimeClient

* Move OverseerRuntimeClient into extra module

* Fix old session info call and make HeadSupportsParachain async

* Improve naming of trait

* Cleanup

* Remove unused From trait implementation

* Remove unwanted debug print

* Move trait to polkadot-node-subsystem-types

* Add sections to runtime client

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Reorder methods

* Fix spelling

* Fix spacing in Cargo.toml

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

* Remove unused babe methods

Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2022-07-20 10:23:25 +00:00