Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rocketpool v1.10.2 #50

Merged
merged 1 commit into from
Sep 17, 2023
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
31 changes: 20 additions & 11 deletions build/startRpNode.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
#!/bin/bash

NETWORK=${NETWORK}
CONSENSUSCLIENT=${CONSENSUSCLIENT}

# Check NETWORK value
case ${NETWORK} in
"mainnet" | "prater") ;;

*)
echo "Invalid NETWORK configured"
exit -1
exit 1
;;
esac
case ${CONSENSUSCLIENT} in
"teku" | "prysm") ;;

# Check CONSENSUSCLIENT value
case ${CONSENSUSCLIENT} in
"teku" | "prysm" | "nimbus") ;;
*)
echo "Invalid CONSENSUSCLIENT configured"
exit -1
exit 1
;;
esac

# Check EXECUTIONCLIENT value
case ${EXECUTIONCLIENT} in
"geth" | "nethermind") ;;

*)
echo "Invalid EXECUTIONCLIENT configured"
exit -1
exit 1
;;
esac

# Set URLs based on configuration
if [ "${EXECUTIONCLIENT}" = "nethermind" ]; then
ECHTTPURL="http://avado-dnp-nethermind.my.ava.do:8545"
ECWSURL="ws://avado-dnp-nethermind.my.ava.do:8545"
Expand All @@ -48,18 +48,27 @@ if [ "${CONSENSUSCLIENT}" = "teku" ]; then
BCHTTPURL="http://teku.my.ava.do:5051"
fi
BCJSONRPCURL=""
elif [ "${CONSENSUSCLIENT}" = "nimbus" ]; then
if [ "${NETWORK}" = "prater" ]; then
BCHTTPURL="http://nimbus-prater.my.ava.do:5052"
else
BCHTTPURL="http://nimbus.my.ava.do:5052"
fi
BCJSONRPCURL=""
else
BCJSONRPCURL=""
BCHTTPURL="http://prysm-beacon-chain-${NETWORK}.my.ava.do:3500"
BCJSONRPCURL="http://prysm-beacon-chain-${NETWORK}.my.ava.do:4000"
fi

# Export variables and substitute them in the template
NETWORK="${NETWORK}" \
CONSENSUSCLIENT="${CONSENSUSCLIENT}" \
ECHTTPURL="${ECHTTPURL}" \
ECWSURL="${ECWSURL}" \
BCHTTPURL="${BCHTTPURL}" \
BCJSONRPCURL="${BCJSONRPCURL}" \
envsubst <$(dirname "$0")/user-settings.template >$(dirname "$0")/user-settings.yml
envsubst <"$(dirname "$0")/user-settings.template" >"$(dirname "$0")/user-settings.yml"

# Create folder for rewards trees
mkdir -p /rocketpool/data/rewards-trees/
Expand Down
2 changes: 1 addition & 1 deletion build/wizard/src/components/NodeStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import SyncStatusTag from "./SyncStatusTag";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faRocket } from "@fortawesome/free-solid-svg-icons";
import { networkType, consusClientType, minipoolStatusType, nodeStatusType } from "./Types"
import { nodeStatusType } from "./Types"
import WithdrawRpl from "./WithdrawRpl";


Expand Down
4 changes: 3 additions & 1 deletion build/wizard/src/components/Types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

export type networkType = "prater" | "mainnet"
export type consusClientType = "teku" | "prysm"

export const consensusClients = ["teku", "prysm", "nimbus"] as const;
export type consensusClientType = typeof consensusClients[number];

// https://github.com/rocket-pool/smartnode/blob/master/shared/types/api/minipool.go
// https://github.com/rocket-pool/rocketpool-go/blob/master/types/minipool.go
Expand Down
15 changes: 10 additions & 5 deletions build/wizard/src/components/ValidatorBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { DappManagerHelper } from "./DappManagerHelper";
import { RestApi } from "./RestApi";
import { networkType, consusClientType, minipoolStatusType, nodeStatusType } from "./Types"
import { networkType, consensusClientType as consensusClientType, minipoolStatusType, nodeStatusType, consensusClients } from "./Types"
import { KeyManagerHelper } from "./KeyManagerHelper";
import { confirmAlert } from 'react-confirm-alert';

Expand All @@ -18,14 +18,14 @@ const ValidatorBanner = ({ dappManagerHelper, minipoolStatus, setKeyManagerHelpe

const [packages, setPackages] = React.useState<string[]>();
const [network, setNetwork] = React.useState<networkType>();
const [consensusClient, setConsensusClient] = React.useState<consusClientType>();
const [consensusClient, setConsensusClient] = React.useState<consensusClientType>();

React.useEffect(() => {
if (dappManagerHelper) {
dappManagerHelper?.getEnvs().then(
(envs) => {
setNetwork(envs["NETWORK" as keyof typeof envs] as networkType ?? "mainnet");
setConsensusClient(envs["CONSENSUSCLIENT" as keyof typeof envs] as consusClientType ?? "prysm");
setConsensusClient(envs["CONSENSUSCLIENT" as keyof typeof envs] as consensusClientType ?? "prysm");
}
)
dappManagerHelper.getPackages().then(
Expand All @@ -41,19 +41,24 @@ const ValidatorBanner = ({ dappManagerHelper, minipoolStatus, setKeyManagerHelpe
const packageNames = {
"prater": {
"teku": "teku-prater.avado.dnp.dappnode.eth",
"nimbus": "nimbus-prater.avado.dnp.dappnode.eth",
"prysm": "eth2validator-prater.avado.dnp.dappnode.eth"
},
"mainnet": {
"teku": "teku.avado.dnp.dappnode.eth",
"nimbus": "nimbus.avado.dnp.dappnode.eth",
"prysm": "eth2validator.avado.dnp.dappnode.eth"
},
}

const validatorPackage = packageNames[network][consensusClient]

const supportedPackages = consensusClients.map(n => packageNames[network][n])

if (packages.includes(packageNames[network]["teku"]) && packages.includes(packageNames[network]["prysm"])) {
setMessage("You have both Teku and Prysm installed. Make sure you do NOT add your keys to both, or you will get slashed.")
const installedConsensusClients = packages.filter(name => supportedPackages.includes(name))

if (installedConsensusClients.length > 1) {
setMessage("You have multiple consensus clients installed. Make sure you do NOT add your keys to more than one client, or you will get slashed.")
}

if (!packages.includes(validatorPackage)) {
Expand Down
3 changes: 3 additions & 0 deletions build/wizard/src/components/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const Welcome = ({ utils, nodeSyncStatus, setNavBar, rplPriceData }: Props) => {
const eth2BC = Object.keys(packages).find((k) => {
return ((
packages[k].name === "prysm-beacon-chain-mainnet.avado.dnp.dappnode.eth") ||
packages[k].name === "nimbus.avado.dnp.dappnode.eth" ||
packages[k].name === "teku.avado.dnp.dappnode.eth"
)
});
Expand All @@ -69,6 +70,7 @@ const Welcome = ({ utils, nodeSyncStatus, setNavBar, rplPriceData }: Props) => {
description: "An ETH2.0 beacon chain",
suggestedpackages: [
store.packages.find((p: any) => { return p.manifest.name === "teku.avado.dnp.dappnode.eth" }),
store.packages.find((p: any) => { return p.manifest.name === "nimbus.avado.dnp.dappnode.eth" }),
store.packages.find((p: any) => { return p.manifest.name === "prysm-beacon-chain-mainnet.avado.dnp.dappnode.eth" })
]
}
Expand Down Expand Up @@ -96,6 +98,7 @@ const Welcome = ({ utils, nodeSyncStatus, setNavBar, rplPriceData }: Props) => {
description: "An ETH2.0 validator client",
suggestedpackages: [
store.packages.find((p: any) => { return p.manifest.name === "teku.avado.dnp.dappnode.eth" }),
store.packages.find((p: any) => { return p.manifest.name === "nimbus.avado.dnp.dappnode.eth" }),
store.packages.find((p: any) => { return p.manifest.name === "prysm-beacon-chain-mainnet.avado.dnp.dappnode.eth" })
]
}
Expand Down
2 changes: 1 addition & 1 deletion dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rocketpool.avado.dnp.dappnode.eth",
"version": "0.0.96",
"version": "0.0.97",
"upstream": "v1.10.1",
"title": "Rocket Pool",
"description": "Rocket Pool is decentralised Ethereum staking protocol",
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3.4'
services:
rocketpool.avado.dnp.dappnode.eth:
image: 'rocketpool.avado.dnp.dappnode.eth:0.0.96'
image: 'rocketpool.avado.dnp.dappnode.eth:0.0.97'
build:
context: ./build
args:
RP_VERSION: v1.10.1
RP_VERSION: v1.10.2
volumes:
- 'rocketpool:/rocketpool'
environment:
Expand Down