From 4b92931cb12bfe8cbe42ad6cdefd0552f762a478 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Wed, 19 Feb 2020 02:35:02 +0100 Subject: [PATCH] docs: warn dev when starting mainnet locally to use a different ETH node (#1318) --- scripts/start | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/start b/scripts/start index 52dfaee04..ad72b6a01 100755 --- a/scripts/start +++ b/scripts/start @@ -7,6 +7,31 @@ const execute = require('child_process').execSync const clientPort = process.env.ARAGON_PORT || process.env.REACT_APP_PORT || 3000 +if ( + process.env.ARAGON_ETH_NETWORK_TYPE === 'main' && + !process.env.ARAGON_DEFAULT_ETH_NODE +) { + console.log( + '⚠️ You are connecting the Aragon client to mainnet but have not specified an Ethereum node.' + ) + console.log( + ' Connecting to the default node (wss://mainnet.eth.aragon.network/ws) in a local' + ) + console.log( + ' environment may result in severe slowdowns when trying to fetch Ethereum events or state.' + ) + console.log() + console.log( + "➡️ During development, it is recommended to override the 'ARAGON_DEFAULT_ETH_NODE' environment" + ) + console.log( + ' variable with an Infura (infura.io) mainnet node to accelerate loading Ethereum events and state.' + ) + console.log( + ' You may do so by directly setting an environment variable or by using a .env file.' + ) +} + execute(`copy-aragon-ui-assets -n aragon-ui ./public`, { stdio: 'inherit', })