What problem does it solve?
This Skill helps developers ensure their State Transition Functions (STFs) are robust, deterministic, and efficient by identifying potential issues in threading, non-determinism, and resource usage.
Core Features & Use Cases
- Threading Model Analysis: Detects incorrect Send/Sync bounds and identifies concurrency points.
- Non-Determinism Detection: Pinpoints common sources of non-determinism like HashMap iteration order.
- Atomicity Verification: Checks for correct checkpoint/restore patterns in state-changing operations.
- Resource Limit Checks: Verifies adherence to defined limits for overlays, events, key/value sizes, and call depth.
- Simplification Opportunities: Suggests ways to optimize code by removing unnecessary bounds or atomic overhead.
- Use Case: A blockchain developer can use this Skill to audit their STF code before a mainnet launch, ensuring it meets the strict determinism requirements of the blockchain.
Quick Start
Analyze the STF code in the 'crates/app/stf/' directory for threading issues and non-determinism.