Skip to content

Calibration eRPC 429 storms: deal flow resolveByProviderId fans out O(active data sets) eth_calls per deal #606

Description

@SgtPooki

Problem

dealbot deal jobs call synapse.storage.createContext({ providerId }) → synapse-sdk StorageContext.resolveByProviderId, which fires getActivePieceCount + getAllDataSetMetadata per active data set (batch size ≥50) to metadata-select a set to reuse. On calibration dealbot has up to ~196 active data sets with a single provider (see #605), so one resolve fires ~132 eth_calls, ×2–3 per deal, with all SPs phase-locked to the same scheduler tick → 300–500 eth_call/s bursts at the top of the minute. These drain chain.love's calib token (currently 1000 req/min) in ~2–3s → eRPC ErrUpstreamsExhausted 429 storms (~9,748 chain.love 429s / 20h, ~12k Ankr-free budget trips). Mainnet is clean today (lower volume) but runs the same armed code path.

Evidence

Fix plan

Related

FilOzone/synapse-sdk#631, #851, #848; FilOzone/pdp#265; #603 (RPC timeout).

Done criteria

  • Calibration deal-flow eth_calls per deal bounded (not O(active data sets)).
  • Calibration ErrUpstreamsExhausted/429 storms eliminated; mainnet stays clean after v1.9.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions