As part of https://github.com/Agoric/agoric-sdk/issues/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.
What is the Problem Being Solved?
As part of https://github.com/Agoric/agoric-sdk/issues/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
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