-
Notifications
You must be signed in to change notification settings - Fork 9
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
refactor: reading state charging weight #127
Comments
(Outdated) |
(Outdated) https://github.com/r0gue-io/pop-cli/blob/b4874220ca58ebb38453c7ab83670f7e0711c674/crates/pop-parachains/src/templates.rs#L168 shows an example of attaching a custom property to an enum using strum, with https://github.com/r0gue-io/pop-cli/blob/b4874220ca58ebb38453c7ab83670f7e0711c674/crates/pop-parachains/src/templates.rs#L194 showing how it can then be obtained. This could be reimplemented as a custom enum property which is statically defined on the enum, and can be used to charge the defined amount of reads/weight BEFORE execution of the read. Your suggestion of attaching it to the output of Yes, a match may be required, but so what. The important thing is accurate weight charging before a read. This can be defined within an additional The point is making it easy to specify the weight/number of reads per query by decorating the enum variant so it is defined in a single place. Returning the value should then be straightforward. |
Closed by #284 |
Read state weight implementation with benchmarks and test coverage (#132 (comment)).
Including proof size (SE).
The text was updated successfully, but these errors were encountered: