Skip to content

Commit d573c12

Browse files
authored
Merge pull request #22 from shutter-network/feat/upgrade-staker-script
feat: update staker scripts to v0.1.2
2 parents 0cfcadb + 310f4b4 commit d573c12

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

dappnode_package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"upstream": [
1111
{
1212
"repo": "dappnode/staker-package-scripts",
13-
"version": "v0.1.0",
13+
"version": "v0.1.2",
1414
"arg": "STAKER_SCRIPTS_VERSION"
1515
}
1616
],

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
UPSTREAM_VERSION: v1.3.15
1818
KEYPER_CONFIG_DIR: /keyper/config
1919
SHUTTER_CHAIN_DIR: /chain
20-
STAKER_SCRIPTS_VERSION: v0.1.0
20+
STAKER_SCRIPTS_VERSION: v0.1.2
2121
restart: unless-stopped
2222
environment:
2323
- SHUTTER_GNOSIS_NODE_PRIVATEKEY=""

shutter/scripts/configure_keyper.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ NODE_PATH=$NODE_HOME/lib/node_modules
1414
PATH=$NODE_HOME/bin:$PATH
1515

1616
function test_ethereum_url() {
17-
# FIXME: This is a workaround for the issue with the staker-scripts@v0.1.1 not setting get_execution_ws_url_from_global_env correctly in the environment variables.
18-
# Git Issue: https://github.com/dappnode/staker-package-scripts/issues/11
19-
export SHUTTER_GNOSIS_NODE_ETHEREUMURL=${ETHEREUM_WS:-$(get_execution_ws_url_from_global_env ${NETWORK} ${SUPPORTED_NETWORKS})}
17+
if [ -z "$ETHEREUM_WS" ]; then
18+
export SHUTTER_GNOSIS_NODE_ETHEREUMURL=$(get_execution_ws_url_from_global_env ${NETWORK})
19+
else
20+
export SHUTTER_GNOSIS_NODE_ETHEREUMURL=$ETHEREUM_WS
21+
fi
2022
RESULT=$(wscat -c "$SHUTTER_GNOSIS_NODE_ETHEREUMURL" -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}')
2123
if [[ $RESULT =~ '"id":1' ]]; then return 0; else
22-
export SHUTTER_GNOSIS_NODE_ETHEREUMURL=ws://execution.${NETWORK}.dncore.dappnode:8545
24+
export SHUTTER_GNOSIS_NODE_ETHEREUMURL=ws://execution.${NETWORK}.dncore.dappnode:8545 #letting it default to the old URL, incase the node running on the dappnode is not updated to the new version
2325
RESULT=$(wscat -c "$SHUTTER_GNOSIS_NODE_ETHEREUMURL" -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}')
2426
if [[ $RESULT =~ '"id":1' ]]; then return 0; else
2527
echo "Could not find DAppNode RPC/WS url for this package!"
@@ -30,7 +32,11 @@ function test_ethereum_url() {
3032
}
3133

3234
function test_beacon_url() {
33-
export SHUTTER_BEACONAPIURL=${BEACON_HTTP:-$(get_beacon_api_url_from_global_env "$NETWORK" "$SUPPORTED_NETWORKS")}
35+
if [ -z "$BEACON_HTTP" ]; then
36+
export SHUTTER_BEACONAPIURL=$(get_beacon_api_url_from_global_env "$NETWORK")
37+
else
38+
export SHUTTER_BEACONAPIURL=$BEACON_HTTP
39+
fi
3440
RESULT=$(curl -X GET "${SHUTTER_BEACONAPIURL}/eth/v1/beacon/genesis" -H "Accept: application/json")
3541
if [[ $RESULT =~ '"genesis_time"' ]]; then return 0; else
3642
export SHUTTER_BEACONAPIURL=http://beacon-chain.${NETWORK}.dncore.dappnode:4000

0 commit comments

Comments
 (0)