File tree Expand file tree Collapse file tree 11 files changed +37
-32
lines changed
go-shutter-settings/settings Expand file tree Collapse file tree 11 files changed +37
-32
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ This package includes the following services:
2424
2525 - Uses VictoriaMetrics to send performance metrics to a remote Pushgateway.
2626
27- - Configuration is handled through templates in ` /config/gnosis/ ` , and the main config file ( ` vmagent.yml ` ) is dynamically generated based on environment variables .
27+ - Configuration is handled via the config file ` /config/gnosis/vmagent.yml ` , placehoders in that file are automatically picked up from the environment by vmagent .
2828
2929### Configuration
3030
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ services:
1313 build :
1414 context : shutter
1515 args :
16- ASSETS_VERSION : shutter-gnosis-1000-set-1v2 # $NETWORK-10*$CHAIN_ID-set-$VERSION
17- UPSTREAM_VERSION : gnosis- v1.2.4b1
16+ ASSETS_VERSION : shutter-gnosis-1000-set1.3 # $NETWORK-10*$CHAIN_ID-set-$VERSION
17+ UPSTREAM_VERSION : v1.2.5
1818 KEYPER_CONFIG_DIR : /keyper/config
1919 SHUTTER_CHAIN_DIR : /chain
2020 STAKER_SCRIPTS_VERSION : v0.1.0
@@ -31,7 +31,7 @@ services:
3131 build :
3232 context : metrics
3333 args :
34- ASSETS_VERSION : shutter-gnosis-1000-set-1v2 # $NETWORK-10*$CHAIN_ID-set-$VERSION
34+ ASSETS_VERSION : shutter-gnosis-1000-set1.3 # $NETWORK-10*$CHAIN_ID-set-$VERSION
3535 restart : on-failure
3636 environment :
3737 SHUTTER_PUSH_METRICS_ENABLED : false
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ FROM victoriametrics/vmagent:v1.101.0
99ARG NETWORK
1010
1111ENV ASSETS_DIR=/assets \
12- TEMPLATE_CONFIG_FILE=/config/${NETWORK}/vmagent_template.yml \
1312 CONFIG_FILE=/config/${NETWORK}/vmagent.yml \
1413 USER_SETTINGS_FILE=/config/user/settings.env
1514
Original file line number Diff line number Diff line change @@ -6,18 +6,24 @@ scrape_configs:
66 static_configs :
77 - targets : ["shutter.shutter-gnosis.dappnode:9100"]
88 labels :
9- instance : " %{KEYPER_NAME}"
9+ instance : " kpr- %{KEYPER_NAME}"
1010 deployment : " %{_ASSETS_VERSION}"
11+ deployment_type : " dappnode"
12+ network : " %{_ASSETS_NETWORK}"
1113 - job_name : ' shuttermint'
1214 metrics_path : /
1315 static_configs :
1416 - targets : ["shutter.shutter-gnosis.dappnode:26660"]
1517 labels :
16- instance : " %{KEYPER_NAME}"
18+ instance : " kpr- %{KEYPER_NAME}"
1719 deployment : " %{_ASSETS_VERSION}"
20+ deployment_type : " dappnode"
21+ network : " %{_ASSETS_NETWORK}"
1822 - job_name : ' vmagent'
1923 static_configs :
2024 - targets : ["localhost:8429"]
2125 labels :
22- instance : " %{KEYPER_NAME}"
23- deployment : " %{_ASSETS_VERSION}"
26+ instance : " kpr-%{KEYPER_NAME}"
27+ deployment : " %{_ASSETS_VERSION}"
28+ deployment_type : " dappnode"
29+ network : " %{_ASSETS_NETWORK}"
Original file line number Diff line number Diff line change @@ -62,11 +62,6 @@ source_user_settings() {
6262 fi
6363}
6464
65- replace_envs_in_yaml () {
66- echo " [INFO | metrics] Replacing environment variables in the configuration file"
67- sed " s|%{KEYPER_NAME}|$KEYPER_NAME |g; s|%{_ASSETS_VERSION}|$_ASSETS_VERSION |g" " $TEMPLATE_CONFIG_FILE " > " $CONFIG_FILE "
68- }
69-
7065update_user_settings
7166
7267if [ " ${SHUTTER_PUSH_METRICS_ENABLED} " = " false" ]; then
@@ -78,8 +73,6 @@ source_assets_envs
7873
7974source_user_settings
8075
81- replace_envs_in_yaml
82-
8376exec /vmagent-prod \
8477 -promscrape.config=" ${CONFIG_FILE} " \
8578 -remoteWrite.url=" ${PUSHGATEWAY_URL} " \
Original file line number Diff line number Diff line change @@ -6,14 +6,13 @@ services:
66 CHAIN_PORT : 26656
77 KEYPER_PORT : 23003
88 KEYPER_METRICS_PORT : 9100
9+ ports :
10+ - " 23003:23003"
11+ - " 26656:26656"
12+ - " 26660:26660"
13+ - " 9100:9100"
914
1015 metrics :
1116 build :
1217 args :
1318 NETWORK : gnosis
14-
15- ports :
16- - " 23003:23003/tcp"
17- - " 26656:26656"
18- - " 26660:26660"
19- - " 9100:9100"
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ FROM ghcr.io/shutter-network/assets:${ASSETS_VERSION} as assets
66RUN rsync -aq --delete /assets-source/ /assets/
77
88ARG UPSTREAM_VERSION
9- FROM ghcr.io/shutter-network/rolling-shutter :${UPSTREAM_VERSION}
9+ FROM ghcr.io/shutter-network/keyper :${UPSTREAM_VERSION}
1010
1111ARG NETWORK
1212ARG KEYPER_CONFIG_DIR
@@ -23,7 +23,7 @@ RUN apt-get update && \
2323ENV SHUTTER_GNOSIS_SM_BLOCKTIME=10 \
2424 SHUTTER_GNOSIS_GENESIS_KEYPER=0x440Dc6F164e9241F04d282215ceF2780cd0B755e \
2525 SHUTTER_GNOSIS_MAXTXPOINTERAGE=5 \
26- SHUTTER_DATABASE_URL =postgres://
[email protected] ${NETWORK}.dappnode:5432/keyper \
26+ SHUTTER_DATABASEURL =postgres://
[email protected] ${NETWORK}.dappnode:5432/keyper \
2727 SHUTTER_SHUTTERMINT_SHUTTERMINTURL=http://localhost:26657 \
2828 CHAIN_LISTEN_PORT=26657 \
2929 SHUTTER_BIN=/rolling-shutter \
@@ -52,7 +52,7 @@ COPY --from=assets ${ASSETS_DIR}/ ${ASSETS_DIR}/
5252
5353# Placed here to rebuild less layers
5454ENV CHAIN_PORT=${CHAIN_PORT} \
55- SHUTTER_P2P_LISTENADDRESSES="/ip4/0.0.0.0/tcp/${KEYPER_PORT}" \
55+ SHUTTER_P2P_LISTENADDRESSES="/ip4/0.0.0.0/tcp/${KEYPER_PORT},/ip4/0.0.0.0/udp/${KEYPER_PORT}/quic-v1 " \
5656 NETWORK=${NETWORK}
5757
5858ENTRYPOINT ["supervisord" , "-c" , "/etc/supervisord.conf" ]
Original file line number Diff line number Diff line change 88
99type KeyperConfig struct {
1010 InstanceID int `env:"_ASSETS_INSTANCE_ID"`
11- DatabaseURL string `env:"SHUTTER_DATABASE_URL "`
11+ DatabaseURL string `env:"SHUTTER_DATABASEURL "`
1212 BeaconAPIURL string `env:"SHUTTER_BEACONAPIURL"`
1313 MaxNumKeysPerMessage int `env:"_ASSETS_MAX_NUM_KEYS_PER_MESSAGE"`
1414 Gnosis struct {
@@ -31,8 +31,8 @@ type KeyperConfig struct {
3131 }
3232 P2P struct {
3333 P2PKey string `env:"SHUTTER_P2P_KEY"`
34- ListenAddresses string `env:"SHUTTER_P2P_LISTENADDRESSES"`
35- AdvertiseAddresses string `env:"SHUTTER_P2P_ADVERTISEADDRESSES"`
34+ ListenAddresses [] string `env:"SHUTTER_P2P_LISTENADDRESSES"`
35+ AdvertiseAddresses [] string `env:"SHUTTER_P2P_ADVERTISEADDRESSES"`
3636 CustomBootstrapAddresses []string `env:"_ASSETS_CUSTOM_BOOTSTRAP_ADDRESSES"`
3737 DiscoveryNamespace string `env:"SHUTTER_DISCOVERY_NAMESPACE"`
3838 }
@@ -44,7 +44,7 @@ type KeyperConfig struct {
4444 DKGStartBlockDelta int `env:"_ASSETS_DKG_START_BLOCK_DELTA"`
4545 }
4646 Metrics struct {
47- Enabled bool `env:"SHUTTER_ENABLED "`
47+ Enabled bool `env:"SHUTTER_METRICS_ENABLED "`
4848 }
4949}
5050
Original file line number Diff line number Diff line change @@ -75,10 +75,10 @@ generate_keyper_config
7575
7676init_keyper_db
7777
78- init_chain
79-
8078configure_keyper
8179
80+ init_chain
81+
8282configure_chain
8383
8484trigger_chain_start
Original file line number Diff line number Diff line change @@ -10,12 +10,18 @@ echo "[INFO | configure] Calculating keyper configuration values..."
1010
1111SUPPORTED_NETWORKS=" gnosis"
1212
13- export SHUTTER_P2P_ADVERTISEADDRESSES=" /ip4/${_DAPPNODE_GLOBAL_PUBLIC_IP} /tcp/${KEYPER_PORT} "
13+ # Conditionally add square brackets to SHUTTER_P2P_LISTENADDRESSES
14+ if [[ ! " $SHUTTER_P2P_LISTENADDRESSES " =~ ^\[ .* \] $ ]]; then
15+ export SHUTTER_P2P_LISTENADDRESSES=" [$SHUTTER_P2P_LISTENADDRESSES ]"
16+ fi
17+
18+ export SHUTTER_P2P_ADVERTISEADDRESSES=" [\" /ip4/${_DAPPNODE_GLOBAL_PUBLIC_IP} /tcp/${KEYPER_PORT} \" , \" /ip4/${_DAPPNODE_GLOBAL_PUBLIC_IP} /udp/${KEYPER_PORT} /quic-v1\" ]"
1419export SHUTTER_BEACONAPIURL=$( get_beacon_api_url_from_global_env " $NETWORK " " $SUPPORTED_NETWORKS " )
1520export SHUTTER_GNOSIS_NODE_CONTRACTSURL=http://execution.gnosis.dncore.dappnode:8545
1621export SHUTTER_GNOSIS_NODE_ETHEREUMURL=$( get_execution_ws_url_from_global_env " $NETWORK " " $SUPPORTED_NETWORKS " )
1722export VALIDATOR_PUBLIC_KEY=$( cat " ${SHUTTER_CHAIN_DIR} /config/priv_validator_pubkey.hex" )
1823export SHUTTER_DISCOVERY_NAMESPACE=" ${_ASSETS_DISCOVERY_NAME_PREFIX} -${_ASSETS_INSTANCE_ID} "
24+ export SHUTTER_METRICS_ENABLED=${SHUTTER_PUSH_METRICS_ENABLED}
1925
2026echo " [INFO | configure] LISTEN: $SHUTTER_P2P_LISTENADDRESSES "
2127
You can’t perform that action at this time.
0 commit comments