@@ -173,52 +173,9 @@ python3 ./run_tests.py --dbs=dummydb,postgres --tests=api_faucet.py
173
173
python3 ./run_tests.py --dbs=dummydb,postgres --tests=api_faucet.py,process_generator.py
174
174
```
175
175
176
- ## Starting and restating the DB ##
177
-
178
- For starting and restating the database, the create_db process in
179
- https://github.com/jtimon/elements-explorer/blob/master/docker/explorer/Procfile
180
- must be active. Conversely, to stop the db from being restarted with
181
- every deployment/run, one must comment that line/process of the Procfile.
182
-
183
- Currently the db needs to be restarted whenever:
184
-
185
- - The schema changes in any way.
186
- - Some of the data stored in blob fields changes
187
- - The reorg handling code shows to be faulty
188
- - Any daemon witnessed a 100-block reorg
189
- - Any daemon crashed or got into a bad state that justifies restarting
190
- its persistent cache
191
-
192
-
193
- ## greedy caching ##
194
-
195
- As explained in the previous section, processes can be activated or
196
- deactivated in https://github.com/jtimon/elements-explorer/blob/master/docker/explorer/Procfile .
197
-
198
- One of the processes one may want to run when the db is not being
199
- restarted is the greedy cacher for any selected set of chains.
200
-
201
- It will slow down initialization and in general everything until it
202
- runs down to height 0 for its chain from the first successfully
203
- getchaininfo result at least once. After that, if the reorg handling
204
- processes are activated, it just double checks that blocks are cached
205
- at least once. Greedy cachers are independent from reorg handling
206
- processes, and thus what they cache may be deleted.
207
-
208
- Since they are very noisy, they are only recommended when you want to
209
- fill the db cache but you don't want to see extra messages in your
210
- logs. Deactivating them should be always fine.
211
-
212
- On anything resembling production, they should be activated too, even
213
- if they take days to fill the db cache the first time, since any
214
- response coming the db without bothering the daemon is one chance less
215
- for a denial of service attack, which, by the way, the whole project
216
- is exposed to even after that unless you're working on a closed
217
- network where you can take care of those attacks in some other way or
218
- if you're just using this project as a developer as you should. In
219
- that latter case you just have to remember not to DoS yourself harder
220
- than your machine can take, but please send back any weird concurrency
221
- errors you get.
176
+ ## More details about handling the DBs ##
177
+
178
+ See ./doc/db.org
222
179
223
180
# License
224
181
0 commit comments