Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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
Expand Down
4 changes: 2 additions & 2 deletions package_variants/gnosis/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -17,4 +17,4 @@ services:
build:
args:
NETWORK: gnosis
ASSETS_VERSION: shutter-api-gnosis-1000-v0.0.0
ASSETS_VERSION: shutter-api-gnosis-1000-v0.0.1
11 changes: 6 additions & 5 deletions shutter/go-shutter-settings/settings/keyper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 11 additions & 5 deletions shutter/scripts/configure_keyper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] 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:-ws://execution.${NETWORK}.dncore.dappnode:8546}
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
}

Expand All @@ -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}
Expand Down
Loading