Skip to content

Commit e78d89a

Browse files
committed
Merge branch 'develop' into release
2 parents 42ef8b3 + 003b430 commit e78d89a

File tree

182 files changed

+15595
-312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+15595
-312
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ tests/test.go
1919
config.yaml
2020
docker-compose.override.yaml
2121
custom-prometheus.yaml
22+
**/custom_rules/
2223
custom-alertmanager.yaml
2324
custom_chains.yaml
2425

.images/babylon-fp-dashboard.png

1.37 MB
Loading
3.04 MB
Loading
511 KB
Loading

.resource/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# CUSTOM_CHAINS_FILE=custom_chains.yaml
88
# If you don't want to delete old records, use "persistence" instead of specific period
99
# DB_RETENTION_PERIOD=1h
10+
# If you're operating docker service in not default directory, please enable this env for cadvisor and promtail
11+
# DOCKER_ROOT=/data/docker
1012

1113
####### Prometheus Service #######
1214
# PROM_SERVER_PORT=9090
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
services:
2+
postgres:
3+
profiles: ['disables']

.resource/example-network-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ chains:
2020
- 'cosmos1xxx'
2121
- 'cosmos1xxx'
2222
nodes:
23-
# NOTE: currently grpc endpoint doens't support ssl
23+
# NOTE: currently grpc endpoint doesn't support ssl
2424
- rpc: 'http://localhost:26657'
2525
api: 'http://localhost:1337'
2626
grpc: 'localhost:9090'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
services:
2+
postgres:
3+
profiles: ['disables']

.resource/example-validator-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ chains:
1919
- 'cosmos1xxx'
2020
- 'cosmos1xxx'
2121
- 'cosmos1xxx'
22+
# NOTE: if you write monikers here, the moniker will be override by these value
23+
# in this case, for only cosmos chains, the CVMS will make a metrics for Figment validator.
24+
# by this feature, you can compare validator performance with yours and others.
25+
monikers:
26+
- 'Figment'
2227
nodes:
23-
# NOTE: currently grpc endpoint doens't support ssl
28+
# NOTE: currently grpc endpoint doesn't support ssl
2429
- rpc: 'http://localhost:26657'
2530
api: 'http://localhost:1337'
2631
grpc: 'localhost:9090'

Makefile

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ version:
2727
@echo "VERSION: ${VERSION}"
2828
@echo "COMMIT: ${COMMIT}"
2929

30-
# Reset indexer db
31-
reset-db:
32-
@docker compose --profile indexer-db down -v
33-
@docker compose --profile indexer-db up -d
34-
3530
# Sort chain_id in support_chains.yaml
3631
sort_support_chains:
3732
@yq eval 'sort_keys(.)' -i ./docker/cvms/support_chains.yaml
@@ -63,6 +58,23 @@ clean:
6358

6459
PHONY: build install run clean
6560

61+
###############################################################################
62+
### Docker ###
63+
###############################################################################
64+
65+
## Reset indexer db
66+
reset-db:
67+
@echo "-> Re-up postgres container for reset"
68+
@docker compose down -v postgres && docker compose up -d postgres
69+
70+
###############################################################################
71+
### Migration ###
72+
###############################################################################
73+
74+
migration:
75+
@echo "-> Start flyway service for new schemas in CVMS"
76+
@docker compose --profile migration up flyway
77+
6678
###############################################################################
6779
### Start ###
6880
###############################################################################
@@ -75,22 +87,22 @@ start-exporter:
7587
## start indexer application in debug mode
7688
start-indexer:
7789
@echo "-> Start CVMS Indexer"
78-
@go run ./cmd/cvms start indexer --config ${CONFIG_PATH} --log-color-disable ${LOG_COLOR_DISABLE} --log-level ${LOG_LEVEL}
90+
@go run ./cmd/cvms start indexer --config ${CONFIG_PATH} --log-color-disable ${LOG_COLOR_DISABLE} --log-level ${LOG_LEVEL} --port 9300
7991

8092
## start exporter application for specific package
8193

8294
SPECIFIC_PACKAGE ?= block
8395
start-exporter-specific-package:
8496
@echo "-> Start CVMS in script mode, you can use this task adding a argument like 'make start-specific-package SPECIFIC_PACKAGE=eventnonce'"
8597
@echo "Selected Package: ${SPECIFIC_PACKAGE}"
86-
@go run ./cmd/cvms start exporter --config ./config.yaml --log-color-disable false --log-level 5 --package-filter ${SPECIFIC_PACKAGE}
98+
@go run ./cmd/cvms start exporter --config ./config.yaml --log-color-disable ${LOG_COLOR_DISABLE} --log-level ${LOG_LEVEL} --package-filter ${SPECIFIC_PACKAGE} --port 9200
8799

88100
### Test runner
89101
SPECIFIC_PACKAGE ?= voteindexer
90102
start-indexer-specific-package:
91103
@echo "-> Start CVMS in script mode, you can use this task adding a argument like 'make start-specific-package SPECIFIC_PACKAGE=voteindexer'"
92104
@echo "Selected Package: ${SPECIFIC_PACKAGE}"
93-
@go run ./cmd/cvms start indexer --config ./config.yaml --log-color-disable false --log-level 5 --package-filter ${SPECIFIC_PACKAGE}
105+
@go run ./cmd/cvms start indexer --config ./config.yaml --log-color-disable ${LOG_COLOR_DISABLE} --log-level ${LOG_LEVEL} --package-filter ${SPECIFIC_PACKAGE} --port 9300
94106

95107
###############################################################################
96108
### Test Packages ###
@@ -192,6 +204,20 @@ test-pkg-uptime:
192204
@echo "End Unit Testing"
193205
@echo
194206

207+
# babylon-finality-provider packages
208+
PACKAGE_NAME_BAYLON_FP := internal/packages/babylon/finality-provider/api
209+
210+
## Unit testing uptime package
211+
test-pkg-babylon-fp:
212+
213+
@echo "Start Unit Testing: Current Unit Module is '${PACKAGE_NAME_BAYLON_FP}'"
214+
215+
@gotest ${MODULE_NAME}/${PACKAGE_NAME_BAYLON_FP}/... -v -count=1
216+
217+
@echo "End Unit Testing"
218+
@echo
219+
220+
195221

196222
###############################################################################
197223
### Test All ###

0 commit comments

Comments
 (0)