Skip to content

Add instruction decode registry with effect cross-check - #55

Open
abhay wants to merge 1 commit into
mainfrom
decode-registry
Open

Add instruction decode registry with effect cross-check#55
abhay wants to merge 1 commit into
mainfrom
decode-registry

Conversation

@abhay

@abhay abhay commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

A Squad proposal arrives as raw Solana instructions. This decodes them into a plain-English action you can read before signing, working down a tier order: bundled primitives, a signed spec registry, the on-chain Anchor IDL, then raw bytes.

The decoder lives in the Rust core, shared by the relay and the app, which reaches it through one decodeProposal call across the FFI. It fetches the IDLs, specs, and mints it needs, then cross-checks the decode against the relay's independent simulation: agreement earns the confidence cap, a mismatch drops the confident statement and shows a warning that never blocks.

Fail-safe throughout. Unresolved data falls through to raw plus the full simulation, never a confident wrong statement, and a decode never loosens the existing high-risk type-to-confirm gate. The app verifies the signed bundle on-device against a shipped key.

Ships 4 curated specs (Kamino deposit, Orca and Raydium swaps, SPL Stake Pool deposit) over real instruction bytes. The production signing key and the relay redeploy are a separate gated step.

A Squad proposal arrives as raw Solana instructions. This decodes them into a
plain-English action you can read before signing, working down a tier order:
bundled primitives, a signed spec registry, the on-chain Anchor IDL, then raw
bytes.

The decoder lives in the Rust core, shared by the relay and the app, which
reaches it through one decodeProposal call across the FFI. It fetches the
IDLs, specs, and mints it needs, then cross-checks the decode against the
relay's independent simulation: agreement earns the confidence cap, a mismatch
drops the confident statement and shows a warning that never blocks.

Fail-safe throughout. Unresolved data falls through to raw plus the full
simulation, never a confident wrong statement, and a decode never loosens the
existing high-risk type-to-confirm gate. The app verifies the signed bundle
on-device against a shipped key.

Ships 4 curated specs (Kamino deposit, Orca and Raydium swaps, SPL Stake Pool
deposit) over real instruction bytes. The production signing key and the relay
redeploy are a separate gated step.
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