-
Notifications
You must be signed in to change notification settings - Fork 94
/
base.env
308 lines (249 loc) · 13.3 KB
/
base.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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
### Environment vars for the backend image
# We explain each flag you can pass to a node and what it does in this file. However, note
# that the actual values of many of these flags are passed on a per-environment basis using
# the docker-compose file for the particular node type (eg devent/testnet/mainnet).
# If you are running a validator, you must set this to the exact same seed that you used to
# register your validator. It will be a twelve word mnemonic you got when you created your
# wallet. You must set this in your docker-compose if you want your node to run as a validator.
POS_VALIDATOR_SEED=
# Options are: [blocksync, hypersync, hypersync-archival]
# - blocksync: Runs a vanilla blocksync. Will download headers from the beginning of time and
# then download all blocks and connect them. This is the slowest sync type but it's also
# the best supported as of Apr 2024.
#
# - hypersync: Your node will download a snapshot of the state that is at most one week old,
# validate that the state lines up with a checksum, and then only connect the last week of
# blocks. This is much faster than blocksync, but a little more error-prone. In the coming
# months, this will become the recommended sync type.
#
# - hypersync-archival: The same as hypersync, but it also downloads historical blocks without
# connecting them. Much faster than blocksync, but still allows for historical analysis or
# building interesting data structures off of historical data.
SYNC_TYPE='blocksync'
# When true, the node will build the indexes needed to allow *other nodes* to sync from it.
# Note this can be true with any SYNC_TyPE, but it's required with the hypersync-*
# sync types.
HYPERSYNC=true
# When this flag is set, we will query these nodes for a checkpoint block and we will skip
# signature checking until we reach this block. Note this flag is extremely important
# for syncing. If you don't set it, syncing will take a really long time.
CHECKPOINT_SYNCING_PROVIDERS=
# The log level. 0 = INFO, 1 = DEBUG, 2 = TRACE. Defaults to zero
GLOG_V=0
# The syntax of the argument is a comma-separated list of pattern=N
# where pattern is a literal file name (minus the ".go" suffix) or "glob"
# pattern and N is a V level. For instance, -vmodule=gopher*=3 sets the V
# level to 3 in all Go files whose names begin "gopher".
# Example: GLOG_VMODULE=--glog-vmodule="*api*=0,*balance*=0"
GLOG_VMODULE=
# Whether or not to use the DeSo testnet. Mainnet is used by default.
TESTNET=false
# When set to true, this node will only connect to other nodes that have
# regtest=true. This is used to configure nodes to run in devnet. It should
# be falst if you're running on testnet or mainnet.
REGTEST=false
# A comma-separated list of ip:port addresses that we should listen on.
# These will take priority over addresses discovered by network
# interfaces.
EXTERNAL_IPS=
# A comma-separated list of ip:port addresses that we should connect to on startup.
# If this argument is specified, we don't connect to any other peers. This is useful
# if you want to debug your node sync without worrying about external factors.
CONNECT_IPS=
# A miner is started if and only if this field is set. Indicates where to send
# block rewards from mining blocks. Public keys must be
# comma-separated compressed ECDSA public keys formatted as base58 strings.
MINER_PUBLIC_KEYS=
# How many threads to run for mining. Only has an effect when --miner_public_keys
# is set. If set to zero, which is the default, then the number of
# threads available to the system will be used.
NUM_MINING_THREADS=0
# A comma-separated list of ip:port addresses that we should connect to on startup.
# If this argument is specified, we will still fetch addresses from DNS seeds and
# potentially connect to them.
ADD_IPS=
# A comma-separated list of DNS seeds to be used in addition to the
# pre-configured seeds.
ADD_SEEDS=
# admin_public_keys is list of public keys delimited by a space
# which gives users access to the admin panel. If '*' is specified
# anyone can access the admin panel.
ADMIN_PUBLIC_KEYS=*
# super_admin_public_keys is a list of public keys delimited by a space
# which gives users access to the super tab of the admin panel and select endpoints
# for these privileged users. At this time, super admins can adjust the reserve price
# at which this node will sell $DESO, set the slippage fee applied to $DESO buys,
# and manage verification of users on this node.
SUPER_ADMIN_PUBLIC_KEYS=*
# When set, determines the port on which this node will listen for protocol-related
# messages. If unset, the port will default to what is present in the DeSoParams set.
# Note also that even though the node will listen on this port, its outbound
# connections will not be determined by this flag
# (17000 mainnet default, 18000 testnet default).
PROTOCOL_PORT=
# When set, determines the port on which this node will listen for json
# requests. If unset, the port will default to what is present in the
# DeSoParams set (17001 mainnet default, 18001 testnet default).
API_PORT=
# Transactions below this feerate will be rate-limited rather than flat-out
# rejected. This is in contrast to min_feerate, which will flat-out reject
# transactions with feerates below what is specified. As such, this value will have no
# effect if it is set below min_feerate. This, along with min_feerate, should
# be the first line of defense against attacks that involve flooding the
# network with low-fee transactions in an attempt to overflow the mempool
RATE_LIMIT_FEERATE=0
# The minimum feerate this node will accept when processing transactions
# relayed by peers. Increasing this number, along with increasing
# rate_limit_feerate, should be the first line of
# defense against attacks that involve flooding the network with low-fee
# transactions in an attempt to overflow the mempool
#
# TODO: This is deprecated in favor of the dynamic fee estimator introduced
# in Revolution PoS
MIN_FEERATE=1000
# The target number of outbound peers. The node will continue attempting to connect to
# random addresses until it has this many outbound connections. During testing it's
# useful to turn this number down and test a small number of nodes in a controlled
# environment.
TARGET_OUTBOUND_PEERS=8
# The maximum number of inbound peers a node can have.
MAX_PEERS=125
# The location where all of the protocol-related data like blocks is stored.
# Useful for testing situations where multiple clients need to run on the
# same machine without trampling over each other.
# When unset, defaults to the system's configuration directory.
DATA_DIR=/db
# When set, the node will not allow more than one connection to/from a particular
# IP. This prevents forms of attack whereby one node tries to monopolize all of
# our connections and potentially make onerous requests as well. Useful to
# disable this flag when testing locally to allow multiple inbound connections
# from test servers
ONE_INBOUND_PER_IP=true
# How long the node will wait for a peer to reply to certain types of requests.
# We make this gratuitous just in case the node we're connecting to is backed up.
STALL_TIMEOUT_SECONDS=900
# When set to true, the node does not look up addresses from DNS seeds.
PRIVATE_MODE=false
# When set to true, the node will generate an index mapping transaction
# ids to transaction information. This enables the use of certain API calls
# like ones that allow the lookup of particular transactions by their ID.
# Defaults to false because the index can be large.
TXINDEX=true
# The amount of DeSo given to new accounts to get them started. Only
# active if --starter_deso_seed is set and funded.
# 1 milli (~$0.10 at $100 coin price).
STARTER_DESO_NANOS=1000000
# A comma-separated list of 'prefix=nanos' mappings, where prefix is a phone
# number prefix such as \"+1\". These mappings allow the
# node operator to specify custom amounts of DeSo to users verifying their phone
# numbers based on the country they're in. This is useful as it is more expensive
# for attackers to get phone numbers from certain countries. An example string would
# be '+1=2000000,+2=2000000', which would double the default nanos for users with
# with those prefixes.
STARTER_PREFIX_NANOS_MAP=
# When proviced, this seed is used to send a 'starter' amount of DeSo to
# newly-created accounts.
STARTER_DESO_SEED=
# The IP:PORT or DOMAIN:PORT corresponding to a node that can be used to
# set/get global state. When this is not provided, global state is set/fetched
# from a local DB. Global state is used to manage things like user data, e.g.
# emails, that should not be duplicated across multiple nodes.
#
# TODO: Global state is deprecated in favor of the new Postgres+GraphQL pipeline.
# More details on this soon.
GLOBAL_STATE_REMOTE_NODE=
# When a remote node is being used to set/fetch global state, a shared_secret
# is also required to restrict access.
#
# TODO: Global state is deprecated in favor of the new Postgres+GraphQL pipeline.
# More details on this soon.
GLOBAL_STATE_REMOTE_SECRET=
# Accepts a space-separated lists of origin domains that will be allowed as the
# Access-Control-Allow-Origin HTTP header. Defaults to * if not set.
ACCESS_CONTROL_ALLOW_ORIGINS=*
# If set, runs our secure header middleware in development mode, which disables some
# of the options. The default is true to make it easy to run a node locally.
# See https://github.com/unrolled/secure for more info. Note that
SECURE_HEADER_DEVELOPMENT=true
# These are the domains that our secure middleware will accept requests from.
# Accepts a space-separated lists of origin domains.
# We also set the HTTP Access-Control-Allow-Origin
SECURE_HEADER_ALLOW_HOSTS=*
# Optional. Client-side amplitude key for instrumenting user behavior.
AMPLITUDE_KEY=
# Optional. Client-side amplitude API Endpoint.
AMPLITUDE_DOMAIN=api.amplitude.com
# Optional. Twilio account SID (string id). Twilio is used for sending
# verification texts. See twilio documentation for more info.
TWILIO_ACCOUNT_SID=
# Optional. Twilio authentication token. See twilio documentation for more info.
TWILIO_AUTH_TOKEN=
# Optional. ID for a verify service configured within Twilio (used for
# verification texts)
TWILIO_VERIFY_SERVICE_ID=
# Users won't be able to create a profile unless they buy this
# amount of satoshis or provide a phone number.
# TODO: This field is deprecated by ParamUpdater transaction
MIN_SATOSHIS_FOR_PROFILE=50000
# Optional. Show a support email to users of this node.
## Arguments for the block producer
#
# When set to a non-zero value, the node will generate block
# templates, and cache the number of templates specified by this flag. When set
# to zero, the node will not produce block templates.
#
# TODO: This field is deprecated with the launch of Revolution Proof of Stake
MAX_BLOCK_TEMPLATES_CACHE=100
# When set to a non-zero value, the node will wait at least this many seconds
# before producing another block template
#
# TODO: This field is deprecated with the launch of Revolution Proof of Stake
MIN_BLOCK_UPDATE_INTERVAL=10
# When specified, this key is used to power the BitcoinExchange flow
# and to check for double-spends in the mempool
#
# Note: It is currently a bit dangerous to serve user traffic without a
# BLOCK_CYPHER_API_KEY because the validation of transactions using
# alternative mechanisms is not 100%.
BLOCK_CYPHER_API_KEY=
# When set, the mempool is initialized using a db in the directory specified, and
# subsequent dumps are also written to this dir
MEMPOOL_DUMP_DIR=
## Emergency flags that can help in reducing noise from peers when trying to debug.
# When set to true, the node will not make any outgoing connections or accept
# any incoming connections.
DISABLE_NETWORKING=false
# When set to true, the node will ignore all INV messages unless they come
# from an outbound peer. This is useful when setting up a node that you want to
# have a direct and 1:1 relationship with another node, as is common when
# setting up read sharding.
IGNORE_INBOUND_INVS=false
# When set to true, the node will ignore all transactions created on this node.
READ_ONLY_MODE=false
# When set to an IP:PORT, the BitcoinManager will use this peer to source Bitcoin
# headers and won't talk to anyone else. When unset, a random Bitcoin peer is chosen.
BITCOIN_CONNECT_PEER=
# When set to true, the node will log a snapshot of all DB keys every 30s.
LOG_DB_SUMMARY_SNAPSHOTS=false
# When set to true, the UI will show processing spinners for unmined posts / DeSo
# / creator coins.
SHOW_PROCESSING_SPINNERS=true
# When set to true, unmined BitcoinExchange transactions from peers are
# disregarded. This is OK because we will eventually reprocess this transaction once
# it gets mined into a block, although anything that is built on top of it may not
# be considered. It's set to false by default because most nodes connect to trusted
# peers right now via --connectips and --ignore_inbound_peer_inv_messages.
#
# TODO: It is currently insecure to serve user write traffic without setting this
# flag to true because soneone could theoretically submit garbage entries to the
# mempool.
IGNORE_UNMINED_BITCOIN=false
# Google credentials to upload images to bucket. This is needed in order for image
# uploads to work.
GCP_CREDENTIALS_PATH=
# Name of bucket to store images
GCP_BUCKET_NAME=images.bitclout.com
### Environment vars for the frontend image
# Override the Caddyfile with the one in this directory
CADDY_FILE=/app/Caddyfile.dev