The native runtime will be removed in the near future and thus this function will not be required
anymore.
\# Code changes
Downstream users just need to remove `native_runtime_version` from their implementation of the
`SubstrateCli` trait.
* frame-benchmarking-cli: Remove native dispatch requirement
No need for this, we can just use the `WasmExecutor` directly.
* Fixes
* Pass benchmarking host functions
* Ensure we can pass custom host functions
* fix online/offline confusion
* unified cache file
* multi-threaded babyyy
* checkpoint for niklas
* compiles
* all tests pass with --test-threads 1
* child-tree scrape is also multi-threaded now.
* better thread splitting
* some suggestions (#12532)
* some suggestions
* tokio multithread
* move unused dependencies
* snapshot command
* fix rem
* a bit of cleanup
* support optional checks
* fix
* OCW command migrated to wasm-only, as an example
* state-version management fully in remote-ext
* almost everything move to wasm executor, some CLI flags reduced
* follow-chain works as well
* Master.into()
* everything builds now
* concurrent insertion and download for remote builds
* minor fix
* fix a bug
* checkpoint
* some updates
* fmt
* review comments
* fmt
* fix
* fmt
* update
* fmt
* rename
* fix the damn UI tests
* fmt
* remoe the thread abstraction for the time being
* cleanup
* fix CI
* fmt
* fix
* fix a few more things
* tweak log levels
* better error handling
* address grumbles: use futures::mpsc
* review comments
* fmt
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update utils/frame/try-runtime/cli/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* better api version stuff
* some doc update
* a whole lot of docs
* fmt
* fix all docs
* fmt
* rpc rebase: Try-runtime Revamp and Facelift (#12921)
* Introduce sensible weight constants (#12868)
* 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 <>
* Checkout to the branch HEAD explicitly in `build-linux-substrate` (#12876)
* cli: Improve pruning documentation (#12819)
* cli: Improve pruning documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Keep `finalized` notation and remove `canonical` one
* cli: Fix cargo doc
* cli: `PruningModeClap` IR enum
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Convert PruningModeClap into pruning modes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Use `PruningModeClap`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Rename to `DatabasePruningMode`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Implement `FromStr` instead of `clap::ValueEnum`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update client/cli/src/params/pruning_params.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Add option documentation back
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Apply suggestions from code review
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Revert "Move LockableCurrency trait to fungibles::Lockable and deprecate LockableCurrency (#12798)" (#12882)
This reverts commit 9a014d1ecd.
* Don't indefinitely block on shutting down Tokio (#12885)
* 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:
* General Message Queue Pallet (#12485)
* 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 <oliver.tale-yazdi@parity.io>
* Move WeightCounter to sp_weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add MockedWeightInfo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Deploy to kitchensink
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use WeightCounter
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Small fixes and logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add service_page
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Typo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Move service_page below service_queue
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add service_message
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use correct weight function
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Overweight execution
* Refactor
* Missing file
* Fix WeightCounter usage in scheduler
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix peek_index
Take into account that decoding from a mutable slice modifies it.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add tests and bench service_page_item
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add debug_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add no-progress check to service_queues
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add more benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Bound from_message and try_append_message
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add PageReaped event
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Rename BookStateOf and BookStateFor
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update tests and remove logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove redundant per-message origins; add footprint() and sweep_queue()
* Move testing stuff to mock.rs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add integration test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix no-progress check
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix debug_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fixup merge and tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix footprint tracking
* Introduce
* Formatting
* OverweightEnqueued event, auto-servicing config item
* Update tests and benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Provide change handler
* Add missing BookStateFor::insert and call QueueChangeHandler
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update benchmarks and weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More tests...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use weight metering functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* weightInfo::process_message_payload is gone
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add defensive_saturating_accrue
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Rename WeightCounter to WeightMeter
Ctr+Shift+H should do the trick.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test on_initialize
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add module docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Add BoundedVec::as_slice
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test Page::{from_message, try_append_message}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fixup docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Test ring (un)knitting
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* More tests...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Beauty fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Rename BoundedVec::as_slice to as_bounded_slice
Conflicts with deref().as_slice() otherwise.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Beauty fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix stale page watermark
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Cleanup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix test feature and clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* QueueChanged handler is called correctly
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Abstract testing functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Cleanup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Simplify tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Make stuff compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Extend overweight execution benchmark
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove TODOs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test service queue with faulty MessageProcessor
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update pallet ui tests to 1.65
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Review doc fixes
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Set version 7.0.0-dev
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Make it compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Switch message_size to u64
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Switch message_count to u64
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Make CI green
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Docs
* Update tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/bench-bot.sh" pallet dev pallet_message_queue
* Dont mention README.md in the Cargo.toml
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove reference to readme
Signed-off-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 <>
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* zombienet timings adjusted (#12890)
* 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` (#12764)
* 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 <git@kchr.de>
* Update client/network/sync/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Trace response payload in default `jsonrpsee` middleware (#12886)
* Trace result in default `jsonrpsee` middleware
* `rpc_metrics::extra`
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Ensure that we inform all tasks to stop before starting the 60 seconds shutdown (#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 <>
* Safe desired targets call (#12826)
* checked call for desired targets
* fix compile
* fmt
* fix tests
* cleaner with and_then
* Fix typo (#12900)
* ValidateUnsigned: Improve docs. (#12870)
* ValidateUnsigned: Improve docs.
* Review comments
* rpc server with HTTP/WS on the same socket (#12663)
* 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
* `pallet-message-queue`: Fix license (#12895)
* Fix license
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add mock doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use explicit call indices (#12891)
* frame-system: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use explicit call indices
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* pallet-template: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* DNM: Temporarily require call_index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "DNM: Temporarily require call_index"
This reverts commit c4934e312e12af72ca05a8029d7da753a9c99346.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Pin canonincalized block (#12902)
* Remove implicit approval chilling upon slash. (#12420)
* 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 <write@reusable.software>
* 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 <write@reusable.software>
Co-authored-by: Ankan <ankan.anurag@gmail.com>
Co-authored-by: command-bot <>
* bounties calls docs fix (#12909)
Co-authored-by: parity-processbot <>
* pallet-contracts migration pre-upgrade fix for v8 (#12905)
* Only run pre-v8 migration check for versions older than 8
* Logix fix
* use custom environment for publishing crates (#12912)
* [contracts] Add debug buffer limit + enforcement (#12845)
* 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
* frame/remote-externalities: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/rpc: Add previous export
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fixup some wrong dependencies (#12899)
* Fixup some wrong dependencies
Dev dependencies should not appear in the feature list. If features are required, they should be
directly enabled for the `dev-dependency`.
* More fixups
* Fix fix
* Remove deprecated feature
* Make all work properly and nice!!
* FMT
* Fix formatting
* add numerator and denominator to Rational128 Debug impl and increase precision of float representation (#12914)
* Fix state-db pinning (#12927)
* Pin all canonicalized blocks
* Added a test
* Docs
* [ci] add job switcher (#12922)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Vlad <vladimir@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: Aaro Altonen <48052676+altonen@users.noreply.github.com>
Co-authored-by: tgmichel <telmo@purestake.com>
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: Luke Schoen <ltfschoen@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Andronik <write@reusable.software>
Co-authored-by: Ankan <ankan.anurag@gmail.com>
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
Co-authored-by: Dino Pačandi <3002868+Dinonard@users.noreply.github.com>
Co-authored-by: João Paulo Silva de Souza <77391175+joao-paulo-parity@users.noreply.github.com>
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
* Revert "rpc rebase: Try-runtime Revamp and Facelift (#12921)"
This reverts commit 4ce770a9cb8daf1401529bda7d974b8c703f6b3e.
* Lexnv/kiz revamp try runtime stuff (#12932)
* Introduce sensible weight constants (#12868)
* 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 <>
* Checkout to the branch HEAD explicitly in `build-linux-substrate` (#12876)
* cli: Improve pruning documentation (#12819)
* cli: Improve pruning documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Keep `finalized` notation and remove `canonical` one
* cli: Fix cargo doc
* cli: `PruningModeClap` IR enum
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Convert PruningModeClap into pruning modes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Use `PruningModeClap`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Rename to `DatabasePruningMode`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Implement `FromStr` instead of `clap::ValueEnum`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update client/cli/src/params/pruning_params.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Add option documentation back
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Apply suggestions from code review
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Revert "Move LockableCurrency trait to fungibles::Lockable and deprecate LockableCurrency (#12798)" (#12882)
This reverts commit 9a014d1ecd.
* Don't indefinitely block on shutting down Tokio (#12885)
* 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:
* General Message Queue Pallet (#12485)
* 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 <oliver.tale-yazdi@parity.io>
* Move WeightCounter to sp_weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add MockedWeightInfo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Deploy to kitchensink
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use WeightCounter
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Small fixes and logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add service_page
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Typo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Move service_page below service_queue
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add service_message
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use correct weight function
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Overweight execution
* Refactor
* Missing file
* Fix WeightCounter usage in scheduler
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix peek_index
Take into account that decoding from a mutable slice modifies it.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add tests and bench service_page_item
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add debug_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add no-progress check to service_queues
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add more benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Bound from_message and try_append_message
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add PageReaped event
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Rename BookStateOf and BookStateFor
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update tests and remove logging
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove redundant per-message origins; add footprint() and sweep_queue()
* Move testing stuff to mock.rs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add integration test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix no-progress check
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix debug_info
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fixup merge and tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix footprint tracking
* Introduce
* Formatting
* OverweightEnqueued event, auto-servicing config item
* Update tests and benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Provide change handler
* Add missing BookStateFor::insert and call QueueChangeHandler
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update benchmarks and weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More tests...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use weight metering functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* weightInfo::process_message_payload is gone
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add defensive_saturating_accrue
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Rename WeightCounter to WeightMeter
Ctr+Shift+H should do the trick.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test on_initialize
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add module docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Add BoundedVec::as_slice
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test Page::{from_message, try_append_message}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fixup docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Test ring (un)knitting
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* More tests...
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Beauty fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Rename BoundedVec::as_slice to as_bounded_slice
Conflicts with deref().as_slice() otherwise.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Beauty fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix stale page watermark
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Cleanup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix test feature and clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* QueueChanged handler is called correctly
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Abstract testing functions
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Cleanup
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Clippy
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Simplify tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Make stuff compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Extend overweight execution benchmark
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove TODOs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Test service queue with faulty MessageProcessor
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update pallet ui tests to 1.65
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Review doc fixes
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* 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 <oliver.tale-yazdi@parity.io>
* Set version 7.0.0-dev
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Make it compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Switch message_size to u64
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Switch message_count to u64
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix benchmarks
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Make CI green
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Docs
* Update tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/bench-bot.sh" pallet dev pallet_message_queue
* Dont mention README.md in the Cargo.toml
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove reference to readme
Signed-off-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 <>
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* zombienet timings adjusted (#12890)
* 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` (#12764)
* 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 <git@kchr.de>
* Update client/network/sync/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Trace response payload in default `jsonrpsee` middleware (#12886)
* Trace result in default `jsonrpsee` middleware
* `rpc_metrics::extra`
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Ensure that we inform all tasks to stop before starting the 60 seconds shutdown (#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 <>
* Safe desired targets call (#12826)
* checked call for desired targets
* fix compile
* fmt
* fix tests
* cleaner with and_then
* Fix typo (#12900)
* ValidateUnsigned: Improve docs. (#12870)
* ValidateUnsigned: Improve docs.
* Review comments
* rpc server with HTTP/WS on the same socket (#12663)
* 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
* `pallet-message-queue`: Fix license (#12895)
* Fix license
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add mock doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use explicit call indices (#12891)
* frame-system: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use explicit call indices
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* pallet-template: explicit call index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* DNM: Temporarily require call_index
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Revert "DNM: Temporarily require call_index"
This reverts commit c4934e312e12af72ca05a8029d7da753a9c99346.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Pin canonincalized block (#12902)
* Remove implicit approval chilling upon slash. (#12420)
* 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 <write@reusable.software>
* 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 <write@reusable.software>
Co-authored-by: Ankan <ankan.anurag@gmail.com>
Co-authored-by: command-bot <>
* bounties calls docs fix (#12909)
Co-authored-by: parity-processbot <>
* pallet-contracts migration pre-upgrade fix for v8 (#12905)
* Only run pre-v8 migration check for versions older than 8
* Logix fix
* use custom environment for publishing crates (#12912)
* [contracts] Add debug buffer limit + enforcement (#12845)
* 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
* frame/remote-externalities: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/rpc: Add previous export
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fixup some wrong dependencies (#12899)
* Fixup some wrong dependencies
Dev dependencies should not appear in the feature list. If features are required, they should be
directly enabled for the `dev-dependency`.
* More fixups
* Fix fix
* Remove deprecated feature
* Make all work properly and nice!!
* FMT
* Fix formatting
* add numerator and denominator to Rational128 Debug impl and increase precision of float representation (#12914)
* Fix state-db pinning (#12927)
* Pin all canonicalized blocks
* Added a test
* Docs
* [ci] add job switcher (#12922)
* Use LOG_TARGET in consensus related crates (#12875)
* Use shared LOG_TARGET in consensus related crates
* Rename target from "afg" to "grandpa"
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Vlad <vladimir@parity.io>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: Aaro Altonen <48052676+altonen@users.noreply.github.com>
Co-authored-by: tgmichel <telmo@purestake.com>
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: Luke Schoen <ltfschoen@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>
Co-authored-by: Andronik <write@reusable.software>
Co-authored-by: Ankan <ankan.anurag@gmail.com>
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
Co-authored-by: Dino Pačandi <3002868+Dinonard@users.noreply.github.com>
Co-authored-by: João Paulo Silva de Souza <77391175+joao-paulo-parity@users.noreply.github.com>
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Co-authored-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
Co-authored-by: Davide Galassi <davxy@datawok.net>
* Revert "Lexnv/kiz revamp try runtime stuff (#12932)"
This reverts commit 378cfb26d984bcde467781f07ef8ddb6998212cb.
* fmt
* update
* fix publish
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Vlad <vladimir@parity.io>
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: Aaro Altonen <48052676+altonen@users.noreply.github.com>
Co-authored-by: tgmichel <telmo@purestake.com>
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
Co-authored-by: Luke Schoen <ltfschoen@users.noreply.github.com>
Co-authored-by: Arkadiy Paronyan <arkady.paronyan@gmail.com>
Co-authored-by: Andronik <write@reusable.software>
Co-authored-by: Ankan <ankan.anurag@gmail.com>
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
Co-authored-by: Dino Pačandi <3002868+Dinonard@users.noreply.github.com>
Co-authored-by: João Paulo Silva de Souza <77391175+joao-paulo-parity@users.noreply.github.com>
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Davide Galassi <davxy@datawok.net>
* First rough draft for BABE revert
* Proper babe revert test
* Cleanup
* Test trivial cleanup
* Fix to make clippy happy
* Check polkadot companion
* Check cumulus companion
* Remove babe's blocks weight on revert
* Handle "empty" blockchain edge case
* Run companions
* Simplify the filter predicate
* Saturating sub is not required
* Run pipeline
* Run pipeline again...
* [10892-integrate-try-runtime-into-node-template] - Integrated try-runtime into node template
* [10892-integrate-try-runtime-into-node-template] Added match arms for try-runtime in command.rs
* [10892-integrate-try-runtime-into-node-template] Added match arms for try-runtime in command.rs
* Added feature flag for try-runtime in node-template/node and enabled try-runtime for node-template/runtime
* Added missing type annotations for try-runtime SubCommand in node-template
* Added missing type annotations for try-runtime SubCommand in node-template
* Implemented frame_try_runtime::TryRuntime<Block> for the node-template Runtime
* Removal of light client from substrate
* add missing import
* These tests relate to there being light and non light clients.
* removing lightnodes from test
* cargo fmt
* not needed
* LightDataChecker not needed any longer
* cargo fmt
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* cargo fmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Split native executor stuff from wasm executor stuff
* Remove `native_runtime_version` in places
* Fix warning
* Fix test warning
* Remove redundant NativeRuntimeInfo trait
* Add a warning for use_native
* Run cargo fmt
* Revert "Add a warning for use_native"
This reverts commit 9494f765a06037e991dd60524f2ed1b14649bfd6.
* Make choosing an executor (native/wasm) an explicit part of service construction
* Add Cargo.lock
* Rename Executor to ExecutorDispatch
* Update bin/node/executor/src/lib.rs
Co-authored-by: Squirrel <gilescope@gmail.com>
* Fix tests
* Fix minor node-executor error
* Fix node cli command thing
Co-authored-by: Squirrel <gilescope@gmail.com>
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com>
* make helper error types generics
* avoid From<io::Error> dep in runner helper logic
* slip of the pen, bump futures to 0.3.9
* more generics
* generic var spaces
Co-authored-by: Andronik Ordian <write@reusable.software>
* network-gossip: add metric for number of local messages (#7871)
* network-gossip: add metric for number of local messages
* grandpa: fix GossipEngine missing metrics registry parameter
* network-gossip: increase known messages cache size
* network-gossip: fix tests
* grandpa: remove unnecessary clone
Co-authored-by: Max Inden <mail@max-inden.de>
* network-gossip: count registered and expired messages separately
* network-gossip: add comment on known messages cache size
* network-gossip: extend comment with cache size in memory
Co-authored-by: Max Inden <mail@max-inden.de>
* Clean-up pass in network/src/protocol.rs (#7889)
* Remove statistics system
* Remove ContextData struct
* Remove next_request_id
* Some TryFrom nit-picking
* Use constants for peer sets
* contracts: Don't read the previous value when overwriting a storage item (#7879)
* Add `len` function that can return the length of a storage item efficiently
* Make use of the new len function in contracts
* Fix benchmarks
* cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* Remove unused imports
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
* Fix clear prefix check to avoid erasing child trie roots. (#7848)
* Fix clear prefix check to avoid erasing child trie roots.
* Renaming and extend existing test with check.
* last nitpicks.
* use follow paths to std standarad components
* line width
Co-authored-by: Bernhard Schuster <bernhard@parity.io>
Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
This fixes the handling of base-path when using `key insert`. Before
the base-path wasn't setup correctly, as done when starting a node. This
resulted in putting the keys into the wrong directory. This pr fixes
this by creating the correct base-path/config dir for the keystore.
Besides that it also removes the insert command from `subkey` as it
doesn't make that much sense. If requested, we could bring it back later.
The function takes a closure that resolved before to a `TaskManager`,
now it resolves to a `Future` which output is a `TaskManager`. This is
required for node setups that are async.
* draft
* revert
* WIP
* all that remains is tests
* update Cargo.lock
* tests WIP
* WIP refactor node-template-runtime and node-runtime
* implments sc_cli::RuntimeAdapter for node_template_runtime::Runtime
* final draft
* fix update_config for subcommands
* proper AccountId decoding
* test-runtime tests
* revert
* move RuntimeAdapter to cli-utils
* use &'static str for TryFrom::<&'a str>::Error for Ss58AddressFormat
* tests
* add frame-system to sc-cli dev-dependencies
* add frame-system to sc-cli dev-dependencies
* fix ui test
* wip
* fixed inspect test
* bump impl version
* bump impl version, fixx spaces remove todos
* pallet-balances-cli, rustc for some reason cannot resolve pallet_balances_cli in node-cli 😩
* wip
* Subcommand::run takes &self
* can't believe i missed that 🤦🏾♂️
* bump wasm-bindgen for some reason
* adds key subcommand, rename generate-node-key to generate-node-id
* cargo update and crossed fingers 🤞🏽
* update ui test
* update more ui tests
* should be all good now
* revert subkey change
* revert subkey change
* adds frame-utilities-cli
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
* removes frame from sc-cli, fix license
* my editor and ci disagrees on line width
* bump spec version
* turn off default features for parity-scale-codec
* enable full_crypto feature for sp-core in cli-utils
* merge frame-utilities-cli with pallet-balances-cli
* remove full_crypto feature from sp_core in cli-utils
* bump Cargo.lock
* cli-utils -> frame-utils
* rename BlockNumber to GenericNumber, fix spaces
* fix spaces
* construct additional_signed manually
* sign test
* remove unused vars
* implement subkey with frame-utilities-cli and sc_cli
* fix moduleid test
* CI and clion disagree on line widths
* adds associated Params type to SignedExtensionProvider
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
* move some code around
* removes unneccesary generic params
* moves module_id back to frame_utilities_cli
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* remove print_ext
* remove MaybeDisplay from pallet_balances::Trait::Balance
* a lot of stuff tbh
* adds ExtrasParamsBuilder
* remove tests for ModuleIdCmd
* address comments from PR
* bump Cargo.lock
* manually insert key into keystore
* remove unnecessary SharedParams
* add validation to vanity pattern, remove unused arg
* remove SharedParams from Sign, Vanity, Verify
* remove SharedParams from ModuleIdCmd, remove expect from Verify, new line to Cargo.toml
* remove SharedParams from InsertCmd
* 🤦🏾♂️
* deleted prometheus.yml
* move a few things around
* fix vanity test
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* Remove service components and add build_network, build_offchain_workers etc
* Improve transaction pool api
* Remove commented out line
* Add PartialComponents
* Add BuildNetworkParams, documentation
* Remove unused imports in tests
* Apply suggestions from code review
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Remove unused imports in node-bench
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Update SubstrateCli to return String
* Add default implementation for executable_name()
* Use display instead of PathBuf
* Get file_name in default impl of executable_name
* Remove String::from and use .into()
* Use default impl for executable_name()
* Use .as_str() and remove useless .to_string()
* Update only sp-io when running companion build
* Remove unneeded update of sp-io in CI
Co-authored-by: Cecile Tonglet <cecile@parity.io>
* :)
* Slight tidy
* Remove ServiceBuilderCommand
* Remove whitespace
* Keep task manager alive for check_block/import_blocks
* Pass task_manager to run_until_exit
* Make task_manager in run_until_exit and make subcommands async
* Change the async_run fn to return a future and task manager
* async_run should take a result fn
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Fix spaces in export_raw_state
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* WIP
* Making progress
* Almost ready
* Get service tests compiling
* Fix node screenshot
* Line widths
* Fix node cli tests
* Fix node cli warning
* ChainComponents -> ServiceComponents, fix tests
* make spawn_handle public
* Remove spawnnamed impl for taskmanager
* Move the keep alive stuff to the task manager
* Move the telemetry, base path, rpc keep_alive to the service builder
* Make the task manager keep alive an internal detail
* Rewrite the browser start_client future
* Remove run_node etc
* Revert my personal changes to browser-demo/build.sh
* use |config|
* Add a runtime_version function to SubstrateCli
* Reexport role and runtime version from sc cli
* Update Cargo.lock
* runtime_version -> native_runtime_version
* Pass chain spec to native_runtime_version for polkadot
* Fix line widths
* Traitify ServiceComponents Client
Related to #4776
Related to https://github.com/paritytech/polkadot/pull/832
To summarize the changes:
1. I did not manage to validate with types the service's Configuration. But I did reduce the possibility of errors by moving all the "fill" functions to their respective structopts
2. I split params.rs to multiple modules: one module params for just CLI parameters and one module commands for CLI subcommands (and RunCmd). Every command and params are in their own file so things are grouped better together and easier to remove
3. I removed the run and run_subcommand helpers as they are not helping much anymore. Running a command is always a set of 3 commands: 1. init 2. update config 3. run. This still allow the user to change the config before arguments get parsed or right after.
4. I added tests for all subcommands.
5. [deleted]
Overall the aim is to improve the situation with the Configuration and the optional parameters, add tests, make the API more consistent and simpler.
These are a few changes I missed during the refactoring.
1. Initialization issue and boilerplate
Most importantly: part of the `Configuration` initialization was done in `sc_cli::init`. This means the user can not benefit from this initialization boilerplate if they have multiple `Configuration` since `sc_cli::init` can only be called once.
2. Boilerplate for `VersionInfo` and `Configuration`
I'm also answering to the critic of @bkchr on the initialization using version: https://github.com/paritytech/substrate/pull/4692/files/bea809d4c14a2ede953227ac885e3b3f9771c548#r372047238 This will allow initializing a `Configuration` and provide the version by default.
3. Loading the `chain_spec` explicitly
In the past it was done automatically but in some cases we want to delay this. I moved the code to `Configuration.load_spec()` so it can be called later on. `chain_spec` can also be written directly to the `Configuration` without using this `load_spec` helper.
4. [deleted]
5. Fixing issue that prevents the user to override the port
In the refactoring I introduced a bug by mistake that could potentially prevent the CLI user to override the ports if defaults where provided for these ports (only on cumulus).
6. Change task_executor from Box to Arc
This is useful for cumulus where we have 2 nodes with 2 separate Configuration that need to spawn tasks to the same runtime.
7. Renamed TasksExecutorRequired to TaskExecutor
For consistency.
This is related to https://github.com/paritytech/cumulus/issues/24
This is the continuation (and hopefully the end of) #4692
* Restructure node-template so it is clear that node, runtime, and pallets are separated
* Separating to mock and tests
* restructuring runtime to top-level
* updated release script
* updated Cargo.lock