-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.env.example
171 lines (125 loc) · 8.67 KB
/
.env.example
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
## This file - if named .env - is parsed by the application on startup.
## Commented out config items are optional (exception: either PRIVATE_KEY or MNEMONIC need to be set of not running in observer mode).
## The default values are as set in the commented items.
## --- NETWORK PARAMETERS ---
## REQUIRED! http RPC endpoint for the chain/network to be supervised by the sentinel.
HTTP_RPC_NODE=
## The sentinel needs an account for signing liquidation transaction (unless it's running in observer mode).
## Can be configured either by private key or mnemonic (derivation path used: m/44'/60'/0'/0/0).
## Make sure the account set here is funded with native coins on the configured chain/network.
#PRIVATE_KEY=
#MNEMONIC=
## When starting without pre-existing database (e.g. first run), the sentinel will by default
## attempt to fast-sync by first downloading a snapshot of the DB for the connected chain from IPFS.
## This is useful especially for sentinel operators without self-hosted node,
## because the initial sync can take long and cause a lot of RPC requests.
## The IPFS cid (address) of the latest snapshots is set in manifest.json.
#FASTSYNC=true
## The snapshot downloader requires an IPFS gateway.
## You can set the gateway URL of your own IPFS node in order to have data integrity verified
## (see https://docs.ipfs.io/concepts/content-addressing/) or use a public gateway you trust.
## If you have an IPFS node running locally, you may want to set this URL: http://localhost:8080/ipfs/
#IPFS_GATEWAY="https://gateway.pinata.cloud/ipfs//ipfs/"
## When syncing, the sentinel makes range queries to the RPC node in order to get all relevant log events.
## A larger value here results in fewer queries, but RPC nodes have varying max limits set. If this value exceeds that, queries will fail.
## The default of 2000 is a conservative choice which should work with most nodes. You can try a larger value (e.g. 10000 or 20000) for faster sync.
#MAX_QUERY_BLOCK_RANGE=2000
## Interval in seconds at which the sentinel polls the RPC for relevant updates.
#POLLING_INTERVAL=30
## The number of blocks the sentinel should lag behind head when updating chain state.
## This is a protection against chain re-orgs, which the sentinel does not handle.
## What's a reasonable setting depends on the connected network and its finality properties.
#BLOCK_OFFSET=12
## --- PROTOCOL PARAMETERS ---
## Version of the Superfluid framework contracts to load and use.
## PROTOCOL_RELEASE_VERSION=v1
## PIC account this sentinel is affiliated with.
## If set, the sentinel will watch if the configured address becomes the PIC for one or more of the configured tokens.
## Only if the configured address is the PIC for a token, will the sentinel do liquidations during the priority period.
#PIC=
## If this is set to true, the sentinel will not do any liquidations during the plebs period.
## It will instead wait for critical streams to become insolvent and only then liquidate.
## This does not affect liquidations done during the patrician period in case the sentinel acts as PIC for a token.
#PIRATE=false
## --- TOKEN SELECTION PARAMETERS ---
## List of Super Tokens (identified by their contract address) to be supervised.
## If not set (the default), all Super Tokens are supervised. In this case, the sentinel auto-discovers and supervises all Super Tokens deployed on the network, including those deployed after it was started.
## Format: 0x000…,0x000…,0x000…,...
#TOKENS=
## List of Super Tokens not to be supervised.
## Has an effect only if TOKENS is not set and thus defaults to all tokens.
#EXCLUDED_TOKENS=
## --- LIQUIDATION PARAMETERS ---
## If set to true, the sentinel will just observe the protocol and NOT send any liquidations transactions.
## Note: in observer mode, the sentinel is not required to have MNEMONIC or PRIVATE_KEY set
#OBSERVER=false
## Defines a delay (in seconds) added to the point in time at which a liquidation would otherwise be triggered.
## This delay is applied to all liquidations, regardless of the period (patrician, pleb, pirate) during which they take place.
## This can be useful e.g. for a backup sentinel as it can help prevent failing transactions due to concurrent liquidation attempts.
## It can also be used by plebs and pirates to reduce the chance of colliding/failing transactions if sent at the earliest possible point in time.
## Note: if running as a PIC, make sure the delay doesn't exceed the patrician period duration. This would allow plebs to front-run you and take the reward.
#ADDITIONAL_LIQUIDATION_DELAY=0
## On congested chains/networks, transactions sent by the sentinel may remain pending.
## The sentinel uses the network recommended gas price (RPC call eth_gasprice) for new transactions.
## If a transaction sent remains pending for more than the time defined in TX_TIMEOUT, a new transaction with the same nonce and data, but higher gas price is sent (replace tx).
## The multiplier set here determines the gsa price step size between consecutive attempt.
## Example:
## The multiplier is set to the default value of 1.15.
## 1. A liquidation tx with a network recommended gas price of 10 gwei is sent and times out.
## 2. A replacement tx with a gas price of 10*1.15=11.5 gwei is sent and times out.
## 3. A replacement tx with a gas price of 11.5*1.15=13.225 gwei is sent and times out.
## 4. A replacement tx with a gas price of 13.225*1.15=15.20875 gwei is sent.
## etc. This process of up-bidding repeats until the transaction gets executed or the configured upper gas price limit is reached.
#RETRY_GAS_MULTIPLIER=1.15
## Max gas price the sentinel will bid for its transactions.
## If this limit is set too low, transactions may remain pending for too long, allowing agreements to become insolvent.
## If this limit is set too high, the configured account may quickly run out of funds during periods of chain congestion.
## The default is 500 gwei.
#MAX_GAS_PRICE=500000000000
## Determines how long (in seconds) the sentinel will wait before each gas price increase step of a pending transaction.
## If the value gets too small, it may be lower than the typical time it takes for transactions to be recognized as confirmed.
## This situation will manifest itself through error messages hinting at already-used nonces.
#TX_TIMEOUT=60
## --- MONITORING/NOTIFICATION PARAMETERS ---
## Log level. One of: debug, info, warn, error
#LOG_LEVEL=info
## By default, a webserver exposing some application metrics is started at METRICS_PORT.
## Set this to false in order to disable it.
#METRICS=true
## Port at which the metrics webserver is listening. Has no effect if METRICS is set to false.
## When running with Docker, this will affect the host port binding, not the binding inside the container.
#METRICS_PORT=9100
## Let the sentinel instance periodically report a basic metrics to a remote server.
## Set this to false in order to disable it.
#TELEMETRY=true
## Default telemetry server instance provided by Superfluid
#TELEMETRY_URL=https://sentinel-telemetry.x.superfluid.dev
## Reporting interval, defaults to 12 hours
#TELEMETRY_INTERVAL=43200
## Allows to set a custom instance name, included in the data sent to the telemetry server.
#INSTANCE_NAME=Sentinel
## If set, you get notified about key events like process (re)starts, configuration changes and error conditions
## to the Slack channel the hook belongs to.
#SLACK_WEBHOOK_URL=
## If set, you get notified about key events like process (re)starts, configuration changes and error conditions
## to the Telegram channel identified by the bot token and chatid.
#TELEGRAM_BOT_TOKEN=
#TELEGRAM_CHAT_ID=
## If you want notifications delivered through other channels, consider creating a notifier implementation for that channel -
## see `src/services/slackNotifier.js` for a blueprint. PRs welcome!
## If notifications are enabled, setting this enables alerts when the sentinel account balance goes below the specified threshold.
## Note that the value is in wei. Thus in order to set a threshold of 1 native token (e.g. ETH), the value should be 1000000000000000000.
#SENTINEL_BALANCE_THRESHOLD=0
## --- TECHNICAL PARAMETERS ---
## Location of the sqlite database. The file (and non-existing directories in the path) will be created if not existing.
## Note: this is ignored (overridden) when running with Docker.
#DB_PATH=data/db.sqlite
## --- DOCKER PARAMETERS ---
## docker-compose config to be used. By default, only the sentinel service is included.
## In order to run a version with prometheus and grafana bundeled,
## set this value to docker-compose-with-monitoring.yml and uncomment, then (re)start.
#COMPOSE_FILE=docker-compose.yml
## Port at which the Prometheus service is listening.
#PROMETHEUS_PORT=9090
## Port at which the Grafana service is listening.
#GRAFANA_PORT=3000