Skip to content

Commit

Permalink
add eth tss automation
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Lee committed Jan 9, 2024
1 parent 9e6ff3c commit 7d13c51
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
13 changes: 3 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,20 +248,13 @@ stop-stateful-upgrade:
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-stateful.yml down --remove-orphans

###############################################################################
### Monitoring and Blockscout ###
### Monitoring ###
###############################################################################

start-blockscout:
@echo "Starting blockscout"
cd contrib/localnet/blockscout && $(DOCKER) compose -f docker-compose.yml up -d

stop-blockscout:
@echo "Stopping blockscout"
cd contrib/localnet/blockscout && $(DOCKER) compose -f docker-compose.yml down --remove-orphans

start-monitoring:
@echo "Starting monitoring services"
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-monitoring.yml up -d
cd contrib/localnet/ && ./grafana/get-tss-address.sh
$(DOCKER) compose -f docker-compose-monitoring.yml up -d

stop-monitoring:
@echo "Stopping monitoring services"
Expand Down
3 changes: 2 additions & 1 deletion contrib/localnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ which does the following docker compose command:
$ docker compose down --remove-orphans
```
### Run monitoring setup
Before starting the monitoring setup, make sure you have added the eth addresses of interest to the grafana/addresses.txt file
Before starting the monitoring setup, make sure the Zetacore API is up at http://localhost:1317.
You can also add any additional ETH addresses to monitor in zeta-node/contrib/localnet/grafana/addresses.txt file
```bash
# in zeta-node/
make start-monitoring
Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/grafana/addresses.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ethTSS:0x5517d89798EC0cfD19a756398c81C12fbd26CD33
ethTSS:0xB2E31B27E6114B0E2E37C3B74B097f7f340cC6aa
9 changes: 9 additions & 0 deletions contrib/localnet/grafana/get-tss-address.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

/usr/sbin/sshd

#retrieve value of ETH TSS Address from localnet
ethTSS_address=$(curl 'http://localhost:1317/zeta-chain/observer/get_tss_address' | jq -r '.eth')

#write value of ETH TSS Address to addresses.txt file
printf "ethTSS:$ethTSS_address\n" > addresses.txt

0 comments on commit 7d13c51

Please sign in to comment.