Skip to content

Reuse a recent "deployed" answer instead of re-reading getClassHashAt #742

Closed

Description

@adrienlacombe

Problem

Each deployment-status read is one starknet_getClassHashAt. The background repeats it for the same address on every Home refresh (the read-only flag), fee review, approval, deploy screen, STRK20 staging step and recovery rescan. For an account that is already deployed, the answer almost never changes, so most of these reads are wasted RPC calls.

Proposal

Reuse a "deployed" answer for a short time, per address and endpoint list, in the background RuntimeRpc wiring.

Acceptance criteria

  • Only a "deployed" answer is reused. "Not deployed" and failed reads always reach the chain, so a fresh deployment is seen at once and a Retry still re-reads (Sherlock 218).
  • Only existence is reused, never the class hash. Signing-path compatibility checks keep reading the live class at a pinned block.
  • A reused answer is bounded in time, so a devnet reset or a reorg is noticed again. Local (loopback) nodes are never reused.
  • The key includes the endpoint list, so mainnet and Sepolia stay separate and a changed RPC endpoint reads again. Memory is bounded and nothing is persisted.

Out of scope

The recovery scan's per-candidate reads of undeployed addresses. Those can't be reused without remembering "not deployed", which this issue deliberately avoids.

Activity

  1. derek-flossman commented on Oct 26, 2026

    @derek-flossman
    Collaborator

    Fixed by #741, merged into release/v0.10.8. Ships in v0.10.8.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions