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

Mechanism to handle infinite message loops #7847

Closed
mhofman opened this issue May 26, 2023 · 1 comment
Closed

Mechanism to handle infinite message loops #7847

mhofman opened this issue May 26, 2023 · 1 comment
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request SwingSet package: SwingSet

Comments

@mhofman
Copy link
Member

mhofman commented May 26, 2023

What is the Problem Being Solved?

Through metering we have a way to prevent a run-away cranks (either synchronous or locally resolved promises). However we don't have any way to prevent a run-away message loop between 2 or more vats.

Currently the chain scheduler implemented by cosmic-swingset has run to completion semantics, and will not process any external input until the current work finishes, allowing a swingset run-away.

Description of the Design

A Swingset controller method that causes all sends currently on the run-queue to be rejected.
It's unclear what to do with pending promise notifications, but likely these could be transformed into rejections as well.

Security Considerations

These rejections are not guaranteed to cause the execution to ultimately complete, the code could handle (ignore) the rejections and continue it message loop.

There is also a risk that such a rejection would cause a vat to fail, and if it's a critical vat, interrupting swingset at that crank may be too late and it would have been preferable to interrupt swingset instead of rejecting all pending run queue events.

Scaling Considerations

We should consider whether this mechanism should be reserved to manual interventions, likely only usable during a chain upgrade, or whether to automatically trigger it once a swingset run has consumed a certain amount of computrons (with a limit likely higher than a block's worth of computrons, possibly with some action types like core eval exempt).

Test Plan

TBD

@mhofman mhofman added enhancement New feature or request SwingSet package: SwingSet cosmic-swingset package: cosmic-swingset labels May 26, 2023
@mhofman
Copy link
Member Author

mhofman commented Jun 19, 2023

Closing in favor of #7938

@mhofman mhofman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

1 participant