Skip to content

Commit 5212d93

Browse files
committed
Remove 1KV/DN and Telemetry components. Dependency updates. Quite a bit of housekeeping.
1 parent 34fc0cd commit 5212d93

File tree

91 files changed

+920
-3316
lines changed

Some content is hidden

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

91 files changed

+920
-3316
lines changed

Cargo.lock

Lines changed: 831 additions & 795 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ members = [
99
"subvt-metrics",
1010
"subvt-network-status-server",
1111
"subvt-network-status-updater",
12-
"subvt-nft",
1312
"subvt-notification-generator",
1413
"subvt-notification-processor",
15-
"subvt-onekv-updater",
1614
"subvt-persistence",
1715
"subvt-plotter",
1816
"subvt-proc-macro",
@@ -22,7 +20,6 @@ members = [
2220
"subvt-session-validator-performance-updater",
2321
"subvt-substrate-client",
2422
"subvt-telegram-bot",
25-
"subvt-telemetry-processor",
2623
"subvt-types",
2724
"subvt-utility",
2825
"subvt-validator-details-server",
@@ -34,7 +31,7 @@ resolver = "2"
3431
[workspace.dependencies]
3532
anyhow = "1.0"
3633
itertools = "0.14"
37-
lazy_static = "1.4"
34+
lazy_static = "1.5"
3835
log = "0.4"
3936
num-traits = "0.2"
4037
thiserror = "2.0"

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,15 @@ Complete details can be found in the
3535
| [subvt-metrics](./subvt-metrics) | Common crate that contains Prometheus helper functions. Used by all other crates that export Prometheus metrics data. |
3636
| [subvt-network-status-server](./subvt-network-status-server) | Publishes the network status data prepared by the network status updater through WS RPC. |
3737
| [subvt-network-status-updater](./subvt-network-status-updater) | Fetches the network status data from the Substrate node after each finalized block and stores it in the Redis instance. |
38-
| [subvt-nft](./subvt-nft) | Contains the functions to fetch NFT records for a stash account using the [sub.id](https://sub.id) public API. |
3938
| [subvt-nofification-generator](./subvt-notification-generator) | Processes the indexed block (PostgreSQL), validator list (Redis) and Telemetry time-series (TimescaleDB) data for possible notifications, and persists notifications according to the previously-defined notification rules. |
4039
| [subvt-notification-processor](./subvt-notification-processor) | Processes and sends the notifications persisted by the notification generator. |
41-
| [subvt-onekv-updater](./subvt-onekv-updater) | Fetches the complete candidate data from the 1KV backend (only Polkadot or Kusama) in regular intervals, and Stores the candidate and all related data (ranking events, score, etc.) in the PostgreSQL network database. |
4240
| [subvt-persistence](./subvt-persistence) | Complete persistence logic for PostgreSQL and Redis (TBD). Contains the full migrations for the network and application PostgreSQL databases. |
4341
| [subvt-plotter](./subvt-plotter) | Used for server-side generation of report charts. Currently used by the Telegram bot to deliver rewards and payouts reports. |
4442
| [subvt-proc-macro](./subvt-proc-macro) | Procedural macros. |
4543
| [subvt-report-service](./subvt-report-service) | Era and validator report REST service. OpenAPI YAML specification document [here](./subvt-report-service/open-api-spec/subvt_report_service.yml), viewable [here](https://helikon-labs.stoplight.io/docs/subvt/YXBpOjM0Mjg0NzAw-sub-vt-application-service). | |
4644
| [subvt-service-common](./subvt-service-common) | Contains the service trait implemented by all SubVT services. |
4745
| [subvt-substrate-client](./subvt-substrate-client) | Facilitates all of the communication between SubVT and Substrate node RPC interfaces. |
4846
| [subvt-telegram-bot](./subvt-telegram-bot) | SubVT Telegram bot, currently live for Kusama and Polkadot. View its readme for details. |
49-
| [subvt-telemetry-processor](./subvt-telemetry-processor) | Subscribes to the chain's feed on a Telemetry server, and persists the node data into the TimescaleDB instance for later analysis. |
5047
| [subvt-types](./subvt-types) | Complete SubVT types. |
5148
| [subvt-utility](./subvt-utility) | Basic utility functions. Not used a lot at the moment, but more a place for later work. |
5249
| [subvt-validator-details-server](./subvt-validator-details-server) | Publishes a validator's details through a WS RPC channel. Subscriber send the account id of the validator at the initial connection, receives the full validator data as the first response, then only the changes with the new finalized blocks. |

_config/base.toml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ asset_hub_start_block_number = 11_151_931
7272
history_record_depth = 10
7373
db_fetch_batch_size = 200
7474

75-
[dn]
76-
# this many most recent records will always be kept in the database for reference
77-
candidate_history_record_count = 5
78-
data_endpoint = "https://nodes.web3.foundation/api/cohort/2-1/polkadot"
79-
refresh_seconds = 300
80-
8175
[report]
8276
max_era_index_range = 100
8377
max_session_index_range = 100
@@ -87,11 +81,6 @@ tmp_dir_path = "/path/to/the/temporary/image/dir"
8781
font_dir_path = "/path/to/the/fonts/dir"
8882
font_sans_serif_family = "DejaVu Sans"
8983

90-
[telemetry]
91-
# W3F wss://telemetry-backend.w3f.community/feed
92-
# Polkadot wss://feed.telemetry.polkadot.io/feed
93-
websocket_url = "wss://telemetry-backend.w3f.community/feed"
94-
9584
[notification_generator]
9685
unclaimed_payout_check_delay_hours = 1
9786

@@ -144,17 +133,12 @@ notification_processor_port = 11011
144133
onekv_updater_port = 11007
145134
report_service_port = 11009
146135
telegram_bot_port = 11012
147-
telemetry_processor_port = 11008
148136
validator_details_server_port = 11002
149137
validator_list_updater_port = 11001
150138
referendum_updater_port = 11014
151139
kline_updater_port = 11015
152140
session_validator_performance_updater_port = 11016
153141

154-
[sub_id]
155-
api_url = "https://sub.id/api/v1/"
156-
nfts_path = "/nfts"
157-
158142
[app_service]
159143
# max x users per IP per x minutes
160144
user_registration_per_ip_limit_time_window_mins = 10

_config/network/kusama.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ token_decimals = 12
1919
relay_start_block_number = 6_015_486
2020
asset_hub_start_block_number = 11_151_931
2121

22-
[dn]
23-
data_endpoint = "https://nodes.web3.foundation/api/cohort/3/kusama"
24-
2522
[notification_generator]
2623
unclaimed_payout_check_delay_hours = 3
2724

_config/network/polkadot.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ token_decimals = 10
1616
relay_start_block_number = 2_700_565
1717
asset_hub_start_block_number = 11_150_800
1818

19-
[dn]
20-
data_endpoint = "https://nodes.web3.foundation/api/cohort/3/polkadot"
21-
2219
[notification_generator]
2320
unclaimed_payout_check_delay_hours = 9
2421

_config/network/westend.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,5 @@ token_decimals = 12
1414
# first block of 2021 for Kusama is 6_015_486
1515
start_block_number = 10_130_000
1616

17-
[telemetry]
18-
# W3F wss://telemetry-backend.w3f.community/feed
19-
# Polkadot wss://feed.telemetry.polkadot.io/feed
20-
websocket_url = "wss://feed.telemetry.polkadot.io/feed"
21-
2217
[session_validator_performance_updater]
2318
start_session_index = 5000

_docker/base/01-subvt-backend-lib.dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ RUN cp target/release/subvt-app-service /subvt/bin/ \
1717
&& cp target/release/subvt-network-status-updater /subvt/bin/ \
1818
&& cp target/release/subvt-notification-generator /subvt/bin/ \
1919
&& cp target/release/subvt-notification-processor /subvt/bin/ \
20-
&& cp target/release/subvt-onekv-updater /subvt/bin/ \
2120
&& cp target/release/subvt-referendum-updater /subvt/bin/ \
2221
&& cp target/release/subvt-report-service /subvt/bin/ \
2322
&& cp target/release/subvt-session-validator-performance-updater /subvt/bin/ \
2423
&& cp target/release/subvt-telegram-bot /subvt/bin/ \
25-
&& cp target/release/subvt-telemetry-processor /subvt/bin/ \
2624
&& cp target/release/subvt-validator-details-server /subvt/bin/ \
2725
&& cp target/release/subvt-validator-list-server /subvt/bin/ \
2826
&& cp target/release/subvt-validator-list-updater /subvt/bin/

_docker/compose/05-docker-compose-subvt-kusama-services.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -168,38 +168,6 @@ services:
168168
- SUBVT__METRICS__HOST=0.0.0.0
169169
# redis
170170
- SUBVT__REDIS__URL=redis://subvt_kusama_redis:6379/
171-
subvt_kusama_onekv_updater:
172-
container_name: subvt_kusama_onekv_updater
173-
restart: unless-stopped
174-
image: "helikon/subvt-onekv-updater:${VERSION}"
175-
networks:
176-
- subvt_kusama
177-
environment:
178-
- SUBVT_ENV=${ENV}
179-
- SUBVT_NETWORK=kusama
180-
- SUBVT_CONFIG_DIR=/subvt/config
181-
# log level
182-
- SUBVT__LOG__SUBVT_LEVEL=${LOG_LEVEL}
183-
# metrics
184-
- SUBVT__METRICS__HOST=0.0.0.0
185-
# postgres
186-
- SUBVT__NETWORK_POSTGRES__HOST=subvt_kusama_postgres
187-
subvt_kusama_telemetry_processor:
188-
container_name: subvt_kusama_telemetry_processor
189-
restart: unless-stopped
190-
image: "helikon/subvt-telemetry-processor:${VERSION}"
191-
networks:
192-
- subvt_kusama
193-
environment:
194-
- SUBVT_ENV=${ENV}
195-
- SUBVT_NETWORK=kusama
196-
- SUBVT_CONFIG_DIR=/subvt/config
197-
# log level
198-
- SUBVT__LOG__SUBVT_LEVEL=${LOG_LEVEL}
199-
# metrics
200-
- SUBVT__METRICS__HOST=0.0.0.0
201-
# postgres
202-
- SUBVT__NETWORK_POSTGRES__HOST=subvt_kusama_postgres
203171
subvt_kusama_notification_generator:
204172
container_name: subvt_kusama_notification_generator
205173
restart: unless-stopped

_docker/compose/06-docker-compose-subvt-polkadot-services.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -168,38 +168,6 @@ services:
168168
- SUBVT__METRICS__HOST=0.0.0.0
169169
# redis
170170
- SUBVT__REDIS__URL=redis://subvt_polkadot_redis:6379/
171-
subvt_polkadot_onekv_updater:
172-
container_name: subvt_polkadot_onekv_updater
173-
restart: unless-stopped
174-
image: "helikon/subvt-onekv-updater:${VERSION}"
175-
networks:
176-
- subvt_polkadot
177-
environment:
178-
- SUBVT_ENV=${ENV}
179-
- SUBVT_NETWORK=polkadot
180-
- SUBVT_CONFIG_DIR=/subvt/config
181-
# log level
182-
- SUBVT__LOG__SUBVT_LEVEL=${LOG_LEVEL}
183-
# metrics
184-
- SUBVT__METRICS__HOST=0.0.0.0
185-
# postgres
186-
- SUBVT__NETWORK_POSTGRES__HOST=subvt_polkadot_postgres
187-
subvt_polkadot_telemetry_processor:
188-
container_name: subvt_polkadot_telemetry_processor
189-
restart: unless-stopped
190-
image: "helikon/subvt-telemetry-processor:${VERSION}"
191-
networks:
192-
- subvt_polkadot
193-
environment:
194-
- SUBVT_ENV=${ENV}
195-
- SUBVT_NETWORK=polkadot
196-
- SUBVT_CONFIG_DIR=/subvt/config
197-
# log level
198-
- SUBVT__LOG__SUBVT_LEVEL=${LOG_LEVEL}
199-
# metrics
200-
- SUBVT__METRICS__HOST=0.0.0.0
201-
# postgres
202-
- SUBVT__NETWORK_POSTGRES__HOST=subvt_polkadot_postgres
203171
subvt_polkadot_notification_generator:
204172
container_name: subvt_polkadot_notification_generator
205173
restart: unless-stopped

0 commit comments

Comments
 (0)