Skip to content

Commit

Permalink
Add session validator performance updater. Bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
kukabi committed Nov 27, 2024
1 parent a1018e1 commit ed9d932
Show file tree
Hide file tree
Showing 57 changed files with 456 additions and 69 deletions.
73 changes: 46 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ members = [
"subvt-referendum-updater",
"subvt-report-service",
"subvt-service-common",
"subvt-session-validator-performance-updater",
"subvt-substrate-client",
"subvt-telegram-bot",
"subvt-telemetry-processor",
Expand Down
7 changes: 6 additions & 1 deletion _config/base.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ validator_details_server_port = 11002
validator_list_updater_port = 11001
referendum_updater_port = 11014
kline_updater_port = 11015
session_validator_performance_updater_port = 11016

[sub_id]
api_url = "https://sub.id/api/v1/"
Expand All @@ -160,4 +161,8 @@ tmp_dir_path = "/path/to/the/temporary/image/dir"
sleep_seconds = 3600
begin_year = 2022
begin_month = 1
begin_day = 1
begin_day = 1

[session_validator_performance_updater]
start_session_index = 5000
sleep_seconds = 60
5 changes: 4 additions & 1 deletion _config/network/kusama.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ start_block_number = 6_015_486
data_endpoint = "https://nodes.web3.foundation/api/cohort/1/kusama"

[notification_generator]
unclaimed_payout_check_delay_hours = 3
unclaimed_payout_check_delay_hours = 3

[session_validator_performance_updater]
start_session_index = 5000
5 changes: 4 additions & 1 deletion _config/network/polkadot.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ start_block_number = 2_700_565
data_endpoint = "https://nodes.web3.foundation/api/cohort/1/polkadot"

[notification_generator]
unclaimed_payout_check_delay_hours = 9
unclaimed_payout_check_delay_hours = 9

[session_validator_performance_updater]
start_session_index = 5000
5 changes: 4 additions & 1 deletion _config/network/westend.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ start_block_number = 10_130_000
[telemetry]
# W3F wss://telemetry-backend.w3f.community/feed
# Polkadot wss://feed.telemetry.polkadot.io/feed
websocket_url = "wss://feed.telemetry.polkadot.io/feed"
websocket_url = "wss://feed.telemetry.polkadot.io/feed"

[session_validator_performance_updater]
start_session_index = 5000
6 changes: 5 additions & 1 deletion _docker/compose/.env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=0.21.4
VERSION=0.22.0
ENV=production
LOG_LEVEL=debug

Expand Down Expand Up @@ -83,3 +83,7 @@ FONT_DIR=/path/to/the/fonts/dir
TMP_DIR=/path/to/temporary/files/dir
PROMETHEUS_DIR=/path/to/the/prometheus/files/dir
TEMPLATE_DIR=/path/to/the/templates/dir

# SESSION VALIDATOR PERFORMANCE UPDATER
KUSAMA_SESSION_VALIDATOR_PERFORMANCE_UPDATER_START_SESSION_INDEX=5000
POLKADOT_SESSION_VALIDATOR_PERFORMANCE_UPDATER_START_SESSION_INDEX=5000
20 changes: 20 additions & 0 deletions _docker/compose/05-docker-compose-subvt-kusama-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,26 @@ services:
- SUBVT__NETWORK_POSTGRES__HOST=subvt_kusama_postgres
# kline updater
- SUBVT__KLINE_UPDATER__TMP_DIR_PATH=/subvt/tmp
subvt_session_validator_performance_updater:
container_name: subvt_session_validator_performance_updater
restart: unless-stopped
image: "helikon/subvt-session-validator-performance-updater:${VERSION}"
networks:
- subvt_kusama
volumes:
- ${TMP_DIR}:/subvt/tmp
environment:
- SUBVT_ENV=${ENV}
- SUBVT_NETWORK=kusama
- SUBVT_CONFIG_DIR=/subvt/config
# log level
- SUBVT__LOG__SUBVT_LEVEL=${LOG_LEVEL}
# metrics
- SUBVT__METRICS__HOST=0.0.0.0
# network postgres
- SUBVT__NETWORK_POSTGRES__HOST=subvt_kusama_postgres
# session validator performance updater
- SUBVT__SESSION_VALIDATOR_PERFORMANCE_UPDATER__START_SESSION_INDEX=${KUSAMA_SESSION_VALIDATOR_PERFORMANCE_UPDATER_START_SESSION_INDEX}
networks:
subvt_kusama:
name: subvt_kusama
Expand Down
20 changes: 20 additions & 0 deletions _docker/compose/06-docker-compose-subvt-polkadot-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,26 @@ services:
- SUBVT__NETWORK_POSTGRES__HOST=subvt_polkadot_postgres
# kline updater
- SUBVT__KLINE_UPDATER__TMP_DIR_PATH=/subvt/tmp
subvt_session_validator_performance_updater:
container_name: subvt_session_validator_performance_updater
restart: unless-stopped
image: "helikon/subvt-session-validator-performance-updater:${VERSION}"
networks:
- subvt_polkadot
volumes:
- ${TMP_DIR}:/subvt/tmp
environment:
- SUBVT_ENV=${ENV}
- SUBVT_NETWORK=polkadot
- SUBVT_CONFIG_DIR=/subvt/config
# log level
- SUBVT__LOG__SUBVT_LEVEL=${LOG_LEVEL}
# metrics
- SUBVT__METRICS__HOST=0.0.0.0
# network postgres
- SUBVT__NETWORK_POSTGRES__HOST=subvt_polkadot_postgres
# session validator performance updater
- SUBVT__SESSION_VALIDATOR_PERFORMANCE_UPDATER__START_SESSION_INDEX=${POLKADOT_SESSION_VALIDATOR_PERFORMANCE_UPDATER_START_SESSION_INDEX}
networks:
subvt_polkadot:
name: subvt_polkadot
Expand Down
Loading

0 comments on commit ed9d932

Please sign in to comment.