Persistent cosmic-swingset state #8222
Labels
cosmic-swingset
package: cosmic-swingset
enhancement
New feature or request
swing-store
SwingSet
package: SwingSet
What is the Problem Being Solved?
Cosmic-swingset has access to a "host" section of the swing-store to keep some state across blocks. However to simplify state-sync (#3769), the implementation in #7225 removed all such host storage that wasn't participating in hangover inconsistency handling, and is not part of the exported data. Only the
blockHeight
andchainSends
performed in the previous block are now kept in the swing-store host storage, and a state-sync restore just repopulates theblockHeight
from the snapshot info, andchainSends
are empty because state-sync arranges to restore a state not suffering from hangover.All other state cosmic-swingset currently keeps is transient and can be safely discarded.
However we find ourselves in need of persisting some state again across blocks in cosmic-swingset. In the future, we may want to keep contextual information associated to some of the swingset execution (#7875) or provide a unified persistent storage capability for the host part of a device (e.g. if the host starts recording timers wakeup, see #7846).
This cosmic-swingset state storage needs to be resilient against hangover inconsistency issues, and be captured in and restored from state-sync snapshots.
Description of the Design
TBD
Security Considerations
Making sure any hangover cannot introduce divergence.
Scaling Considerations
TBD
Test Plan
We should actually exercise hangover logic in a test, possibly by forcing a node in a multi-validator setup to rollback the cosmos state by 1 block, or simulate a state-sync when host state is kept.
Upgrade Considerations
TBD
The text was updated successfully, but these errors were encountered: