diff --git a/Cargo.lock b/Cargo.lock index eb53e8ef..d57a059f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7696,7 +7696,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subvt-app-service" -version = "0.22.0" +version = "0.22.1" dependencies = [ "actix-http", "actix-rt", @@ -7725,7 +7725,7 @@ dependencies = [ [[package]] name = "subvt-block-processor" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-lock", @@ -7751,7 +7751,7 @@ dependencies = [ [[package]] name = "subvt-config" -version = "0.22.0" +version = "0.22.1" dependencies = [ "config", "serde", @@ -7759,7 +7759,7 @@ dependencies = [ [[package]] name = "subvt-governance" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "lazy_static", @@ -7773,7 +7773,7 @@ dependencies = [ [[package]] name = "subvt-kline-updater" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-trait", @@ -7796,7 +7796,7 @@ dependencies = [ [[package]] name = "subvt-logging" -version = "0.22.0" +version = "0.22.1" dependencies = [ "env_logger", "log", @@ -7805,7 +7805,7 @@ dependencies = [ [[package]] name = "subvt-metrics" -version = "0.22.0" +version = "0.22.1" dependencies = [ "env_logger", "log", @@ -7819,7 +7819,7 @@ dependencies = [ [[package]] name = "subvt-network-status-server" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-trait", @@ -7844,7 +7844,7 @@ dependencies = [ [[package]] name = "subvt-network-status-updater" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-trait", @@ -7866,7 +7866,7 @@ dependencies = [ [[package]] name = "subvt-nft" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "lazy_static", @@ -7878,7 +7878,7 @@ dependencies = [ [[package]] name = "subvt-notification-generator" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-lock", @@ -7905,7 +7905,7 @@ dependencies = [ [[package]] name = "subvt-notification-processor" -version = "0.22.0" +version = "0.22.1" dependencies = [ "a2", "anyhow", @@ -7940,7 +7940,7 @@ dependencies = [ [[package]] name = "subvt-onekv-updater" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-trait", @@ -7962,7 +7962,7 @@ dependencies = [ [[package]] name = "subvt-persistence" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "chrono", @@ -7981,7 +7981,7 @@ dependencies = [ [[package]] name = "subvt-plotter" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "chrono", @@ -8004,7 +8004,7 @@ dependencies = [ [[package]] name = "subvt-proc-macro" -version = "0.22.0" +version = "0.22.1" dependencies = [ "proc-macro2", "quote", @@ -8013,7 +8013,7 @@ dependencies = [ [[package]] name = "subvt-referendum-updater" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-trait", @@ -8037,7 +8037,7 @@ dependencies = [ [[package]] name = "subvt-report-service" -version = "0.22.0" +version = "0.22.1" dependencies = [ "actix-web", "anyhow", @@ -8065,7 +8065,7 @@ dependencies = [ [[package]] name = "subvt-service-common" -version = "0.22.0" +version = "0.22.1" dependencies = [ "actix-web", "anyhow", @@ -8082,7 +8082,7 @@ dependencies = [ [[package]] name = "subvt-session-validator-performance-updater" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-lock", @@ -8101,7 +8101,7 @@ dependencies = [ [[package]] name = "subvt-substrate-client" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-lock", @@ -8130,7 +8130,7 @@ dependencies = [ [[package]] name = "subvt-telegram-bot" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-recursion", @@ -8168,7 +8168,7 @@ dependencies = [ [[package]] name = "subvt-telemetry-processor" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-lock", @@ -8192,7 +8192,7 @@ dependencies = [ [[package]] name = "subvt-types" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "chrono", @@ -8234,7 +8234,7 @@ dependencies = [ [[package]] name = "subvt-utility" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "hex", @@ -8244,7 +8244,7 @@ dependencies = [ [[package]] name = "subvt-validator-details-server" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-trait", @@ -8268,7 +8268,7 @@ dependencies = [ [[package]] name = "subvt-validator-list-server" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-trait", @@ -8295,7 +8295,7 @@ dependencies = [ [[package]] name = "subvt-validator-list-updater" -version = "0.22.0" +version = "0.22.1" dependencies = [ "anyhow", "async-lock", diff --git a/_config/network/kusama.toml b/_config/network/kusama.toml index 11846b2c..04c27411 100644 --- a/_config/network/kusama.toml +++ b/_config/network/kusama.toml @@ -21,4 +21,4 @@ data_endpoint = "https://nodes.web3.foundation/api/cohort/1/kusama" unclaimed_payout_check_delay_hours = 3 [session_validator_performance_updater] -start_session_index = 5000 \ No newline at end of file +start_session_index = 40900 \ No newline at end of file diff --git a/_config/network/polkadot.toml b/_config/network/polkadot.toml index ba476069..cc5064b5 100644 --- a/_config/network/polkadot.toml +++ b/_config/network/polkadot.toml @@ -21,4 +21,4 @@ data_endpoint = "https://nodes.web3.foundation/api/cohort/1/polkadot" unclaimed_payout_check_delay_hours = 9 [session_validator_performance_updater] -start_session_index = 5000 \ No newline at end of file +start_session_index = 9100 \ No newline at end of file diff --git a/_docker/compose/.env.sample b/_docker/compose/.env.sample index 93d898c9..ce44fd1c 100644 --- a/_docker/compose/.env.sample +++ b/_docker/compose/.env.sample @@ -1,4 +1,4 @@ -VERSION=0.22.0 +VERSION=0.22.1 ENV=production LOG_LEVEL=debug @@ -85,5 +85,5 @@ 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 \ No newline at end of file +KUSAMA_SESSION_VALIDATOR_PERFORMANCE_UPDATER_START_SESSION_INDEX=40900 +POLKADOT_SESSION_VALIDATOR_PERFORMANCE_UPDATER_START_SESSION_INDEX=9100 \ No newline at end of file diff --git a/_migrations/network/migrations/20211002061816_block.up.sql b/_migrations/network/migrations/20211002061816_block.up.sql index 217c6b5e..2faf2446 100644 --- a/_migrations/network/migrations/20211002061816_block.up.sql +++ b/_migrations/network/migrations/20211002061816_block.up.sql @@ -39,4 +39,6 @@ CREATE INDEX IF NOT EXISTS sub_block_idx_hash_epoch_index CREATE INDEX IF NOT EXISTS sub_block_idx_author_account_id ON sub_block (author_account_id); CREATE INDEX IF NOT EXISTS sub_block_idx_era_index_author_account_id - ON sub_block (era_index, author_account_id); \ No newline at end of file + ON sub_block (era_index, author_account_id); +CREATE INDEX IF NOT EXISTS sub_block_idx_author_account_id_epoch_index + ON sub_block (author_account_id, epoch_index); \ No newline at end of file diff --git a/_migrations/network/migrations/20241127061013_session_validator_performance.down.sql b/_migrations/network/migrations/20241127061013_session_validator_performance.down.sql index d2f607c5..f4455e89 100644 --- a/_migrations/network/migrations/20241127061013_session_validator_performance.down.sql +++ b/_migrations/network/migrations/20241127061013_session_validator_performance.down.sql @@ -1 +1 @@ --- Add down migration script here +DROP TABLE sub_session_validator_performance CASCADE; diff --git a/_migrations/network/migrations/20241127061013_session_validator_performance.up.sql b/_migrations/network/migrations/20241127061013_session_validator_performance.up.sql index 11639a1d..fadb8a98 100644 --- a/_migrations/network/migrations/20241127061013_session_validator_performance.up.sql +++ b/_migrations/network/migrations/20241127061013_session_validator_performance.up.sql @@ -12,7 +12,9 @@ CREATE TABLE IF NOT EXISTS sub_session_validator_performance explicit_attestation_count INT, missed_attestation_count INT, attestations_per_billion INT, - created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now() + created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(), + CONSTRAINT sub_era_validator_u_era_index_validator + UNIQUE (validator_account_id, era_index, session_index) ); CREATE INDEX IF NOT EXISTS sub_session_validator_performance_idx_validator_account_id @@ -24,4 +26,6 @@ CREATE INDEX IF NOT EXISTS sub_session_validator_performance_idx_validator_accou CREATE INDEX IF NOT EXISTS sub_session_validator_performance_idx_validator_account_id_active_validator_index_session_index_desc ON sub_session_validator_performance (validator_account_id, active_validator_index, session_index DESC); CREATE INDEX IF NOT EXISTS sub_session_validator_performance_idx_validator_account_id_para_validator_index_session_index_desc - ON sub_session_validator_performance (validator_account_id, para_validator_index, session_index DESC); \ No newline at end of file + ON sub_session_validator_performance (validator_account_id, para_validator_index, session_index DESC); +CREATE UNIQUE INDEX IF NOT EXISTS sub_session_validator_performance_u_validator_era_session + ON sub_session_validator_performance (validator_account_id, era_index, session_index); \ No newline at end of file diff --git a/subvt-app-service/Cargo.toml b/subvt-app-service/Cargo.toml index 0529ba30..2cceb91f 100644 --- a/subvt-app-service/Cargo.toml +++ b/subvt-app-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-app-service" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-block-processor/Cargo.toml b/subvt-block-processor/Cargo.toml index f87a98ff..15ba8eb1 100644 --- a/subvt-block-processor/Cargo.toml +++ b/subvt-block-processor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-block-processor" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-config/Cargo.toml b/subvt-config/Cargo.toml index 06381eca..bdf64d97 100644 --- a/subvt-config/Cargo.toml +++ b/subvt-config/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-config" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-governance/Cargo.toml b/subvt-governance/Cargo.toml index dde44917..14aa7e26 100644 --- a/subvt-governance/Cargo.toml +++ b/subvt-governance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-governance" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-kline-updater/Cargo.toml b/subvt-kline-updater/Cargo.toml index 20a2d704..32b82656 100644 --- a/subvt-kline-updater/Cargo.toml +++ b/subvt-kline-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-kline-updater" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-logging/Cargo.toml b/subvt-logging/Cargo.toml index 648bd8e8..7c1df8de 100644 --- a/subvt-logging/Cargo.toml +++ b/subvt-logging/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-logging" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-metrics/Cargo.toml b/subvt-metrics/Cargo.toml index 11c896c7..0b036821 100644 --- a/subvt-metrics/Cargo.toml +++ b/subvt-metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-metrics" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-network-status-server/Cargo.toml b/subvt-network-status-server/Cargo.toml index db8c202a..980fbeaf 100644 --- a/subvt-network-status-server/Cargo.toml +++ b/subvt-network-status-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-network-status-server" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-network-status-updater/Cargo.toml b/subvt-network-status-updater/Cargo.toml index 7a928947..f4883611 100644 --- a/subvt-network-status-updater/Cargo.toml +++ b/subvt-network-status-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-network-status-updater" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-nft/Cargo.toml b/subvt-nft/Cargo.toml index 65f7562e..70fcacc3 100644 --- a/subvt-nft/Cargo.toml +++ b/subvt-nft/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-nft" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-notification-generator/Cargo.toml b/subvt-notification-generator/Cargo.toml index c105a7cc..eae64fff 100644 --- a/subvt-notification-generator/Cargo.toml +++ b/subvt-notification-generator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-notification-generator" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-notification-processor/Cargo.toml b/subvt-notification-processor/Cargo.toml index b4fcb8b8..e6a8ec10 100644 --- a/subvt-notification-processor/Cargo.toml +++ b/subvt-notification-processor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-notification-processor" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-onekv-updater/Cargo.toml b/subvt-onekv-updater/Cargo.toml index 32c16be8..18df83b1 100644 --- a/subvt-onekv-updater/Cargo.toml +++ b/subvt-onekv-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-onekv-updater" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-persistence/Cargo.toml b/subvt-persistence/Cargo.toml index cf2e86b0..668f4e51 100644 --- a/subvt-persistence/Cargo.toml +++ b/subvt-persistence/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-persistence" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-persistence/src/postgres/network/block.rs b/subvt-persistence/src/postgres/network/block.rs index bde8ceb3..642f726e 100644 --- a/subvt-persistence/src/postgres/network/block.rs +++ b/subvt-persistence/src/postgres/network/block.rs @@ -88,4 +88,23 @@ impl PostgreSQLNetworkStorage { .await?; Ok(processed_block_height.0 as u64) } + + pub async fn get_number_of_blocks_in_epoch_by_validator( + &self, + epoch_index: u64, + validator_account_id: &AccountId, + ) -> anyhow::Result { + let number_of_blocks: (i64,) = sqlx::query_as( + r#" + SELECT COUNT(DISTINCT hash) from sub_block + WHERE epoch_index = $1 + AND author_account_id = $2 + "#, + ) + .bind(epoch_index as i64) + .bind(validator_account_id.to_string()) + .fetch_one(&self.connection_pool) + .await?; + Ok(number_of_blocks.0 as u32) + } } diff --git a/subvt-persistence/src/postgres/network/performance.rs b/subvt-persistence/src/postgres/network/performance.rs index c63d2600..0d326614 100644 --- a/subvt-persistence/src/postgres/network/performance.rs +++ b/subvt-persistence/src/postgres/network/performance.rs @@ -1,4 +1,5 @@ use crate::postgres::network::PostgreSQLNetworkStorage; +use subvt_types::performance::SessionValidatorPerformance; impl PostgreSQLNetworkStorage { pub async fn get_session_validator_performance_updater_last_processed_session_id( @@ -14,4 +15,37 @@ impl PostgreSQLNetworkStorage { .await?; Ok(row.0.map(|index| index as u64)) } + + pub async fn save_session_validator_performances( + &self, + performances: &[SessionValidatorPerformance], + ) -> anyhow::Result<()> { + let mut transaction = self.connection_pool.begin().await?; + for (i, performance) in performances.iter().enumerate() { + log::info!("Persist {} of {}.", i + 1, performances.len()); + sqlx::query( + r#" + INSERT INTO sub_session_validator_performance (validator_account_id, era_index, session_index, active_validator_index, authored_block_count, para_validator_group_index, para_validator_index, implicit_attestation_count, explicit_attestation_count, missed_attestation_count, attestations_per_billion) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) + ON CONFLICT(validator_account_id, era_index, session_index) DO NOTHING + RETURNING id + "#, + ) + .bind(performance.validator_account_id.to_string()) + .bind(performance.era_index as i64) + .bind(performance.session_index as i64) + .bind(performance.active_validator_index as i64) + .bind(performance.authored_block_count as i32) + .bind(performance.para_validator_group_index.map(|i| i as i64)) + .bind(performance.para_validator_index.map(|i| i as i64)) + .bind(performance.implicit_attestation_count.map(|i| i as i32)) + .bind(performance.explicit_attestation_count.map(|i| i as i32)) + .bind(performance.missed_attestation_count.map(|i| i as i32)) + .bind(performance.attestations_per_billion.map(|i| i as i32)) + .execute(&mut *transaction) + .await?; + } + transaction.commit().await?; + Ok(()) + } } diff --git a/subvt-plotter/Cargo.toml b/subvt-plotter/Cargo.toml index b57238b1..02362c9a 100644 --- a/subvt-plotter/Cargo.toml +++ b/subvt-plotter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-plotter" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-proc-macro/Cargo.toml b/subvt-proc-macro/Cargo.toml index 958c5883..cb22a77d 100644 --- a/subvt-proc-macro/Cargo.toml +++ b/subvt-proc-macro/Cargo.toml @@ -3,7 +3,7 @@ proc-macro = true [package] name = "subvt-proc-macro" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-referendum-updater/Cargo.toml b/subvt-referendum-updater/Cargo.toml index 45c4e267..bb195eb6 100644 --- a/subvt-referendum-updater/Cargo.toml +++ b/subvt-referendum-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-referendum-updater" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-report-service/Cargo.toml b/subvt-report-service/Cargo.toml index a1d6522f..5a94de9c 100644 --- a/subvt-report-service/Cargo.toml +++ b/subvt-report-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-report-service" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-service-common/Cargo.toml b/subvt-service-common/Cargo.toml index 8d003bf3..63216a16 100644 --- a/subvt-service-common/Cargo.toml +++ b/subvt-service-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-service-common" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-session-validator-performance-updater/Cargo.toml b/subvt-session-validator-performance-updater/Cargo.toml index a19ee051..2cbcd52c 100644 --- a/subvt-session-validator-performance-updater/Cargo.toml +++ b/subvt-session-validator-performance-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-session-validator-performance-updater" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-session-validator-performance-updater/src/lib.rs b/subvt-session-validator-performance-updater/src/lib.rs index cf2d391f..683e745c 100644 --- a/subvt-session-validator-performance-updater/src/lib.rs +++ b/subvt-session-validator-performance-updater/src/lib.rs @@ -33,6 +33,7 @@ impl SessionValidatorPerformanceUpdater { active_validator_account_ids.len(), session.index ); + log::debug!("Get era validator records."); let mut era_active_validators = Vec::new(); for account_id in active_validator_account_ids.iter() { let era_validator = match postgres @@ -44,6 +45,7 @@ impl SessionValidatorPerformanceUpdater { }; era_active_validators.push(era_validator); } + log::debug!("Get performance data."); let mut session_validator_performances = Vec::new(); for era_active_validator in era_active_validators.iter() { let mut performance = SessionValidatorPerformance { @@ -53,6 +55,13 @@ impl SessionValidatorPerformanceUpdater { active_validator_index: era_active_validator.active_validator_index.unwrap(), ..Default::default() }; + // block count + performance.authored_block_count = postgres + .get_number_of_blocks_in_epoch_by_validator( + session.index, + &era_active_validator.validator_account_id, + ) + .await?; // para-related let maybe_para_validator = postgres .get_session_para_validator( @@ -74,18 +83,21 @@ impl SessionValidatorPerformanceUpdater { performance.implicit_attestation_count = Some(votes_summary.implicit); performance.explicit_attestation_count = Some(votes_summary.explicit); performance.missed_attestation_count = Some(votes_summary.missed); - let attestation_count = votes_summary.implicit + votes_summary.explicit; + let attestation_count = (votes_summary.implicit + votes_summary.explicit) as u64; let total_attestation_slots = - votes_summary.implicit + votes_summary.explicit + votes_summary.missed; + (votes_summary.implicit + votes_summary.explicit + votes_summary.missed) as u64; let attestations_per_billion = - (attestation_count / total_attestation_slots) * 1_000_000_000; - performance.attestations_per_billion = Some(attestations_per_billion); + attestation_count * 1_000_000_000 / total_attestation_slots; + performance.attestations_per_billion = Some(attestations_per_billion as u32); } session_validator_performances.push(performance); } - // persist performances & update state + log::info!("Persist session performance data."); + postgres + .save_session_validator_performances(&session_validator_performances) + .await?; log::info!( - "Persist {} validator performances for session {}.", + "Persisted {} validator performances for session {}.", session_validator_performances.len(), session.index ); @@ -120,7 +132,7 @@ impl Service for SessionValidatorPerformanceUpdater { .map(|epoch| epoch.index) .unwrap_or(1); let start_session_index = max( - last_processed_session_index, + last_processed_session_index + 1, CONFIG .session_validator_performance_updater .start_session_index, @@ -128,7 +140,7 @@ impl Service for SessionValidatorPerformanceUpdater { log::info!( "Process sessions {}-{}.", start_session_index, - (current_session_index - 1) + current_session_index - 1, ); if start_session_index >= (current_session_index - 1) { log::warn!( diff --git a/subvt-substrate-client/Cargo.toml b/subvt-substrate-client/Cargo.toml index 77d45173..8a979c30 100644 --- a/subvt-substrate-client/Cargo.toml +++ b/subvt-substrate-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-substrate-client" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-telegram-bot/Cargo.toml b/subvt-telegram-bot/Cargo.toml index 45283e99..7b15f4c4 100644 --- a/subvt-telegram-bot/Cargo.toml +++ b/subvt-telegram-bot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-telegram-bot" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-telemetry-processor/Cargo.toml b/subvt-telemetry-processor/Cargo.toml index b31ba6f0..f5c5b36a 100644 --- a/subvt-telemetry-processor/Cargo.toml +++ b/subvt-telemetry-processor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-telemetry-processor" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-types/Cargo.toml b/subvt-types/Cargo.toml index eba815e3..676e1902 100644 --- a/subvt-types/Cargo.toml +++ b/subvt-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-types" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-utility/Cargo.toml b/subvt-utility/Cargo.toml index 8a555b7c..ca08ce8a 100644 --- a/subvt-utility/Cargo.toml +++ b/subvt-utility/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-utility" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-validator-details-server/Cargo.toml b/subvt-validator-details-server/Cargo.toml index 84949afa..680b432f 100644 --- a/subvt-validator-details-server/Cargo.toml +++ b/subvt-validator-details-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-validator-details-server" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-validator-list-server/Cargo.toml b/subvt-validator-list-server/Cargo.toml index 71a746da..bd2168d0 100644 --- a/subvt-validator-list-server/Cargo.toml +++ b/subvt-validator-list-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-validator-list-server" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0" diff --git a/subvt-validator-list-updater/Cargo.toml b/subvt-validator-list-updater/Cargo.toml index f11121cc..d1ad2e4d 100644 --- a/subvt-validator-list-updater/Cargo.toml +++ b/subvt-validator-list-updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subvt-validator-list-updater" -version = "0.22.0" +version = "0.22.1" edition = "2021" rust-version = "1.67.0"