Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest substrate #28

Open
wants to merge 1,474 commits into
base: Juni/key-value-v0.3.0
Choose a base branch
from
Open

Update to latest substrate #28

wants to merge 1,474 commits into from

Conversation

andskur
Copy link
Member

@andskur andskur commented Dec 13, 2022

βœ„ -----------------------------------------------------------------------------

Thank you for your Pull Request! πŸ™

Before you submit, please check that:

  • Description: You added a brief description of the PR, e.g.:
    • What does it do?
    • What important points should reviewers know?
    • Is there something left for follow-up PRs?
  • Labels: You labeled the PR appropriately if you have permissions to do so:
    • A* for PR status (one required)
    • B* for changelog (one required)
    • C* for release notes (exactly one required)
    • D* for various implications/requirements
    • Github project assignment
  • Related Issues: You mentioned a related issue if this PR is related to it, e.g. Fixes #228 or Related #1337.
  • 2 Reviewers: You asked at least two reviewers to review. If you aren't sure, start with GH suggestions.
  • Style Guide: Your PR adheres to the style guide
    • In particular, mind the maximal line length of 100 (120 in exceptional circumstances).
    • There is no commented code checked in unless necessary.
    • Any panickers in the runtime have a proof or were removed.
  • Runtime Version: You bumped the runtime version if there are breaking changes in the runtime.
  • Docs: You updated any rustdocs which may need to change.
  • Polkadot Companion: Has the PR altered the external API or interfaces used by Polkadot?
    • If so, do you have the corresponding Polkadot PR ready?
    • Optionally: Do you have a corresponding Cumulus PR?

Refer to the contributing guide for details.

After you've read this notice feel free to remove it.
Thank you!

βœ„ -----------------------------------------------------------------------------

serban300 and others added 30 commits September 30, 2022 12:46
* BEEFY: generate historical proofs

Signed-off-by: Serban Iorga <[email protected]>

* Update frame/merkle-mountain-range/rpc/src/lib.rs

Co-authored-by: Adrian Catangiu <[email protected]>

* Update primitives/merkle-mountain-range/src/lib.rs

Co-authored-by: Adrian Catangiu <[email protected]>

* Update frame/merkle-mountain-range/src/lib.rs

Co-authored-by: Adrian Catangiu <[email protected]>

* cargo fmt

* fix off-by-one in leaves powerset generation

* test all possible mmr sizes for historical proofs

* remove now redundant simple_historical_proof

* cargo fmt

Signed-off-by: Serban Iorga <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Robert Hambrock <[email protected]>
* Remove contracts RPCs

* Remove serde as RPC serialization is no longer needed

* Rename folder to match crate name

* Compile fix

* Remove Byte wrapper
…aritytech#12124)

* client/beefy: create communication module and move gossip there

* client/beefy: move beefy_protocol_name module to communication

* client/beefy: move notification module under communication

* client/beefy: add incoming request_response protocol handler

* client/beefy: keep track of connected peers and their progress

* client/beefy: add logic for generating Justif requests

* client/beefy: cancel outdated on-demand justification requests

* try Andre's suggestion for JustificationEngine

* justif engine add justifs validation

* client/beefy: impl OnDemandJustificationsEngine async next()

* move beefy proto name test

* client/beefy: initialize OnDemandJustificationsEngine

* client/tests: allow for custom req-resp protocols

* client/beefy: on-demand-justif: implement simple peer selection strategy

* client/beefy: fix voter initialization

Fix corner case where voter gets a single burst of finality
notifications just when it starts.

The notification stream was consumed by "wait_for_pallet" logic,
then main loop would subscribe to finality notifications, but by that
time some notifications might've been lost.

Fix this by subscribing the main loop to notifications before waiting
for pallet to become available. Share the same stream with the main loop
so that notifications for blocks before pallet available are ignored,
while _all_ notifications after pallet available are processed.

Add regression test for this.

Signed-off-by: acatangiu <[email protected]>

* client/beefy: make sure justif requests are always out for mandatory blocks

* client/beefy: add test for on-demand justifications sync

* client/beefy: tweak main loop event processing order

* client/beefy: run on-demand-justif-handler under same async task as voter

* client/beefy: add test for known-peers

* client/beefy: reorg request-response module

* client/beefy: add issue references for future work todos

* client/beefy: consolidate on-demand-justifications engine state machine

Signed-off-by: acatangiu <[email protected]>

* client/beefy: fix for polkadot companion

* client/beefy: implement review suggestions

* cargo fmt and clippy

* fix merge damage

* fix rust-doc

* fix merge damage

* fix merge damage

* client/beefy: add test for justif proto name

Signed-off-by: acatangiu <[email protected]>
* Fix Weight::is_zero

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add test

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
…h#12402)

* Remove unnecessary Clone trait bounds on CountedStorageMap

* cargo fmt
* beefy-mmr: reuse sp_runtime::traits::Keccak256

* beefy-mmr: use sp_runtime::traits:Hash for generating merkle proofs

* beefy-mmr: use sp_runtime::traits:Hash for validating merkle proofs

* beefy-mmr: remove primitives::Hasher and primitives::Hash

* fixes

* beefy-mmr: reduce the number of generic parameters for merkle_root()

* fix

* compute upper Vec capacity more accurately
* client/beefy: remove bounds on type definitions

* client/beefy: remove gossip protocol legacy name

* client/beefy: simplify justification request response engine

Signed-off-by: Adrian Catangiu <[email protected]>
* Improved election pallet testing

* fmt

* remove comment

* more checks

* fixes in logic

* roll_to_signed

* switch to roll_to_signed

* Update frame/election-provider-multi-phase/src/mock.rs

Co-authored-by: Kian Paimani <[email protected]>

* remove useless checks

* remove warning

* add checks to signed.rs

* add some checks to unsigned.rs

* fmt

* use roll_to_signed and roll_to_unsigned

* remove nonsense

* remove even more nonsense

* fix

* fix

* remove useless checks

Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: parity-processbot <>
* Replace contract access weight by proper PoV component

* Return the whole weight struct from dry-runs

* Fixup `seal_call` and `seal_instantiate`

* Fix duplicate extrinsics

* Remove ContractAccessWeight from runtime

* Fix doc link

* Remove leftover debugging output
* BEEFY client: avoid unnecessary clone

* MMR: impl TypeInfo for some structures
* Implement `Clone` and `Default` for `Config`

* `cargo fmt`

* Remove default config implementation
* Introduce preimages module in traits

* Multisize Preimages

* Len not actually necessary

* Tweaks to the preimage API

* Fixes

* Get Scheduler building with new API

* Scheduler tests pass

* Bounded Scheduler πŸŽ‰

* Use Agenda holes and introduce IncompleteSince to avoid need to reschedule

* Tests pass with new weight system

* New benchmarks

* Add missing file

* Drop preimage when permenantly overeight

* Drop preimage when permenantly overeight

* Referenda uses latest preimage API

* Testing ok

* Adding tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add preimage migration

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Docs

* Remove dbg

* Refactor Democracy

* Refactor Democracy

* Add final MEL

* Remove silly maps

* Fixes

* Minor refactor

* Formatting

* Fixes

* Fixes

* Fixes

* Update frame/preimage/src/lib.rs

Co-authored-by: Shawn Tabrizi <[email protected]>

* Add migrations to Democracy

* WIP

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Resolve conflicts

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Revert "Resolve conflicts"

This reverts commit a89cd0a.

* Undo wrong resolves...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* WIP

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Make compile

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* massage clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* clippy annoyance

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* clippy annoyance

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix benchmarks

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* add missing file

* Test <Preimage as QueryPreimage>

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Clippy harassment

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add test

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fixup tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove old stuff

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Test <Scheduler as Anon> trait functions

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update pallet-ui tests

Why is this needed? Should not be the case unless master is broken...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More scheduler trait test

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Apply review suggestion

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Beauty fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add Scheduler test migration_v3_to_v4_works

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Merge fixup

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Keep referenda benchmarks instantiatable

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use new scheduler weight functions

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use new democracy weight functions

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use weight compare functions

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update pallet-ui tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More renaming…

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More renaming…

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add comment

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Implement OnRuntimeUpgrade for scheduler::v3_to_v4 migration

Put the migration into a proper `MigrateToV4` struct and implement
the OnRuntimeUpgrade hooks for it. Also move the test to use that
instead.

This should make it easier for adding it to Polkadot.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Handle undecodable Agendas

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove trash

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix test

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use new OnRuntimeUpgrade functions

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fix test

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix BoundedSlice::truncate_from

Co-authored-by: jakoblell

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix pre_upgrade hook return values

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add more error logging

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Find too large preimages in the pre_upgrade hook

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Test that too large Calls in agendas are ignored

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use new OnRuntimeUpgrade hooks

Why did the CI not catch this?!

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* works fine - just more logs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix staking migration

Causing issues on Kusama...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix UI tests

No idea why this is needed. This is actually undoing an earlier change.
Maybe the CI has different rustc versions!?

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove multisig's Calls (paritytech#12072)

* Remove multisig's Calls

* Multisig: Fix tests and re-introduce reserve logic (paritytech#12241)

* Fix tests and re-introduce reserve logic

* fix benches

* add todo

* remove irrelevant bench

* [Feature] Add a migration that drains and refunds stored calls (paritytech#12313)

* [Feature] Add a migration that drains and refunds stored calls

* migration fixes

* fixes

* address review comments

* consume the whole block weight

* fix assertions

* license header

* fix interface

Co-authored-by: parity-processbot <>

Co-authored-by: parity-processbot <>
Co-authored-by: Roman Useinov <[email protected]>

* Fix test

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix multisig benchmarks

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* ".git/.scripts/bench-bot.sh" pallet dev pallet_democracy

* ".git/.scripts/bench-bot.sh" pallet dev pallet_scheduler

* ".git/.scripts/bench-bot.sh" pallet dev pallet_preimage

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: parity-processbot <>
Co-authored-by: Roman Useinov <[email protected]>
* upgrade kvdb & co

* remove patch

* update Cargo.lock

* upgrade impl-serde

* fix parsing test

* actually fix it

* FFS
* primitives/beefy: move Payload to its own file

* primitives/beefy: add Payload tests

* primitives/beefy: add MmrRootProvider as custom BEEFY payload provider

* client/beefy: use generic BEEFY 'PayloadProvider'

* primitives/beefy: rename Payload::new to Payload::from_single_entry for clarity

* fix visibility

* fix cargo doc
* Maximum value for MultiplierUpdate

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Stephen Shelton <[email protected]>

* Update lib.rs

* return constant

* fix in runtime

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Kian Paimani <[email protected]>

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Kian Paimani <[email protected]>

* fixes

* remove unused import

* Update lib.rs

* more readable

* fix

* fix nits

Co-authored-by: Stephen Shelton <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
…ty and discovery + revamp of pallet macro documentation (paritytech#12334)

* proof of concept working for pallet::whitelist_storage

* fix comments

* pallet macros docs rewrite WIP

* fix issue with cargo fmt cobbling links

* tweak capitalization

* fix docs for storage_version

* fix docs for pallet::hooks

* fix several comments

* fix invalid link

* fix wrapping and add missing links for pallet::hooks docs

* run rewrap on all text blocks in frame_support::pallet docs

* cargo fmt

* fix up pallet::call_index docs

* fix docs for pallet::extra_constants

* fix docs for pallet::error

* fix docs for pallet::event

* fix docs for pallet::event

* * fix docs for pallet::storage
* fix docs for pallet::getter
* fix docs for pallet::storage_prefix
* fix docs for pallet::unbounded
* fix docs for pallet::whitelist_storage
* fix docs for #[cfg(..)] (for storage items and attributes)
* fix docs for pallet::storage macro expansion

* fix docs for pallet::type_value

* fix docs for pallet::genesis_config

* fix docs for pallet::genesis_build

* fix docs for pallet::inherent

* fix docs for pallet::validate_unsigned

* fix docs for pallet::origin

* fix docs for general notes on instantiable pallets

* fix docs for example of a non-instantiable pallet

* fix docs for example of an instantiable pallet

* fix docs for upgrade guidelines

* fix docs for upgrade guidelines

* fix docs for upgrade checking and final notes

* fix some examples near the beginning

* extract docs for `pallet::whitelist_storage`

* add docs for pallet_macro_stub

* fix order of pallet::config and pallet::constant

* set up stub for pallet::config

* set up stub for pallet::constant

* fix

* set up stub for pallet::disable_frame_system_supertrait_check

* set up stub for pallet::generate_storage_info

* set up stub for pallet::storage_version

* set up stub for pallet::hooks

* set up stub for pallet::weight

* set up stub for pallet::compact

* set up stub for pallet::call_index

* set up stub for pallet::extra_constants

* set up stub for pallet::error

* set up stub for pallet::event

* set up stub for pallet::generate_deposit

* set up stub for pallet::storage

* set up stub for pallet::getter

* set up stub for pallet::storage_prefix

* set up stub for pallet::unbounded

* set up stub for pallet::type_value

* set up stub for pallet::genesis_config

* set up stub for pallet::genesis_build

* set up stub for pallet::inherent

* set up stub for pallet::validate_unsigned

* set up stub for pallet::origin

* fix comment

* cargo fmt

* tweak error message

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Keith Yeung <[email protected]>

* Update frame/support/procedural/src/lib.rs

Co-authored-by: Keith Yeung <[email protected]>

* switch order of derives

Co-authored-by: Squirrel <[email protected]>

* tweak wording

Co-authored-by: Squirrel <[email protected]>

* add more context info about `MAX_MODULE_ERROR_ENCODED_SIZE`

Co-authored-by: Squirrel <[email protected]>

* tweak wording about where clause

Co-authored-by: Squirrel <[email protected]>

* clarify wording about system/events key

Co-authored-by: Squirrel <[email protected]>

* use "The Event enum" instead of "item"

Co-authored-by: Squirrel <[email protected]>

* fix bad wording

Co-authored-by: Squirrel <[email protected]>

* use enum instead of type

Co-authored-by: Squirrel <[email protected]>

* expect => expects

Co-authored-by: Squirrel <[email protected]>

* add additional note about storage prefix

Co-authored-by: Squirrel <[email protected]>

* clearer note about GenesisConfig

Co-authored-by: Squirrel <[email protected]>

* Use "The impl" instead of "The item"

Co-authored-by: Squirrel <[email protected]>

* add note and link to tight-coupling docs

Co-authored-by: Squirrel <[email protected]>

* cargo fmt

* remove spaces around parenthesis

* fix missing text for pallet::config

* fix issue with pallet::constant intro

* fix wording about codec index

* fix pallet::error wording

* fix comment about 1 byte => 256 errors

* fix where clause comment

* fix comment about where pallet events are stored

* rewrap some text

* fix pallet::storage docs

* fix pallet::storage_prefix docs

* tweak docs for pallet::genesis_build

* tweak docs for pallet::config

* specify that pallet::event must be present if pallet::config is present

* add note about why we would want to bypass the supertrait check

* mention that pallet::generate_store attribute is only valid on pallet struct

* add note about adding new calls to the end to maintain existing order

* add note about pallet::type_value and pallet::storage

Co-authored-by: Squirrel <[email protected]>

* add note about using pallet::type_value alongside pallet::storage

* include warning about modifying disaptchables on other pallet::call_index docs page

* fix incorrect comment

* add much more information for pallet::inherent

* move pallet::pallet macro expansion notes back to their rightful place

* re-run CI

* fix macro expansion appearing in wrong place for pallet::pallet

* replicate pallet::pallet docs on the pallet::pallet macro stub

* force CI re-run

Co-authored-by: Keith Yeung <[email protected]>
Co-authored-by: Squirrel <[email protected]>
Co-authored-by: parity-processbot <>
This fixes some warnings on latest nightly.
…paritytech#12386)

* Extend the lower bounds of some of the benchmarks to also include `0`

* Fix verify snippet for `pallet_bounties/spend_funds`
* Define CustomVerify trait

Signed-off-by: Serban Iorga <[email protected]>

* Use ECDSA CustomVerify for MultiSignature

Signed-off-by: Serban Iorga <[email protected]>

* beefy: small simplifications

Signed-off-by: Serban Iorga <[email protected]>

* Revert "Use ECDSA CustomVerify for MultiSignature"

This reverts commit 136cff8.

* Revert "Define CustomVerify trait"

This reverts commit adf91e9.

* Define BeefyAuthorityId and BeefyVerify traits

* Improve BeefyVerify unit tests

Co-authored-by: Robert Hambrock <[email protected]>

* fmt & import sp_core::blake2_256

* Renamings

* remove SignerToAccountId

* fix

Signed-off-by: Serban Iorga <[email protected]>
Co-authored-by: Robert Hambrock <[email protected]>
* Remove "to_block" field from BlockRequests

* Maybe fix the tests
* Vesting pallet - make WithdrawReasons configurable

* Update `pallet-vesting` README

Co-authored-by: parity-processbot <>
…#12441)

* Move Role(s) to `sc-network-common`

* Introduce `NotificationHandshake` type

* Move block announce protocol config creation to `ChainSync`

* Include block announcement into `notification_protocols`

* Apply review comments

* Remove unneeded include

* Add missing include

* Apply review comments
muharem and others added 30 commits December 7, 2022 12:20
* optinal submission deposit and migration

* refund submission deposit call, test, bench

* try runtime fixes

* assert for bench

* Only refund cancelled/approved referenda deposits

* update storage version

Co-authored-by: Gav <[email protected]>
* Remove sandboxing interface

* Remove unused struct
* implement crate publishing from CI

* fix indentation

* use resource_group for job exclusivity

ensure that at most one instance of the publish-crates job is running at any given time to prevent race conditions

* correct publish = false

* Remove YAML anchors as GitLab's `extends:` doesn't need it

* Temporarily force cache upload for the new jobs

* Revert `RUSTY_CACHIER_FORCE_UPLOAD`

* pin libp2p-tcp=0.37.0 for sc-telemetry

* Revert "pin libp2p-tcp=0.37.0 for sc-telemetry"

This reverts commit 29146bf.

* always collect generated crates

* increase timeout for publish-crates-template

* Force upload the new job cache again

* Revert "Force upload the new job cache again"

This reverts commit 5a5feee.

* reformat

* improve timeout explanation

* s/usual/average

Co-authored-by: Vladimir Istyufeev <[email protected]>
* zombienet: warp-sync integration test added

* spelling

* Readme corrected

* dir name updated

* Check second phase of warp sync

* zombienet pipeline enable + naive test network

* zombienet stage added

* paritypr/substrate-debug image added for zombienet testing

* debugs added

* debugs added

* buildah problem fixed

* rollback

* runner tag

* test name corrected

* dir renamed (regex problem)

* common code clean up

* common code clean up

* fix

* warp sync test improvements

* full sha used

as short is too short (https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2051228#L38)

* disable tracing for nodes

* COMMON_USER -> DOCKERIO_USER

* refs reworked

* paritypr/substrate image used

* DOCKERIO -> DOCKER

* generate-ws-db toml cleanup

* improvements

* fix

* raw chain spec used

* zombienet v1.3.18 used

* zombienet: warp sync test enabled

* chain-spec path corrected

* log parsing improved

Checking if log does not container error or verification failed messages

* warp sync test: removed validators

* fix

* review remarks applied

* dir test name changed: 0000_block_building -> 0000-block-building

* transaction finalized test added

* transaction finalized test: error handling improved

* trigger CI job

* trigger CI job

* trigger CI job

* trigger CI job

* Explicitly touch `version.rs` to invalidate the related cache

* zombienet add logs as artifacts

* Revert "Explicitly touch `version.rs` to invalidate the related cache"

This reverts commit 9d00ccf.

* file naming changed

Co-authored-by: parity-processbot <>
Co-authored-by: Vladimir Istyufeev <[email protected]>
Co-authored-by: Javier Viola <[email protected]>
…ableCurrency (paritytech#12798)

* WIP move LockableCurrency to fungibles

* rename Lockable and LockIdentifier to funginbles::*

* fix imports further

* change Lockable from fungible to fungibles

* reintroduce LockableCurrency but marked as deprecated

* fix imports

* fix imports

* cargo fmt

* add allow deprecated warnings

* remove unused benchmark import

* fix some of the docs

* fix failing doctest check

* reexport LockIdentifier and LockableCurrency from support/traits

* reexport LockIdentifier and LockableCurrency from support/traits

* allow using deprecated re-export

* replace LockableCurrency and LockIdentifier with a module alias

* Update frame/support/src/traits/tokens/fungibles/lockable.rs

* Update frame/staking/src/pallet/mod.rs

Co-authored-by: Squirrel <[email protected]>

* Update frame/support/src/traits.rs

Co-authored-by: Squirrel <[email protected]>

* REVERT removing fungibles::Lockable import

Co-authored-by: parity-processbot <>
Co-authored-by: Squirrel <[email protected]>
)

* check if an asset exists via loose coupling

* Update frame/support/src/traits/tokens/fungibles.rs

Co-authored-by: joe petrowski <[email protected]>

Co-authored-by: joe petrowski <[email protected]>
Co-authored-by: parity-processbot <>
* Introduce sensible weight constants

* cargo fmt

* Remove unused import

* Add missing import

* ".git/.scripts/bench-bot.sh" pallet dev pallet_lottery

Co-authored-by: command-bot <>
* cli: Improve pruning documentation

Signed-off-by: Alexandru Vasile <[email protected]>

* cli: Keep `finalized` notation and remove `canonical` one

* cli: Fix cargo doc

* cli: `PruningModeClap` IR enum

Signed-off-by: Alexandru Vasile <[email protected]>

* cli: Convert PruningModeClap into pruning modes

Signed-off-by: Alexandru Vasile <[email protected]>

* cli: Use `PruningModeClap`

Signed-off-by: Alexandru Vasile <[email protected]>

* cli: Rename to `DatabasePruningMode`

Signed-off-by: Alexandru Vasile <[email protected]>

* cli: Implement `FromStr` instead of `clap::ValueEnum`

Signed-off-by: Alexandru Vasile <[email protected]>

* Update client/cli/src/params/pruning_params.rs

Co-authored-by: Bastian KΓΆcher <[email protected]>

* Fix clippy

Signed-off-by: Alexandru Vasile <[email protected]>

* cli: Add option documentation back

Signed-off-by: Alexandru Vasile <[email protected]>

* Apply suggestions from code review

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: Bastian KΓΆcher <[email protected]>
* Don't indefinitely on shutting down Tokio

Now we wait in maximum 60 seconds before we shutdown the node. Tasks are may be leaked and leading
to some data corruption.

* Drink less :thinking_face:
* The message queue

* Make fully generic

* Refactor

* Docs

* Refactor

* Use iter not slice

* Per-origin queues

* Multi-queue processing

* Introduce MaxReady

* Remove MaxReady in favour of ready ring

* Cleanups

* ReadyRing and tests

* Stale page reaping

* from_components -> from_parts

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Move WeightCounter to sp_weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add MockedWeightInfo

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Deploy to kitchensink

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use WeightCounter

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Small fixes and logging

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add service_page

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Typo

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Move service_page below service_queue

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add service_message

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use correct weight function

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Overweight execution

* Refactor

* Missing file

* Fix WeightCounter usage in scheduler

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix peek_index

Take into account that decoding from a mutable slice modifies it.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add tests and bench service_page_item

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add debug_info

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add no-progress check to service_queues

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add more benches

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Bound from_message and try_append_message

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add PageReaped event

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Rename BookStateOf and BookStateFor

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update tests and remove logging

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove redundant per-message origins; add footprint() and sweep_queue()

* Move testing stuff to mock.rs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add integration test

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix no-progress check

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix debug_info

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fixup merge and tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix footprint tracking

* Introduce

* Formatting

* OverweightEnqueued event, auto-servicing config item

* Update tests and benchmarks

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Provide change handler

* Add missing BookStateFor::insert and call QueueChangeHandler

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Docs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update benchmarks and weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More tests...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use weight metering functions

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* weightInfo::process_message_payload is gone

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add defensive_saturating_accrue

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Rename WeightCounter to WeightMeter

Ctr+Shift+H should do the trick.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Test on_initialize

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add module docs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove origin from MaxMessageLen

The message origin is not encoded into the heap and does
therefore not influence the max message length anymore.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add BoundedVec::as_slice

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Test Page::{from_message, try_append_message}

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fixup docs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Docs

* Do nothing in sweep_queue if the queue does not exist

... otherwise it inserts default values into the storage.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Test ring (un)knitting

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Upgrade stress-test

Change the test to not assume that all queued messages will be
processed in the next block but split it over multiple.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More tests...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Beauty fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Rename BoundedVec::as_slice to as_bounded_slice

Conflicts with deref().as_slice() otherwise.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix imports

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove ReadyRing struct

Was used for testing only. Instead use 'fn assert_ring' which also
check the service head and backlinks.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Beauty fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix stale page watermark

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Cleanup

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix test feature and clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* QueueChanged handler is called correctly

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update benches

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Abstract testing functions

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Cleanup

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Simplify tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Make stuff compile

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Extend overweight execution benchmark

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove TODOs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Test service queue with faulty MessageProcessor

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update pallet ui tests to 1.65

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More docs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Review doc fixes

Co-authored-by: Robert Klotzner <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add weight_limit to extrinsic weight of execute_overweight

* Correctly return unused weight

* Return actual weight consumed in do_execute_overweight

* Review fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Set version 7.0.0-dev

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Make it compile

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Switch message_size to u64

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Switch message_count to u64

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix benchmarks

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Make CI green

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Docs

* Update tests

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* ".git/.scripts/bench-bot.sh" pallet dev pallet_message_queue

* Dont mention README.md in the Cargo.toml

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Remove reference to readme

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: parity-processbot <>
Co-authored-by: Robert Klotzner <[email protected]>
Co-authored-by: Keith Yeung <[email protected]>
* zombinet tests: add some timeout to allow net spin-up

Sometimes tests are failing at first try, as the pods were not up yet.
Adding timeout should allow the network to spin up properly.

* initial timeout increased to 30s
* Move import queue out of `sc-network`

Add supplementary asynchronous API for the import queue which means
it can be run as an independent task and communicated with through
the `ImportQueueService`.

This commit removes removes block and justification imports from
`sc-network` and provides `ChainSync` with a handle to import queue so
it can import blocks and justifications. Polling of the import queue is
moved complete out of `sc-network` and `sc_consensus::Link` is
implemented for `ChainSyncInterfaceHandled` so the import queue
can still influence the syncing process.

* Fix tests

* Apply review comments

* Apply suggestions from code review

Co-authored-by: Bastian KΓΆcher <[email protected]>

* Update client/network/sync/src/lib.rs

Co-authored-by: Bastian KΓΆcher <[email protected]>

Co-authored-by: Bastian KΓΆcher <[email protected]>
…12886)

* Trace result in default `jsonrpsee` middleware

* `rpc_metrics::extra`

Co-authored-by: Bastian KΓΆcher <[email protected]>

Co-authored-by: Bastian KΓΆcher <[email protected]>
…s shutdown (paritytech#12897)

* Ensure that we inform all tasks to stop before starting the 60 seconds shutdown

The change of waiting in maximum 60 seconds for the node to shutdown actually introduced a bug. We
were actually waiting always 60 seconds as we didn't informed our tasks to shutdown. The solution to
this problem is to drop the task manager as this will then inform all tasks to end. It also adds
tests to ensure that the behaviors work as expected. (This should already have been done in the
first pr! :()

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

Co-authored-by: command-bot <>
* checked call for desired targets

* fix compile

* fmt

* fix tests

* cleaner with and_then
* ValidateUnsigned: Improve docs.

* Review comments
* jsonrpsee v0.16

add backwards compatibility

run old http server on http only

* cargo fmt

* update jsonrpsee 0.16.1

* less verbose cors log

* fix nit in log: WS -> HTTP

* revert needless changes in Cargo.lock

* remove unused features in tower

* fix nits; add client-core feature

* jsonrpsee v0.16.2
* Fix license

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add mock doc

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
* frame-system: explicit call index

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use explicit call indices

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* pallet-template: explicit call index

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* DNM: Temporarily require call_index

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Revert "DNM: Temporarily require call_index"

This reverts commit c4934e3.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
* don't read slashing spans when taking election snapshot

* update cargo.toml

* bring back remote test

* fix merge stuff

* fix npos-voters function sig

* remove as much redundant diff as you can

* Update frame/staking/src/pallet/mod.rs

Co-authored-by: Andronik <[email protected]>

* fix

* Update frame/staking/src/pallet/impls.rs

* update lock

* fix all tests

* review comments

* fmt

* fix offence bench

* clippy

* ".git/.scripts/bench-bot.sh" pallet dev pallet_staking

Co-authored-by: Andronik <[email protected]>
Co-authored-by: Ankan <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: parity-processbot <>
* Only run pre-v8 migration check for versions older than 8

* Logix fix
* Add debug buffer limit + enforcement

Add debug buffer limit + enforcement

* use BoundedVec for the debug buffer

* revert schedule (debug buf len limit not needed anymore)

* return DispatchError

* addressed review comments
Update to latest substrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.