-
Notifications
You must be signed in to change notification settings - Fork 114
/
.env
181 lines (145 loc) · 8.04 KB
/
.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
PG_HOST=127.0.0.1
PG_PORT=5490
PG_USER=postgres
PG_PASSWORD=postgres
PG_DATABASE=stacks_blockchain_api
PG_SCHEMA=public
PG_SSL=false
# Idle connection timeout in seconds, defaults to 30
# PG_IDLE_TIMEOUT=30
# Max connection lifetime in seconds, defaults to 60
# PG_MAX_LIFETIME=60
# Seconds before force-ending running queries on connection close, defaults to 5
# PG_CLOSE_TIMEOUT=5
# Can be any string, use to specify a use case specific to a deployment
PG_APPLICATION_NAME=stacks-blockchain-api
# The connection URI below can be used in place of the PG variables above,
# but if enabled it must be defined without others or omitted.
# PG_CONNECTION_URI=
# If your PG deployment implements a combination of primary server and read replicas, you should
# specify the values below to point to the primary server. The API will use primary when
# implementing LISTEN/NOTIFY postgres messages for websocket/socket.io support.
# To avoid any data inconsistencies across replicas, make sure to set `synchronous_commit` to
# `on` or `remote_apply` on the primary database's configuration.
# See https://www.postgresql.org/docs/12/runtime-config-wal.html
# Any value not provided here will fall back to the default equivalent above.
# PG_PRIMARY_HOST=
# PG_PRIMARY_PORT=
# PG_PRIMARY_USER=
# PG_PRIMARY_PASSWORD=
# PG_PRIMARY_DATABASE=
# PG_PRIMARY_SCHEMA=
# PG_PRIMARY_SSL=
# PG_PRIMARY_IDLE_TIMEOUT=
# PG_PRIMARY_MAX_LIFETIME=
# PG_PRIMARY_CLOSE_TIMEOUT=
# The connection URI below can be used in place of the PG variables above,
# but if enabled it must be defined without others or omitted.
# PG_PRIMARY_CONNECTION_URI=
# Limit to how many concurrent connections can be created, defaults to 10
# PG_CONNECTION_POOL_MAX=10
# Insert concurrency when processing new blocks
# If your PostgreSQL is operating on SSD and has multiple CPU cores, consider raising this value, for instance, to 8 or 16.
# STACKS_BLOCK_DATA_INSERT_CONCURRENCY=4
# If specified, controls the Stacks Blockchain API mode. The possible values are:
# * `readonly`: Runs the API endpoints without an Event Server that listens to events from a node and
# writes them to the local database. The API will only read data from the PG database
# specified above to respond to requests.
# * `writeonly`: Runs the Event Server without API endpoints. Useful when looking to query the postgres
# database containing blockchain data exclusively without the overhead of a web server.
# * `offline`: Run the API endpoints without a stacks-node or postgres connection. In this mode,
# only the given Rosetta endpoints are supported:
# https://www.rosetta-api.org/docs/node_deployment.html#offline-mode-endpoints
# If not specified or any other value is provided, the API will run in the default `read-write` mode
# (with both Event Server and API endpoints).
# STACKS_API_MODE=
# To avoid running unnecessary mempool stats during transaction influx, we use a debounce mechanism for the process.
# This variable controls the duration it waits until there are no further mempool updates
# MEMPOOL_STATS_DEBOUNCE_INTERVAL=1000
# MEMPOOL_STATS_DEBOUNCE_MAX_INTERVAL=10000
# If specified, an http server providing profiling capability endpoints will be opened on the given port.
# This port should not be publicly exposed.
# STACKS_PROFILER_PORT=9119
STACKS_CORE_EVENT_PORT=3700
STACKS_CORE_EVENT_HOST=127.0.0.1
STACKS_BLOCKCHAIN_API_PORT=3999
STACKS_BLOCKCHAIN_API_HOST=127.0.0.1
STACKS_CORE_RPC_HOST=127.0.0.1
STACKS_CORE_RPC_PORT=20443
# STACKS_CORE_PROXY_HOST=127.0.0.1
# STACKS_CORE_PROXY_PORT=20443
# Configure a path to a file containing additional stacks-node `POST /v2/tranascation` URLs for the /v2 proxy to mutlicast.
# The file should be a newline-delimited list of URLs.
# STACKS_API_EXTRA_TX_ENDPOINTS_FILE=./config/extra-tx-post-endpoints.txt
# STACKS_FAUCET_NODE_HOST=<IP or hostname>
# STACKS_FAUCET_NODE_PORT=<port number>
# A comma-separated list of STX private keys which will send faucet transactions to accounts that
# request them. Attempts will always be made from the first account, only once transaction chaining
# gets too long the faucet will start using the next one.
# FAUCET_PRIVATE_KEY=
## configure the chainID/networkID; testnet: 0x80000000, mainnet: 0x00000001
STACKS_CHAIN_ID=0x00000001
# configure custom testnet and mainnet chainIDs for other networks such as subnets,
# multiple values can be set using comma-separated key-value pairs.
# TODO: currently configured with the default subnet testnet ID, the mainnet values
# are placeholders that should be replaced with the actual subnet mainnet chainID
CUSTOM_CHAIN_IDS=testnet=0x55005500,mainnet=12345678,mainnet=0xdeadbeaf
# If enabled, the API will skip the startup validation request to the stacks-node /v2/info RPC endpoint
# SKIP_STACKS_CHAIN_ID_CHECK=1
# Seconds to allow API components to shut down gracefully before force-killing them, defaults to 60
# STACKS_SHUTDOWN_FORCE_KILL_TIMEOUT=60
BTC_RPC_HOST=http://127.0.0.1
BTC_RPC_PORT=18443
BTC_RPC_USER=btc
BTC_RPC_PW=btc
BTC_FAUCET_PK=29c028009a8331358adcc61bb6397377c995d327ac0343ed8e8f1d4d3ef85c27
# The contracts used to query for inbound transactions
TESTNET_SEND_MANY_CONTRACT_ID=ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many-memo
MAINNET_SEND_MANY_CONTRACT_ID=SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo
# Enable debug logging
# STACKS_API_LOG_LEVEL=debug
# Directory containing Stacks 1.0 BNS data extracted from https://storage.googleapis.com/blockstack-v1-migration-data/export-data.tar.gz
# BNS_IMPORT_DIR=/extracted/export-data-dir/
# Stacks blockchain node type (L1 or subnet). L1 by default.
# If STACKS_NODE_TYPE is set to subnet, BNS importer is skipped.
STACKS_NODE_TYPE=L1
# Override the default file path for the proxy cache control file
# STACKS_API_PROXY_CACHE_CONTROL_FILE=/path/to/.proxy-cache-control.json
# Enable Rosetta endpoints.
# STACKS_API_ENABLE_ROSETTA=1
# Enable FT metadata processing for Rosetta operations display. Disabled by default.
# STACKS_API_ENABLE_FT_METADATA=1
# The Rosetta API endpoints require FT metadata to display operations with the proper `symbol` and
# `decimals` values. If FT metadata is enabled, this variable controls the token metadata error
# handling mode when metadata is not found.
# The possible values are:
# * `warning`: The API will issue a warning and not display data for that token.
# * `error`: The API will throw an error. If not specified or any other value is provided, the mode
# will be set to `warning`.
# STACKS_API_TOKEN_METADATA_ERROR_MODE=warning
# Web Socket ping interval to determine client availability, in seconds.
# STACKS_API_WS_PING_INTERVAL=5
# Web Socket ping timeout, in seconds. Clients will be dropped if they do not respond with a pong
# after this time has elapsed.
# STACKS_API_WS_PING_TIMEOUT=5
# Web Socket message timeout, in seconds. Clients will be dropped if they do not acknowledge a
# message after this time has elapsed.
# STACKS_API_WS_MESSAGE_TIMEOUT=5
# Web Socket update queue timeout, in seconds. When an update is scheduled (new block, tx update,
# etc.), we will allow this number of seconds to elapse to allow all subscribed clients to receive
# new data.
# STACKS_API_WS_UPDATE_QUEUE_TIMEOUT=5
# Specify max number of STX address to store in an in-memory LRU cache (CPU optimization).
# Defaults to 50,000, which should result in around 25 megabytes of additional memory usage.
# STACKS_ADDRESS_CACHE_SIZE=10000
# Specify a URL to redirect from /doc. If this URL is not provided, server renders local documentation
# of openapi.yaml for test / development NODE_ENV.
# For production, /doc is not served if this env var is not provided.
# API_DOCS_URL="https://docs.hiro.so/api"
# For use while syncing. Places the API into an "Initial Block Download(IBD)" mode,
# forcing it to stop any redundant processing until the node is fully synced up to its peers.
# Some examples of processing that are avoided are:
# REFRESH MATERIALIZED VIEW SQLs that are extremely CPU intensive on the PG instance, Mempool messages, etc.,
# IBD_MODE_UNTIL_BLOCK=
# Folder with events to be imported by the event-replay.
STACKS_EVENTS_DIR=./events