Skip to content

v0.17.0

Compare
Choose a tag to compare
@fordN fordN released this 21 Jul 22:10
· 728 commits to main since this release

NPM

npm install -g @graphprotocol/[email protected]
npm install -g @graphprotocol/[email protected]
npm install -g @graphprotocol/[email protected]

Note: Installing these packages requires Rust and it's package manager cargo to be installed so that the cost model module can be built. If you already have Rust installed, make sure you're on the latest stable release. Installing the above packages may also require passing --unsafe-perm=true to the above install commands.

Docker

docker pull ghcr.io/graphprotocol/indexer-agent:v0.17.0
docker pull ghcr.io/graphprotocol/indexer-service:v0.17.0

Changes (Overview)

This release primarily contains updates to the indexer agent to improve efficiency. The process of reallocating towards a subgraph deployment has been updated to use closeAndAllocate(), so it requires one transaction instead of two (close then allocate). Handling of high gas price scenarios has also been improved; when estimated gas prices exceed the threshold the agent will now enter a holding pattern where it waits for gas prices to return to below the gas-price-max before continuing with transaction execution. Along with the updated behavior, the gas-price-max startup argument has been updated for ease of use to be denominated in gwei rather than wei.

There were a few additional minor improvements to indexer agent:

  • improved handling of empty auth fields for the Ethereum endpoint,
  • more clear log messages from subgraph query errors.

Some networking optimizations have been included for both the indexer service and indexer agent:

  • both recommended k8s setups have both been updated to use a ClusterIP service instead of LoadBalancer since the LoadBalancer services have been shown to introduce more latency and their extra features aren't required here,
  • /network execution has been optimized by switching to a simpler HTTP client (doesn't need to be GraphQL aware).

As promised in the last release, this release includes an update to make the /network endpoint optional and introduces a dedicated (optional) auth token for /network requests.

New configuration options with this release (all optional):

Environment Variable CLI Option Recommended Value
INDEXER_AGENT_NETWORK_SUBGRAPH_AUTH_TOKEN --network-subgraph-auth-token <Secret bearer token for network queries>
INDEXER_AGENT_SERVE_NETWORK_SUBGRAPH --serve-network-subgraph true
INDEXER_AGENT_VOUCHER_EXPIRATION --voucher-expiration 2160

Changes (Per Component)

Indexer Agent

Added

  • Reallocate to subgraph deployment in one transaction using closeAndAllocate.
  • Wait for gas prices below the gas-price-max (gwei) before proceeding with transaction execution.
  • Add --voucher-expiration to configure the time (in seconds) after which a voucher with too few query fees is permanently deleted. Until then, keep retrying to redeem it to give the indexer a chance to adjust their --allocation-claim-threshold.

Changed

  • Show subgraph query error reason in logs.
  • Use ClusterIP in the k8s indexer agent service rather than a LoadBalalancer since LoadBalancer services have been
    shown to introduce extra latency.
  • Use undefined for auth user and password if none specified.
  • Update gas-price-max units to be gwei instead of wei for improved human readability.
  • Default gas-price-max changed from 20 gwei to 50 gwei.

Fixed

  • Improve robustness of subgraph deployments query by querying batches of only 10 deployments at a time.

Indexer Service

Changed

  • Make the /network endpoint optional by default and introduce a dedicated (optional) auth token for /network requests.
  • Optimize /network execution by switching to a simpler HTTP client (doesn't need to be GraphQL aware).
  • Use ClusterIP in the k8s indexer service service rather than a LoadBalalancer since LoadBalancer services have been
    shown to introduce extra latency.

Indexer CLI

Fixed

  • Remove vestigial check for channel-messages-inbox endpoint.

Indexer Common

Changed

  • Optimize /network execution by switching to a simpler HTTP client (doesn't need to be GraphQL aware).

Indexer Native

Fixed

  • Fix build for Node v16 by upgrading neon-sys dependency.