Skip to content

v2.14.0

Choose a tag to compare

@DZakh DZakh released this 12 Mar 16:19
a387548

What's Changed

Enhanced Reliability with RPC Data Sources

You can now specify RPC providers for redundancy and failover, ensuring 100% uptime for your indexer. If HyperSync becomes unavailable, your indexer will automatically switch to an RPC provider.

To enable this, add an rpc field to your network configuration. It can be a URL or a list of RPC configuration objects:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c

🧠 The fallback RPC is triggered if the primary data source does not receive a new block within 20 seconds.

New RPC Configuration Syntax

Adding an RPC provider is now as simple as setting a single URL:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c
  • If HyperSync is available for a chain, it remains the primary data source, with RPC as a fallback.
  • For chains without HyperSync support, RPC becomes the primary data source.

Advanced Configuration

Gain more control over your RPC setup by specifying it explicitly as a primary source:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc:
+     url: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
+     for: sync
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c

Or define multiple RPC endpoints with custom settings:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc:
+     - url: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
+       for: fallback
+     - url: https://eth-mainnet.your-free-rpc-provider.com
+       for: fallback
+       initial_block_interval: 1000
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c

By @DZakh in #437 and #467.

Bug Fixes

  • Improved historical sync performance by fixing a critical issue related to reorg detection mode. #470 (@DZakh)
  • Fixed raw events that had empty parameters. #460 (@DZakh)
  • Fixed Docker Compose file for self-hosting, ensuring Hasura connects correctly to Postgres when using a custom user or database. #459 (@JasoonS)
  • Added support for nested ABIs in contract imports. #472 (@diyahir, @DZakh)

Other Changes

New Contributors

Full Changelog: v2.13.0...v2.14.0