Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
13 changes: 9 additions & 4 deletions shutter/scripts/configure_keyper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ PATH=$NODE_HOME/bin:$PATH
function test_ethereum_url() {
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.${SUPPORTED_NETWORKS}.dncore.dappnode:8545
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUPPORTED_NETWORKS is potentially an array. So this shouldn't apply here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the logic here needs to check for both ports and if none of them work, ask the user to configure an ETHEREUM_WS

Copy link
Contributor Author

@blockchainluffy blockchainluffy Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is checking for both, 8546 port is checked initially if it does not find ETHEREUM_WS url, then if it does not work, we check for 8545 port (set in the test_ethereum_url function)

RESULT=$(wscat -c "" -x '{"jsonrpc": "2.0", "method": "net_version", "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,7 +37,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")}
//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.
export SHUTTER_NETWORK_NODE_ETHEREUMURL=${ETHEREUM_WS:-ws://execution.${SUPPORTED_NETWORKS}.dncore.dappnode:8546}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above: I suggest to use ${NETWORK} instead of the array ${SUPPORTED_NETWORKS}.

echo "[DEBUG | configure] SHUTTER_NETWORK_NODE_ETHEREUMURL is ${SHUTTER_NETWORK_NODE_ETHEREUMURL}"
test_ethereum_url

Expand Down
Loading