rhmaxdotorg / pulsechain-validator

PulseChain Validator Automated Setup Scripts
https://launchpad.pulsechain.com
38 stars 13 forks source link

Cannot add more validators after having added a first round #15

Closed nicogranuja closed 1 year ago

nicogranuja commented 1 year ago

Yo, is this by design/expected?

I setup the first round of validators following the process and everything went great, but I want to add more validators on top of my initial ones, I followed the process to produce the keys, scp into host and when I try to run the /opt/lighthouse/lighthouse/lh account validator import --directory ~/my_keys_folder --network=pulsechain_testnet_v4 command to import the keys I get this error:

Running account manager for pulsechain_testnet_v4 network
validator-dir path: "/home/node/.lighthouse/pulsechain_testnet_v4/validators"
Unable to open or create slashing protection database at /home/node/.lighthouse/pulsechain_testnet_v4/validators/slashing_protection.sqlite: SQLError("database is locked")

Is this by design/expected? Can we only add the initial load of validators and none on top? Or is there another process after having added the first load

Thanks

nicogranuja commented 1 year ago

Solved: Turns out the lighthouse-validator must be stopped: sudo systemctl stop lighthouse-validator to "unlock the SQL Lite db: slashing_protection.sqlite

So steps to add more validators (recommended to have both ubuntu and node user open in 2 tabs): Run as ubuntu user: sudo systemctl stop lighthouse-validator

Run as node user: /opt/lighthouse/lighthouse/lh account validator import --directory ~/my_keys_folder --network=pulsechain_testnet_v4 After you finish importing the key or keys

Run as ubuntu user to start the lh client back up: sudo systemctl start lighthouse-validator

Verify that all clients are up and running: sudo systemctl status geth lighthouse-beacon lighthouse-validator

Feel free to add this to a FAQ section of the README, or we can leave here for someone else who runs into this in the future can address the issue. Also, is there a better way to do this? Seems kind of sketchy having to stop the service and risk getting penalized for doing so, when wanting to add more validators 🧐

rhmaxdotorg commented 1 year ago

good stuff! thanks

yeah, you need to stop the service to change its config and reload it. maybe in the future the clients will be more flexible.