Chain Registry
Goal
Chain-Registry is responsible for
- Storing chains’ related information including URL, name, block depth, block position, and backoff duration.
Chain Registry allows Orchestrate to access to the blockchain network JSON-RPC endpoint, to act as a proxy. And to asynchronously catch and process transaction receipts as transactions are mined on the network.
Quick-Start
The application can be configured through flags or environment variables, we can run the help run
command line.
go run . help run
Configure Run
Usage:
orchestrate chain-registry run [flags]
Flags:
--chain-registry-init strings Initialize Chain Registry
Environment variable: "CHAIN_REGISTRY_INIT"
--db-database string Target Database name
Environment variable: "DB_DATABASE" (default "postgres")
--db-host string Database host
Environment variable: "DB_HOST" (default "127.0.0.1")
--db-password string Database User password
Environment variable: "DB_PASSWORD" (default "postgres")
--db-poolsize int Maximum number of connections on database
Environment variable: "DB_POOLSIZE"
--db-port int Database port
Environment variable: "DB_PORT" (default 5432)
--db-user string Database User.
Environment variable: "DB_USER" (default "postgres")
-h, --help help for run
--providers-throttle-duration duration Duration to wait for, after a configuration reload, before taking into account any new configuration
Environment variable: "PROVIDERS_THROTTLE_DURATION" (default 1s)
--rest-hostname string Hostname to expose REST services
Environment variable: "REST_HOSTNAME"
--rest-port uint Port to expose REST services
Environment variable: "REST_PORT" (default 8081)
Configure Migrate
Usage:
orchestrate chain-registry migrate [flags]
orchestrate chain-registry migrate [command]
Available Commands:
down Reverts last migration
init Initialize database
reset Reverts all migrations
set-version Set database version
up Upgrade database
version Print current database version
Flags:
--db-database string Target Database name
Environment variable: "DB_DATABASE" (default "postgres")
--db-host string Database host
Environment variable: "DB_HOST" (default "127.0.0.1")
--db-password string Database User password
Environment variable: "DB_PASSWORD" (default "postgres")
--db-poolsize int Maximum number of connections on database
Environment variable: "DB_POOLSIZE"
--db-port int Database port
Environment variable: "DB_PORT" (default 5432)
--db-user string Database User.
Environment variable: "DB_USER" (default "postgres")
-h, --help help for migrate
Warning
- Default values can be changed by using environment variables.
- Environment variables will be overwritten by Flags values.