Skip to content

feat(snos): migrate to Starknet 0.14.2 with semantic parity#503

Draft
Mohiiit wants to merge 21 commits intomainfrom
feat/0.14.2
Draft

feat(snos): migrate to Starknet 0.14.2 with semantic parity#503
Mohiiit wants to merge 21 commits intomainfrom
feat/0.14.2

Conversation

@Mohiiit
Copy link
Copy Markdown
Collaborator

@Mohiiit Mohiiit commented Feb 24, 2026

Summary

This draft migrates SNOS to Starknet 0.14.2 dependency/API surface with semantic parity for OS input assembly.

Scope

  • Upgrades sequencer-related dependencies and Cairo-compatible pins to the 0.14.2 line.
  • Adapts transaction/block processing to 0.14.2 type and constructor requirements.
  • Removes legacy cached-state input generation path.
  • Populates OS block input using real initial_reads and computed block_hash_commitments.
  • Aligns debug serialization to the 0.14.2 input model.
  • Adds table-driven coverage (rstest) around state-diff conversion and hashing-data assembly.

Sequence Diagram

sequenceDiagram
    participant RPC as RPC State Source
    participant Exec as Tx Executor
    participant Build as Input Builder
    participant OS as Starknet OS

    RPC->>Exec: Load block context + txs
    Exec->>Exec: Execute txs in canonical order
    Exec->>Build: Execution outputs
    Exec->>Build: Initial reads snapshot
    RPC->>Build: State update
    Build->>Build: Convert to thin state diff
    Build->>Build: Compute block hash commitments
    Build->>OS: Assemble OsBlockInput (0.14.2)
Loading

Flow Diagram

flowchart TD
    A[Block + Transactions] --> B[Execute Transactions]
    B --> C[Capture Initial Reads]
    B --> D[Collect Outputs For Hashing]
    A --> E[Fetch State Update]
    E --> F[Convert To ThinStateDiff]
    D --> G[Compute Block Header Commitments]
    F --> G
    C --> H[Assemble OsBlockInput]
    G --> H
    H --> I[Serialize Debug Output]
Loading

Notes

  • Cutover is 0.14.2-only in this branch (no dual-version shims).
  • Migration keeps block-assembly semantics explicit for edge cases (genesis/empty-block/migration vectors).

Validation Status

  • Build, tests, formatting, and lint checks are green in local validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant