-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/batch call filter #2
base: master
Are you sure you want to change the base?
Conversation
frame/utility/src/lib.rs
Outdated
} | ||
|
||
Err(DispatchErrorWithPostInfo { | ||
post_info: None::<frame_support::pallet_prelude::Weight>.into(), |
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.
Я не совсем так понимал структуру кода в утреннем разговоре
В данном случае у нас post_info: None
говорит о том, что предсказанная цена соответствует итоговой, что в данном случае не правда, т.к вместо вызова мы лишь применили фильтр
В таком случае тут по идее должен быть Some(Weight::default())
Также мне кажется что стоит этот метод назвать dispatch_filtered
, и чтобы он принимал Origin и Call, выполнял все проверки (В т.ч вычислял is_root, что дёшево, т.к Origin это просто enum), и выполнял вызов
В текущем виде дублирование проверки is_root выглядит странно
a1deb4b
to
71662b3
Compare
71662b3
to
8251de8
Compare
8251de8
to
a991ebf
Compare
* Cherry pick all crypto related changes from pull-request paritytech#13311 applied to master's head * Import some stuff just if 'full_crypto' is on * Remove copyright year * Cleanup * First generic BLS draft * Finalize generic implementation * Restore tests * Fix rust docs * Fix after master merge * Fix after master merge * Use double bls with G1 as signature group and verify individual signatures using DLEQ proof. * Fix inclusions and types used within substrate * Remove unused cruft * Restore usage of upstream crates * Fix test * Reduce the diff by aligning Cargo.lock to master * Application-crypto provides bls381 * Implement bls381 for local keystore * Use new generic keystore features * import DoublePublickey[Scheme] from the bls-like root to be less confusing. * fix compilation * Apply suggestions from code review Co-authored-by: Robert Hambrock <[email protected]> * Clean leftovers * - update bls test vector after applying spec change recommendation. - send message as ref. * Different hard junction ids for different bls12 types * update to new bls-like * bls-like → w3f-bls * Make clippy happy * update test vector after replacing hash and crop with hash to field. * cargo fmt * account for paritytech#13972 * hide BLS behind "bls_non_production" feature flag * Remove Cargo.lock entries duplicated in merge * add bls377 to primitives/keystore and client/keystore add bls377 to primitives/application-crypto/ add bls_non_production to primitives/keystore and client/keystore bump up w3f-bls version * rename feature `bls_non_production` to `bls-experimental` --------- Co-authored-by: Davide Galassi <[email protected]> Co-authored-by: André Silva <[email protected]> Co-authored-by: Robert Hambrock <[email protected]>
Description
Adding CallFilter to pallet-utility.
Motivation
The current form of the pallet uses frame_system::Config::BaseCallFilter, which does not allow to disable calls that should not be used in this particular pallet.
Behavior
This PR adds call filtering at the pallet level. Filtering rules are similar to
frame_system::Config::BaseCallFilter
: