You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- wait until #10684, where we can terminate an incarnation without terminating the contract
- see #10659 (comment)
- note: try/catch/finally remains for `borrow()` and `deposit()` so we can exit seats
closeshttps://github.com/Agoric/agoric-private/issues/234
## Description
See issue for context. It also seems related to #10684 because the code path that was triggering the bad state was this:
https://github.com/Agoric/agoric-sdk/blob/ca25dd59f43f27451fad685207086a9be87860c7/packages/fast-usdc/src/exos/liquidity-pool.js#L272-L285
As you can see, we were updating the pool state, but then the `atomicRearrange` failed, so the pool state was left invalid. This PR makes it so that the bad proposal shape is caught by the type guard earlier, so this code path never happens.
The withdraw path was already being handled correctly because the typeguard was specific enough.
If the proposal shape is correct, but the amounts are incorrect, the contract already handles that fine by failing before the state update.
### Security Considerations
The bug would allow anyone to send an offer that breaks the liquidity pool.
### Scaling Considerations
None
### Documentation Considerations
None
### Testing Considerations
Added a bootstrap test that fails accordingly without the fix.
### Upgrade Considerations
None
What is the Problem Being Solved?
Presently if a contract reaches an invalid state, it can invoke "death before confusion" with
zcf.shutdownWithFailure
.The problem is that kills the vat permanently.
There are cases in which the vat would want to stop until it can be upgraded with repair.
Description of the Design
Something like
zcf.suspendWithFailure
.That will require lower level support in SwingSet (probably liveslots).
Security Considerations
Scaling Considerations
Test Plan
Upgrade Considerations
The text was updated successfully, but these errors were encountered: