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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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.

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.
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.

Each Web3Signer package includes four services:

Expand Down
6 changes: 5 additions & 1 deletion packages/brain/src/modules/apiServers/brain/config.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export const allowedOrigins = ["http://ui.lido-csm-holesky.dappnode", "http://ui.lido-csm-mainnet.dappnode"];
export const allowedOrigins = [
"http://ui.lido-csm-hoodi.dappnode",
"http://ui.lido-csm-holesky.dappnode",
"http://ui.lido-csm-mainnet.dappnode"
];
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const allowedOrigins = [
"http://rocketpool.dappnode",
"http://stader-testnet.dappnode",
"http://stader.dappnode",
"http://ui.lido-csm-hoodi.dappnode",
"http://ui.lido-csm-holesky.dappnode",
"http://ui.lido-csm-mainnet.dappnode"
];
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
STADER_POOL_FEE_RECIPIENT_MAINNET,
STADER_POOL_FEE_RECIPIENT_PRATER,
LIDO_FEE_RECIPIENT_HOLESKY,
LIDO_FEE_RECIPIENT_MAINNET
LIDO_FEE_RECIPIENT_MAINNET,
LIDO_FEE_RECIPIENT_HOODI
} from "@stakingbrain/common";
import { CustomImportRequest } from "./types.js";
import { CronJob } from "../../../cron/cron.js";
Expand Down Expand Up @@ -201,6 +202,7 @@ function getNonEditableFeeRecipient(
case "lido":
if (network === "mainnet") return LIDO_FEE_RECIPIENT_MAINNET;
else if (network === "holesky") return LIDO_FEE_RECIPIENT_HOLESKY;
else if (network === "hoodi") return suggestedFeeRecipient ?? LIDO_FEE_RECIPIENT_HOODI;
else throw Error(`Fee recipient not found for tag: ${tag} and network: ${network}`);

// Stader FR cannot be known in advance
Expand Down
2 changes: 2 additions & 0 deletions packages/brain/src/modules/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export const brainConfig = (): BrainConfig => {

const getPostgresUrl = (network: Network): string => {
switch (network) {
case Network.Hoodi:
return "postgres://postgres:password@postgres.web3signer-hoodi.dappnode:5432/web3signer";
case Network.Holesky:
return "postgres://postgres:password@postgres.web3signer-holesky.dappnode:5432/web3signer";
case Network.Mainnet:
Expand Down
1 change: 1 addition & 0 deletions packages/brain/src/modules/config/loadEnvs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function getNetwork(): Network {
if (network === Network.Gnosis) return Network.Gnosis;
if (network === Network.Lukso) return Network.Lukso;
if (network === Network.Holesky) return Network.Holesky;
if (network === Network.Hoodi) return Network.Hoodi;

throw Error(`NETWORK env must be one of ${Object.values(Network).join(", ")}`);
}
Expand Down
8 changes: 8 additions & 0 deletions packages/brain/src/modules/config/networks/hoodi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const hoodiBrainConfig = () => {
return {
blockExplorerUrl: "https://hoodi.beaconcha.in",
minGenesisTime: 1742212800, // Monday, 17 March 2025 12:00:00
secondsPerSlot: 12,
slotsPerEpoch: 32
};
};
3 changes: 3 additions & 0 deletions packages/brain/src/modules/config/networks/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { gnosisBrainConfig } from "./gnosis.js";
import { holeskyBrainConfig } from "./holesky.js";
import { hoodiBrainConfig } from "./hoodi.js";
import { luksoBrainConfig } from "./lukso.js";
import { mainnetBrainConfig } from "./mainnet.js";
import { praterBrainConfig } from "./prater.js";
import { Network } from "@stakingbrain/common";

export const networkConfig = (network: Network) => {
switch (network) {
case Network.Hoodi:
return hoodiBrainConfig();
case Network.Holesky:
return holeskyBrainConfig();
case Network.Mainnet:
Expand Down
2 changes: 2 additions & 0 deletions packages/common/src/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const ROCKET_POOL_FEE_RECIPIENT = "0xd4E96eF8eee8678dBFf4d535E033Ed1a4F76
export const LIDO_FEE_RECIPIENT_MAINNET = "0x388C818CA8B9251b393131C08a736A67ccB19297" as const;
// https://docs.lido.fi/deployed-contracts/holesky/#core-protocol
export const LIDO_FEE_RECIPIENT_HOLESKY = "0xE73a3602b99f1f913e72F8bdcBC235e206794Ac8" as const;
// https://docs.lido.fi/deployed-contracts/hoodi#core-protocol
export const LIDO_FEE_RECIPIENT_HOODI = "0x9b108015fe433F173696Af3Aa0CF7CDb3E104258" as const;

export const STADER_POOL_FEE_RECIPIENT_MAINNET = "0x9d4C3166c59412CEdBe7d901f5fDe41903a1d6Fc" as const;

Expand Down
3 changes: 2 additions & 1 deletion packages/common/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ export enum Network {
Gnosis = "gnosis",
Prater = "prater",
Lukso = "lukso",
Holesky = "holesky"
Holesky = "holesky",
Hoodi = "hoodi"
}

export enum ExecutionClient {
Expand Down
10 changes: 8 additions & 2 deletions packages/ui/src/ImportScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default function ImportScreen({

const tagSelectOptions: TagSelectOption[] = ["gnosis", "lukso"].includes(network)
? [{ value: "solo", label: "Solo" }]
: ["holesky"].includes(network)
: ["holesky", "hoodi"].includes(network)
? [
{ value: "solo", label: "Solo" },
{ value: "rocketpool", label: "Rocketpool" },
Expand Down Expand Up @@ -432,7 +432,13 @@ export default function ImportScreen({
Lido Node Operator, it is your responsibility to ensure that your validators use MEV boost. <br /> Please
install the MEV Boost package from{" "}
<Link
to={network === "holesky" ? "http://my.dappnode/stakers/holesky" : "http://my.dappnode/stakers/ethereum"}
to={
network === "holesky"
? "http://my.dappnode/stakers/holesky"
: network === "hoodi"
? "http://my.dappnode/stakers/hoodi"
: "http://my.dappnode/stakers/ethereum"
}
>
your stakers tab
</Link>{" "}
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/src/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const beaconchaApiParamsMap = new Map<string, Omit<ApiParams, "host">>([
apiPath: "/api/v1/"
}
],
["holesky", { baseUrl: "https://holesky.beaconcha.in", apiPath: "/api/v1/" }]
["holesky", { baseUrl: "https://holesky.beaconcha.in", apiPath: "/api/v1/" }],
["hoodi", { baseUrl: "https://hoodi.beaconcha.in", apiPath: "/api/v1/" }]
]);

export interface AppParams {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/socket/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ class RpcClient {
}
}

export const rpcClient = new RpcClient(`http://${BRAIN_UI_DOMAIN(window.env?.NETWORK || Network.Holesky)}:80`);
export const rpcClient = new RpcClient(`http://${BRAIN_UI_DOMAIN(window.env?.NETWORK || Network.Hoodi)}:80`);
3 changes: 2 additions & 1 deletion packages/ui/src/utils/dataUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export function prettyClientDnpName(dnpName: string): string {
!name.includes("prater") &&
!name.includes("gnosis") &&
!name.includes("lukso") &&
!name.includes("holesky")
!name.includes("holesky") &&
!name.includes("hoodi")
);
if (!clientName) return dnpName;

Expand Down