* Use set_balance instead of write_balance in benchmark
* Another approach
* Use BalanceOf::<T>::max_value() / 1000
* use a regular div instead of a checked one
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.
* wasm-builder: Make `hash` and `date` optional
Apparently there are installations where the `hash` and `date` is optional.
Closes: https://github.com/paritytech/substrate/issues/14335
* ".git/.scripts/commands/fmt/fmt.sh"
---------
Co-authored-by: command-bot <>
* sc-tracing: Only print events for whitelisted targets
We should only print events for whitelisted targets, otherwise we may run into some stack overflow
while printing the event.
* Update client/tracing/src/lib.rs
Co-authored-by: Koute <koute@users.noreply.github.com>
* Fix
---------
Co-authored-by: Koute <koute@users.noreply.github.com>
* sp-api: Support nested transactions
Adds support for nested transactions in `sp-api` by using `execute_in_transaction`. This was working
until a recent refactor, but this was actually not intended. However, supporting nested transactions
is a worthwhile feature to have. So, this pr "brings it back" and adds a test to ensure it will not break.
* Make clippy happy
* Assert that the runtime api type is not unwind safe
* Count number of transactions
* 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
* metadata-ir: Add extrinsic type info to decode address, call, sig
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame-metadata: Point to unreleased branch
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata-ir: Include addrees, call, signature in V15 conversion
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata-ir: Include extra ty
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* construct_runtime: Extract address,call,sig,extra ty from tx type
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Check metadata populates xt types correctly
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata-ir/tests: Add extra fields on ExtrinsicMetadataIR
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/traits: Expand the `Extrinsic::SignaturePayload`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Adjust to new `Extrinsic` associated types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata: Simplify metadata generation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/example: Adjust to new interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Adjust `extrinsic_metadata_ir_types`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert the additional Extrinsic' associated types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Add `SignaturePayload` marker trait
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Implement SignaturePayload for empty tuple
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust to new SignaturePayload trait
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Adjust `extrinsic_metadata_ir_types` to new interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Adjust pallet test
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Add Extrinsic length prefix to the metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Populate `ExtrinsicMetadataIR` with `len_ty`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update primitives/runtime/src/traits.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Apply cargo fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* v15: Remove len type of the extrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Update frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: parity-processbot <>
This improves the reporting of invalid boot nodes. First, it will only report each boot node once
as invalid and not every time we try to connect to the node. Second, the node will only report for
addresses that we added as startup and not for addresses of the boot node that the node learned from
other nodes.
Closes: https://github.com/paritytech/substrate/issues/13584
Closes: https://github.com/paritytech/polkadot/issues/7385
* frame-metadata: Point to unreleased branch
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Generalize outer enum generation for events and errors
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Remove individual generation of outer enum events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/traits: Add marker trait for outer runtime enums
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Derive Clone, PartialEq, Eq for RuntimeEvents only
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/pallet: Include `#[pallet::error]` enum into pallet parts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata-ir: Include call, event, error types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata: Include outer enum types in V15 metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Ensure `RuntimeError` includes `#[pallet::error]` parts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Document the reserved name for `RuntimeError`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Use self-generated `RuntimeEvent` for `GetRuntimeOuterEnumTypes`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/ui: Fix UI tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Remove unused system path
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/ui: Unexpected field and reintroduce frame_system::Config for RuntimeCall
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Remove `GetRuntimeOuterEnumTypes` marker trait
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Remove `;` from macro
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame-metadata to point to unreleased branch
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Rename error_enum_ty to module_error_enum_ty
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update module_error_ty documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Implement from_dispatch_error
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Adjust test to ModuleErrorType
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Improve documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Check `from_dispatch_error` impl
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Remove the module_error_ty
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Apply fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert unneeded parts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "Revert unneeded parts"
This reverts commit b94bbd16078a025775a48da1095edec1705e6a4d.
Revert "Apply fmt"
This reverts commit 9b1c3e7b4ef27d32e10b35054a99916067e0397b.
Revert "Remove the module_error_ty"
This reverts commit 98de5b24653f9f9ec6ee842b749401b18a01758a.
* Update frame-metadata to origin/master
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Add outerEnums to the metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Add tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Keep backwards compatibility for explicit pallet parts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Rename tt_error_part to be more generic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Increase recursion_limit to 1k
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Rename `fully_expanded` to `expanded`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Improve documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust UI tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update UI tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update undefined_validate_unsigned_part.stderr UI test
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust yet again
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Optimise macro expansions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Use latest frame-metadata and rename `moduleErrorType` to `RuntimeError`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix comment
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Apply fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame/support/procedural/src/construct_runtime/parse.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update frame/support/procedural/src/construct_runtime/parse.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update frame-metadata PR
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Remove `expanded` from error messages and fix typo
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Move docs to the function
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ui: Use the intermed syntax for pallet parts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame-metadata with latest release
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Address feedback for `from_dispatch_error`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Adds ability to prepare/initialize before running `set_code` benchmark
* Fix
* ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system
* Replaced BenchmarkHelper with function
* Fix
* Introduced `set_code_data` for benchmark with default value
* ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system
* (Hope) Final adjustment (because system parachains generates ValidationFunctionStored instead of CodeUpdated)
* ".git/.scripts/commands/bench/bench.sh" pallet dev frame-system
* ".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev frame-system
---------
Co-authored-by: command-bot <>
* expose kademlia replication factor through node CLI
* set default CLI flag value for kademlia_replication_factor
Co-authored-by: Bastian Köcher <git@kchr.de>
* wrap CLI value as Option
* make kademlia replication factor non-optional
---------
Co-authored-by: Bastian Köcher <git@kchr.de>