From 5bd82afe71418533de9baf5d06dc7c8673ddac4a Mon Sep 17 00:00:00 2001 From: Nipun Jindal Date: Fri, 18 Oct 2024 15:30:44 +0530 Subject: [PATCH 1/2] using presign dif for Fee RecipientFile --- shared/services/config/stadernode-config.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shared/services/config/stadernode-config.go b/shared/services/config/stadernode-config.go index aadcfcbc..6bb0709f 100644 --- a/shared/services/config/stadernode-config.go +++ b/shared/services/config/stadernode-config.go @@ -446,11 +446,15 @@ func (cfg *StaderNodeConfig) GetSpRewardCyclePath(cycle int64, daemon bool) stri } func (cfg *StaderNodeConfig) GetFeeRecipientFilePath() string { + validatorDirName := "validators" + if cfg.parent.IsSSVMode { + validatorDirName = "presign" + } if !cfg.parent.IsNativeMode { - return filepath.Join(DaemonDataPath, "validators", FeeRecipientFilename) + return filepath.Join(DaemonDataPath, validatorDirName, FeeRecipientFilename) } - return filepath.Join(cfg.DataPath.Value.(string), "validators", NativeFeeRecipientFilename) + return filepath.Join(cfg.DataPath.Value.(string), validatorDirName, NativeFeeRecipientFilename) } func (cfg *StaderNodeConfig) GetClaimData(cycles []*big.Int) ([]*big.Int, []*big.Int, [][][32]byte, error) { From 572feb4a93728d53eb20cf0935b9f2058a7b0730 Mon Sep 17 00:00:00 2001 From: Nipun Jindal Date: Sun, 20 Oct 2024 18:04:22 +0530 Subject: [PATCH 2/2] set validator dir name for ssv flag --- install/templates/eth2.tmpl | 2 +- install/templates/validator.tmpl | 2 +- shared/services/config/stader-config.go | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/install/templates/eth2.tmpl b/install/templates/eth2.tmpl index 7dc14dae..399e5929 100644 --- a/install/templates/eth2.tmpl +++ b/install/templates/eth2.tmpl @@ -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}/${VALIDATORS_DIR_NAME}:/validators - ${STADER_DATA_FOLDER}/secrets:/secrets:ro - eth2clientdata:/ethclient - ${STADER_FOLDER}/scripts:/setup:ro diff --git a/install/templates/validator.tmpl b/install/templates/validator.tmpl index e8f6c187..48220075 100644 --- a/install/templates/validator.tmpl +++ b/install/templates/validator.tmpl @@ -32,7 +32,7 @@ services: restart: unless-stopped stop_grace_period: 3m volumes: - - ${STADER_DATA_FOLDER}/validators:/validators + - ${STADER_DATA_FOLDER}/${VALIDATORS_DIR_NAME}:/validators - ${STADER_FOLDER}/scripts:/setup:ro - ${STADER_FOLDER}/addons:/addons networks: diff --git a/shared/services/config/stader-config.go b/shared/services/config/stader-config.go index eebef57a..407ed59d 100644 --- a/shared/services/config/stader-config.go +++ b/shared/services/config/stader-config.go @@ -860,6 +860,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["VALIDATORS_DIR_NAME"] = "validators" // default validators dir name + if cfg.IsSSVMode { + envVars["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)