-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdefaults.env
53 lines (40 loc) · 5.22 KB
/
defaults.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This file contains the default values for all Chaingraph configuration
# settings. Create a `.env` file to overwrite any variable at runtime.
# The Postgres connection string (postgres://username:password@host:port/dbname) for the database to which Chaingraph will save data
CHAINGRAPH_POSTGRES_CONNECTION_STRING=postgres://chaingraph:very_insecure_postgres_password@localhost:5432/chaingraph
# The maximum number of connections the pool should maintain to the database.
# For best performance, this should be set to the number of CPUs available to Postgres. If not set (and postgres.cpus is not set), Chaingraph will assume that Postgres is running on hardware equivalent to its own. (This is ideal if Postgres is running on either the same machine or an equivalent one from a homogenous Kubernetes node pool.)
CHAINGRAPH_POSTGRES_MAX_CONNECTIONS=
# If set to false, the Postgres database will be configured to use "synchronous_commit = off" during initial sync.
# In real-world testing, this usually reduces the speed of Chaingraph's initial sync, so Chaingraph leaves "synchronous_commit = on" by default.
CHAINGRAPH_POSTGRES_SYNCHRONOUS_COMMIT=true
# The target size (in MB) of the buffer which holds downloaded blocks waiting to be saved to the database. This primarily affects memory usage during the initial chain sync.
# For best performance, this should be around `CHAINGRAPH_POSTGRES_MAX_CONNECTIONS * maximum block size`, while leaving enough memory available to the host machine. If not set, Chaingraph will measure free memory at startup and attempt to select a reasonable value.
CHAINGRAPH_BLOCK_BUFFER_TARGET_SIZE_MB=
# A mapping of network magic bytes to hex-encoded genesis blocks.
# Format: `NETWORK_MAGIC:RAW_GENESIS_BLOCK_HEX`, comma separated.
# E.g. CHAINGRAPH_GENESIS_BLOCKS=e3e1f3e8:rawblockhex,deadbeef:rawblockhex
CHAINGRAPH_GENESIS_BLOCKS=e3e1f3e8:0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000,dab5bffa:0100000043497fd7f826957108f4a30fd9cec3aeba79972084e90ead01ea330900000000bac8b0fa927c0ac8234287e33c5f74d38d354820e24756ad709d7038fc5f31f020e7494dffff001d03e4b6720101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0e0420e7494d017f062f503253482fffffffff0100f2052a010000002321021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac00000000,e2b7daaf:0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4af1a93c5fffff001d01d3cd060101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000
# A list of trusted nodes to which this Chaingraph instance should connect.
# Format: `NODE_NAME:IP_ADDRESS:PORT_NUMBER:NETWORK` comma separated. NETWORK may be provided as `mainnet` (0xe3e1f3e8), `testnet`/`testnet4`/`chipnet` (0xe2b7daaf), or 4 hex-encoded "magic bytes", e.g. `e3e1f3e8`.
# E.g. CHAINGRAPH_TRUSTED_NODES=bchn-mainnet:127.0.0.1:8333:mainnet,verde-mainnet:127.0.0.1:8334:mainnet,another-mainnet:127.0.0.1:8335:e3e1f3e8
CHAINGRAPH_TRUSTED_NODES=bchn-testnet:127.0.0.1:28333:testnet4,bchn-chipnet:127.0.0.1:48333:chipnet
# User-Agent string to share with trusted nodes. If not set, the default `/chaingraph:[version]/` will be used.
# e.g. CHAINGRAPH_USER_AGENT=/chaingraph-custom:0.0.0/
CHAINGRAPH_USER_AGENT=
# The port at which the internal API will listen
CHAINGRAPH_INTERNAL_API_PORT=3200
# The file path to which logs should be written. May be either a relative or absolute path, e.g. `data/chaingraph/log.ndjson` or `~/.chaingraph/log.ndjson`
# To automatically create a new log file based on the start time of each run, provide only a directory name (without `.ndjson` file extension), e.g. `~/.chaingraph/logs`
# To disable logging to a file, set `CHAINGRAPH_LOG_PATH=false`
CHAINGRAPH_LOG_PATH=data/chaingraph/logs
# The minimum log level to print to STDOUT. May be `trace`, `debug`, `info`, `warn`, `error`, or `fatal`.
# When `NODE_ENV` is not `production`, STDOUT logs will also be piped through the pino-pretty package.
CHAINGRAPH_LOG_LEVEL_STDOUT=debug
# The minimum log level to log at `CHAINGRAPH_LOG_PATH`. May be `trace`, `debug`, `info`, `warn`, `error`, or `fatal`.
CHAINGRAPH_LOG_LEVEL_PATH=trace
# When enabled, Chaingraph will log all messages it receives.
# This is useful for debugging network problems, but should otherwise remain disabled to reduce log sizes.
CHAINGRAPH_LOG_FIREHOSE=false
# To optimize for production, set this to `production`.
NODE_ENV=development