Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Utility/Recovery passthrough always pays a fee. #4953

Merged
merged 5 commits into from
Feb 17, 2020

Conversation

shawntabrizi
Copy link
Member

@shawntabrizi shawntabrizi commented Feb 17, 2020

This PR updates the logic around calculating the weight and fees for passthrough calls in the Utility pallet.

This makes it so that passthrough calls always pay a fee to avoid allowing users to spam the network with potentially free transactions which cost computation.

Additionally we use the FunctionOf struct to standardize the way we calculate custom weight information. The calculations themselves (other than pays_fee = true) should be unchanged.

@shawntabrizi shawntabrizi added A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). labels Feb 17, 2020
bkchr
bkchr previously approved these changes Feb 17, 2020
@shawntabrizi
Copy link
Member Author

@bkchr lets put this on ice, I will try to use @kianenigma new FunctionOf syntax and update all passthrough logic

@shawntabrizi shawntabrizi changed the title Utility passthrough always pays a fee. Utility/Recovery passthrough always pays a fee. Feb 17, 2020
@shawntabrizi shawntabrizi removed the A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). label Feb 17, 2020
@bkchr bkchr merged commit 419e5fd into paritytech:master Feb 17, 2020
@shawntabrizi shawntabrizi deleted the shawntabrizi-utility-always-fee branch February 18, 2020 00:24
General-Beck pushed a commit to General-Beck/substrate that referenced this pull request Feb 18, 2020
* Utility passthrough always pays a fee.

* Use `FunctionOf` instead of Passthrough

* Update recovery passthrough
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants