Skip to content
Merged
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
16 changes: 14 additions & 2 deletions packages/brain/src/modules/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ export const brainConfig = (): BrainConfig => {
// 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") {
let beaconchainUrl;

// Special case for Nimbus on Gnosis since it is not yet separated into two services.
// TODO: remove this if when Gnosis is migrated to generic repos
if (consensusClient === "nimbus" && network === Network.Gnosis) {
validatorUrl = `http://beacon-validator.nimbus-gnosis.dappnode:3500`;
beaconchainUrl = `http://beacon-validator.nimbus-gnosis.dappnode:4500`;
} else if (consensusClient === "teku") {
validatorUrl =
network === Network.Mainnet
? `https://validator.teku.dappnode:3500`
Expand All @@ -23,6 +30,11 @@ export const brainConfig = (): BrainConfig => {

const { blockExplorerUrl, minGenesisTime, secondsPerSlot, slotsPerEpoch } = networkConfig(network);

// Default beaconchainUrl if not already set
if (!beaconchainUrl) {
beaconchainUrl = `http://beacon-chain.${network}.dncore.dappnode:3500`;
}

return {
chain: {
network,
Expand All @@ -39,7 +51,7 @@ export const brainConfig = (): BrainConfig => {
blockExplorerUrl,
executionClientUrl: `http://execution.${network}.dncore.dappnode:8545`,
validatorUrl,
beaconchainUrl: `http:/beacon-chain.${network}.dncore.dappnode:3500`,
beaconchainUrl,
signerUrl: `http://signer.${network}.dncore.dappnode:9000`,
postgresUrl: getPostgresUrl(network),
token: getValidatorToken(consensusClient),
Expand Down