feat: allow vats to be marked critical and panic the kernel if a critical vat fails #5436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Vats now accept a
critical
property as one of their creation options. If a vat is marked as critical, failure of that vat causes a kernel panic.In order to avoid allowing just anyone to set up a situation that could bring down the kernel and thus the chain, dynamic vats cannot be configured as critical simply by setting the
critical
option to true (as they can with static vats). Instead, for thecritical
option value you must provide the "critical vat key", a capability that can only be obtained from the vatAdmin vat. The vatAdmin root now supports an additional method,getCriticalVatKey()
which returns this capability. Note that this is only available on the vatAdmin root object, not on any vatAdminService object, and thus is initially only available to the bootstrap vat.Fixes #4279