Commit Graph

3866 Commits

Author SHA1 Message Date
Bradley Olson 7e7f72ed74 Change handle_import_statements to FatalResult (#6820)
* Changing dispute db errors to fatal

* fmt
2023-03-04 19:35:04 +01:00
Keith Yeung d29951e2f8 Introduce XCM matcher for writing barriers (#6756)
* Introduce XCM matcher for writing barriers

* Fix compilation

* cargo fmt

* Add more doc comments

* Add mod doc comment

* More doc comments

* Add tests and fix logic

* Remove redundant syntax

* Add more doc comments

* Add more doc comments

* Add more doc comments
2023-03-04 05:37:56 +00:00
eskimor 7d9a0b7cc3 Freeze note on SessionInfo. (#6818)
* Add note about frozen `SessionInfo`.

* Better comment.

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
2023-03-03 21:50:42 +01:00
Arkadiy Paronyan d98d948bfc Bump parity-db (#6816)
* Bump parity-db

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-03-03 21:12:28 +01:00
Bradley Olson f2bc0f57b6 Removing Outdated References to Misbehavior Arbitration Subsystem (#6814)
* Provisioner guide entry update

* Removing mentions of misbehavior arbitration sub

* fmt
2023-03-03 12:17:17 +01:00
Branislav Kontur 837d7748ad Forgotten re-export for MatchedConvertedConcreteId (#6815) 2023-03-03 12:14:24 +01:00
Robert Hambrock 443cadedbd Companion for substrate#13509: bump API versions of {Beefy,Mmr}Api (#6809)
* version {Beefy,Mmr}Api

* update lockfile for {"substrate"}
2023-03-03 11:56:43 +01:00
Oliver Tale-Yazdi 177bedc160 Migrate to Weight::from_parts (#6794)
* Migrate to from_parts

Have a look at https://github.com/ggwpez/substrate-scripts/blob/master/migrate-from-parts.py

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

* Adapt to master

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

* update lockfile for {"substrate"}

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
2023-03-03 00:32:30 +01:00
Branislav Kontur c5637bda91 [XCM] Multiple FungiblesAdapters support + WeightTrader::buy_weight more accurate error (#6739)
* Change ParaId->Sibling for `SiblingParachainConvertsVia`

* [XCM] Multiple `FungiblesAdapter`s support + `WeightTrader::buy_weight` more accurate error

* Added test for `ConvertedConcreteId` with `AsPrefixedGeneralIndex`

* Solution 3. - new MatchedConvertedConcreteId with matching capabilities

* Review fixes

* Renamed `AssetNotFound` -> `AssetNotHandled`

---------

Co-authored-by: parity-processbot <>
2023-03-02 16:50:12 +01:00
eskimor 4931eb0a97 Get rid of unnecessary cloning and work. (#6808)
Co-authored-by: eskimor <eskimor@no-such-url.com>
2023-03-02 07:53:32 +01:00
Mara Robin B a1771657f4 changelog: fix migration listing (#6806)
* changelog: fix runtime migration listing

* changelog: fix db migration listing
2023-03-02 00:40:03 +01:00
Dmitry Markin 519adbcf3b Bump crossbeam-utils 0.8.9 -> 0.8.14 (#6800) 2023-03-01 15:33:05 +03:00
Davide Galassi 0b00e6d5b8 [Companion] BEEFY crates renaming (#6799)
* Temporary commit to make the Substrate CI happy

* Revert "Temporary commit to make the Substrate CI happy"

This reverts commit 9eb2fd223c3e36312242d4fda4ebacf3dd732547.

* Align to substrate master

* Update lock

* Adjust some naming according to the new substrate crates
2023-02-28 17:09:43 +01:00
Mara Robin B 63d1641b1e update weights (#6798)
* polkadot: update weights

* westend: update weights

* kusama: update weights

* rococo: update weights
2023-02-28 14:08:21 +00:00
Keith Yeung 56f6b39da8 XCM: Limit the max number of assets weighable in MultiAssets (#6786)
* Limit the max number of assets weighable in MultiAssets

* Apply suggestions from code review

Co-authored-by: Gavin Wood <gavin@parity.io>

* Add tests

* cargo fmt

* Include proof size weight in tests

* Add comments

---------

Co-authored-by: Gavin Wood <gavin@parity.io>
2023-02-28 10:12:12 +01:00
Anton Vilhelm Ásgeirsson 65fdcf3413 Use BTreeSet as the internal type of ParachainsCache (#6795)
* Add tests for ParachainsCache

* Use BTreeSet for ParachainsCache internals

* Use `into_iter()` instead of cloneing storage vals
2023-02-27 17:22:46 +00:00
Davide Galassi 03d8256b6e [Companion] GRANDPA crate renaming (#6776)
* Companion for grandpa crate renaming
* lock update
2023-02-27 17:55:16 +01:00
Mira Ressel f019376cb1 Automatically format ci pipeline specs with prettier (#6783) 2023-02-27 15:34:54 +04:00
Keith Yeung 3df2893bae Ensure max_weight is assigned properly in AllowTopPaidExecutionFrom (#6787) 2023-02-25 16:37:56 +01:00
Bradley Olson 92ee0b7d9f Explicitly Handling ProvisionableData Cases (#6757)
* Initial pass

* fmt

* Lock changes

* Implementers guide edit

* Reasoning changes

* typo

Co-authored-by: Marcin S. <marcin@bytedude.com>

* Revert "Lock changes"

This reverts commit 3131a5245c6349743789270e6d1ad7842dc4c9df.

* Getting rid of cargo.lock changes

* Argumentation update

* fmt

---------

Co-authored-by: Marcin S. <marcin@bytedude.com>
2023-02-24 21:54:14 +01:00
Bastian Köcher 1e291f30f4 Companion for Substrate#12520 (#6730)
* Companion for Substrate#12520

https://github.com/paritytech/substrate/pull/12520

* Fix

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-24 12:47:41 +00:00
Oleg Plakida 5e7ade9037 Revert back to bare metal runners for weights generation (#6762)
* Revert back to bare metal runners for weights generation

* new old weights

---------

Co-authored-by: alvicsam <alvicsam@gmail.com>
2023-02-23 11:50:43 +01:00
Louis Merlin e5f65865fe Improve XCM fuzzer (#6190)
* Add improved XCM fuzzer

* Add command for running a single input

* Add installation command

* Fix @m-cat's nit

* Add newline

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

* Add info about current directory in fuzzing README

* Update Cargo.lock

---------

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2023-02-23 08:59:03 +00:00
miss_k 020be2ff1c Corrected weight trader comment (#6752)
* Corrected weight trader comment

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

---------

Co-authored-by: command-bot <>
2023-02-22 23:19:37 +01:00
Mara Robin B c5b5276f85 clean up executed migrations (#6763)
* kusama: clean up executed migrations

* polkadot: clean up executed migrations

* rococo: clean up executed migrations

* westend: clean up executed migrations
2023-02-22 17:39:55 +00:00
cheme 94d24de1a0 Remove state migration from westend runtime. (#6737)
* clean state_trie_migration from westend

* update cargo.lock

* Revert "clean state_trie_migration from westend"

This reverts commit b1d55c688e9a8a2fbd155f0a9ddaba9766ad101c.

* cleanup.

* use storage_alias

* Revert "use storage_alias"

This reverts commit 5289745d1592a14db0063d9ee111137473993f41.

* Revert "Revert "use storage_alias""

This reverts commit d4c688acdddf29a09c79a4eef52ab4095128e5b3.

* Force alias.

* magic
2023-02-22 14:21:44 +00:00
Ross Bulat 6bd19ac7f1 polkadot companion #12608 (Pools claim permissions) (#6753)
* update weights functions

* + placeholder weight

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

* update weights

* update lockfile for {"substrate"}

---------

Co-authored-by: command-bot <>
2023-02-22 13:05:29 +00:00
Paulo Martins 1ae3c81126 Add Turboflakes bootnodes to Polkadot, Kusama and Westend (#6628) 2023-02-22 13:57:15 +01:00
Koute 1b30ce5a9d Companion for substrate#13284 (#6653)
* Align iterator use to new substrate

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-22 08:36:16 +00:00
Daniel Shiposha 2f6e941caf Companion for Substrate #13410: Introduce EnsureOrigin to democracy.propose (#6750)
* feat: set SubmitOrigin in all affected runtimes

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-22 00:15:06 +00:00
Michal Kucharczyk 0e59d866f3 BlockId removal: BlockBuilderProvider::new_block_at (#6734)
* `BlockId` removal: `BlockBuilderProvider::new_block_at`

It changes the arguments of `BlockBuilderProvider::new_block_at` from:
`BlockId<Block>` to: `Block::Hash`

* useless import removed

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-21 19:26:46 +00:00
Gonçalo Pestana 82b6db41e8 Companion PR for PR#13119 (#6683)
* Companion PR for PR#13119

* restart ci

* update lockfile for {"substrate"}

* Use Master Cargo.lock

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

* cargo update -p sp-io

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

* Use Master Cargo.lock

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

* cargo update -p sp-io

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

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-02-21 12:56:13 +00:00
Adrian Catangiu 09df3f1ec8 Companion for Substrate#13411: frame/beefy: prune entries in set id session mapping (#6743)
* rococo-runtime: configure pallet_beefy::MaxSetIdSessionEntries

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-21 11:30:19 +00:00
Michal Kucharczyk d091a84a07 BlockId removal: refactor of runtime API (#6721)
* BlockId removal: refactor of runtime API

It changes the first argument of all generated runtime API calls from: `BlockId<Block>` to: `Block::Hash`

* fmt

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-20 23:44:20 +00:00
Oliver Tale-Yazdi 35a0d69af8 Fix auction bench (#6747)
* Adjust command

* Move imports

* Chain-specific blocktime

* update lockfile for {"substrate"}

* cargo update -p sp-io

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

* Fix bench

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

* Export constants from node service

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

* Use constants in CLI

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

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Piotr Mikołajczyk <piomiko41@gmail.com>
Co-authored-by: parity-processbot <>
2023-02-20 17:02:07 +00:00
s0me0ne-unkn0wn b13ba77a3b Use PVF code paired with executor params wherever possible (#6742) 2023-02-20 13:41:46 +01:00
s0me0ne-unkn0wn bad4afca36 Retire OldV1SessionInfo (#6744) 2023-02-20 10:30:45 +00:00
Adrian Catangiu d009d13523 Companion for substrate #13121 - BEEFY Equivocations support (#6593)
* runtimes: implement new BeefyApi

Signed-off-by: acatangiu <adrian@parity.io>

* rococo-runtime: add ValidateUnsigned to pallet_beefy

* update lockfile for {"substrate"}

---------

Signed-off-by: acatangiu <adrian@parity.io>
Co-authored-by: parity-processbot <>
2023-02-17 10:28:48 +00:00
Bastian Köcher 5ca430b649 Do not call longest chain by default (#6704)
* Do not call longest chain by default

We always called longest chain by default just for some potential
logging. This was probably some oversight for when this select chain
implementation was introduced.

* Fix tests
2023-02-17 08:55:14 +01:00
Tsvetomir Dimitrov 2853f349bf Fix a metric description (#6732) 2023-02-16 18:59:46 +02:00
Bastian Köcher 83eb8453eb Change MaxMemorySize to MaxMemoryPages (#6728)
* Change `MaxMemorySize` to `MaxMemoryPages`

We should set the max memory for the executor in pages (64KiB) and not in bytes.
The wasm memory is always a multiple of a page and we should use the
same terminology.

* FMT

* Fix warning
2023-02-16 17:10:24 +01:00
Marcin S d5a7991429 Use a BoundedVec in ValidationResult (#6603)
* Use a `BoundedVec` in `ValidationResult`

> Use a `BoundedVec` for `upward_messages` and `horizontal_messages` in order to
> limit the number of individual messages/memory allocations right at decoding
> time. The reason for this is that the `ValidationResult` may contain a code
> upgrade (including a full PVF binary), so the total size limit can't be set
> too low and this limit will still allow several millions of upward messages,
> which will (due to the memory allocator overhead) already have a
> non-negligible memory footprint in decoded form.

* List all fields when hashing so we don't miss one

* Define types for  `BoundedVec`s of messages

* Fix test compile errors

* Depend on `bounded-collections` 0.1.4 (fixes allocation issue)

* Fix compilation issue

* Derive `Hash` instead of manual `impl`

* Avoid use of unwrap
2023-02-16 15:08:56 +00:00
Adrian Catangiu 686f6972ce Companion for substrate #12910: BEEFY metrics (#6706)
* service: provide prometheus registry for beefy metrics

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-16 13:34:39 +00:00
JP 9a5e01a3b4 Update release-related templates for the new changelogerator output format (#6702)
* update templates to upcoming context.json format

* fix merging error

* more fixes

* fix templates

* fix

* print "changelogerator --version"

* print changelogerator version as debug

* remove excluded debug info

* WIP

* Switch to changelogerator v0.10.1

* Update bundle deps

* fix

---------

Co-authored-by: Wilfried Kopp <wilfried@parity.io>
2023-02-16 10:13:33 +00:00
s0me0ne-unkn0wn dd0a556665 Executor Environment parameterization (#6161)
* Re-apply changes without Diener, rebase to the lastest master

* Cache pruning

* Bit-pack InstantiationStrategy

* Move ExecutorParams version inside the structure itself

* Rework runtime API and executor parameters storage

* Pass executor parameters through backing subsystem

* Update Cargo.lock

* Introduce `ExecutorParams` to approval voting subsys

* Introduce `ExecutorParams` to dispute coordinator

* `cargo fmt`

* Simplify requests from backing subsys

* Fix tests

* Replace manual config cloning with `.clone()`

* Move constants to module

* Parametrize executor performing PVF pre-check

* Fix Malus

* Fix test runtime

* Introduce session executor params as a constant defined by session info
pallet

* Use Parity SCALE codec instead of hand-crafted binary encoding

* Get rid of constants; Add docs

* Get rid of constants

* Minor typo

* Fix Malus after rebase

* `cargo fmt`

* Use transparent SCALE encoding instead of explicit

* Clean up

* Get rid of relay parent to session index mapping

* Join environment type and version in a single enum element

* Use default execution parameters if running an old runtime

* `unwrap()` -> `expect()`

* Correct API version

* Constants are back in town

* Use constants for execution environment types

* Artifact separation, first try

* Get rid of explicit version

* PVF execution queue worker separation

* Worker handshake

* Global renaming

* Minor fixes resolving discussions

* Two-stage requesting of executor params to make use of runtime API cache

* Proper error handling in pvf-checker

* Executor params storage bootstrapping

* Propagate migration to v3 network runtimes

* Fix storage versioning

* Ensure `ExecutorParams` serialization determinism; Add comments

* Rename constants to make things a bit more deterministic
Get rid of stale code

* Tidy up a structure of active PVFs

* Minor formatting

* Fix comment

* Add try-runtime hooks

* Add storage version write on upgrade

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

* Add pre- and post-upgrade assertions

* Require to specify environment type; Remove redundant `impl`s

* Add `ExecutorParamHash` creation from `H256`

* Fix candidate validation subsys tests

* Return splittable error from executor params request fn

* Revert "Return splittable error from executor params request fn"

This reverts commit a0b274177d8bb2f6e13c066741892ecd2e72a456.

* Decompose approval voting metrics

* Use more relevant errors

* Minor formatting fix

* Assert a valid environment type instead of checking

* Fix `try-runtime` hooks

* After-merge fixes

* Add migration logs

* Remove dead code

* Fix tests

* Fix tests

* Back to the strongly typed implementation

* Promote strong types to executor interface

* Remove stale comment

* Move executor params to `SessionInfo`: primitives and runtime

* Move executor params to `SessionInfo`: node

* Try to bump primitives and API version

* Get rid of `MallocSizeOf`

* Bump target API version to v4

* Make use of session index already in place

* Back to v3

* Fix all the tests

* Add migrations to all the runtimes

* Make use of existing `SessionInfo` in approval voting subsys

* Rename `TARGET` -> `LOG_TARGET`

* Bump all the primitives to v3

* Fix Rococo ParachainHost API version

* Use `RollingSessionWindow` to acquire `ExecutorParams` in disputes

* Fix nits from discussions; add comments

* Re-evaluate queue logic

* Rework job assignment in execution queue

* Add documentation

* Use `RuntimeInfo` to obtain `SessionInfo` (with blackjack and caching)

* Couple `Pvf` with `ExecutorParams` wherever possible

* Put members of `PvfWithExecutorParams` under `Arc` for cheap cloning

* Fix comment

* Fix CI tests

* Fix clippy warnings

* Address nits from discussions

* Add a placeholder for raw data

* Fix non exhaustive match

* Remove redundant reexports and fix imports

* Keep only necessary semantic features, as discussed

* Rework `RuntimeInfo` to support mock implementation for tests

* Remove unneeded bound

* `cargo fmt`

* Revert "Remove unneeded bound"

This reverts commit 932463f26b00ce290e1e61848eb9328632ef8a61.

* Fix PVF host tests

* Fix PVF checker tests

* Fix overseer declarations

* Simplify tests

* `MAX_KEEP_WAITING` timeout based on `BACKGING_EXECUTION_TIMEOUT`

* Add a unit test for varying executor parameters

* Minor fixes from discussions

* Add prechecking max. memory parameter (see paritytech/srlabs_findings#110)

* Fix and improve a test

* Remove `ExecutionEnvironment` and `RawData`

* New primitives versioning in parachain host API

* `disputes()` implementation for Kusama and Polkadot

* Move `ExecutorParams` from `vstaging` to stable primitives

* Move disputes from `vstaging` to stable implementation

* Fix `try-runtime`

* Fixes after merge

* Move `ExecutorParams` to the bottom of `SessionInfo`

* Revert "Move executor params to `SessionInfo`: primitives and runtime"

This reverts commit dfcfb85fefd1c5be6c8a8f72dc09fd1809cfa9ce.

* Always use fresh activated live hash in pvf precheck
(re-apply 34b09a4c20de17e7926ed942cd0d657d18f743fa)

* Fixing tests (broken commit)

* Fix candidate validation tests

* Fix PVF host test

* Minor fixes

* Address discussions

* Restore migration

* Fix `use` to only include what is needed instead of `*`

* Add comment to never touch `DEFAULT_CONFIG`

* Update migration to set default `ExecutorParams` for `dispute_period`
sessions back

* Use `earliest_stored_session` instead of calculations

* Nit

* Add logs

* Treat any runtime error as `NotSupported` again

* Always return default executor params if not available

* Revert "Always return default executor params if not available"

This reverts commit b58ac4482ef444c67a9852d5776550d08e312f30.

* Add paritytech/substrate#9997 workaround

* `cargo fmt`

* Remove migration (again!)

* Bump executor params to API v4 (backport from #6698)

---------

Co-authored-by: Andronik <write@reusable.software>
2023-02-15 11:26:09 +00:00
Sam Elamin 7f6b8e6df9 add warp sync params to enable parachain warp sync (#6334)
* add warp sync params to enable parachain warp sync

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-14 18:31:50 +00:00
Marcin S fd70d01274 Refactor PVF preparation memory stats (#6693)
* Refactor PVF preparation memory stats

The original purpose of this change was to gate metrics that are unsupported by
some systems behind conditional compilation directives (#[cfg]); see
https://github.com/paritytech/polkadot/pull/6675#discussion_r1099996209.

Then I started doing some random cleanups and simplifications and got a bit
carried away. 🙈 The code should be overall tidier than before.

Changes:
- Don't register unsupported metrics (e.g. `max_rss` on non-Linux systems)
- Introduce `PrepareStats` struct as an abstraction over the `Ok` values of
  `PrepareResult`. It is cleaner, and can be easily modified in the future.
- Other small changes

* Minor fixes to comments

* Fix compile errors

* Try to fix some Linux errors

* Mep

* Fix candidate-validation tests

* Update docstring
2023-02-14 15:48:57 +00:00
Gavin Wood 9c35763017 v3::Junction supports small (32-byte max) "vecs". (#6716)
* v3::Junction supports small (32-byte max) "vecs".

* Formatting

* Add test
2023-02-14 13:31:27 +00:00
girazoki 91bb2ae3d0 Companion for substrate #13159 (#6620)
* SetMembersOrigin

* Update Substrate

* Remove bags list from runtime common

---------

Co-authored-by: Bastian Köcher <info@kchr.de>
2023-02-13 11:30:02 +01:00
Chevdor f17ea2cdd0 Fix release notes templates (#6697)
* WIP

* Fix templates

- fix conditions to fetch misc PRs
- render the misc section only if required
- add html comment to help debugging
- add a new API section to T2 labels
2023-02-10 17:12:45 +01:00