Commit Graph

4231 Commits

Author SHA1 Message Date
eskimor eaf057c5ed Parathreads Feature Branch (#6969)
* First baby steps

* Split scheduler into several modules

* Towards a more modular approach for scheduling

* move free_cores; IntoInterator -> BTreeMap

* Move clear()

* Move more functions out of scheduler

* Change weight composition

* More abstraction

* Further refactor

* clippy

* fmt

* fix test-runtime

* Add parathreads pallet to construct_runtime!

* Make all runtimes use (Parachains, Parathreads) scheduling

* Delete commented out code

* Remove parathreads scheduler from westend, rococo, and kusama

* fix rococo, westend, and kusama config

* Revert "fix rococo, westend, and kusama config"

This reverts commit 59e4de380d5c7d17eaaba5e2c2b81405de3465e3.

* Revert "Remove parathreads scheduler from westend, rococo, and kusama"

This reverts commit 4c44255296083ac5670560790ed77104917890a4.

* Remove CoreIndex from free_cores

* Remove unnecessary struct for parathreads

* parathreads provider take 1

* Comment out parathread tests

* Pop into lookahead

* fmt

* Fill lookahead with two entries for parachains

* fmt

* Current stage

* Towards ab parathreads

* no AB use

* Make tests typecheck

* quick hack to set scheduling lookahead to 1

* Fix scheduler tests

* fix paras_inherent tests

* misc

* Update more of a test

* cfg(test)

* some cleanup

* Undo paras_inherent changes

* Adjust paras inherent tests

* Undo changes to v2 primitives

* Undo v2 mod changes to tests

* minor

* Remove parathreads assigner and pallet

* minor

* minor

* more cleanup

* fmt

* minor

* minor

* minor

* Remove on_new_session from assignment provider

* Make adder collator integration test pass

* disable failing unit tests

* minor

* minor

* re-enable one unit test

* minor

* handle retries, add concluded para to pop interface

* comment out unused code

* Remove core_para from interface

* Remove first claimqueue element on clear if None instead removing all Nones

* Move claimqueue get out of loop

* Use VecDeque instead of Ved in ClaimQueue

* Make occupied() AB ready(?)

* handle freed disputed in clear_and_fill_claimqueue

* clear_and_fill_claimqueue returns scheduled Vec

* Rename and minor refactor

* return position of assignment taken from claimqueue

* minor

* Fix session boundary parachains number change + extended test

* Fix runtimes

* Fix polkadot runtime

* Remove polkadot pallet from benchmarks

* fix test runtime

* Add storage migration

* Minor refactor

* Minor

* migratin typechecks

* Add migration to runtimes

* Towards modular scheduling II (#6568)

* Add post migration check

* pebkac

* Disable migrations but mine

* Revert "Disable migrations but mine"

This reverts commit 4fa5c5a370c199944a7e0926f50b08626bfbad4c.

* Move scheduler migration

* Revert "Move scheduler migration"

This reverts commit a16b1659a907950bae048a9f7010f2aa76e02b6d.

* Fix migration

* cleanup

* Don't lose retries value anymore

* comment out test function

* Remove retries value from Assignment again

* minor

* Make collator for parathreads optional

* data type refactor

* update scheduler tests

* Change test function cfg

* comment out test function

* Try cfg(test) only

* fix cfg flags

* Add get_max_retries function to provider interface (#7047)

* Fix merge commit

* pebkac

* fix merge

* update cargo.lock

* fix merge

* fix merge

* Use btreemap instead of vec, fix scheduler calls.

* Use imported `ScheduledCore`

* Remove unused import in inclusion tests

* Use keys() instead of mapping over a BTreeMap

* Fix migrations for parachains scheduler

* Use BlockNumberFor<T> everywhere in scheduler

* Add on demand assignment provider pallet (#7110)

* Address some PR comments

* minor

* more cleanup

* find_map and timeout availability fixes

* Change default scheduling_lookahead to 1

* Add on demand assignment provider pallet

* Move test-runtime to new assignment provider

* Run cargo format on scheduler tests

* minor

* Mutate cores in single loop

* timeout predicate simplification

* claimqueue desired size fix

* Replace expect by ok_or

* More improvements

* Fix push back order and next_up_on_timeout

* minor

* session change docs

* Add pre_new_session call to hand pre session updates

* Remove sc_network dependency and PeerId from unnecessary data structures

* Remove unnecessary peer_ids

* Add OnDemandOrdering proxy (#7156)

* Add OnDemandBidding proxy

* Fix names

* OnDemandAssigner for rococo only

* Check PeerId in collator protocol before fetching collation

* On occupied, remove non occupied cores from the claimqueue front and refill

* Add missing docs

* Comment out unused field

* fix ScheduledCore in tests

* Fix the fix

* pebkac

* fmt

* Fix occupied dropping

* Remove double import

* ScheduledCore fixes

* Readd sc-network dep

* pebkac

* OpaquePeerId -> PeerId in can_collate interface

* Cargo.lock update for interface change

* Remove checks not needed anymore?

* Drop occupied core on session change if it would time out after the new session

* Add on demand assignment provider pallet

* Move test-runtime to new assignment provider

* Run cargo format on scheduler tests

* Add OnDemandOrdering proxy (#7156)

* Add OnDemandBidding proxy

* Fix names

* OnDemandAssigner for rococo only

* Remove unneeded config values

* Update comments

* Use and_then for queue position

* Return the max size of the spot queue on error

* Add comments to add_parathread_entry

* Add module comments

* Add log for when can_collate fails

* Change assigner queue type to `Assignment`

* Update assignment provider tests

* More logs

* Remove unused keyring import

* disable can_collate

* comment out can_collate

* Can collate first checks set if empty

* Move can_collate call to collation advertisement

* Fix backing test

* map to loop

* Remove obsolete check

* Move invalid collation test from backing to collator-protocol

* fix unused imports

* fix test

* fix Debug derivation

* Increase time limit on zombienet predicates

* Increase zombienet timeout

* Minor

* Address some PR comments

* Address PR comments

* Comment out failing assert due to on-demand assigner missing

* remove collator_restrictions info from backing

* Move can_collate to ActiveParas

* minor

* minor

* Update weight information for on demand config

* Add ttl to parasentry

* Fix tests missing parasentry ttl

* Adjust scheduler tests to use ttl default values

* Use match instead of if let for ttl drop

* Use RuntimeDebug trait for `ParasEntry` fields

* Add comments to on demand assignment pallet

* Fix spot traffic calculation

* Revert runtimedebug changes to primitives

* Remove runtimedebug derivation from `ParasEntry`

* Mention affinity in pallet level docs

* Use RuntimeDebug trait for ParasEntry child types

* Remove collator restrictions

* Fix primitive versioning and other merge issues

* Fix tests post merge

* Fix node side tests

* Edit parascheduler migration for clarity

* Move parascheduler migration up to next release

* Remove vestiges from merge

* Fix tests

* Refactor ttl handling

* Remove unused things from scheduler tests

* Move on demand assigner to own directory

* Update documentation

* Remove unused sc-network dependency in primitives

Was used for collator restrictions

* Remove unused import

* Reenable scheduler test

* Remove unused storage value

* Enable timeout predicate test and fix fn

Turns out that the issue with the compiler is fixed and we can now
use impl Trait in the manner used here.

* Remove unused imports

* Add benchmarking entry for perbill in config

* Correct typo

* Address review comments

* Log out errors when calculating spot traffic.

* Change parascheduler's log target name

* Update scheduler_common documentation

* Use mutate for affinity fns, add tests

* Add another on demand affinity test

* Unify parathreads and parachains in HostConfig (take 2) (#7452)

* Unify parathreads and parachains in HostConfig

* Fixed missed occurences

* Remove commented out lines

* `HostConfiguration v7`

* Fix version check

* Add `MigrateToV7` to `Unreleased`

* fmt

* fmt

* Fix compilation errors after the rebase

* Update runtime/parachains/src/scheduler/tests.rs

Co-authored-by: Anton Vilhelm Ásgeirsson <antonva@users.noreply.github.com>

* Update runtime/parachains/src/scheduler/tests.rs

Co-authored-by: Anton Vilhelm Ásgeirsson <antonva@users.noreply.github.com>

* fmt

* Fix migration test

* Fix tests

* Remove unneeded assert from tests

* parathread_cores -> on_demand_cores; parathread_retries -> on_demand_retries

* Fix a compilation error in tests

* Remove unused `use`

* update colander image version

---------

Co-authored-by: alexgparity <alex.gremm@parity.io>
Co-authored-by: Anton Vilhelm Ásgeirsson <antonva@users.noreply.github.com>
Co-authored-by: Javier Viola <javier@parity.io>

* Fix branch after merge with master

* Refactor out duplicate checks into a helper fn

* Fix tests post merge

* Rename add_parathread_assignment, add test

* Update docs

* Remove unused on_finalize function

* Add weight info to on demand pallet

* Update runtime/parachains/src/configuration.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Update runtime/parachains/src/scheduler_common/mod.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Update runtime/parachains/src/assigner_on_demand/mod.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Add benchmarking to on demand pallet

* Make place_order test check for success

* Add on demand benchmarks

* Add local test weights to rococo runtime

* Modify TTL drop behaviour to not skip claims

Previous behaviour would jump a new claim from the assignment provider
ahead in the claimqueue, assuming lookahead is larger than 1.

* Refactor ttl test to test claimqueue order

* Disable place_order ext. when no on_demand cores

* Use default genesis config for benchmark tests

* Refactor config builder param

* Move lifecycle test from scheduler to on demand

* Remove unneeded lifecycle test

Paras module via the parachain assignment provider doesn't provide
new assignments if a parachain loses it's lease. The on demand
assignment provider doesn't provide an assignment that is not a
parathread.

* Re enable validator shuffle test

* More realistic weights for place_order

* Remove redundant import

* Fix backwards compatibility (hopefully)

* ".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtime=rococo --target_dir=polkadot --pallet=runtime_parachains::assigner_on_demand

* Fix tests.

* Fix off-by-one.

* Re enable claimqueue fills test

* Re enable schedule_rotates_groups test

* Fix fill_claimqueue_fills test

* Re enable next_up_on_timeout test, move fn

* Do not pop from assignment provider when retrying

* Fix tests missing collator in scheduledcore

* Add comment about timeout predicate.

* Rename parasentry retries to availability timeouts

* Re enable schedule_schedules... test

* Refactor prune retried test to new scheduler

* Have all scheduler tests use genesis_cfg fn

* Update docs

* Update copyright notices on new files

* Rename is_parachain_core to is_bulk_core

* Remove erroneous TODO

* Simplify import

* ".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtime=rococo --target_dir=polkadot --pallet=runtime_parachains::configuration

* Revert AdvertiseCollation order shuffle

* Refactor place_order into keepalive and allowdeath

* Revert rename of hrmp max inbound channels

parachain encompasses both on demand and slot auction / bulk.

* Restore availability_timeout_predicate function

* Clean up leftover comments

* Update runtime/parachains/src/scheduler/tests.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* ".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtime=westend --target_dir=polkadot --pallet=runtime_parachains::configuration

---------

Co-authored-by: alexgparity <alex.gremm@parity.io>
Co-authored-by: alexgparity <115470171+alexgparity@users.noreply.github.com>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: command-bot <>

* On Demand - update weights and small nits (#7605)

* Remove collator restriction test in inclusion

On demand parachains won't have collator restrictions implemented in
this way but will instead use a preferred collator registered to a
`ParaId` in `paras_registrar`.

* Remove redundant config guard for test fns

* Update weights

* Update WeightInfo for on_demand assigner

* Unify assignment provider parameters into one call (#7606)

* Combine assignmentprovider params into one fn call

* Move scheduler_common to a module under scheduler

* Fix ttl handling in benchmark builder

* Run cargo format

* Remove obsolete test.

* Small improvement.

* Use same migration pattern as config module

* Remove old TODO

* Change log target name for assigner on demand

* Fix migration

* Fix clippy warnings

* Add HostConfiguration storage migration to V8

* Add `MigrateToV8` to unreleased migrations for all runtimes

* Fix storage version check for config v8

* Set `StorageVersion` to 8 in `MigrateToV8`

* Remove dups.

* Update primitives/src/v5/mod.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

---------

Co-authored-by: alexgparity <alex.gremm@parity.io>
Co-authored-by: alexgparity <115470171+alexgparity@users.noreply.github.com>
Co-authored-by: antonva <anton.asgeirsson@parity.io>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
Co-authored-by: Anton Vilhelm Ásgeirsson <antonva@users.noreply.github.com>
Co-authored-by: Javier Viola <javier@parity.io>
Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
2023-08-17 12:52:23 +00:00
Bastian Köcher 26b5f259a3 Companion for Substrate#14612 (#7536)
* Companion for reworking the storage transaction cache

* Cargo lock

* Fixes

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-08-17 11:26:44 +00:00
Gavin Wood 747957fd8a Polkadot gets topic-based message IDs (#7301)
* Polkadot gets topics

* Formatting

* Fixes

---------

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2023-08-17 11:06:39 +00:00
Liam Aharon 0a9cf2a516 cli: remove deprecated try-runtime subcommand (also companion for #14731) (#7599)
* remove try-runtime-cli

* fix ci pipeline

* fix link

* remove chain var

* build runtime with try-runtime feature

* use main branch

* pin to commit

* fix build

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-08-17 05:57:38 +00:00
Javier Viola e6473e2840 bump zombienet to v1.3.65 (#7631)
* bump zombienet version

* remove workaround, zombienet collators cmd bug fixed in latest version

* add env var to run in ci

* add env var to run in ci
2023-08-16 20:31:57 +00:00
Oliver Tale-Yazdi a42b32e392 [Polkadot] 28 days as conviction voting period (#7595)
* Use 28 days for conviction vote locking

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

* Remove unused dependency profile

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

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-16 16:26:41 +02:00
Oliver Tale-Yazdi d501d92176 Fix clippy warnings (#7625)
* Fix clippy check

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

* Autofix clippy

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

* Fix trivial

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

* fmt

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

* suppress warnings

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

* Quiet clippy 😌

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

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-08-16 12:20:31 +00:00
Aaro Altonen a0f83eb992 Revert "[Substrate companion] update libp2p to 0.52.0 (#7472)" (#7583)
* Revert "[Substrate companion] update libp2p to 0.52.0 (#7472)"

This reverts commit 7a1d96e1ce.

* Update dependencies

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-08-16 11:39:40 +00:00
dependabot[bot] 1756ee0590 Bump actions/setup-node from 3.7.0 to 3.8.0 (#7622)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3.7.0...v3.8.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-16 07:37:41 +00:00
Adrian Catangiu 022a3b97f3 Revert "companion for 14754: cli: move no-beefy flag to sc-cli (#7600)" (#7613)
* Revert "companion for 14754: cli: move no-beefy flag to sc-cli (#7600)"

This reverts commit 26adab4f7c.

* update lockfile for {"substrate"}

* fix merge damage

---------

Co-authored-by: parity-processbot <>
2023-08-15 16:06:07 +00:00
alexd10s bf785881ac Change the Config of the MaxRococoNum Slot from a Constant to a Storage function (#7217)
* set MaxPermanentSlots and MaxTemporarySlots with a extrinsic instead of a constant

* delete the  MaxPermanentSlots and MaxTemporarySlots constants from config on  Rococo and Westend

* migration code for assigned slots

* remove getters

* little refactor

* set values in the GenesisConfig

* refactor in the migration, adding it in the rococo runtime

* refactor: fmt

* Minor fix

* pre_upgrade check

* add migration to mod v1

* Logs following Substrate#12873

* fix: current storage version set to 1

* use enact when try-runtime

* Vec seems to be missing

* feature gate import

* fix as per #13993

* address comments

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

* address  comments

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

* benchmarking for assign_perm_parachain_slot extrinsic

* benchmark all the extrinsics of the pallet

* cargo fmt for assigned slots

* migration added for westend

* licence in benchmarking file

* BuildGenesisConfig

* assigned_slots default in genesis

* cargo fmt

* assigned_slots fix tests config

* cargo fmt

* fix benchmarking compile error

* fix benchmarking imports

* benchmark worst case scenario for validation code and head data

* add assigned_slots in frame_benchmarking on Rococo and Westend

* modify values for para_id in benchmarking

* delete the assigned_slots in westend frame_benchmarking

* fix benchmarkings and add it to westend

* cargo fmt

* ".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtime=rococo --target_dir=polkadot --pallet=runtime_common::assigned_slots

* ".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtime=westend --target_dir=polkadot --pallet=runtime_common::assigned_slots

* use generated weights in assigned_slots pallet

* small changes in set_max_permanent_slots and set_max_temporary_slots

* revert last commit

* address some comments

* wrap migration with VersionCheckedMigrateToV1

* add experimental feature in pallet, and assers in post_upgrade migration

* clean warnings

* clean unnecesary experimental flag

* small typo in comments

* cargo fmt

* small comments fixes

---------

Co-authored-by: al3mart <11448715+al3mart@users.noreply.github.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
2023-08-15 13:17:15 +00:00
Bastian Köcher cf3271fea2 Remove superflous parameter overseer_enable_anyways and make parachain node type more explicit (#7617)
* Remove superflous parameter `overseer_enable_anyways`

We don't need this flag, as we don't need the overseer enabled when the
node isn't a collator or validator.

* Rename `IsCollator` to `IsParachainNode`

`IsParachainNode` is more expressive and also encapsulates the state of
the parachain node being a full node. Some functionality like the
overseer needs to run always when the node runs alongside a parachain
node. The parachain node needs the overseer to e.g. recover PoVs. Other
things like candidate validation or pvf checking are only required for
when the node is running as validator.

* FMT

* Fix CI
2023-08-15 08:51:27 +00:00
Keith Yeung e9c6c72f5a XCM: Rename Instruction instructions to Command instructions (#7593)
Co-authored-by: parity-processbot <>
2023-08-14 21:30:12 +00:00
Marcin S 37dccb1435 PVF workers: some fixes for cargo run and cargo install (#7608)
- Update some places where `cargo run` was used
- Add note to error messages about `cargo build` before `cargo run`
- Fix call to `cargo install` in readme
2023-08-14 16:14:30 +00:00
Lulu 1a07354f5c Don't publish test crates (#7588) 2023-08-14 17:31:13 +02:00
Aaro Altonen 2194b95708 Disable validation/collation protocols for normal full nodes (#7601)
If authority discovery is not enabled, `Overseer` is not enabled,
meaning `NetworkBridge` is not started. Validation/collation protocols
are, however, enabled even if the `NetworkBridge` is not started.

Currently this results in normal Polkadot full nodes advertising these
protocols, accepting inbound substreams and even establishing outbound
substreams for the validation protocol. Since the `NetworkBridge` is
not started and no protocol in Substrate is interested in these
protocol events, the events are relayed to all protocol handlers but
are getting discarded because no installed protocol is interested in them.

Co-authored-by: parity-processbot <>
2023-08-14 17:34:38 +03:00
Oliver Tale-Yazdi 342d720573 Use same fmt and clippy configs as in Substrate (#7611)
* Use same rustfmt.toml as Substrate

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

* format format file

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

* Format with new config

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

* Add Substrate Clippy config

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

* Print Clippy version in CI

Otherwise its difficult to reproduce locally.

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

* Make fmt happy

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

* Update node/core/pvf/src/error.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Update node/core/pvf/src/error.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
2023-08-14 14:29:29 +00:00
Aaro Altonen ac435c96cf Remove ParityDb migration tests (#7612) 2023-08-14 13:52:52 +00:00
Chevdor b617877b36 Fix the user used to login to Docker hub (#7610) 2023-08-14 13:11:11 +02:00
Chevdor 1f437d9e11 RC container image fixes (#7607)
* Remove ENV for the artifacts folder
2023-08-14 12:00:24 +02:00
jserrat d4ad8d5e74 pvf: use test-utils feature to export test only (#7538)
* pvf: use test-utils feature to export test only

* adding comment to test-utils feature

* make prepare-worker and execute-worker as optional dependencies and add comments to test-utils

* remove doc hidden from pvf testing

* add prepare worker and execute worker entrypoints to test-utils feature

* pvf: add sp_tracing as optional dependency of test-utils

* add test-utils for polkadot and malus

* add test-utils feature to prepare and execute workers script

* remove required features from prepare and executing

* Try to trigger CI again to fix broken jobs

---------

Co-authored-by: Marcin S <marcin@realemail.net>
2023-08-14 09:48:15 +00:00
Adrian Catangiu 26adab4f7c companion for 14754: cli: move no-beefy flag to sc-cli (#7600)
* cli: move no-beefy flag to substrate sc-cli config

* bump substrate ref

---------

Signed-off-by: Adrian Catangiu <adrian@parity.io>
2023-08-11 18:30:58 +03:00
Chevdor 693a29da1a Publish RC container images (#7556)
* WIP

* Add missing checkout

* Add debuggin

* Fix VAR name

* Bug fix

* Rework jobs

* Revert "Rework jobs"

This reverts commit 2bfa79fd3ae633c17403b838f9a5025f0f7fc3f3.

* Add cache

* Add temp default for testing

* Add missing checkout

* Fix patch

* Comment out the GPG check for now

* Rename polkadot_injected_release into a more appropriate polkadot_injected_debian

* Refactoring / renaming

* Introduce a generic image for binary injection

* Flag files to be deleted and changes to be done

* WIP

* Fix multi binaries images

* Add test build scripts

* Remove old file, add polkadot build-injected script

* Fix doc

* Fix tagging

* Add build of the injected container

* Fix for docker

* Remove the need for TTY

* Handling container publishing

* Fix owner and registry

* Fix vars

* Fix repo

* Fix var naming

* Fix case when there is no tag

* Fix case with no tag

* Handle error

* Fix spacings

* Fix tags

* Remove unnecessary grep that may fail

* Add final check

* Clean up and introduce GPG check

* Add doc

* Add doc

* Update doc/docker.md

Co-authored-by: Mira Ressel <mira@parity.io>

* type

Co-authored-by: Mira Ressel <mira@parity.io>

* Fix used VAR

* Improve doc

* ci: Update .build-push-image jobs to use the new build-injected.sh

* ci: fix path to build-injected.sh script

* Rename the release artifacts folder to prevent confusion due to a similar folder in the gitlab CI

* ci: check out polkadot repo in .build-push-image

This seems far cleaner than copying the entire scripts/ folder into our
job artifacts.

* feat(build-injected.sh): make PROJECT_ROOT configurable

This lets us avoid a dependency on git in our CI image.

* ci: build injected images with buildah

* ci: pass full image names to zombienet

* Add missing ignore

---------

Co-authored-by: Mira Ressel <mira@parity.io>
2023-08-11 15:28:39 +02:00
Andrei Eres cf66819a19 Add counter for unapproved candidates (#7491)
* Add counter for unapproved candidates

* Update metrics

* Split metrics

* Remove depth metric

* Print only the oldest unapproved candidates

* Update logging condition

* Fix logging condition

* Update logging

* Update node/core/approval-voting/src/lib.rs

Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>

---------

Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
2023-08-10 11:17:24 +00:00
Gonçalo Pestana 55bc8f9f23 Companion for substrate#12970 (#6807)
* Runtime companion changes

* updates runtime configs

* Fixes runtime-test runtime configs

* Uses ElectionBounds and builder from own mod

* updates new bounds mod

* Fixes test-runtime mock

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-08-10 10:42:43 +02:00
Liam Aharon 9d84998575 Remove unused code in runtime/polkadot/src/lib.rs (#7540)
* remove SetStorageVersions runtime upgrade

* remove unused imports
2023-08-10 05:29:43 +00:00
Davide Galassi ebf29d7a65 Companion for #14412 (#7547)
* Companion for 14412

* update lockfile for {"substrate"}

* Trigger CI

---------

Co-authored-by: parity-processbot <>
2023-08-09 18:28:48 +02:00
Xiliang Chen eb36cd7468 update weight file template (#7589) 2023-08-08 14:16:42 +00:00
Marcin S ffb742310f PVF: Add missing crate descriptions (#7587) 2023-08-08 09:51:40 -04:00
Keith Yeung 0f90a667bd Document non-uniqueness of SetTopic IDs (#7579)
* Document non-uniqueness of SetTopic IDs

* More comments on WithUniqueTopic
2023-08-07 16:13:36 +00:00
PG Herveou ed7a0b87eb Remove xcm on_runtime_upgrade pallet hook (#7235)
* move migration stuffs

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <git@kchr.de>

* Fix test

* fix

* lint

* fix lint

* rm extra space

* fix lint

* PR review

* fixes

* use saturating_accrue in fn

* fix test

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
2023-08-05 16:09:21 +00:00
Lulu 0142a01353 Add license to crates (#7578)
* Add license to crates

This is required to publish to crates.io

* Add more licenses
2023-08-04 18:33:05 +02:00
Andrei Eres 7c89f2886e Fix flaky reputation change test (#7550)
* Fix flaky reputation change test

* Remove fixme

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

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
2023-08-04 14:27:55 +00:00
Branislav Kontur ee54e62c90 [xcm] GlobalConsensusConvertsFor for remote relay chain (based on pevious GlobalConsensusParachainConvertsFor) (#7517)
* [xcm] `GlobalConsensusConvertsFor` for remote relay chain (based on previous GlobalConsensusParachainConvertsFor)

* Typo

* PR fix (constants in test)

* Re-export of `GlobalConsensusConvertsFor`

* assert to panic

* Update xcm/src/v3/multiasset.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

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

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

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

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Review fixes

---------

Co-authored-by: parity-processbot <>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
2023-08-03 08:32:49 +00:00
drskalman 2bbc7a73a3 Companion for Substrate#14373 (#7572)
* rename BEEFY `crypto` →`ecdsa_crypto`

* - bump up `BeefyApi` to version 3
- deal with `PeerId` error.

* update BEEFY dependency names for `fake-runtime` and `chain_spec`
revert Cargo.toml

* cargo fmt

* Use master Cargo.lock

* update lockfile for {"substrate"}

---------

Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: parity-processbot <>
2023-08-02 15:25:12 +00:00
Dmitry Markin 253c505edc [companion] Get rid of Peerset compatibility layer (#7355)
* Update `NetworkPeers` trait interface

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-08-02 13:37:12 +00:00
eskimor 367098bae5 Take into account size as well in weight limiting. (#7369)
* Take into account size as well in weight limiting.

* Fix logging.

* More logs.

* Remove randomized selection in provisioner

No longer supported by runtime.

* Fix and simplify weight calculation.

Random filtering of remote disputes got dropped.

* Make existing tests pass.

* Tests for size limiting.

* Fix provisioner.

* Remove rand dependency.

* Better default block length for tests.

* ".git/.scripts/commands/bench/bench.sh" runtime kusama runtime_parachains::paras_inherent

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot runtime_parachains::paras_inherent

* ".git/.scripts/commands/bench/bench.sh" runtime westend runtime_parachains::paras_inherent

* Update runtime/parachains/src/paras_inherent/mod.rs

Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>

* Update runtime/parachains/src/paras_inherent/mod.rs

Co-authored-by: Chris Sosnin <48099298+slumber@users.noreply.github.com>

* Add back missing line.

* Fix test.

* fmt fix.

* Add missing test annotation

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: command-bot <>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
Co-authored-by: Chris Sosnin <48099298+slumber@users.noreply.github.com>
2023-08-01 12:43:54 +00:00
Branislav Kontur 4980b64497 XcmContext to buy_weight / refund_weight (#7563)
* added XcmContext to WeightTrader trait

* cargo fmt

* make xcm context optional

* make compile

* fix compile

* `XcmContext` to `buy_weight / refund_weight`

---------

Co-authored-by: Patricio Napoli <hi@patricionapoli.dev>
Co-authored-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: parity-processbot <>
2023-08-01 11:04:52 +00:00
Marcin S f226cd5ac9 PVF: Fix external workers being required for non-collator full nodes (#7566)
* PVF: Fix external workers being required for non-collator full nodes

* Fix

* Make check more precise

> This might as well be if role.is_authority() as there aren't really any nodes
> that are both authorities and collators. But if there were a node that is an
> authority and a collator, it'd probably want to validate candidates (in its
> role as an authority).

* Just seeing if this fixes zombienet CI...
2023-08-01 07:53:01 +00:00
Marcin S 85b06f18b9 98.6% OF DEVELOPERS CANNOT REVIEW THIS PR! [read more...] (#7337)
* [WIP] PVF: Split out worker binaries

* Address compilation problems and re-design a bit

* Reorganize once more, fix tests

* Reformat with new nightly to make `cargo fmt` test happy

* Address `clippy` warnings

* Add temporary trace to debug zombienet tests

* Fix zombienet node upgrade test

* Fix malus and its CI

* Fix building worker binaries with malus

* More fixes for malus

* Remove unneeded cli subcommands

* Support placing auxiliary binaries to `/usr/libexec`

* Fix spelling

* Spelling

Co-authored-by: Marcin S. <marcin@realemail.net>

* Implement review comments (mostly nits)

* Fix worker node version flag

* Rework getting the worker paths

* Address a couple of review comments

* Minor restructuring

* Fix CI error

* Add tests for worker binaries detection

* Improve tests; try to fix CI

* Move workers module into separate file

* Try to fix failing test and workers not printing latest version

- Tests were not finding the worker binaries
- Workers were not being rebuilt when the version changed
- Made some errors easier to read

* Make a bunch of fixes

* Rebuild nodes on version change

* Fix more issues

* Fix tests

* Pass node version from node into dependencies to avoid recompiles

- [X] get version in CLI
- [X] pass it in to service
- [X] pass version along to PVF
- [X] remove rerun from service
- [X] add rerun to CLI

- [X] don’t rerun pvf/worker’s (these should be built by nodes which have rerun enabled)

* Some more improvements for smoother tests

- [X] Fix tests
- [X] Make puppet workers pass None for version and remove rerun
- [X] Make test collators self-contained

* Add back rerun to PVF workers

* Move worker binaries into files in cli crate

As a final optimization I've separated out each worker binary from its own crate
into the CLI crate. Before, the worker bin shared a crate with the worker lib,
so when the binaries got recompiled so did the libs and everything transitively
depending on the libs. This commit fixes this regression that was causing
recompiles after every commit.

* Fix bug (was passing worker version for node version)

* Move workers out of cli into root src/bin/ dir

- [X] Pass in node version from top-level (polkadot)
- [X] Add build.rs with rerun-git-head to root dir

* Add some sanity checks for workers to dockerfiles

* Update malus

  + [X] Make it self-contained
  + [X] Undo multiple binary changes

* Try to fix clippy errors

* Address `cargo run` issue

- [X] Add default-run for polkadot
- [X] Add note about installation to error

* Update readme (installation instructions)

* Allow disabling external workers for local/testing setups

  + [X] cli flag to enable single-binary mode
  + [X] Add message to error

* Revert unnecessary Cargo.lock changes

* Remove unnecessary build scripts from collators

* Add back missing malus commands (should fix failing ZN job)

* Some minor fixes

* Update Cargo.lock

* Fix some build errors

* Undo self-contained binaries; cli flag to disable version check

  + [X] Remove --dont-run-external-workers
  + [X] Add --disable-worker-version-check
  + [X] Remove PVF subcommands
  + [X] Redo malus changes

* Try to fix failing job and add some docs for local tests

---------

Co-authored-by: Dmitry Sinyavin <dmitry.sinyavin@parity.io>
Co-authored-by: s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com>
Co-authored-by: parity-processbot <>
2023-07-31 13:35:42 +00:00
Chris Sosnin 9d2cee1b08 drop wip label (#7559) 2023-07-28 17:58:37 +00:00
Sergejs Kostjucenko 9354598e4a Fix publish dockerhub description ci jobs (#7558)
* fix var names in ci

* fix formatting
2023-07-28 14:50:46 +01:00
Chevdor c11d8d928e Fix matrix rooms (#7143)
* Fix matrix rooms

* Switch to V2 tokens

* Fix bots and tokens (secrets)

* Add new notif

ref. #7143

* Fix secret name

* Add new line

* Remove erroneous comment

---------

Co-authored-by: parity-processbot <>
2023-07-28 13:05:57 +00:00
Sergejs Kostjucenko 11af1cea68 Fix ci syntax (#7553)
* fix ci syntax

* change to trigger ci
2023-07-28 11:24:42 +03:00
Sergejs Kostjucenko 05eed8a7d4 fix description filename (#7552) 2023-07-27 22:04:17 +03:00
Sergejs Kostjucenko ed0bedc6cf Publish docker image description (#7551)
* Add CI job to publish Docker images description to dockerhub

* add destination dockerhub repo
2023-07-27 17:49:33 +03:00
Marijn Schouten 1f372d8335 change HashFor to HashingFor (#7465)
* change HashFor to HashingFor

* Update node/service/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Bump Substrate

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

* Revert "Bump Substrate"

This reverts commit 5df19d03e85a7d39c8c7faa8b5f0f2225751d19a.

* Bump Substrate

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

* fmt

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: Bastian Köcher <git@kchr.de>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-07-25 17:07:36 +00:00
Anton 7a1d96e1ce [Substrate companion] update libp2p to 0.52.0 (#7472)
* update tinyvec to 1.6.0

* update once_cell to 1.18.0

* update data-encoding to 2.4.0

* update libc

* update js-sys

* update wasm-bindgen-futures

* update pin-project

* update tokio

* update syn

* p2p protocol now contains `PeerId`

not multihash

* update arrayvec to 0.7.4

* update sha2

* update smallvec

* updates to Cargo.lock after merge

* redo dep updates

* update lru

in attempt to compile polkadot

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-07-25 14:24:59 +00:00
RadiumBlock 30e1c2a551 Added RadiumBlock bootnodes (#7519) 2023-07-25 15:10:11 +02:00
Andrei Sandu 57169b22b9 ParachainsInherent: apply weight limit only in ProvideInherent (#7530)
* move filtering and panic in enter

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

* typo

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

* more typo

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

* review feedback

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

* 🤦🤦🤦 Test only `polkadot-runtime-parachains`

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

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
2023-07-25 09:00:44 +00:00