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

cosmic-swingset per action metering #8246

Open
mhofman opened this issue Aug 24, 2023 · 1 comment
Open

cosmic-swingset per action metering #8246

mhofman opened this issue Aug 24, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mhofman
Copy link
Member

mhofman commented Aug 24, 2023

What is the Problem Being Solved?

As part of #7938, cosmic-swingset must reset swingset meters before processing a new action, but not when continuing a previous action that got interrupted because of the block's run policy reaching its limit.

Description of the Design

  • New cosmos x/swingset param to control the number of computrons per action
  • cosmic-swingset reset meters on value derived from params

Security Considerations

None specific to this issue

Scaling Considerations

Prevents runaway execution. Must be careful to chose a value that allows all normal operations

Test Plan

Until we have #8216, we can temporarily patch zoe to only create meters with a hard coded value. This value will only be used for the initial vat creation, until a new action is processed, and thus needs to be high enough to cover startVat.
Then we modify the bootstrap test infrastructure to handle resetting meters similarly to how cosmic-swingset would
Finally we add a bootstrap test with a faulty contract, assert it gets killed when going in a loop, and verify we can still perform other actions on chain after that.

Upgrade Considerations

None specific to this issue

@mhofman mhofman added the enhancement New feature or request label Aug 24, 2023
@mhofman mhofman self-assigned this Aug 24, 2023
@mhofman
Copy link
Member Author

mhofman commented Oct 3, 2023

As a point of reference, the KREAd launch seem to have used something like 30x the block limit for their core eval and resulting work.

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

No branches or pull requests

1 participant