Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sugh01 committed Aug 8, 2024
1 parent c33443f commit 0d280e5
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
9 changes: 9 additions & 0 deletions cli/actions/importKeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ func (s *sedgeActions) ImportValidatorKeys(options ImportValidatorKeysOptions) e
log.Infof("Copying the keys from %s", charonPath)
options.From = filepath.Join(options.GenerationPath, "keystore")
}
defaultCharonPath := filepath.Join(configs.DefaultAbsSedgeDataPath, ".charon")
//Copy the folder from charonPath to defaultCharonPath
log.Infof("Copying Charon contents to the default path %s", defaultCharonPath)
if err := os.MkdirAll(defaultCharonPath, os.ModePerm); err != nil {
return err
}
if err := copy.Copy(charonPath, defaultCharonPath); err != nil {
return err
}
charonValidatorKeysPath := filepath.Join(charonPath, "validator_keys")
defaultKeystorePath := filepath.Join(configs.DefaultAbsSedgeDataPath, "keystore")
log.Infof("Copying the keys to the default path %s", defaultKeystorePath)
Expand Down
2 changes: 1 addition & 1 deletion configs/client_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ validator:
distributed:
charon:
name: ghcr.io/obolnetwork/charon
version: v0.19.2
version: v1.0.1
2 changes: 1 addition & 1 deletion configs/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ const (
ConsensusDir = "consensus-data"
ValidatorDir = "validator-data"
KeystoreDir = "keystore"
DistributedValidatorDir = "../.charon"
DistributedValidatorDir = ".charon"
)
7 changes: 5 additions & 2 deletions templates/services/merge/distributedValidator/charon.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{/* charon.tmpl */}}
{{ define "distributedValidator" }}
dv:
container_name: sedge-dv-client{{if .ContainerTag}}-{{.ContainerTag}}{{end}}
image: ${DV_IMAGE_VERSION}
environment:
- CHARON_BEACON_NODE_ENDPOINTS=${CC_API_URL}
Expand All @@ -10,10 +11,12 @@
- CHARON_P2P_EXTERNAL_HOSTNAME=${DV_INSTANCE_NAME:-charon}
- CHARON_P2P_TCP_ADDRESS=0.0.0.0:{{.DVDiscoveryPort}}
- CHARON_VALIDATOR_API_ADDRESS=127.0.0.1:{{.DVApiPort}}
- CHARON_MONITORING_ADDRESS=0.0.0.0:{{.DVMetricsPort}}
- CHARON_BUILDER_API={{.MevBoostOnValidator}}
- CHARON_MONITORING_ADDRESS=0.0.0.0:{{.DVMetricsPort}}{{if .MevBoostOnValidator}}
- CHARON_BUILDER_API={{.MevBoostOnValidator}}{{end}}
ports:
- ${CHARON_PORT_P2P_TCP:-{{.DVDiscoveryPort}}}:${CHARON_PORT_P2P_TCP:-{{.DVDiscoveryPort}}}/tcp
expose:
- {{.DVMetricsPort}}
networks:
- sedge
volumes:
Expand Down
4 changes: 2 additions & 2 deletions templates/services/merge/validator/lighthouse.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
- --metrics-port={{.VlMetricsPort}}
- --metrics-address=0.0.0.0{{range $flag := .VlExtraFlags}}
- --{{$flag}}{{end}}{{if .MevBoostOnValidator}}
- --builder-proposals{{end}}{{if .LoggingDriver}}
- {{if .Distributed}}--distributed{{end}}
- --builder-proposals{{end}}{{if .Distributed}}
- --distributed{{end}}{{if .LoggingDriver}}
logging:
driver: "{{.LoggingDriver}}"{{if eq .LoggingDriver "json-file"}}
options:
Expand Down
2 changes: 1 addition & 1 deletion templates/services/merge/validator/lodestar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- --dataDir=/data
- --logFile=/data/logs/validator.log
- --logFileLevel=${VL_LOG_LEVEL}
- --server=${CC_API_URL}
- --server={{if .Distributed}}${DV_API_URL}{{else}}${CC_API_URL}{{end}}
- --metrics=true
- --metrics.address=0.0.0.0
- --metrics.port={{.VlMetricsPort}}{{with .FeeRecipient}}
Expand Down
2 changes: 1 addition & 1 deletion templates/services/merge/validator/prysm.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- --wallet-password-file=/keystore/keystore_password.txt{{if .CustomConsensusConfigs}}{{if .CustomNetworkConfigPath}}
- --chain-config-file=/network_config/config.yml{{end}}{{else}}
- --{{if .SplittedNetwork}}${CL_NETWORK}{{else}}${NETWORK}{{end}}{{end}}
- --beacon-rpc-provider=${CC_ADD_API_URL}
- --beacon-rpc-provider={{if .Distributed}}${DV_API_URL}{{else}}${CC_ADD_API_URL}{{end}}
- --graffiti=${GRAFFITI}
- --verbosity=${VL_LOG_LEVEL}
- --accept-terms-of-use
Expand Down
2 changes: 1 addition & 1 deletion templates/services/merge/validator/teku.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
command:
- validator-client{{if .CustomConsensusConfigs}}{{if .CustomNetworkConfigPath}}
- --network=/network_config/config.yml{{end}}{{end}}
- --beacon-node-api-endpoint=${CC_API_URL}
- --beacon-node-api-endpoint={{if .Distributed}}${DV_API_URL}{{else}}${CC_API_URL}{{end}}
- --data-path=/data
- --log-destination=CONSOLE
- --validators-graffiti=${GRAFFITI}
Expand Down

0 comments on commit 0d280e5

Please sign in to comment.