Skip to content

Commit 3ca0c3e

Browse files
committed
Fix for entrypoint with prysm hybrid mode
1 parent 2e85b17 commit 3ca0c3e

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

shared/services/config/rocket-pool-config.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,14 @@ func (cfg *RocketPoolConfig) GetMevBoostOpenPorts() string {
13831383
return fmt.Sprintf("\"%s\"", portMode.DockerPortMapping(port))
13841384
}
13851385

1386+
// Used by text/template to select an entrypoint based on which consensus client is used.
1387+
func (cfg *RocketPoolConfig) GetEth2Entrypoint() string {
1388+
if client, _ := cfg.GetSelectedConsensusClient(); client == config.ConsensusClient_Prysm {
1389+
return "bash"
1390+
}
1391+
return "sh"
1392+
}
1393+
13861394
// The title for the config
13871395
func (cfg *RocketPoolConfig) GetConfigTitle() string {
13881396
return cfg.Title

shared/services/rocketpool/assets/install/templates/eth2.tmpl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,9 @@ services:
9494
- dac_override
9595
security_opt:
9696
- no-new-privileges
97-
{{- if ne .ConsensusClient.String "prysm"}}
98-
entrypoint: sh
99-
{{- else}}
100-
{{- /* prysm has bash but not sh and may need us to download genesis for testnets */}}
101-
entrypoint: bash
97+
entrypoint: {{ .GetEth2Entrypoint }}
98+
{{- if eq .ConsensusClient.String "prysm"}}
99+
{{- /* prysm may need us to download genesis for testnets */}}
102100
depends_on:
103101
eth2_genesis_downloader:
104102
condition: service_completed_successfully

shared/services/rocketpool/assets/install/templates/validator.tmpl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ services:
4545
{{- if eq .ConsensusClient.String "teku"}}
4646
- TEKU_USE_SLASHING_PROTECTION={{.Teku.UseSlashingProtection}}
4747
{{- end}}
48-
{{- if eq .ConsensusClient.String "prysm"}}
49-
entrypoint: bash
50-
{{- else}}
51-
entrypoint: sh
52-
{{- end}}
48+
entrypoint: {{ .GetEth2Entrypoint }}
5349
command: "/setup/start-vc.sh"
5450
cap_drop:
5551
- all

0 commit comments

Comments
 (0)