-
Notifications
You must be signed in to change notification settings - Fork 980
Description
Description
Currently, we have the default directory in lighthouse as ~/.lighthouse/. Unless we explicitly provide the --datadir flag, the beacon/validator/account commands use this directory as the default base directory. The folder has the following structure
.lighthouse
├── beacon
├── secrets
├── validators
└── wallets
Currently, we have only a single network that people care about (medalla), so it's fine to have the beacon and key related subdirectories at the top level.
But as we move closer towards mainnet, we will have multiple networks that we would want to run and we could see issues with overwriting of one chain's data/keys with another.
Proposal
.lighthouse
└── medalla
├── beacon
├── secrets
├── validators
└── wallets
└── mainnet
├── beacon
├── secrets
├── validators
└── wallets
└── custom
├──...
Here, we have a top level directory for every named testnet we can pass in the --testnet option and a custom directory for handling networks with a custom --testnet-dir.
Having multiple unnamed testnets from the --testnet-dir can lead to overwriting of files in the custom directory.
The disadvantage I see with this proposal is that this isn't backwards compatible for users currently running medalla.
So we would need to have a mechanism for moving the current top level folders that are being used in medalla inside ~/.lighthouse/medalla the first time a user runs the beacon/validator/account binaries. Not sure if this would be an issue with permissions somehow.
Keen to hear your thoughts/suggestions/alternatives :)