Skip to content

Commit

Permalink
Lido CSM - provide command for deposit-data file json, add 32ETH depo…
Browse files Browse the repository at this point in the history
…sit warning
  • Loading branch information
coincashew committed Jul 24, 2024
1 parent b6c4c4b commit 64a9d1e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
6 changes: 0 additions & 6 deletions env
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ GRAFFITI="🏠🥩🪙🛡️EthPillar"
# ETH address receiving priority fees (tips) and MEV rewards
FEE_RECIPIENT_ADDRESS=

# Validator Client Only Settings
# Beacon node address for standalone validator only client. Example: http://192.168.1.234:5052
VC_ONLY_API_BN_ENDPOINT=
# Execution client address for standalone validator only client. Example: http://192.168.1.234:8545
VC_ONLY_EL_RPC_ENDPOINT=

# MEV must be greater than this value or a block is produced locally
MEV_MIN_BID="0.05"

Expand Down
2 changes: 1 addition & 1 deletion ethpillar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 🙌 Ask questions on Discord:
# * https://discord.gg/dEpAVWgFNB

EP_VERSION="1.9.0"
EP_VERSION="1.9.1"

# VARIABLES
export BASE_DIR="$HOME/git/ethpillar" && cd $BASE_DIR
Expand Down
22 changes: 12 additions & 10 deletions manage_validator_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ function generateNewValidatorKeys(){
"holesky" "Testnet. Practice your staking setup here." OFF \
3>&1 1>&2 2>&3)

if [ -z $NETWORK ]; then exit; fi # pressed cancel
if [ -z "$NETWORK" ]; then exit; fi # pressed cancel
if ! whiptail --title "Information on Secret Recovery Phrase Mnemonic" --yesno "$MSG_INTRO" 25 78; then exit; fi
if network_isConnected; then whiptail --title "Warning: Internet Connection Detected" --msgbox "$MSG_INTERNET" 18 78; fi

while true; do
ETHADDRESS=$(whiptail --title "Ethereum Withdrawal Address" --inputbox "$MSG_ETHADDRESS" 15 78 --ok-button "Submit" 3>&1 1>&2 2>&3)
if [ -z $ETHADDRESS ]; then exit; fi #pressed cancel
if [ -z "$ETHADDRESS" ]; then exit; fi #pressed cancel
if [[ "${ETHADDRESS}" =~ ^0x[a-fA-F0-9]{40}$ ]]; then
break
else
Expand Down Expand Up @@ -100,7 +100,7 @@ function importValidatorKeys(){
"holesky" "Testnet. Practice your staking setup here." OFF \
3>&1 1>&2 2>&3)

if [ -z $NETWORK ]; then exit; fi # pressed cancel
if [ -z "$NETWORK" ]; then exit; fi # pressed cancel

if whiptail --title "Important Information" --defaultno --yesno "$MSG_IMPORT" 20 78; then
loadKeys
Expand All @@ -123,13 +123,13 @@ function addRestoreValidatorKeys(){
"holesky" "Testnet. Practice your staking setup here." OFF \
3>&1 1>&2 2>&3)

if [ -z $NETWORK ]; then exit; fi # pressed cancel
if [ -z "$NETWORK" ]; then exit; fi # pressed cancel
if ! whiptail --title "Information on Secret Recovery Phrase Mnemonic" --yesno "$MSG_INTRO" 25 78; then exit; fi
if network_isConnected; then whiptail --title "Warning: Internet Connection Detected" --msgbox "$MSG_INTERNET" 18 78; fi

while true; do
ETHADDRESS=$(whiptail --title "Ethereum Withdrawal Address" --inputbox "$MSG_ETHADDRESS" 15 78 --ok-button "Submit" 3>&1 1>&2 2>&3)
if [ -z $ETHADDRESS ]; then exit; fi #pressed cancel
if [ -z "$ETHADDRESS" ]; then exit; fi #pressed cancel
if [[ "${ETHADDRESS}" =~ ^0x[a-fA-F0-9]{40}$ ]]; then
break
else
Expand Down Expand Up @@ -231,12 +231,12 @@ function loadKeys(){
sudo systemctl start validator
ohai "Starting validator"
#Rename Imported Keys Dir
KEYFOLDER=${KEYPATH}_$(date +%F_%H-%M-%S)
KEYFOLDER=${KEYPATH}$(date +%F-%H%M%S)
mv $KEYPATH $KEYFOLDER
getLAUNCHPAD_URL
queryValidatorQueue
setLaunchPadMessage
whiptail --title "Next Steps: Upload JSON Deposit Data File" --msgbox "$MSG_LAUNCHPAD" 28 78
whiptail --title "Next Steps: Upload JSON Deposit Data File" --msgbox "$MSG_LAUNCHPAD" 31 78
ohai "Finished loading keys. Press enter to continue."
read
promptViewLogs
Expand All @@ -255,11 +255,13 @@ function setLaunchPadMessage(){

MSG_LAUNCHPAD_LIDO="1) Visit Lido CSM: $LAUNCHPAD_URL_LIDO
\n2) Connect your wallet on the correct network, review and accept terms.
\n3) Copy JSON from your deposit_data-#########.json found in the directory:
\n$KEYFOLDER
\n3) Copy JSON from your deposit_data-#########.json
\nTo view JSON, run command:
cat ~/staking-deposit-cli/$(basename $KEYFOLDER)/deposit*json
\n4) Provide the ~2 ETH/stETH bond per validator.
\n5) Lido will deposit the 32ETH. Wait for your validators to become active. $MSG_VALIDATOR_QUEUE
\nTips:
\n - DO NOT DEPOSIT 32ETH YOURSELF: Lido will handle the validator deposit for you.
\n - Wait for Node Sync: Before making the ~2ETH bond deposit, ensure your EL/CL client is synced to avoid missing rewards.
\n - Timing of Validator Activation: After depositing, it takes about 15 hours for a validator to be activated unless there's a long entry queue."
if [[ $(grep -oE "${CSM_FEE_RECIPIENT_ADDRESS}" /etc/systemd/system/validator.service) ]]; then
Expand Down Expand Up @@ -329,7 +331,7 @@ function setMessage(){
MSG_ETHADDRESS="Ensure that you have control over this address.
\nETH address secured by a hardware wallet is recommended.
\nIn checksum format, enter your Withdrawal Address:"
MSG_ETHADDRESS_LIDO="Set this to Lido's CSM Withdrawal Vault Address.
MSG_ETHADDRESS_LIDO="\nSet this to Lido's CSM Withdrawal Vault Address.
\nHolesky: ${CSM_WITHDRAWAL_ADDRESS}
\nIn checksum format, ether the Withdrawal Address:"
MSG_IMPORT="Importing validator keys:
Expand Down

0 comments on commit 64a9d1e

Please sign in to comment.