stf-analysis

Analyze Rust STF implementations for correctness, threading, and non-determinism.

4|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/evstack/ev-rs --skill stf-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stf-analysis
Source: https://github.com/evstack/ev-rs/tree/main/.claude/skills/stf-analysis
Command: npx skills add https://github.com/evstack/ev-rs --skill stf-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

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.

Frequently Asked Questions about stf-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find non-determinism issues in Rust blockchain code?

You can detect non-determinism in Rust STF code by auditing for HashMap iteration order and verifying Send/Sync bounds. This analysis pinpoints threading issues and verifies state atomicity using checkpoint/restore patterns.

What is a State Transition Function in blockchain execution?

A State Transition Function (STF) defines the rules for changing blockchain state during execution. Analyzing it ensures your logic is deterministic, handles threading correctly, and adheres to resource limits for overlays and key/value sizes.

How do I audit Rust Send and Sync bounds for state transition logic?

To audit Rust Send/Sync bounds for STF logic, analyze the code to detect incorrect concurrency boundaries. This process identifies threading model issues and suggests simplifications by removing unnecessary atomic overhead or bounds.

Does blockchain STF code require checkpoint and restore patterns for atomicity?

Yes, blockchain STF code requires checkpoint and restore patterns to verify atomicity during state-changing operations. Analyzing these patterns ensures failed transitions correctly roll back state, preventing inconsistent execution.

What are common resource limit checks for blockchain STF implementations?

Common resource limit checks for blockchain STF implementations verify adherence to defined maximums for overlays, events, key/value sizes, and call depth. This analysis ensures execution remains constrained and deterministic.