-
Notifications
You must be signed in to change notification settings - Fork 636
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
feature: Get compute usage from profile #8783
Conversation
a3c3937
to
f98b98c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Going through gas profiles seems like the best way to me, too. For actions, we will either have to make profiles more general, or perhaps add the compute cost counter for it (on the receipt level) after all.
Just one question, is there a way we can ensure the values in the gas profile are always the same as in the gas counter? Because today profiles are a mere debug tool and we wouldn't necessarily know it it is slightly wrong in some cases. But once compute cost limits are fully implemented, this makes it part of the protocol specification. Any bugs we would find later would require a protocol update to fix.
f98b98c
to
fb40310
Compare
I've added a test in Will file an Issue to track this work. |
This seemed like the simplest approach that introduces minimal overhead and code changes (as opposed to introducing a dedicated field in the GasCounter). Some follow-up work is planned in near#8795
1e846b1
to
7e2610d
Compare
This seemed like the simplest approach that introduced minimal runtime overhead and code changes (as opposed to introducing a dedicated field in the GasCounter). Happy to consider the alternatives though.
Part of #8032
Some follow-up work is planned in #8795