Skip to content

Commit

Permalink
Merge pull request #394 from dappnode/marc/use-old-teku-domain
Browse files Browse the repository at this point in the history
use old domain for teku due to tls cert
  • Loading branch information
Marketen authored Oct 10, 2024
2 parents 03dcc61 + 1e2dbf4 commit 58db880
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/brain/src/modules/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,26 @@ import { getTlsCert } from "./getTlsCert.js";
export const brainConfig = (): BrainConfig => {
const { network, executionClient, consensusClient, isMevBoostSet, shareDataWithDappnode } = loadEnvs();

// Determine the protocol based on the consensus client. teku uses https (tls cert)
const validatorProtocol = consensusClient === "teku" ? "https" : "http";
// Determine the validator URL based on the consensus client and network.
// All this logic is needed because Teku has a TLS certificate that points to the old
// https://validator.teku-${network}.dappnode:3500 URL. TODO: update the Teku TLS certificate https://docs.teku.consensys.io/how-to/configure/tls
let validatorUrl;
if (consensusClient === "teku") {
validatorUrl =
network === Network.Mainnet
? `https://validator.teku.dappnode:3500`
: `https://validator.teku-${network}.dappnode:3500`;
} else {
validatorUrl = `http://validator.${network}.dncore.dappnode:3500`;
}

return {
network,
executionClient,
consensusClient,
isMevBoostSet,
executionClientUrl: `http://execution.${network}.dncore.dappnode:8545`,
validatorUrl: `${validatorProtocol}://validator.${network}.dncore.dappnode:3500`,
validatorUrl,
beaconchainUrl: `http:/beacon-chain.${network}.dncore.dappnode:3500`,
signerUrl: `http://signer.${network}.dncore.dappnode:9000`,
token: getValidatorToken(consensusClient),
Expand Down

0 comments on commit 58db880

Please sign in to comment.