This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[FRAME Core] New pallets: safe-mode and tx-pause
#12092
Merged
Merged
Changes from all commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
7faa277
Add safe-mode
ggwpez e2f3efe
Update pallet
ggwpez 630cf4a
Add to kitchensink-runtime
ggwpez e29a2ea
Spelling
ggwpez 50a5ddd
Rename to tx-pause
ggwpez 00955c1
Add SafeMode pallet
ggwpez 2b4549b
fmt
ggwpez 59a492a
Automatically disable safe-mode in on_init…
ggwpez c2140af
Add permissionless enable+extend
ggwpez b740f4f
Add repay+slash stake methods
ggwpez 13f2ef6
Add docs
ggwpez 8084258
Fix stakes storage
ggwpez b143cdd
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez 93acbae
Genesis config for safe-mode pallet
ggwpez 8806aa7
Genesis config for safe-mode pallet
ggwpez 956bb70
Rename ExtrinsicName to FunctionName
ggwpez e3b388b
Origin variable duration
ggwpez 57219d4
Rename FunctionName -> CallName
ggwpez 3e421f2
Rename and docs
ggwpez ace1f1c
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez 379b82f
Pallet safe mode tests (#12148)
nuke-web3 7f8688e
Tests for `pallet-tx-pause` (#12259)
nuke-web3 b703957
rename to active/inactive
nuke-web3 722c4f6
Runtime types, fix tests
nuke-web3 1983a4d
WIP safe mode and tx pause {continued} (#12371)
nuke-web3 3a0bec0
Set block number
ggwpez 8902379
dummy weights generated, safe mode
nuke-web3 3ef4045
add repay_reservation call with RepaymentDelay per #10033 feature req…
nuke-web3 9c46c46
make call name optional to allow pausing pallets, handle `Contains` c…
nuke-web3 b8a4fcb
move to full_name notation for all interfaces, last commit introduced…
nuke-web3 f39cc9d
refactor is_paused
nuke-web3 9277178
safe math on safe mode
nuke-web3 46c5f8c
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez 31167d7
Make stuff compile
ggwpez ec7aff6
Compile
ggwpez a53608c
Cleanup & renames
ggwpez f868b5d
Cleanup TxPause pallet
ggwpez eb59831
Fix benches
ggwpez cf3d749
fmt
ggwpez 76e8dc4
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez 7a5b098
Refactor to fungibles::* and rename stuf
ggwpez 2e535ba
Merge branch 'oty-safe-mode-local' into oty-safe-mode
ggwpez a8a2948
Make compile
ggwpez 2f551fb
Fix node config
ggwpez 5292a69
Typos
ggwpez 6b5c820
Remove CausalHoldReason
ggwpez 645c2d0
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez 4aa8f43
Refactor benchmarks and runtime configs
ggwpez 9118a1f
Add traits
ggwpez ddc94a9
Remove old code
ggwpez b65d1d5
Cleanup safe-mode benches
ggwpez 3aa32e2
Update frame/safe-mode/Cargo.toml
ggwpez 2c80c63
Update frame/safe-mode/Cargo.toml
ggwpez b79c9b3
Docs
ggwpez defb00b
Remove getters
ggwpez 5881f47
Update Cargo.lock
ggwpez 1ab26e4
Remove phantom
ggwpez 53bb17e
Fix test
ggwpez c2fc849
Remove phantom
ggwpez 273b7ab
Apply suggestions from code review
ggwpez dda7893
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez f237453
Use new as Origin benchmarking syntax
ggwpez f228a19
Docs
ggwpez ec3baa5
Fix node
ggwpez 0384516
Fix tx-pause benches
ggwpez 1dc0a1f
Renames
ggwpez 8d978f2
Remove duplicate test
ggwpez 4389622
Add docs
ggwpez 27c803a
docs
ggwpez 0079f87
Apply suggestions from code review
ggwpez f66cd4a
Cleanup tests
ggwpez d7d863c
docs
ggwpez c37e497
Cleanup GenesisConfigs
ggwpez 82a8a06
Doc traits
ggwpez ba81f08
Remove PauseTooLongNames
ggwpez 1542959
docs
ggwpez 0e4c0c1
Merge remote-tracking branch 'origin/oty-safe-mode' into oty-safe-mode
ggwpez 16b46d6
Use V2 benchmarking
ggwpez 1f4e223
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez 8915860
Use RuntimeHoldReason
ggwpez d0967a8
Fix kitchensink runtime
ggwpez c56f1f9
Fix CI
ggwpez 055d465
Fix CI
ggwpez 7fbd556
Review
ggwpez c86894b
Rename Stake to Deposit
ggwpez 77456ad
Add docs
ggwpez b80ff71
Add Notify and test it
ggwpez 5ece51a
Fix kitchensink
ggwpez 57dea70
Update frame/safe-mode/src/tests.rs
ggwpez 533bdc9
Update frame/safe-mode/src/tests.rs
ggwpez 2abedb4
Update frame/support/src/traits/safe_mode.rs
ggwpez bbde914
Update frame/support/src/traits/safe_mode.rs
ggwpez e6a8646
Update frame/support/src/traits/safe_mode.rs
ggwpez 05917be
Update frame/support/src/traits/tx_pause.rs
ggwpez 3de3041
Update frame/tx-pause/src/lib.rs
ggwpez b024c1a
Update frame/tx-pause/src/lib.rs
ggwpez bee80ed
Update frame/tx-pause/src/mock.rs
ggwpez 55406a7
Update frame/support/src/traits/safe_mode.rs
ggwpez 78f541e
Simplify code
ggwpez 4643c38
Update frame/support/src/traits/safe_mode.rs
ggwpez f652595
Update frame/support/src/traits/safe_mode.rs
ggwpez 48481d9
Update frame/support/src/traits/safe_mode.rs
ggwpez f1b4f0c
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez de0c81c
Merge remote-tracking branch 'origin/master' into oty-safe-mode
ggwpez a287d99
Fixup merge
ggwpez 80cf834
Make stuff compile
ggwpez f39ca0a
Make tx-pause compile again
ggwpez 9259c64
Fix features
ggwpez 3ed9996
Fix more features
ggwpez 37d9c4d
Merge branch 'master' of https://github.com/paritytech/substrate into…
022f9da
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
93d9e44
Update weights
ggwpez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| [package] | ||
| name = "pallet-safe-mode" | ||
| version = "4.0.0-dev" | ||
| authors = ["Parity Technologies <admin@parity.io>"] | ||
| edition = "2021" | ||
| license = "Apache-2.0" | ||
| homepage = "https://substrate.io" | ||
| repository = "https://github.com/paritytech/substrate/" | ||
| description = "FRAME safe-mode pallet" | ||
|
|
||
| [package.metadata.docs.rs] | ||
| targets = ["x86_64-unknown-linux-gnu"] | ||
|
|
||
| [dependencies] | ||
| codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] } | ||
| frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../benchmarking" } | ||
| frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" } | ||
| frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" } | ||
| scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } | ||
| sp-arithmetic = { version = "16.0.0", default-features = false, path = "../../primitives/arithmetic" } | ||
| sp-runtime = { version = "24.0.0", default-features = false, path = "../../primitives/runtime" } | ||
| sp-std = { version = "8.0.0", default-features = false, path = "../../primitives/std" } | ||
| pallet-balances = { version = "4.0.0-dev", path = "../balances", default-features = false, optional = true } | ||
| pallet-utility = { version = "4.0.0-dev", path = "../utility", default-features = false, optional = true } | ||
| pallet-proxy = { version = "4.0.0-dev", path = "../proxy", default-features = false, optional = true } | ||
|
|
||
| [dev-dependencies] | ||
| sp-core = { version = "21.0.0", path = "../../primitives/core" } | ||
| sp-io = { version = "23.0.0", path = "../../primitives/io" } | ||
| pallet-balances = { version = "4.0.0-dev", path = "../balances" } | ||
| pallet-utility = { version = "4.0.0-dev", path = "../utility" } | ||
| pallet-proxy = { version = "4.0.0-dev", path = "../proxy" } | ||
|
|
||
| [features] | ||
| default = [ "std" ] | ||
| std = [ | ||
| "codec/std", | ||
| "frame-benchmarking/std", | ||
| "frame-support/std", | ||
| "frame-system/std", | ||
| "pallet-balances?/std", | ||
| "pallet-proxy?/std", | ||
| "pallet-utility?/std", | ||
| "scale-info/std", | ||
| "sp-arithmetic/std", | ||
| "sp-core/std", | ||
| "sp-io/std", | ||
| "sp-runtime/std", | ||
| "sp-std/std", | ||
| ] | ||
| runtime-benchmarks = [ | ||
| "frame-benchmarking/runtime-benchmarks", | ||
| "frame-support/runtime-benchmarks", | ||
| "frame-system/runtime-benchmarks", | ||
| "pallet-balances/runtime-benchmarks", | ||
| "pallet-proxy/runtime-benchmarks", | ||
| "pallet-utility/runtime-benchmarks", | ||
| "sp-runtime/runtime-benchmarks", | ||
| ] | ||
| try-runtime = [ | ||
| "frame-support/try-runtime", | ||
| "frame-system/try-runtime", | ||
| "pallet-balances?/try-runtime", | ||
| "pallet-proxy?/try-runtime", | ||
| "pallet-utility?/try-runtime", | ||
| "sp-runtime/try-runtime", | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.