Skip to content
Merged
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
8 changes: 8 additions & 0 deletions shared/services/config/rocket-pool-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,14 @@ func (cfg *RocketPoolConfig) GetMevBoostOpenPorts() string {
return fmt.Sprintf("\"%s\"", portMode.DockerPortMapping(port))
}

// Used by text/template to select an entrypoint based on which consensus client is used.
func (cfg *RocketPoolConfig) GetEth2Entrypoint() string {
if client, _ := cfg.GetSelectedConsensusClient(); client == config.ConsensusClient_Prysm {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function checks if we're in hybrid mode

return "bash"
}
return "sh"
}

// The title for the config
func (cfg *RocketPoolConfig) GetConfigTitle() string {
return cfg.Title
Expand Down
8 changes: 3 additions & 5 deletions shared/services/rocketpool/assets/install/templates/eth2.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ services:
- dac_override
security_opt:
- no-new-privileges
{{- if ne .ConsensusClient.String "prysm"}}
entrypoint: sh
{{- else}}
{{- /* prysm has bash but not sh and may need us to download genesis for testnets */}}
entrypoint: bash
entrypoint: {{ .GetEth2Entrypoint }}
{{- if eq .ConsensusClient.String "prysm"}}
{{- /* prysm may need us to download genesis for testnets */}}
depends_on:
eth2_genesis_downloader:
condition: service_completed_successfully
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ services:
{{- if eq .ConsensusClient.String "teku"}}
- TEKU_USE_SLASHING_PROTECTION={{.Teku.UseSlashingProtection}}
{{- end}}
{{- if eq .ConsensusClient.String "prysm"}}
entrypoint: bash
{{- else}}
entrypoint: sh
{{- end}}
entrypoint: {{ .GetEth2Entrypoint }}
command: "/setup/start-vc.sh"
cap_drop:
- all
Expand Down
Loading