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

Deprecate FunctionOf #6104

Closed
2 tasks
kianenigma opened this issue May 21, 2020 · 2 comments · Fixed by #6340
Closed
2 tasks

Deprecate FunctionOf #6104

kianenigma opened this issue May 21, 2020 · 2 comments · Fixed by #6340
Assignees
Labels
I7-refactor Code needs refactoring.

Comments

@kianenigma
Copy link
Contributor

kianenigma commented May 21, 2020

Sadly, yes. We recently learned that the whole thing was useless since the scope in which the right hand side of #[weight = { ... }]was being evaluated in already had access to all the parameters. So this is useless, adds only noise. It should be deprecated.

  • Mark FunctionOf as #[deprecated]
  • Remove all users in substrate and polkadot

A good candidate for something to be done #6040.

@kianenigma kianenigma added the I7-refactor Code needs refactoring. label May 21, 2020
@athei athei changed the title Deprecate FunctionOf, Potentially Add Origin to WeighData Deprecate FunctionOf Jun 10, 2020
@athei
Copy link
Member

athei commented Jun 10, 2020

Split off the Origin part to: paritytech/polkadot-sdk#355

@athei athei self-assigned this Jun 10, 2020
@kianenigma
Copy link
Contributor Author

@athei I think this by itself would be mostly code removal and pretty trivial for substrate/polkadot. But, I'd surely flag it as clientnoteworthy, and maybe even consider communicating it in public channels since it might break other projects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I7-refactor Code needs refactoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants