diff --git a/dappnode_package.json b/dappnode_package.json index 1fea366..d64379e 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -10,7 +10,7 @@ "upstream": [ { "repo": "dappnode/staker-package-scripts", - "version": "v0.1.1", + "version": "v0.1.0", "arg": "STAKER_SCRIPTS_VERSION" } ], diff --git a/docker-compose.yml b/docker-compose.yml index b71369d..9cff7ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,16 +12,16 @@ services: build: context: shutter args: - UPSTREAM_VERSION: v1.3.7 + UPSTREAM_VERSION: v1.3.9 KEYPER_CONFIG_DIR: /keyper/config SHUTTER_CHAIN_DIR: /chain - STAKER_SCRIPTS_VERSION: v0.1.1 + STAKER_SCRIPTS_VERSION: v0.1.0 restart: unless-stopped environment: - SHUTTER_API_NODE_PRIVATEKEY="" - SHUTTER_PUSH_METRICS_ENABLED=false - KEYPER_NAME="" - - ETHEREUM_WS="" + - ETHEREUM_WS= - SHUTTER_PUSH_LOGS_ENABLED=false - PUSHGATEWAY_USERNAME="" - PUSHGATEWAY_PASSWORD="" diff --git a/package_variants/gnosis/docker-compose.yml b/package_variants/gnosis/docker-compose.yml index ce56638..98cae24 100644 --- a/package_variants/gnosis/docker-compose.yml +++ b/package_variants/gnosis/docker-compose.yml @@ -6,7 +6,7 @@ services: CHAIN_PORT: 27656 KEYPER_PORT: 24003 KEYPER_METRICS_PORT: 9100 - ASSETS_VERSION: shutter-api-gnosis-1000-v0.0.0 + ASSETS_VERSION: shutter-api-gnosis-1000-v0.0.1 ports: - "24003:24003" - "27656:27656" @@ -17,4 +17,4 @@ services: build: args: NETWORK: gnosis - ASSETS_VERSION: shutter-api-gnosis-1000-v0.0.0 \ No newline at end of file + ASSETS_VERSION: shutter-api-gnosis-1000-v0.0.1 \ No newline at end of file diff --git a/shutter/go-shutter-settings/settings/keyper.go b/shutter/go-shutter-settings/settings/keyper.go index 7045b51..e07a552 100644 --- a/shutter/go-shutter-settings/settings/keyper.go +++ b/shutter/go-shutter-settings/settings/keyper.go @@ -12,11 +12,12 @@ type KeyperConfig struct { BeaconAPIURL string `env:"SHUTTER_BEACONAPIURL"` MaxNumKeysPerMessage int `env:"_ASSETS_MAX_NUM_KEYS_PER_MESSAGE"` Chain struct { - EncryptedGasLimit int `env:"_ASSETS_ENCRYPTED_GAS_LIMIT"` - MaxTxPointerAge int `env:"_ASSETS_MAX_TX_POINTER_AGE"` - GenesisSlotTimestamp int `env:"_ASSETS_GENESIS_SLOT_TIMESTAMP"` - SyncStartBlockNumber int `env:"_ASSETS_SYNC_START_BLOCK_NUMBER"` - Node struct { + EncryptedGasLimit int `env:"_ASSETS_ENCRYPTED_GAS_LIMIT"` + MaxTxPointerAge int `env:"_ASSETS_MAX_TX_POINTER_AGE"` + GenesisSlotTimestamp int `env:"_ASSETS_GENESIS_SLOT_TIMESTAMP"` + SyncStartBlockNumber int `env:"_ASSETS_SYNC_START_BLOCK_NUMBER"` + SyncMonitorCheckInterval int `env:"_ASSETS_SYNC_MONITOR_CHECK_INTERVAL"` + Node struct { PrivateKey string `env:"SHUTTER_API_NODE_PRIVATEKEY"` ContractsURL string `env:"SHUTTER_GNOSIS_NODE_CONTRACTSURL"` //Unused DeploymentDir string `env:"SHUTTER_DEPLOYMENT_DIR"` // Unused diff --git a/shutter/scripts/configure_keyper.sh b/shutter/scripts/configure_keyper.sh index c581ec6..1115a94 100755 --- a/shutter/scripts/configure_keyper.sh +++ b/shutter/scripts/configure_keyper.sh @@ -14,11 +14,18 @@ NODE_PATH=$NODE_HOME/lib/node_modules PATH=$NODE_HOME/bin:$PATH function test_ethereum_url() { + # 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. + # Git Issue: https://github.com/dappnode/staker-package-scripts/issues/11 + export SHUTTER_NETWORK_NODE_ETHEREUMURL=${ETHEREUM_WS:-$(get_execution_ws_url_from_global_env ${NETWORK} ${SUPPORTED_NETWORKS})} RESULT=$(wscat -c "$SHUTTER_NETWORK_NODE_ETHEREUMURL" -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}') if [[ $RESULT =~ '"id":1' ]]; then return 0; else - echo "Could not find DAppNode RPC/WS url for this package!" - echo "Please configure 'ETHEREUM_WS' to point to an applicable websocket RPC service." - exit 1; + export SHUTTER_NETWORK_NODE_ETHEREUMURL=ws://execution.${NETWORK}.dncore.dappnode:8545 + RESULT=$(wscat -c "$SHUTTER_NETWORK_NODE_ETHEREUMURL" -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}') + if [[ $RESULT =~ '"id":1' ]]; then return 0; else + echo "Could not find DAppNode RPC/WS url for this package!" + echo "Please configure 'ETHEREUM_WS' to point to an applicable websocket RPC service." + exit 1 + fi fi } @@ -33,9 +40,8 @@ fi export SHUTTER_P2P_ADVERTISEADDRESSES="[\"/ip4/${_DAPPNODE_GLOBAL_PUBLIC_IP}/tcp/${KEYPER_PORT}\", \"/ip4/${_DAPPNODE_GLOBAL_PUBLIC_IP}/udp/${KEYPER_PORT}/quic-v1\"]" -export SHUTTER_NETWORK_NODE_ETHEREUMURL=${ETHEREUM_WS:-$(get_execution_ws_url_from_global_env "$NETWORK" "$SUPPORTED_NETWORKS")} -echo "[DEBUG | configure] SHUTTER_NETWORK_NODE_ETHEREUMURL is ${SHUTTER_NETWORK_NODE_ETHEREUMURL}" test_ethereum_url +echo "[DEBUG | configure] SHUTTER_NETWORK_NODE_ETHEREUMURL is ${SHUTTER_NETWORK_NODE_ETHEREUMURL}" export VALIDATOR_PUBLIC_KEY=$(cat "${SHUTTER_CHAIN_DIR}/config/priv_validator_pubkey.hex") export SHUTTER_METRICS_ENABLED=${SHUTTER_PUSH_METRICS_ENABLED}