Skip to content

Incidents (#242): pending_squads_upgrade — Solana program-upgrade early warning #251

Description

@szhygulin

Tracking the `pending_squads_upgrade` signal scoped out of #246's parent investigation. Part of the #242 v2 follow-up.

Signal

Any pending Squads multisig transaction that targets `BPFLoaderUpgradeable::Upgrade` against a program the user is exposed to. Fires before the upgrade lands — earliest possible warning, complementing the existing `recent_program_upgrade` signal which fires only post-execution.

Data path

  • Squads V4 program ID: typically `SMPLecH534NA9acpos4G6x7uf3LWbCAwZQE9e8ZekMu` (claim — needs `rnd` verification before code; per memory `feedback_verify_external_facts` Solana program ID drift is a real footgun).
  • For each program in the user's exposure set with `upgradeAuthority` matching a Squads PDA: fetch all pending transactions on that multisig, decode each, flag any that target `BPFLoaderUpgradeable`.
  • Squads SDK exposes typed account decoding for transaction state (`Pending` / `Approved` / `Executed`).

Decisions

Decision Options Recommendation
Squads version coverage V3 only; V4 only; both V4 only initially — V3 is legacy; most active programs are V4 now. Document V3 as out of scope. Verify with `rnd` skill before committing — Squads program ID drift across versions is a known footgun.
Dependency `@sqds/multisig` SDK; or hand-roll Anchor IDL decoding SDK — saves ~300 LoC of decoder code, and Squads ships the IDL with each release.
Performance Scan all pending tx on every call; cache per-multisig per-block Cache per-(multisig, slot). Pending tx state changes are slot-bounded events.
Multisig discovery Per-program `upgradeAuthority` lookup; also scan SetUpgradeAuthority history Just upgradeAuthority. Historical scanning is a separate forensic question.

Scope estimate

~400-600 LoC + tests. New file `src/modules/incidents/squads-pending.ts`. SDK adds ~5MB transitive. New signal emitter in `chain-solana.ts`.

Risk

Medium-high. Squads program-ID and IDL drift is real (per memory `feedback_verify_external_facts` — PR #33 clear-signing labels were backwards because external SDK assumptions weren't verified). Must empirically validate Squads V4 program ID, account layout, and tx-state enum values before shipping.

Cross-references


Filed via gh CLI by an AI agent (Claude Code) after the deferred-work investigation in #246's PR thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions