Skip to content

v3.15.0

Latest

Choose a tag to compare

@DZakh DZakh released this 29 Oct 14:32
d9fabe1

What's Changed

30% faster indexing

We cut per-event handler overhead. This resulted in up to a 30% speedup for many indexing cases.

By @DZakh in #1771

25% more efficient storage

We moved Postgres storage into Rust. This reduced CPU usage by 25%.

By @DZakh in #1649

Field selection for onBlock / onSlot handlers

Use fields to select which fields to index for a block. This is especially useful for building time-based workflows and more.

indexer.onBlock(
  {
    name: "headers",
    where: () => ({ block: { number: { _gte: 10, _every: 2 } } }),
    fields: { block: ["timestamp", "miner"] },
  },
  async ({ block }) => {
    block.timestamp;
    block.miner;
  },
);

By @DZakh in #1766

ClickHouse-only entities

ClickHouse-only entities can now be read from handlers. You can index the whole dataset into ClickHouse while keeping only metadata in the Postgres database.

This feature allows 5-20x smaller storage for your indexers, as well as powerful analytics queries.

By @DZakh in #1710

Anonymous events support

Anonymous EVM events can now be indexed. An event is anonymous when its signature ends in anonymous or its ABI entry has "anonymous": true.

events:
  - event: LogNote(bytes4 indexed sig, ...) anonymous

Such logs carry no signature topic, so every registration of an anonymous event must filter that param by concrete values:

indexer.onEvent(
  {
    contract: "Vat",
    event: "LogNote",
    where: { params: { sig: "0x29ae8114" } },
  },
  async ({ event }) => {
    /* event.params.sig === "0x29ae8114" */
  },
);

By @DZakh in #1769

console.log

We replaced Pino logging with a native Rust logger and redesigned how logging is done in general.

Every console.log performed in your handler files now goes through the Envio logger. This allows it to be displayed on Envio Cloud and augments it with the current timestamp.

When calling console.log from a handler, it is also automatically augmented with handler details the same way context.log does. There is no need to pass context around for this.

By @DZakh in #1763

Strict Hex Type

We added an option to make types stricter for hex values: string -> `0x${string}`

strict_hex_type: true # default false for backward compatibility

By @DZakh in #1761

Fixes

  • Fix TUI for chains at the head without events by @DZakh in #1692
  • Fix race condition for TUI by @DZakh in #1693
  • Fix onEvent's where filter for Fuel handlers by @DZakh in #1770
  • Fix SVM handlers crash for instructions with no logs by @DZakh in #1777

Other Improvements

  • Lower the client-side filter's threshold default to 100k addresses by @DZakh in #1755
  • Improve error message when a value is too large for Postgres index by @DZakh in #1752
  • Updated supported HyperSync chains by @DZakh in #1765
  • Dead code removal by @DZakh in #1760
  • New metric. envio_indexing_source_rate_limited_seconds reports how long a chain spent waiting out source rate limits. by @DZakh in #1775
  • Removed postgres.js, viem and pino dependencies by @DZakh in #1772
  • Speed up tests in CI by @DZakh in #1690
  • Fix race condition for tests by @DZakh in #1674, #1694
  • More reliable and agent-friendly internal testing framework by @DZakh in #1753
  • Move internal tests to use a black-box approach by @DZakh in #1762, #1775

Full Changelog: v3.14.1...v3.15.0