Draft
Conversation
CertainLach
requested changes
Mar 1, 2023
frame/utility/src/lib.rs
Outdated
| } | ||
|
|
||
| Err(DispatchErrorWithPostInfo { | ||
| post_info: None::<frame_support::pallet_prelude::Weight>.into(), |
Member
There was a problem hiding this comment.
Я не совсем так понимал структуру кода в утреннем разговоре
В данном случае у нас 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
PraetorP
pushed a commit
that referenced
this pull request
Jul 14, 2023
* 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 <roberthambrock@gmail.com> * 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 <davxy@datawok.net> Co-authored-by: André Silva <andrerfosilva@gmail.com> Co-authored-by: Robert Hambrock <roberthambrock@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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: