subsquid
Search…
Hydra Processor
Hydra Processor is a 'sink' tool used to fetch substrate events from a Hydra indexer. It sequentially applies the event handlers one by one in the order the events have been emitted.

Commands

hydra-processor migrate

1
undefined
2
3
USAGE
4
$ hydra-processor migrate
5
6
OPTIONS
7
-e, --env=env [default: .env] Path to a file with environment variables
Copied!

hydra-processor run

1
undefined
2
3
USAGE
4
$ hydra-processor run
5
6
OPTIONS
7
-e, --env=env [default: .env] Path to a file with environment variables
8
-m, --manifest=manifest [default: manifest.yml] Manifest file
9
--id=id ID of the processor (useful for multi-processor setups)
10
--indexer=indexer Indexer URL to source events
Copied!

Quickstart

hydra-processor is driven by environment variables (loaded from .env file or supplied by a shell) and by settings from manifest.yml (by default, it looks up manifest.yml in the current folder).
Before the first run, the processor should set up auxiliary database tables required for its work:
1
hydra-processor migrate
Copied!
Then processing may be started:
1
hydra-processor run
Copied!

Environment variables

Variable
Default
Required
Description
INDEXER_ENDPOINT_URL
-
Yes
Hydra indexer endpoint to source the raw event and extrinsic data
DB_NAME
-
Yes
Database name
DB_PORT
-
Yes
Database port
DB_HOST
-
Yes
Database host
DB_USER
-
Yes
Database user
DB_PASS
-
Yes
Database password
PROMETHEUS_PORT
3000
No
A prometheus metrics endpoint is started at this port
POLL_INTERVAL_MS
1 sec (60000 msec)
No
How often the processor polls the indexer for new blocks

Manifest file

The manifest file describes which and how the events and extrinsics should be processed. See mappings for more details.
Last modified 7d ago