Skip to content

Commit ad8a125

Browse files
authored
Merge pull request #131 from santteegt/feat/hoodi-support
Update support for Hoodi testnet + bump rocketpool v1.17.3 + UI improvements
2 parents 03511a3 + 8ecd0ff commit ad8a125

24 files changed

+1959
-1526
lines changed

build/api/src/AppConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ interface Config {
66
brainUIUrl: string;
77
w3sUrl: string;
88
rpExplorerUrl: string;
9+
beaconchaInUrl: string;
910
explorerUrl: string;
1011
package: string;
1112
}
@@ -25,6 +26,7 @@ class AppConfig {
2526
brainUIUrl: `http://brain.web3signer${w3sSuffix}.dappnode`,
2627
w3sUrl: `http://web3signer.web3signer${w3sSuffix}.dappnode:9000`,
2728
rpExplorerUrl: `https://${networkPrefix}rocketscan.io`,
29+
beaconchaInUrl: `https://${networkPrefix}beaconcha.in`,
2830
explorerUrl: `https://${networkPrefix}etherscan.io`,
2931
package: isMainnet ? `rocketpool.public.dappnode` : `rocketpool-testnet.public.dappnode`,
3032
};

build/restart-vc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
echo "Restarting validator... mocked!"
3+
# echo "Restarting validator... mocked!"

build/rocketpool-start.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ case $NETWORK in
3434
_EXECUTION_LAYER_WS="ws://besu.public.dappnode:8546"
3535
_EXECUTION_NODE_CLIENT="besu"
3636
;;
37+
"reth.dnp.dappnode.eth")
38+
_EXECUTION_LAYER_HTTP="http://reth.dappnode:8545"
39+
_EXECUTION_LAYER_WS="ws://reth.dappnode:8546"
40+
_EXECUTION_NODE_CLIENT="reth"
41+
;;
3742
"erigon.dnp.dappnode.eth")
3843
_EXECUTION_LAYER_HTTP="http://erigon.dappnode:8545"
3944
_EXECUTION_LAYER_WS="ws://erigon.dappnode:8545"
@@ -79,7 +84,7 @@ case $NETWORK in
7984
esac
8085

8186
;;
82-
"hoodi")
87+
"testnet")
8388
echo "Hoodi network"
8489

8590
# https://github.com/dappnode/DAppNodePackage-SSV-Shifu/blob/775dfbc2190b8c3bc7384a2e4c62d83892071001/build/entrypoint.sh#L3
@@ -100,6 +105,11 @@ case $NETWORK in
100105
_EXECUTION_LAYER_WS="ws://hoodi-besu.dappnode:8546"
101106
_EXECUTION_NODE_CLIENT="besu"
102107
;;
108+
"hoodi-reth.dnp.dappnode.eth")
109+
_EXECUTION_LAYER_HTTP="http://hoodi-reth.dappnode:8545"
110+
_EXECUTION_LAYER_WS="ws://hoodi-reth.dappnode:8546"
111+
_EXECUTION_NODE_CLIENT="reth"
112+
;;
103113
"hoodi-erigon.dnp.dappnode.eth")
104114
_EXECUTION_LAYER_HTTP="http://hoodi-erigon.dappnode:8545"
105115
_EXECUTION_LAYER_WS="ws://hoodi-erigon.dappnode:8545"
@@ -169,9 +179,6 @@ export BEACON_NODE_CLIENT=$_BEACON_NODE_CLIENT
169179
# BEACON_NODE_API_3500="http://beacon-chain.prysm-hoodi.dappnode:3500"
170180
# BEACON_NODE_API_4000="http://beacon-chain.prysm-hoodi.dappnode:4000"
171181

172-
if [ "$NETWORK" == "hoodi" ]; then
173-
NETWORK="testnet"
174-
fi
175182
NETWORK="${NETWORK}" \
176183
EXECUTION_NODE_CLIENT="${EXECUTION_NODE_CLIENT}" \
177184
BEACON_NODE_CLIENT="${BEACON_NODE_CLIENT}" \
@@ -191,11 +198,6 @@ if [ -f "/rocketpool/data/wallet" ]; then
191198
fi
192199
if [ ! -f /rocketpool/data/password ]; then
193200
echo "${INFO} set-password"
194-
if [ ! -f /.rocketpool/data/password ]; then
195-
mkdir -p /.rocketpool/data
196-
echo "${WALLET_PASSWORD}" > /.rocketpool/data/password
197-
echo "${WALLET_PASSWORD}" > /rocketpool/data/password
198-
fi
199201
/usr/local/bin/rocketpoold --settings /app/rocketpool/user-settings.yml api wallet set-password "${WALLET_PASSWORD}"
200202
fi
201203
echo "${INFO} Initializing Rocketpool service"

build/supervisord.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ logfile=/var/log/supervisor/supervisord.log
55
pidfile=/var/run/supervisord.pid
66
childlogdir=/var/log/supervisor
77

8+
[unix_http_server]
9+
file=/var/run/supervisor.sock
10+
chmod=0700
11+
12+
[supervisorctl]
13+
serverurl=unix:///var/run/supervisor.sock
14+
15+
[rpcinterface:supervisor]
16+
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
17+
818
[program:rocketpool]
919
command=/bin/sh -c "/usr/local/bin/rocketpool-start.sh"
1020
autorestart=true

build/ui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@types/node": "^16.18.14",
1717
"@types/react": "^18.0.28",
1818
"@types/react-dom": "^18.0.11",
19+
"@uiw/react-json-view": "^2.0.0-alpha.38",
1920
"axios": "^1.3.4",
2021
"bignumber.js": "^9.1.1",
2122
"react": "^18.2.0",

build/ui/src/App.css

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
text-align: center;
33
display: flex;
44
flex-direction: column;
5+
min-height: 100vh;
6+
width: 100%;
7+
overflow-x: hidden;
58
}
69

710
.App-logo {
811
height: 40vmin;
912
pointer-events: none;
13+
max-height: 200px;
1014
}
1115

1216
@media (prefers-reduced-motion: no-preference) {
@@ -18,9 +22,33 @@
1822
.App-header {
1923
display: flex;
2024
flex-direction: column;
21-
height: 100vh;
22-
font-size: calc(10px + 2vmin);
25+
min-height: 100vh;
26+
font-size: calc(10px + 1vmin);
2327
color: black;
28+
width: 100%;
29+
}
30+
31+
/* Mobile-first responsive design */
32+
@media (max-width: 768px) {
33+
.App-header {
34+
font-size: calc(8px + 1.5vmin);
35+
}
36+
37+
.App-logo {
38+
height: 30vmin;
39+
max-height: 120px;
40+
}
41+
}
42+
43+
@media (max-width: 480px) {
44+
.App-header {
45+
font-size: calc(6px + 1.2vmin);
46+
}
47+
48+
.App-logo {
49+
height: 25vmin;
50+
max-height: 100px;
51+
}
2452
}
2553

2654
.App-link {
@@ -63,6 +91,41 @@
6391
padding: 20px;
6492
}
6593

94+
/* Mobile responsive adjustments */
95+
@media (max-width: 768px) {
96+
.menu {
97+
padding: 10px;
98+
margin-bottom: 16px;
99+
}
100+
101+
.menu-item {
102+
padding: 8px;
103+
font-size: 1rem;
104+
}
105+
106+
.detail {
107+
font-size: 18px;
108+
padding: 15px;
109+
}
110+
}
111+
112+
@media (max-width: 480px) {
113+
.menu {
114+
padding: 8px;
115+
margin-bottom: 12px;
116+
}
117+
118+
.menu-item {
119+
padding: 6px;
120+
font-size: 0.9rem;
121+
}
122+
123+
.detail {
124+
font-size: 16px;
125+
padding: 10px;
126+
}
127+
}
128+
66129
.error-message {
67130
font-size: 0.875rem;
68131
color: red;

build/ui/src/Dashboard.tsx

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -77,36 +77,22 @@ function Dashboard({ activeTab }: { activeTab: string }): JSX.Element {
7777
};
7878

7979
const styles = {
80-
container: {
81-
minHeight: "100vh",
80+
loadingOverlay: {
81+
position: "fixed" as const,
82+
top: 0,
83+
left: 0,
84+
width: "100%",
85+
height: "100%",
86+
backgroundColor: "rgba(0, 0, 0, 0.55)",
8287
display: "flex",
8388
justifyContent: "center",
8489
alignItems: "center",
90+
zIndex: 9999,
8591
},
8692
};
8793

8894
return (
8995
<div className="App">
90-
{isLoading && (
91-
<>
92-
<div style={styles.container}>
93-
<div
94-
style={{
95-
display: "flex",
96-
flexDirection: "column",
97-
alignItems: "center",
98-
}}
99-
>
100-
<CircularProgress sx={{ marginBottom: "1rem" }} />
101-
{!rocketpoolValue?.walletStatus && (
102-
<Typography variant="body1">
103-
Loading on-chain Rocket Pool data...
104-
</Typography>
105-
)}
106-
</div>
107-
</div>
108-
</>
109-
)}
11096
{rocketpoolValue?.walletStatus && (
11197
<>
11298
{rocketpoolValue.walletStatus.walletInitialized &&
@@ -115,10 +101,11 @@ function Dashboard({ activeTab }: { activeTab: string }): JSX.Element {
115101
)}
116102
<Box
117103
sx={{
118-
margin: 8,
104+
margin: { xs: 1, sm: 2, md: 4, lg: 8 },
119105
display: "flex",
120106
flexDirection: "column",
121107
alignItems: "left",
108+
padding: { xs: 1, sm: 2 },
122109
}}
123110
>
124111
{!clientsSynced && activeTab !== "Info" ? (
@@ -129,9 +116,12 @@ function Dashboard({ activeTab }: { activeTab: string }): JSX.Element {
129116
) : (
130117
<Card
131118
sx={{
132-
padding: 4,
119+
padding: { xs: 2, sm: 3, md: 4 },
133120
borderRadius: 2,
134121
boxShadow: 4,
122+
width: "100%",
123+
maxWidth: "100%",
124+
overflow: "hidden",
135125
}}
136126
>
137127
<div className="content">
@@ -152,6 +142,24 @@ function Dashboard({ activeTab }: { activeTab: string }): JSX.Element {
152142
)}
153143
</>
154144
)}
145+
{isLoading && (
146+
<div style={styles.loadingOverlay}>
147+
<div
148+
style={{
149+
display: "flex",
150+
flexDirection: "column",
151+
alignItems: "center",
152+
}}
153+
>
154+
<CircularProgress sx={{ marginBottom: "1rem" }} />
155+
{!rocketpoolValue?.walletStatus && (
156+
<Typography variant="body1" color="white">
157+
Loading on-chain Rocket Pool data...
158+
</Typography>
159+
)}
160+
</div>
161+
</div>
162+
)}
155163
</div>
156164
);
157165
}

0 commit comments

Comments
 (0)