Skip to content
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

Let the max_gas() function in BuiltinActor's take complexity argument(s) #4395

Open
ekovalev opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@ekovalev
Copy link
Member

In the modification made to the BuiltinActor trait (#4345), the new max_gas() function - a counterpart of the "weight()" function for pallets extrinsics, does not accept any arguments, so it can only report a single maximum gas needed for any message processing, regardless of the concrete payload.
To fine-tune this behaviour, we might want to let it take some complexity arguments the way extrinsics weight functions do, so that we can have more accurate estimation of the expected gas budged based on the actual message payload.

This, however, may require further refactoring of the BuiltinActor trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant