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

Nipun/ssv flag different validator dir #223

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,9 @@ fi


# Create ~/.stader dir & files
# //ssv-flag
progress 6 "Creating Stader user data directory..."
{ mkdir -p "$DATA_PATH/validators" || fail "Could not create the Stader user data directory."; } >&2
{ mkdir -p "$DATA_PATH/$HOST_VALIDATORS_DIR_NAME" || fail "Could not create the Stader user data directory."; } >&2
{ mkdir -p "$STADER_PATH/runtime" || fail "Could not create the Stader runtime directory."; } >&2
{ mkdir -p "$DATA_PATH/secrets" || fail "Could not create the Stader secrets directory."; } >&2
{ mkdir -p "$DATA_PATH/sp-rewards-merkle-proofs" || fail "Could not create the Stader socializing pool rewards merkle proofs directory."; } >&2
Expand Down
1 change: 1 addition & 0 deletions install/templates/api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- ${STADER_FOLDER}:/.stader
- ${STADER_DATA_FOLDER}:/.stader/data
- ${STADER_DATA_FOLDER}/${HOST_VALIDATORS_DIR_NAME}:/.stader/data/validators
networks:
- net
entrypoint: /bin/sleep
Expand Down
1 change: 1 addition & 0 deletions install/templates/eth1.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- eth1clientdata:/ethclient
- ${STADER_FOLDER}/scripts:/setup:ro
- ${STADER_DATA_FOLDER}/secrets:/secrets
- ${STADER_DATA_FOLDER}/${HOST_VALIDATORS_DIR_NAME}:/.stader/data/validators
networks:
- net
environment:
Expand Down
2 changes: 1 addition & 1 deletion install/templates/eth2.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
stop_grace_period: 3m
ports: [ "${BN_P2P_PORT:-9001}:${BN_P2P_PORT:-9001}/tcp", "${BN_P2P_PORT:-9001}:${BN_P2P_PORT:-9001}/udp"${BN_OPEN_PORTS} ]
volumes:
- ${STADER_DATA_FOLDER}/validators:/validators
- ${STADER_DATA_FOLDER}/${HOST_VALIDATORS_DIR_NAME}:/validators
- ${STADER_DATA_FOLDER}/secrets:/secrets:ro
- eth2clientdata:/ethclient
- ${STADER_FOLDER}/scripts:/setup:ro
Expand Down
1 change: 1 addition & 0 deletions install/templates/guardian.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
volumes:
- ${STADER_FOLDER}:/.stader
- ${STADER_DATA_FOLDER}:/.stader/data
- ${STADER_DATA_FOLDER}/${HOST_VALIDATORS_DIR_NAME}:/.stader/data/validators
networks:
- net
command: "-m 0.0.0.0 -r ${NODE_METRICS_PORT:-9104} guardian"
Expand Down
1 change: 1 addition & 0 deletions install/templates/mev-boost.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ services:
ports: [${MEV_BOOST_OPEN_API_PORT}]
volumes:
- ${STADER_FOLDER}/scripts:/setup:ro
- ${STADER_DATA_FOLDER}/${HOST_VALIDATORS_DIR_NAME}:/.stader/data/validators
networks:
- net
environment:
Expand Down
1 change: 1 addition & 0 deletions install/templates/node.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- ${STADER_FOLDER}:/.stader
- ${STADER_DATA_FOLDER}:/.stader/data
- ${STADER_DATA_FOLDER}/${HOST_VALIDATORS_DIR_NAME}:/.stader/data/validators
networks:
- net
command: "node"
Expand Down
2 changes: 1 addition & 1 deletion install/templates/validator.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
restart: unless-stopped
stop_grace_period: 3m
volumes:
- ${STADER_DATA_FOLDER}/validators:/validators
- ${STADER_DATA_FOLDER}/${HOST_VALIDATORS_DIR_NAME}:/validators
- ${STADER_FOLDER}/scripts:/setup:ro
- ${STADER_FOLDER}/addons:/addons
networks:
Expand Down
4 changes: 4 additions & 0 deletions shared/services/config/stader-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,10 @@ func (cfg *StaderConfig) GenerateEnvironmentVariables() map[string]string {
envVars["TX_FEE_CAP"] = fmt.Sprintf("%d", int64(txFeeCap))
envVars["TX_FEE_CAP_IN_GWEI"] = fmt.Sprintf("%d", int64(txFeeCapInGwei))
envVars["SSV_MODE"] = fmt.Sprintf("%v", cfg.IsSSVMode)
envVars["HOST_VALIDATORS_DIR_NAME"] = "validators" // default validators dir name
if cfg.IsSSVMode {
envVars["HOST_VALIDATORS_DIR_NAME"] = "presign" // sets the directory name for validator info in case of ssv mode is set to true.
}
config.AddParametersToEnvVars(cfg.StaderNode.GetParameters(), envVars)
config.AddParametersToEnvVars(cfg.GetParameters(), envVars)

Expand Down
Loading