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

fees: add per-action block space calculations & representative values #4116

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

aubrika
Copy link
Contributor

@aubrika aubrika commented Mar 27, 2024

Draft example of current best interpretation for #3940 - any Action with a bespoke ActionPlan is currently given a block space value of "64" as a placeholder, but obviously that needs to change, just unsure how based on previous ticket comments.

@cratelyn cratelyn added this to the Sprint 3 milestone Mar 27, 2024
@aubrika aubrika force-pushed the 3940-remove-tx-wide-costs branch from d93f3c9 to e66d183 Compare March 28, 2024 00:37
@aubrika aubrika force-pushed the 3940-remove-tx-wide-costs branch from e66d183 to b14147c Compare March 28, 2024 20:37
@aubrika aubrika requested a review from hdevalence March 28, 2024 21:01
@aubrika
Copy link
Contributor Author

aubrika commented Mar 28, 2024

Added some approximate block space estimates based on the proto fields, but for some data types (e.g. bytes, string) of variable size, I'm unsure if the chosen values (64 bytes?) are good approximations - do you have thoughts @hdevalence ?

Also, are there any actions for which this draft is currently computing the length of the encoding which should be hard-coded? I chose the set of actions with bespoke associated ActionPlans, but I just want to confirm I understood the prior breakdown correctly.

Copy link
Member

@hdevalence hdevalence left a comment

Choose a reason for hiding this comment

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

The numbers seem plausible, it would be good to have comments clarifying:

  • what is being added up
  • why we are not concerned about the exact byte size for the fixed-size actions (e.g., why it's ok to ignore protobuf framing), namely that it makes only a small difference in the action's gas cost and simplifies the accounting

@aubrika aubrika force-pushed the 3940-remove-tx-wide-costs branch from b14147c to ff23599 Compare April 1, 2024 21:54
@aubrika aubrika force-pushed the 3940-remove-tx-wide-costs branch from ff23599 to b00c0b8 Compare April 1, 2024 22:00
@aubrika aubrika force-pushed the 3940-remove-tx-wide-costs branch from b00c0b8 to 6b72b7b Compare April 1, 2024 22:02
@aubrika aubrika force-pushed the 3940-remove-tx-wide-costs branch from 6b72b7b to 8a0478b Compare April 1, 2024 22:12
@aubrika aubrika marked this pull request as ready for review April 1, 2024 23:24
@aubrika aubrika merged commit c0b4ba6 into main Apr 1, 2024
7 checks passed
@aubrika aubrika deleted the 3940-remove-tx-wide-costs branch April 1, 2024 23:25
@aubrika aubrika mentioned this pull request Apr 4, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants