-
Notifications
You must be signed in to change notification settings - Fork 122
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 tx-pause pallet to make it easier to pause stuff #771
Conversation
…ausable pallets Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks sound to me. a few suggestions
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
One thing to consider, if the network is being spammed, can we somehow force the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions and suggestions
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See open question at #771 (comment)
I'm not convinced we need string parameters and extrinsic pausing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after run-tests fix
Signed-off-by: Adam Reif <Garandor@manta.network>
* Split UpdateOrigin to PauseOrigin and Upnause origin. Add list of unpausable pallets Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network> * Fix tests and add new ones Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network> * Add pause_pallets extrinsic to pause multiple pallets Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network> * Fix benchmark tests Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network> * Use 2/6 tech committee for PauseOrigin Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network> * update tx-pause tests Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * pause_pallets and weight draft Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * update weight calculation Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * weight test works Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * fix clippy Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * TxPause pallet whitelist in filter Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * change MaxCallNames to 25 Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * rename to NonPausablePallets Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * EnsureMembers not work on manta yet Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> * fix syntax change Signed-off-by: Adam Reif <Garandor@manta.network> Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network> Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com> Signed-off-by: Adam Reif <Garandor@manta.network> Co-authored-by: zqhxuyuan <zqhxuyuan@gmail.com> Co-authored-by: Adam Reif <garandor@manta.network> Signed-off-by: Charles Ferrell <charlie@manta.network>
Description
closes: #769
UpdateOrigin
toPauseOrigin
andUnpauseOrigin
.PauseOrigin
can be both technical committee (1/2) or governance.UnpauseOrigin
is only governanceAdd a special case for function nametxp_pause_all_pallets
which signifies that the whole pallet is filtered and added a new pause extrinsic that accepts an array of pallet names, to make it easier to pause en-masse quickly. Again the pause-origin is used.pause_pallets
andunpause_pallets
where parameter ispallet_name
, whilefunction_names
is get from metadata byGetMetadata
traitpause_transactions
andunpause_transactions
which parameter is bothpallet_name
andVec<function_name>
MaxCallNames
is used for (pre-charge) weight calculation, and it means the extrinsic count of one pallet, current setting to 10. or we may increase to 20?Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
L-
group to this PRA-
andC-
groups to this PRFiles changed
in the Github PR explorer.Situational Notes:
BaseFilter
. Ensure every extrinsic works from front-end. If there's corresponding tool, ensure both work for each other.try-runtime
. This includes migrations inherited from upstream changes, and you can search the diffs for modifications of#[pallet::storage]
items to check for any.authoring_version
: The version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.spec_version
: The version of the runtime specification. A full node will not attempt to use its native runtime in substitute for the on-chain Wasm runtime unless all of spec_name, spec_version, and authoring_version are the same between Wasm and native.impl_version
: The version of the implementation of the specification. Nodes are free to ignore this; it serves only as an indication that the code is different; as long as the other two versions are the same then while the actual code may be different, it is nonetheless required to do the same thing. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the impl_version changing.transaction_version
: The version of the extrinsics interface. This number must be updated in the following circumstances: extrinsic parameters (number, order, or types) have been changed; extrinsics or pallets have been removed; or the pallet order in the construct_runtime! macro or extrinsic order in a pallet has been changed. You can run themetadata_diff.yml
workflow for help. If this number is updated, then thespec_version
must also be updated