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

Use proper weights in the pallet-template #13817

Merged

Conversation

AlexD10S
Copy link
Contributor

@AlexD10S AlexD10S commented Apr 4, 2023

Fix the issue #13761 - Use proper weights in the pallet-template.

Part of the issue paritytech/polkadot-sdk#192

@AlexD10S AlexD10S added the A3-in_progress Pull request is in progress. No review needed at this stage. label Apr 4, 2023
@AlexD10S AlexD10S added the B0-silent Changes should not be mentioned in any release notes label Apr 4, 2023
@AlexD10S AlexD10S requested a review from ggwpez April 4, 2023 20:14
@@ -20,6 +20,7 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive"
frame-benchmarking = { version = "4.0.0-dev", default-features = false, optional = true, path = "../../../../frame/benchmarking" }
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../../../frame/support" }
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../../frame/system" }
sp-std = { version = "5.0.0", default-features = false, path = "../../../../primitives/std" }
Copy link
Member

@ggwpez ggwpez Apr 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just found yourself another issue (if you want obviously 😛).

Getting rid of this and using PhantomData from core::marker instead.

bin/node-template/pallets/template/src/weights.rs Outdated Show resolved Hide resolved
@ggwpez
Copy link
Member

ggwpez commented Apr 4, 2023

FYI you can auto-close the mentioned issue once this merges https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue

@ggwpez ggwpez added A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit. and removed A3-in_progress Pull request is in progress. No review needed at this stage. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Apr 4, 2023
@ggwpez
Copy link
Member

ggwpez commented Apr 5, 2023

Can you still make the CI green please?
Just need to put a () for the WeightInfo in the mock.

@kianenigma kianenigma requested a review from gupnik April 5, 2023 12:14
@AlexD10S AlexD10S linked an issue Apr 5, 2023 that may be closed by this pull request
@AlexD10S
Copy link
Contributor Author

AlexD10S commented Apr 6, 2023

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 9e1fa3d into master Apr 6, 2023
@paritytech-processbot paritytech-processbot bot deleted the alexd10s-use-proper-weights-pallet-template branch April 6, 2023 11:27
gpestana pushed a commit that referenced this pull request Apr 23, 2023
* benchmarking to generate weights file

* add the calculated weights in the extrinsics

* use benchmarking v2 syntax to generate the weights

* minor syntax change when benchmarking

* added WeightInfo in the mock to pass tests

* minor cargo fmt format changes
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
* benchmarking to generate weights file

* add the calculated weights in the extrinsics

* use benchmarking v2 syntax to generate the weights

* minor syntax change when benchmarking

* added WeightInfo in the mock to pass tests

* minor cargo fmt format changes
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. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use proper weights in the pallet-template
6 participants