Kian Paimani
35eb133baa
Ensure correct variant count in Runtime[Hold/Freeze]Reason ( #1900 )
...
closes https://github.com/paritytech/polkadot-sdk/issues/1882
## Breaking Changes
This PR introduces a new item to `pallet_balances::Config`:
```diff
trait Config {
++ type RuntimeFreezeReasons;
}
```
This value is only used to check it against `type MaxFreeze`. A similar
check has been added for `MaxHolds` against `RuntimeHoldReasons`, which
is already given to `pallet_balances`.
In all contexts, you should pass the real `RuntimeFreezeReasons`
generated by `construct_runtime` to `type RuntimeFreezeReasons`. Passing
`()` would also work, but it would imply that the runtime uses no
freezes at all.
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-10-24 12:01:04 +02:00
Bastian Köcher
f3bf5c1acd
xcm: Change TypeInfo::path to not include staging (#1948 )
...
The `xcm` crate was renamed to `staging-xcm` to be able to publish it to
crates.io as someone as squatted `xcm`. The problem with this rename is
that the `TypeInfo` includes the crate name which ultimately lands in
the metadata. The metadata is consumed by downstream users like
`polkadot-js` or people building on top of `polkadot-js`. These people
are using the entire `path` to find the type in the type registry. Thus,
their code would break as the type path would now be [`staging_xcm`,
`VersionedXcm`] instead of [`xcm`, `VersionedXcm`]. This pull request
fixes this by renaming the path segment `staging_xcm` to `xcm`.
This requires: https://github.com/paritytech/scale-info/pull/197
---------
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com >
2023-10-20 11:21:19 +02:00
yjh
aad80cce31
feat: compute pallet/storage prefix hash at compile time ( #1539 )
...
Since the hash rules of this part of the `pallet_prefix/storage_prefix`
are always fixed, we can put the runtime calculation into compile time.
---
polkadot address: 15ouFh2SHpGbHtDPsJ6cXQfes9Cx1gEFnJJsJVqPGzBSTudr
---------
Co-authored-by: Juan <juangirini@gmail.com >
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-10-03 17:16:46 +02:00
Lulu
391591b6a4
Fix mistakes in Cargo.toml ( #1504 )
2023-09-12 12:41:34 +02:00
Juan
68ab943c65
Remove deprecated pallet_balances's set_balance_deprecated and transfer dispatchables ( #1226 )
...
* remove deprecated dispatchables
* update test
* update tests
* update tests
* add prdocs
* add prdoc
* Update docs/prdoc/pr_1226.prdoc
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
* move prdoc file
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Chevdor <chevdor@users.noreply.github.com >
2023-09-06 16:06:47 +03:00
Juan
bdbe982970
Restructure dispatch macro related exports ( #1162 )
...
* restructure dispatch macro related exports
* moved Dispatchable to lib.rs
* fix .gitignore final newline
* ".git/.scripts/commands/fmt/fmt.sh"
* fix rustdocs
* wip
---------
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
Co-authored-by: command-bot <>
Co-authored-by: ordian <write@reusable.software >
2023-08-31 14:08:44 +03:00
Przemek Rzad
bfb241d7f3
Add missing licenses and tune the scanning workflow ( #1288 )
...
* Add missing Cumulus licenses
* Typo
* Add missing Substrate licenses
* Single job checking the sub-repos in steps
* Remove dates
* Remove dates
* Add missing (C)
* Update FRAME UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update more UI tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-08-30 15:45:49 +03:00
Oliver Tale-Yazdi
dcda0e50f5
Fix build profiles ( #1229 )
...
* Fix build profiles
Closes https://github.com/paritytech/polkadot-sdk/issues/1155
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Manually set version to 1.0.0
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use workspace repo
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* 'Authors and Edition from workspace
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-08-29 13:39:41 +02:00
alvicsam
f441a5fc93
Diener workspacify
...
Signed-off-by: alvicsam <alvicsam@gmail.com >
2023-08-25 11:05:17 +02:00
Oliver Tale-Yazdi
3710edfedc
[FRAME Core] New pallets: safe-mode and tx-pause ( #12092 )
...
* Add safe-mode
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add to kitchensink-runtime
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Spelling
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename to tx-pause
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add SafeMode pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Automatically disable safe-mode in on_init…
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add permissionless enable+extend
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add repay+slash stake methods
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix stakes storage
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Genesis config for safe-mode pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Genesis config for safe-mode pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename ExtrinsicName to FunctionName
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Origin variable duration
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename FunctionName -> CallName
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename and docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Pallet safe mode tests (#12148 )
* Add safe-mode mock runtime
* Add safe-mode tests
* Add ForceEnable- and ForceExtendOrigin
* Start dummy benchmarks
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Tests for `pallet-tx-pause` (#12259 )
* mock added
* tests added
* dummy benchmarks started
* rename to active/inactive
tests broken, in progress
* Runtime types, fix tests
* WIP safe mode and tx pause {continued} (#12371 )
* test coverage on safe mode and tx pause
* benchmarks & tests
* tests passing, use FullNameOf to check tx-pause unfilterables
* naming updates
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Set block number
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* dummy weights generated, safe mode
* add repay_reservation call with RepaymentDelay per #10033 feature requirements
* make call name optional to allow pausing pallets, handle `Contains` correctly for this throughout, doc comments started
* move to full_name notation for all interfaces, last commit introduced 1 more storage read.
* refactor is_paused
* safe math on safe mode
* Make stuff compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Cleanup & renames
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Cleanup TxPause pallet
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* fmt
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Refactor to fungibles::* and rename stuf
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Make compile
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix node config
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Typos
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove CausalHoldReason
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Refactor benchmarks and runtime configs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add traits
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove old code
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Cleanup safe-mode benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/safe-mode/Cargo.toml
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/safe-mode/Cargo.toml
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove getters
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update Cargo.lock
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove phantom
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Remove phantom
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Apply suggestions from code review
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Use new as Origin benchmarking syntax
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix node
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix tx-pause benches
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Renames
* Remove duplicate test
* Add docs
* docs
* Apply suggestions from code review
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
* Cleanup tests
* docs
* Cleanup GenesisConfigs
* Doc traits
* Remove PauseTooLongNames
* docs
* Use V2 benchmarking
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Use RuntimeHoldReason
* Fix kitchensink runtime
* Fix CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix CI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Review
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Rename Stake to Deposit
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add Notify and test it
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix kitchensink
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update frame/safe-mode/src/tests.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/safe-mode/src/tests.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/support/src/traits/safe_mode.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/support/src/traits/safe_mode.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/support/src/traits/safe_mode.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/support/src/traits/tx_pause.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/tx-pause/src/lib.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/tx-pause/src/lib.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/tx-pause/src/mock.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/support/src/traits/safe_mode.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Simplify code
* Update frame/support/src/traits/safe_mode.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/support/src/traits/safe_mode.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Update frame/support/src/traits/safe_mode.rs
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
* Fixup merge
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 >
* Make tx-pause compile again
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix features
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix more features
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* ".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime=dev --target_dir=substrate --pallet=pallet_safe_mode
* Update weights
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Dan Shields <35669742+NukeManDan@users.noreply.github.com >
Co-authored-by: Dan Shields <nukemandan@protonmail.com >
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com >
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com >
Co-authored-by: command-bot <>
2023-08-25 00:56:00 +00:00