Paj Digital Labs
All articles
Web3 & Crypto Tech

Blockchain Dependency Incidents: Circuit Breakers for RPC and Indexer Failures

A stale indexer and an unavailable RPC need different responses. Monitor data freshness, stop unsafe writes and preserve transaction tracking when chain infrastructure degrades.

Paj Digital Labs 3 min read
Hardware security key beside a connected circuit board
Editorial illustration · Web3 & Crypto Tech

A blockchain app displays balances normally while its indexer is an hour behind. Another app sees an RPC error and tells every user to resubmit their pending transaction. Both failures come from treating dependency health as a single up-or-down flag.

Chain infrastructure has several dimensions: transport availability, data freshness, method correctness and transaction delivery. A circuit breaker should respond to the affected capability, not blindly disable or retry everything.

Map critical dependencies

List reads, writes, indexing, pricing and transaction status services. Note which can share underlying infrastructure even if the brand names differ.

Separate authoritative chain state from derived projections. An indexer may serve a useful history view, but its lag should not be mistaken for an on-chain balance update. Pricing data introduces another independent freshness boundary.

Record which operation depends on each source. This lets you degrade one feature without unnecessarily taking the whole application offline.

Measure freshness

Track observed block height or the network's appropriate progress indicator against approved independent sources. For an indexer, track the processed checkpoint and age of the latest indexed event.

A successful HTTP response can contain stale data. Include method-specific checks and the actual chain or cluster identity. A fast endpoint connected to the wrong network is not healthy for your application.

  • Read endpoint unavailable — Use compatible fallback or show unavailable data
  • Indexer behind — Label historical views as delayed
  • Price source stale — Disable quote-dependent actions
  • Submission uncertainty — Preserve signature/hash and investigate status
  • Chain finality stalled — Pause settlement-dependent actions under policy

Thresholds should reflect the network and business risk. Do not copy one fixed block-gap number across chains with different timing and finality models.

Use bounded breakers

A breaker can open after a defined pattern of failures, wait, then allow a limited probe. Avoid constant retries that worsen provider overload.

Keep timeouts and retry budgets explicit. Long chains of fallback calls can exceed the user's acceptable wait even when every individual timeout looks reasonable.

Only fail over to a compatible source. Method support, chain, commitment or finality semantics and historical coverage must match the operation. A generic endpoint list is not a compatibility guarantee.

Protect writes

For a failed submission, determine whether the transaction reached the network before constructing another operation. Preserve the original identity and use the chain's supported status and expiry logic.

If a quote or simulation source is stale, do not let the interface proceed using old conditions without an approved policy. Disable the affected action and explain the reason in plain language.

A circuit breaker in the browser is a usability control, not a security boundary. Server-side operations also need the relevant checks and budgets.

Keep read-only paths useful

Show previously known data with its timestamp when that is safe and clearly labelled. Do not display stale balances as current spendable funds.

Transaction tracking may deserve a separate fallback path even when new submissions are disabled. Users with pending operations need evidence and support, not a blank unavailable screen.

Avoid making every error look like a wallet problem. If your indexer is delayed, tell the user the history view is delayed rather than asking them to reconnect or sign again.

Reconcile after recovery

When the dependency returns, backfill missed ranges and verify checkpoints. A green health check does not prove the backlog is processed.

Apply events idempotently and account for the chain's reorganisation or finality model. Check that provisional state and user-facing projections converge before declaring recovery.

Review unresolved transaction submissions separately. Some may have succeeded while the service was unavailable; others may have expired or failed. Do not mark the entire incident window failed by default.

Prepare the incident runbook

Document how to disable new actions, change approved providers, inspect freshness and restore processing. Keep credentials out of the runbook and limit provider configuration changes to authorised operators.

Test a stale-but-responsive source, partial method failure, rate limiting and a total outage. Verify the interface's actual behaviour and the central read/write paths, not just a mocked health indicator.

Record recovery evidence: backlog drained, state reconciled and pending operations resolved under the policy. Availability alone is an incomplete success signal.

The resilient application does not promise that every dependency stays healthy. It knows which facts are uncertain, stops actions that depend on them and keeps enough identity to recover without asking users to risk duplicate transactions.

Paj Digital Labs

The engineering journal of Paj Digital Solutions — hosting, server infrastructure and web engineering, written by the people who run the servers.

Related reading