diff --git a/docker/compose.yaml b/docker/compose.yaml index 1512f6a..ebc1aff 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -49,6 +49,7 @@ services: - ethereum-sidecar - --log_format=json - --ethereum-sidecar.server.ethereum-node-address=${MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS} + - --ethereum-sidecar.server.network=${MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK} restart: always expose: - 7500 diff --git a/docker/mainnet.env.example b/docker/mainnet.env.example index 84e44f8..60809b1 100644 --- a/docker/mainnet.env.example +++ b/docker/mainnet.env.example @@ -29,6 +29,7 @@ MEZOD_CHAIN_ID="mezo_31612-1" MEZOD_HOME="/var/mezod" MEZOD_MONIKER="" MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS="" # Ethereum Mainnet WS RPC +MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK="mainnet" MEZOD_LOG_LEVEL=info MEZOD_LOG_FORMAT=json # json|plain MEZOD_PORT_P2P=26656 # Default. It should be changed in case of a custom setup diff --git a/docker/testnet.env.example b/docker/testnet.env.example index 432419d..5e730df 100644 --- a/docker/testnet.env.example +++ b/docker/testnet.env.example @@ -29,6 +29,7 @@ MEZOD_CHAIN_ID="mezo_31611-1" MEZOD_HOME="/var/mezod" MEZOD_MONIKER="" MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS="" +MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK="sepolia" MEZOD_LOG_LEVEL=info MEZOD_LOG_FORMAT=json # json|plain MEZOD_PORT_P2P=26656 # Default. It should be changed in case of a custom setup diff --git a/helm-chart/mezod/templates/statefulset.yaml b/helm-chart/mezod/templates/statefulset.yaml index 7e9fb20..e48f011 100644 --- a/helm-chart/mezod/templates/statefulset.yaml +++ b/helm-chart/mezod/templates/statefulset.yaml @@ -136,6 +136,11 @@ spec: - --home=/tmp/dummy-data - --log_format=json - --ethereum-sidecar.server.ethereum-node-address=$(ETHEREUM_ENDPOINT) + {{- if eq .Values.env.NETWORK "mainnet" }} + - --ethereum-sidecar.server.network=mainnet + {{- else if eq .Values.env.NETWORK "testnet" }} + - --ethereum-sidecar.server.network=sepolia + {{- end }} env: - name: ETHEREUM_ENDPOINT valueFrom: diff --git a/native/mainnet.env.example b/native/mainnet.env.example index 650e110..d3c8eb3 100755 --- a/native/mainnet.env.example +++ b/native/mainnet.env.example @@ -16,6 +16,7 @@ export MEZOD_ETHEREUM_SIDECAR_CLIENT_SERVER_ADDRESS="127.0.0.1:7500" # Address to an ethereum node (web socket address) # Example: wss://your.eth.node export MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS="" +export MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK="mainnet" export MEZOD_LOG_FORMAT="json" export MEZOD_KEY_NAME="key0" export MEZOD_LOGLEVEL="info" diff --git a/native/testnet.env.example b/native/testnet.env.example index 13feff1..9a17493 100755 --- a/native/testnet.env.example +++ b/native/testnet.env.example @@ -16,6 +16,7 @@ export MEZOD_ETHEREUM_SIDECAR_CLIENT_SERVER_ADDRESS="127.0.0.1:7500" # Address to an ethereum node (web socket address) # Example: wss://your.eth.node export MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS="" +export MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK="sepolia" export MEZOD_LOG_FORMAT="json" export MEZOD_KEY_NAME="key0" export MEZOD_LOGLEVEL="info" diff --git a/native/v-kit.sh b/native/v-kit.sh index 8f09011..cddd046 100755 --- a/native/v-kit.sh +++ b/native/v-kit.sh @@ -183,6 +183,7 @@ configure_mezo() { ${MEZO_EXEC} toml set \ ${app_config_file} \ + -v ethereum-sidecar.server.network="${MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK}" \ -v ethereum-sidecar.client.server-address="0.0.0.0:7500" \ -v api.enable=true \ -v api.address="tcp://0.0.0.0:1317" \ @@ -245,7 +246,7 @@ After=network.target [Service] Restart=no ExecStartPre=/bin/echo "Starting ethereum-sidecar systemd initialization..." -ExecStart=${MEZO_EXEC} ethereum-sidecar --log_format=${MEZOD_LOG_FORMAT} --ethereum-sidecar.server.ethereum-node-address=${MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS} +ExecStart=${MEZO_EXEC} ethereum-sidecar --log_format=${MEZOD_LOG_FORMAT} --ethereum-sidecar.server.network=${MEZOD_ETHEREUM_SIDECAR_SERVER_NETWORK} --ethereum-sidecar.server.ethereum-node-address=${MEZOD_ETHEREUM_SIDECAR_SERVER_ETHEREUM_NODE_ADDRESS} StandardOutput=journal StandardError=journal User=root