Skip to content

Commit 42c8785

Browse files
Support hoodi testnet (#423)
1 parent 50f0691 commit 42c8785

File tree

14 files changed

+41
-9
lines changed

14 files changed

+41
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Staking Brain is a critical logical component for Staking in DAppNode. It provides a user interface and a Launchpad API that allow manual and automatic keystore management. Designed to support not only solo stakers, but also DVT/LSD technologies, Staking Brain streamlines the staking process for all users.
44

5-
Within the Dappnode environment, Staking Brain is incorporated into the Web3Signer packages (gnosis, mainnet, prater, lukso and holesky). It ensures that user configurations for validators are reliably maintained. Please note that Staking Brain does not store keystores itself, but ensures their storage in the web3signer. It also maintains consistency between the validator service and web3signer service, as the validator must recognize all the pubkeys of validators whose keystores have been imported into the signer.
5+
Within the Dappnode environment, Staking Brain is incorporated into the Web3Signer packages (gnosis, mainnet, prater, lukso, holesky, hoodi). It ensures that user configurations for validators are reliably maintained. Please note that Staking Brain does not store keystores itself, but ensures their storage in the web3signer. It also maintains consistency between the validator service and web3signer service, as the validator must recognize all the pubkeys of validators whose keystores have been imported into the signer.
66

77
Each Web3Signer package includes four services:
88

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
export const allowedOrigins = ["http://ui.lido-csm-holesky.dappnode", "http://ui.lido-csm-mainnet.dappnode"];
1+
export const allowedOrigins = [
2+
"http://ui.lido-csm-hoodi.dappnode",
3+
"http://ui.lido-csm-holesky.dappnode",
4+
"http://ui.lido-csm-mainnet.dappnode"
5+
];

packages/brain/src/modules/apiServers/launchpad/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const allowedOrigins = [
33
"http://rocketpool.dappnode",
44
"http://stader-testnet.dappnode",
55
"http://stader.dappnode",
6+
"http://ui.lido-csm-hoodi.dappnode",
67
"http://ui.lido-csm-holesky.dappnode",
78
"http://ui.lido-csm-mainnet.dappnode"
89
];

packages/brain/src/modules/apiServers/ui/calls/importValidators.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
STADER_POOL_FEE_RECIPIENT_MAINNET,
1010
STADER_POOL_FEE_RECIPIENT_PRATER,
1111
LIDO_FEE_RECIPIENT_HOLESKY,
12-
LIDO_FEE_RECIPIENT_MAINNET
12+
LIDO_FEE_RECIPIENT_MAINNET,
13+
LIDO_FEE_RECIPIENT_HOODI
1314
} from "@stakingbrain/common";
1415
import { CustomImportRequest } from "./types.js";
1516
import { CronJob } from "../../../cron/cron.js";
@@ -201,6 +202,7 @@ function getNonEditableFeeRecipient(
201202
case "lido":
202203
if (network === "mainnet") return LIDO_FEE_RECIPIENT_MAINNET;
203204
else if (network === "holesky") return LIDO_FEE_RECIPIENT_HOLESKY;
205+
else if (network === "hoodi") return suggestedFeeRecipient ?? LIDO_FEE_RECIPIENT_HOODI;
204206
else throw Error(`Fee recipient not found for tag: ${tag} and network: ${network}`);
205207

206208
// Stader FR cannot be known in advance

packages/brain/src/modules/config/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export const brainConfig = (): BrainConfig => {
5252

5353
const getPostgresUrl = (network: Network): string => {
5454
switch (network) {
55+
case Network.Hoodi:
56+
return "postgres://postgres:[email protected]:5432/web3signer";
5557
case Network.Holesky:
5658
return "postgres://postgres:[email protected]:5432/web3signer";
5759
case Network.Mainnet:

packages/brain/src/modules/config/loadEnvs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function getNetwork(): Network {
3939
if (network === Network.Gnosis) return Network.Gnosis;
4040
if (network === Network.Lukso) return Network.Lukso;
4141
if (network === Network.Holesky) return Network.Holesky;
42+
if (network === Network.Hoodi) return Network.Hoodi;
4243

4344
throw Error(`NETWORK env must be one of ${Object.values(Network).join(", ")}`);
4445
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export const hoodiBrainConfig = () => {
2+
return {
3+
blockExplorerUrl: "https://hoodi.beaconcha.in",
4+
minGenesisTime: 1742212800, // Monday, 17 March 2025 12:00:00
5+
secondsPerSlot: 12,
6+
slotsPerEpoch: 32
7+
};
8+
};

packages/brain/src/modules/config/networks/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { gnosisBrainConfig } from "./gnosis.js";
22
import { holeskyBrainConfig } from "./holesky.js";
3+
import { hoodiBrainConfig } from "./hoodi.js";
34
import { luksoBrainConfig } from "./lukso.js";
45
import { mainnetBrainConfig } from "./mainnet.js";
56
import { praterBrainConfig } from "./prater.js";
67
import { Network } from "@stakingbrain/common";
78

89
export const networkConfig = (network: Network) => {
910
switch (network) {
11+
case Network.Hoodi:
12+
return hoodiBrainConfig();
1013
case Network.Holesky:
1114
return holeskyBrainConfig();
1215
case Network.Mainnet:

packages/common/src/params.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export const ROCKET_POOL_FEE_RECIPIENT = "0xd4E96eF8eee8678dBFf4d535E033Ed1a4F76
88
export const LIDO_FEE_RECIPIENT_MAINNET = "0x388C818CA8B9251b393131C08a736A67ccB19297" as const;
99
// https://docs.lido.fi/deployed-contracts/holesky/#core-protocol
1010
export const LIDO_FEE_RECIPIENT_HOLESKY = "0xE73a3602b99f1f913e72F8bdcBC235e206794Ac8" as const;
11+
// https://docs.lido.fi/deployed-contracts/hoodi#core-protocol
12+
export const LIDO_FEE_RECIPIENT_HOODI = "0x9b108015fe433F173696Af3Aa0CF7CDb3E104258" as const;
1113

1214
export const STADER_POOL_FEE_RECIPIENT_MAINNET = "0x9d4C3166c59412CEdBe7d901f5fDe41903a1d6Fc" as const;
1315

packages/common/src/types/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ export enum Network {
33
Gnosis = "gnosis",
44
Prater = "prater",
55
Lukso = "lukso",
6-
Holesky = "holesky"
6+
Holesky = "holesky",
7+
Hoodi = "hoodi"
78
}
89

910
export enum ExecutionClient {

0 commit comments

Comments
 (0)