EPF4: UPDATE 7
This is a direct follow-up to UPDATE 6, which is basically me reviewing the experimental code i have written prior for implementing ephemery reset using Lodestar.
The most important takeaway is that i will be creating three major code files within the reset directory in lodestar's ephemery package:
checkTestnet.ts
resetTestnet.ts
index.ts
NOTE: checkTestnet.ts
is a dependency on holly's genesis implementation. This is because the checkTestnet
function as a whole is checking if a new ephemery genesis has been released based on the terminal timestamp and using that information to reset the client using the new genesis.
I will address the checkTestnet
function in another update so as to focus solely on resetTestnet.ts
in this one. The index.ts
file is simply useful for importing the aforementioned functions and doesn't warrant a deep dive.
stopClients()
This is probably the most important part of the reset implementation problem.
stopClients()
==> pauseClients()
.startClients()
startClients() ==> restartClients()
.clearDataDirs() && downloadGenesisRelease(genesisRelease) && setupGenesis()
TODO: