Skip to content

v3.3.0

Choose a tag to compare

@DZakh DZakh released this 20 Jul 12:13
d71711e

Improvements for Huge Multichain & Factory Contract Indexers

Faster backfill, lower memory usage, better stability, and lower latency at the head.

By @DZakh in #1321, #1330, #1331, #1332, #1334, #1335, #1298, #1336, #1337, #1338, #1341, #1340, #1342, #1347, #1339, #1349, #1355, #1358, #1361, #1360, #1359, #1364, #1377, #1380, #1379, #1369, #1394, #1392, #1395, #1399, #1400, #1401, #1403, #1406, #1404, #1413, #1414, #1415, #1423, #1427, #1426, #1430, #1429, #1434, #1392, #1447

Per-Chain Effect API

Effect API now supports per-chain caching and rate limiting via a new crossChain option. This controls whether an effect's input is cached and rate-limited globally or separately per chain. Default: true.

  • crossChain: true (default): Uses a single shared cache for all chains. Recommended for chain-agnostic calls (e.g. token metadata, price by symbol) where the result does not depend on the chain.
  • crossChain: false: Maintains a separate cache and rate-limit budget for each chain. context.chain.id becomes available in the effect handler. Use when the result is chain-specific, such as on-chain reads or per-chain RPCs; the same input will be fetched once per chain.
// Chain-specific result → crossChain: false, access context.chain.id
const getBalance = createEffect(
  {
    name: "getBalance",
    input: S.string,
    output: S.bigint,
    rateLimit: false,
    crossChain: false,
  },
  async ({ input: account, context }) =>
    rpcFor(context.chain.id).getBalance(account),
);

Cross-chain effects can only call other cross-chain effects, as they do not have a specific chain context; chain-scoped effects (crossChain: false) can call either type. Accessing context.chain in a cross-chain effect will throw an error.

Be aware that per-chain effects have different cache structure and will require a cache reset/migration when switching the crossChain option.

By @DZakh in #1432

Nested Env Vars Interpolation In Config

Environment variable interpolation now supports nested fallback values in defaults (e.g., ${ENVIO_RPC_1:-https://my.rpc?defaultToken=${ENVIO_RPC_DEFAULT_TOKEN}}).

By @DZakh in #1367

Custom HTTP Headers For RPC

chains:
  - id: 1
    rpc:
      - url: https://eth-mainnet.your-rpc-provider.com
        for: sync
        headers:
          authorization: "Bearer ${ENVIO_RPC_1_TOKEN}"

By @DZakh in #1363

RPC Source Enhancements

We improved RPC source to support cases previously only possible with HyperSync:

  • Event handlers using or union for params filters in where
  • Indexers with multiple wildcard events

By @DZakh in #1368

We also improved how RPC Source handles provider's response-too-large errors by @DZakh in #1371, #1372

Fixes

  • Critical fix for rollback handling for deleted entities by @DZakh in #1431
  • Critical fix for an edge case with incorrect rollback on reorg by @DZakh in #1444
  • Fix serialization of zero-parameter events in raw_events by @DZakh in #1356
  • Fix experimental SVM account_filters config parsing by @JasoonS in #1408
  • Fix SVM to exclude failed transaction instructions by @JasoonS in #1428

Other Improvements

Full Changelog: v3.2.1...v3.3.0