Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Significant retention.sh Update #15

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

metanull-operator
Copy link

Major retention.sh update to generalize functionality, add configurability, improve error checking, add more client support, etc.

  • Retained ability to set default value of variables in the script, but now also supports environment variables and loading an environment variable file
  • Added timeout_window variable to configure timeout for resetting clients
  • Client systemd service names must now be defined to support different system setups
  • Client type must be defined for each client to support different logic for various clients
  • Ownership and group of testnet files can now be reset after downloaded latest files, in case specific ownership is required
  • FORCE_RESET option added to force a reset of the clients for testing purposes
  • Additional error checking around parameters
  • External command calls updated to avoid injections into commands
  • Execution data directory logic now retains enode info for reth, geth, besu, nethermind and erigon
  • Logic updated to support single-client consensus/validator clients or separate consensus and validator clients
  • Slashing database cleared for lodestar, prysm, lighthouse, teku, and nimbus validator clients in both single-process and separate-process configurations
  • Genesis initialization added for erigon
  • Optionally run geth and erigon initialization as a non-root user, for instances where the service doesn't run as root
  • Additional error handling around retrieval of GitHub release information

Update retention.sh to allow configuration through environment variables. Attempt to complete functionality for client resets.
Minor text change when displaying time until genesis
Added a lot of variable value hygiene code. Much more checking of variable values. Running commands using arrays to avoid injection attacks using variable values. Added optional sudo command to geth and erigon genesis initialization if those services are run as specific users and files need to be owned by those users. Eliminated some ephemery references, though this is still ephemery focused.
Some significant code reorganization primarily to better handle some unset VC variables and better code reuse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant