async terminateVat
has surprising synchronous expectations from callers
#10073
Labels
enhancement
New feature or request
What is the Problem Being Solved?
Originally posted by @gibson042 in #10055 (comment)
The problem really is that we're
void
ing the result ofterminateVat
, meaning that we also ignore any errors that would happen during that call (unhandled rejection). This was introduced in bd93950 along with the following note:Description of the Design
Do what is described in the TODO, or at least change
terminateVat
to no longer be anasync
function, but instead return a promise for the completion of the async parts. That latter part wasn't done in #10055 as it would have cause errors triggered interminateVat
to throw instead of rejecting the result promise, and the consequences are somewhat unclear (this is also a form of releasing zalgo)Security Considerations
When changing the termination behavior, we run the risk of making some errors synchronous, preventing some forward progress. It might however be for the best as these errors might have previously been ignored.
Scaling Considerations
None
Test Plan
Both termination paths must be tested: vatAdmin triggered, and controller triggered, as well as attempting to trigger some of the error cases of vat termination to verify the handling behavior.
Upgrade Considerations
This behavior is part of consensus, and as such requires a chain software upgrade. It potentially might require a vat-admin upgrade as well.
The text was updated successfully, but these errors were encountered: