feat(eth-validator-cli): new plugin. by TobiWo. managing validators via execution layer requests#97
Conversation
…ia execution layer requests
|
""" WalkthroughThe changes introduce a new plugin, "eth-validator-cli by TobiWo," to the EthPillar TUI. This includes updating the main script to handle the new plugin, adding an example environment configuration, and providing scripts for plugin installation, upgrading, removal, and an interactive menu for Ethereum validator operations. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EthPillar TUI
participant Plugin Installer
participant Plugin Menu
User->>EthPillar TUI: Selects "eth-validator-cli" plugin
EthPillar TUI->>EthPillar TUI: Export env vars, check plugin dir
alt Plugin not installed
EthPillar TUI->>Plugin Installer: Run install script (-i)
Plugin Installer->>EthPillar TUI: Complete installation
end
EthPillar TUI->>Plugin Menu: Launch menu.sh
User->>Plugin Menu: Interact with validator management options
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 4
🔭 Outside diff range comments (1)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (1)
130-152: 🛠️ Refactor suggestionProvide a default action when no flags supplied.
If the script is invoked without-i,-u, or-r, it silently exits. It’s better to show usage:if [[ $OPTIND -eq 1 ]]; then usage exit 1 fior force at least one option.
♻️ Duplicate comments (3)
plugins/eth-validator-cli/menu.sh (3)
62-74: Duplicate of previous command-invocation pattern.
The same string-concatenation approach is used inexitCommand. Please apply the array-based fix described above to harden against word splitting.
76-88: Duplicate of previous command-invocation pattern.
switchWithdrawalCredentialTypeCommandalso buildscommandas a string. Refactor to use an array as per the earlier suggestion to avoid edge-case failures.
90-104: Duplicate of previous command-invocation pattern.
withdrawCommandfollows the same pattern—please refactor to use an array-based invocation to ensure robust handling of user input.
🧹 Nitpick comments (8)
plugins/eth-validator-cli/env.example (1)
1-3: Consider adding inline documentation to the template.
While the three variables are clear, it would help first-time users if each line had a brief comment explaining its purpose and expected format. For example:# JSON-RPC endpoint for your execution client JSON_RPC_URL=http://localhost:8545 # Beacon node API endpoint BEACON_API_URL=http://localhost:5052 # Maximum number of validator operations per block MAX_REQUESTS_PER_BLOCK=5plugins/eth-validator-cli/menu.sh (2)
13-20: Remove or leverage unused color variables.
ShellCheck flagsy,b, andpas unused (SC2034). Either delete them or use them for warnings/prompts to avoid stale code.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 14-14: y appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 15-15: b appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 16-16: p appears unused. Verify use (or export if used externally).
(SC2034)
106-160: Add robust error handling and shell safety flags.
Consider adding at the top:set -euo pipefailand catching the absence of dependencies (
whiptail,jq, etc.) before entering the main loop. This will improve maintainability and prevent partial failures.plugins/eth-validator-cli/plugin_eth-validator-cli.sh (5)
10-11: Consider enabling strict mode.
Right after the shebang, add:set -euo pipefail IFS=$'\n\t'to catch errors early, avoid unset variables, and handle pipelines correctly.
53-60: Handle missingcurrent_versiongracefully.
If the plugin isn’t installed yet,current_versionwon’t exist. Before reading it:if [[ ! -f "$PLUGIN_INSTALL_PATH/current_version" ]]; then error "No installed version found; please install first (-i)"; return fiThis prevents confusing upgrade prompts.
63-100: After copying the example env, ensure executables have correct permissions.
You copyenv.exampletoenv, but don’t set themenu.shand client binary as executable. Consider:sudo chmod +x "$PLUGIN_INSTALL_PATH/eth-validator-cli" "$PLUGIN_INSTALL_PATH/menu.sh"so users can run the menu immediately.
103-108: Verify removal path beforerm -rf.
To avoid catastrophic deletion ifPLUGIN_INSTALL_PATHis unset, wrap:if [[ -d "$PLUGIN_INSTALL_PATH" ]]; then sudo rm -rf "$PLUGIN_INSTALL_PATH" else error "Installation directory not found" fi
111-128: Typo in usage help formatting.
TheOptions)andAbout $APP_NAME)lines use a closing parenthesis instead of a colon, which is inconsistent. Changing them to:Options: ... About $APP_NAME:improves readability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
ethpillar.sh(2 hunks)plugins/eth-validator-cli/env.example(1 hunks)plugins/eth-validator-cli/menu.sh(1 hunks)plugins/eth-validator-cli/plugin_eth-validator-cli.sh(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh
[warning] 31-31: _arch is referenced but not assigned.
(SC2154)
[warning] 35-35: _platform is referenced but not assigned.
(SC2154)
plugins/eth-validator-cli/menu.sh
[warning] 14-14: y appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 15-15: b appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 16-16: p appears unused. Verify use (or export if used externally).
(SC2034)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: run-lido-csm-staking-node
🔇 Additional comments (3)
ethpillar.sh (2)
1192-1193: New plugin submenu entry looks consistent.
The "🔧 eth-validator-cli by TobiWo" entry follows the existing pattern and iconography. No issues spotted.
1251-1257: Ensure necessary env vars are available to the plugin.
You exportBACKTITLE,EDITOR,_platform, and_archbefore invoking the installer and menu. The plugin’smenu.shalso sources its ownenvto pick upJSON_RPC_URL,BEACON_API_URL, andMAX_REQUESTS_PER_BLOCK. Verify at runtime that both sets of variables (global and plugin-specific) are correctly merged.plugins/eth-validator-cli/menu.sh (1)
21-32: Nice modular logging and prompting functions.
Theinfo,error, andquestionhelpers keep the code DRY and readable. Consider adding a check forwhiptail/jqavailability at the top to preempt runtime failures.
e5003c1 to
c2340ee
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (1)
30-36: Initialize_archand_platformbefore use.
These variables are referenced indownloadClient()but never set, causing SC2154 warnings and download failures. Insert this beforedownloadClient():+ # Detect architecture and platform + _arch=$(uname -m) + case "$_arch" in + x86_64) _arch=amd64 ;; + aarch64) _arch=arm64 ;; + *) error "Unsupported arch: $_arch"; exit 1 ;; + esac + _platform=$(uname -s | tr '[:upper:]' '[:lower:]')🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
[warning] 36-36: _platform is referenced but not assigned.
(SC2154)
🧹 Nitpick comments (3)
plugins/eth-validator-cli/menu.sh (2)
32-35: Consider quoting paths in file checks.
To prevent globbing or word-splitting ifPLUGIN_INSTALL_PATHever contains spaces, quote the tests:- [[ -f $PLUGIN_INSTALL_PATH/env ]] && source $PLUGIN_INSTALL_PATH/env + [[ -f "$PLUGIN_INSTALL_PATH/env" ]] && source "$PLUGIN_INSTALL_PATH/env" - [[ -f $PLUGIN_INSTALL_PATH/current_version ]] && VERSION=$(cat $PLUGIN_INSTALL_PATH/current_version) + [[ -f "$PLUGIN_INSTALL_PATH/current_version" ]] && VERSION=$(cat "$PLUGIN_INSTALL_PATH/current_version")
152-156: Use the install path for helper script invocation.
Relying on a relative path (./plugins/...) may fail if the CWD changes. Prefer the absolute install location:- exec ./plugins/eth-validator-cli/plugin_eth-validator-cli.sh -u + exec "$PLUGIN_INSTALL_PATH"/plugin_eth-validator-cli.sh -uAnd similarly for
-r.plugins/eth-validator-cli/plugin_eth-validator-cli.sh (1)
35-38: Guard against empty binary URLs.
IfBINARIES_URLis empty,wgetwill silently fail. Add a check:- BINARIES_URL=$(echo "$json" | jq -r ".assets[] | select(.name) | .browser_download_url" | grep -i "${_platform}-${_custom}") + BINARIES_URL=$(echo "$json" | jq -r ".assets[] | select(.name) | .browser_download_url" | grep -i "${_platform}-${_custom}") + if [[ -z "$BINARIES_URL" ]]; then + error "Failed to find a matching binary for $_platform-$_custom" + exit 1 + fi🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 36-36: _platform is referenced but not assigned.
(SC2154)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
plugins/eth-validator-cli/env.example(1 hunks)plugins/eth-validator-cli/menu.sh(1 hunks)plugins/eth-validator-cli/plugin_eth-validator-cli.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- plugins/eth-validator-cli/env.example
🧰 Additional context used
🪛 Shellcheck (0.10.0)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
[warning] 36-36: _platform is referenced but not assigned.
(SC2154)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: run-lido-csm-staking-node
🔇 Additional comments (3)
plugins/eth-validator-cli/menu.sh (3)
37-39: Environment validation is solid.
Using the: "${VAR:?…}"pattern ensures immediate failure on missing configuration, which is exactly what we want here.
41-46: EnsureNETWORKis defined.
You lowercase${NETWORK,,}, but ifNETWORKisn’t set inenvyou’ll hitset -uand exit. ConfirmNETWORKexists inenv.exampleand is documented.
48-62: Robust command invocation.
Buildingcmdas an array and prompting for confirmation before execution follows best practices and avoids word-splitting issues.Also applies to: 64-76, 78-90, 92-106
| if [[ $OPTIND -eq 1 ]]; then | ||
| usage | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Correct the “no flags” logic.
Checking OPTIND here always evaluates to true, so the script never reaches flag parsing. Use the argument count instead:
- if [[ $OPTIND -eq 1 ]]; then
+ if [[ $# -eq 0 ]]; then
usage
exit 1
fiThis ensures usage is shown only when no flags are passed.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if [[ $OPTIND -eq 1 ]]; then | |
| usage | |
| exit 1 | |
| fi | |
| if [[ $# -eq 0 ]]; then | |
| usage | |
| exit 1 | |
| fi |
c2340ee to
a3dc6b6
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (2)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (2)
132-137: 🛠️ Refactor suggestionShow usage when no flags are provided
Currently, running the script without any options results in no action. Add a pre-check beforegetoptsto display help:+if [[ $# -eq 0 ]]; then + usage + exit 1 +fi while getopts :iurh opt; do case ${opt} in i ) install ;;
13-21:⚠️ Potential issueMissing architecture & platform detection
Variables_archand_platformare later referenced indownloadClient()but never initialized, causing SC2154 warnings and breaking the download logic. Add detection viauname:# Variables RELEASE_URL="https://api.github.com/repos/TobiWo/eth-validator-cli/releases/latest" ... PLUGIN_SOURCE_PATH="$SOURCE_DIR" + +# Detect architecture and platform +_arch=$(uname -m) +case "$_arch" in + x86_64) _arch=amd64 ;; + aarch64) _arch=arm64 ;; + *) echo "Unsupported architecture: $_arch"; exit 1 ;; +esac +_platform=$(uname -s | tr '[:upper:]' '[:lower:]')
🧹 Nitpick comments (3)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (3)
23-26: Use failure-safe curl flags
IngetLatestVersion(), replacecurl -swith flags that cause errors on non-2xx responses. This makes your empty-TAG check more reliable:-function getLatestVersion(){ - TAG=$(curl -s $RELEASE_URL | jq -r .tag_name ) +function getLatestVersion() { + TAG=$(curl -fsSL "$RELEASE_URL" | jq -r .tag_name) if [[ -z "$TAG" ]]; then echo "Failed to fetch latest version"; exit 1; fi }
29-36: Quote variables & improve error branch
InsidedownloadClient(), always quote expansions to prevent globbing/word-splitting and make the unsupported-arch check clearer:-function downloadClient(){ - local _custom - [[ $_arch == "amd64" ]] && _custom="x64" - [[ -z $_custom ]] && echo "Unsupported arch: $_arch" && exit 1 +function downloadClient() { + local _custom + [[ "$_arch" == "amd64" ]] && _custom="x64" + if [[ -z "$_custom" ]]; then + echo "Unsupported architecture: $_arch" + exit 1 + fiAlso, when grepping the JSON, quote
${_platform}and${_custom}:- BINARIES_URL=$(echo "$json" | jq -r ".assets[] | select(.name) | .browser_download_url" | grep --ignore-case "${_platform}"-"${_custom}") + BINARIES_URL=$(echo "$json" | jq -r '.assets[] .browser_download_url' | grep -i "${_platform}-${_custom}")🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
[warning] 36-36: _platform is referenced but not assigned.
(SC2154)
113-120: Minor help text formatting
Inusage(), the “Options” header uses a parenthesis. For consistency with other help tools, switch to a colon:-Options) +Options:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
plugins/eth-validator-cli/env.example(1 hunks)plugins/eth-validator-cli/menu.sh(1 hunks)plugins/eth-validator-cli/plugin_eth-validator-cli.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- plugins/eth-validator-cli/env.example
- plugins/eth-validator-cli/menu.sh
🧰 Additional context used
🪛 Shellcheck (0.10.0)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
[warning] 36-36: _platform is referenced but not assigned.
(SC2154)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: run-lido-csm-staking-node
| #!/bin/bash | ||
|
|
||
| # Author: coincashew.eth | coincashew.com | ||
| # License: GNU GPL | ||
| # Source: https://github.com/coincashew/ethpillar | ||
| # Description: Contributoor helper script | ||
| # | ||
| # Made for home and solo stakers 🏠🥩 | ||
|
|
||
| SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Add strict mode and robust error handling
To catch failures early and avoid unbound variables, enable strict mode at the very top of the script. For example, immediately after the shebang:
+# Enable strict mode
+set -euo pipefail
+IFS=$'\n\t'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| #!/bin/bash | |
| # Author: coincashew.eth | coincashew.com | |
| # License: GNU GPL | |
| # Source: https://github.com/coincashew/ethpillar | |
| # Description: Contributoor helper script | |
| # | |
| # Made for home and solo stakers 🏠🥩 | |
| SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| #!/bin/bash | |
| # Enable strict mode | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # Author: coincashew.eth | coincashew.com | |
| # License: GNU GPL | |
| # Source: https://github.com/coincashew/ethpillar | |
| # Description: Contributoor helper script | |
| # | |
| # Made for home and solo stakers 🏠🥩 | |
| SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
a3dc6b6 to
7ebe574
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (4)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (4)
133-134: Show usage when no options are provided
Invoking the script without flags currently does nothing. Add a guard to display help instead of silently exiting.Insert before the
getoptsloop:if [[ $# -eq 0 ]]; then usage exit 1 fi
1-2: 🛠️ Refactor suggestionEnable strict mode for robust error handling
We should bail out on errors, undefined variables, and pipeline failures to avoid silent failures.Apply this diff right after the shebang:
#!/bin/bash +set -euo pipefail +IFS=$'\n\t'
30-36:⚠️ Potential issueDetect architecture and platform before downloading
The variables_archand_platformare used but never set, causing the download logic to always exit with “Unsupported architecture.”Add detection logic (e.g. before
downloadClientor at the top of the script):_arch=$(uname -m) case "$_arch" in x86_64) _arch=amd64 ;; aarch64) _arch=arm64 ;; *) echo "Unsupported architecture: $_arch"; exit 1 ;; esac _platform=$(uname -s | tr '[:upper:]' '[:lower:]')🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
67-79: 🛠️ Refactor suggestionFix newline handling in
MSG_ABOUT
Backslash-escaped\ninside double quotes won’t render as newlines. Use ANSI-C quoting or a here-doc.Replace with:
-MSG_ABOUT="🔧 eth-validator-cli by TobiWo: CLI tool for managing validators via execution layer requests -\nFeatures: -- Consolidate one or multiple source validators to one target validator -... -Continue to install?" +MSG_ABOUT=$'🔧 eth-validator-cli by TobiWo: CLI tool for managing validators via execution layer requests\n\nFeatures:\n- Consolidate one or multiple source validators to one target validator\n- Switch withdrawal credentials from type 0x01 to 0x02 (compounding) for one or multiple validators\n- Partially withdraw ETH from one or many validators\n- Exit one or many validators\n- This CLI currently only supports validator related features included in the Pectra hardfork.\n- The tool is especially useful if you need to manage multiple validators at once.\n- Currently it only supports private keys as secret. This will change soon with e.g. hardware ledger support.\n- ⚠️ Tool is very early. Use on Hoodi only. Not recommended for mainnet yet!\n\nDocumentation: '"$DOCUMENTATION"$'\nSource Code: '"$SOURCE_CODE"$'\n\nContinue to install?'
🧹 Nitpick comments (2)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (2)
37-43: Validate the download URL before attempting to fetch
If the asset URL isn’t found,wgetwill fail in an unclear way. Let’s catch an emptyBINARIES_URLearly.For example:
- BINARIES_URL=$(echo "$json" | jq -r ".assets[] | select(.name) | .browser_download_url" | grep --ignore-case "${_platform}"-"${_custom}") + BINARIES_URL=$(echo "$json" | jq -r ".assets[] | select(.name) | .browser_download_url" | grep --ignore-case "${_platform}-${_custom}") + if [[ -z "$BINARIES_URL" ]]; then + echo "Error: No download URL found for ${_platform}-${_custom}" + exit 1 + fi🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 38-38: _platform is referenced but not assigned.
(SC2154)
127-131: Nit: Fix stray parenthesis in usage help
The lineAbout $APP_NAME)includes an extra). It should read:About $APP_NAME
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
plugins/eth-validator-cli/env.example(1 hunks)plugins/eth-validator-cli/menu.sh(1 hunks)plugins/eth-validator-cli/plugin_eth-validator-cli.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- plugins/eth-validator-cli/env.example
- plugins/eth-validator-cli/menu.sh
🧰 Additional context used
🪛 Shellcheck (0.10.0)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
[warning] 38-38: _platform is referenced but not assigned.
(SC2154)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: run-lido-csm-staking-node
7ebe574 to
fc9f697
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (3)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (3)
30-36: Implement architecture and platform detection
past_review_comments: Critical:_archand_platformare unset.
You must populate these before using them indownloadClient().function downloadClient(){ - local _custom + local _custom + # Detect host architecture and platform + _arch=$(uname -m) + case "${_arch}" in + x86_64) _arch="amd64" ;; + aarch64) _arch="arm64" ;; + *) echo "Unsupported architecture: ${_arch}"; exit 1 ;; + esac + _platform=$(uname -s | tr '[:upper:]' '[:lower:]')This snippet must appear before you reference
$_archor$_platform.🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
71-83: Fix newline handling in multi-lineMSG_ABOUT
past_review_comments: Backslash-nin double quotes won’t render as newlines inwhiptail. Use ANSI-C quoting or a here-doc.- MSG_ABOUT="🔧 eth-validator-cli by TobiWo: CLI tool for managing validators via execution layer requests -\nFeatures: -- Consolidate ... -... -" + MSG_ABOUT=$'🔧 eth-validator-cli by TobiWo: CLI tool for managing validators via execution layer requests\n\nFeatures:\n- Consolidate one or multiple source validators to one target validator\n- Switch withdrawal credentials from type 0x01 to 0x02 (compounding) for one or multiple validators\n- Partially withdraw ETH from one or many validators\n- Exit one or many validators\n- This CLI currently only supports features from the Pectra hardfork.\n- Useful for batch validator operations.\n- ⚠️ Early-stage: use on testnets only!\n\nDocumentation: '"$DOCUMENTATION"$'\nSource Code: '"$SOURCE_CODE"$'\n\nContinue to install?'
1-2: 🛠️ Refactor suggestionEnable strict mode for safer scripting
Adding strict mode (
set -euo pipefail) and a safeIFSprevents silent failures, unbound variables, and word-splitting issues early in the script.#!/bin/bash +set -euo pipefail +IFS=$'\n\t'
🧹 Nitpick comments (3)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh (3)
131-135: Remove stray parenthesis in usage outputThere's an extra
)on the "About" line that may confuse users.- About $APP_NAME) + About $APP_NAME
14-17: Consistent naming: renameGITHUB_RELEASE_NODEStoGITHUB_RELEASE_NOTES
NODESsuggests a collection;NOTESbetter reflects that this is a link to the release notes page.- GITHUB_RELEASE_NODES="https://github.com/TobiWo/eth-validator-cli/releases" + GITHUB_RELEASE_NOTES="https://github.com/TobiWo/eth-validator-cli/releases"And update all references accordingly.
22-27: Check for required dependencies before executionFail early if
curl,jq,wget,tar, orwhiptailare missing:function check_dependencies() { for cmd in curl jq wget tar whiptail; do command -v "$cmd" >/dev/null 2>&1 || { echo "Error: $cmd is required but not installed."; exit 1; } done } check_dependenciesThis ensures users get a clear error rather than cryptic failures.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
plugins/eth-validator-cli/env.example(1 hunks)plugins/eth-validator-cli/menu.sh(1 hunks)plugins/eth-validator-cli/plugin_eth-validator-cli.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- plugins/eth-validator-cli/env.example
- plugins/eth-validator-cli/menu.sh
🧰 Additional context used
🪛 Shellcheck (0.10.0)
plugins/eth-validator-cli/plugin_eth-validator-cli.sh
[warning] 32-32: _arch is referenced but not assigned.
(SC2154)
[warning] 38-38: _platform is referenced but not assigned.
(SC2154)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: run-lido-csm-staking-node
Summary by CodeRabbit
New Features
Chores