Skip to content

Commit 4b92931

Browse files
authored
docs: warn dev when starting mainnet locally to use a different ETH node (#1318)
1 parent 51ad29d commit 4b92931

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

scripts/start

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@ const execute = require('child_process').execSync
77

88
const clientPort = process.env.ARAGON_PORT || process.env.REACT_APP_PORT || 3000
99

10+
if (
11+
process.env.ARAGON_ETH_NETWORK_TYPE === 'main' &&
12+
!process.env.ARAGON_DEFAULT_ETH_NODE
13+
) {
14+
console.log(
15+
'⚠️ You are connecting the Aragon client to mainnet but have not specified an Ethereum node.'
16+
)
17+
console.log(
18+
' Connecting to the default node (wss://mainnet.eth.aragon.network/ws) in a local'
19+
)
20+
console.log(
21+
' environment may result in severe slowdowns when trying to fetch Ethereum events or state.'
22+
)
23+
console.log()
24+
console.log(
25+
"➡️ During development, it is recommended to override the 'ARAGON_DEFAULT_ETH_NODE' environment"
26+
)
27+
console.log(
28+
' variable with an Infura (infura.io) mainnet node to accelerate loading Ethereum events and state.'
29+
)
30+
console.log(
31+
' You may do so by directly setting an environment variable or by using a .env file.'
32+
)
33+
}
34+
1035
execute(`copy-aragon-ui-assets -n aragon-ui ./public`, {
1136
stdio: 'inherit',
1237
})

0 commit comments

Comments
 (0)