Skip to content

Commit b72636f

Browse files
committed
Dependency updates. Improve logging. Bump version.
1 parent 326606d commit b72636f

File tree

35 files changed

+340
-309
lines changed

35 files changed

+340
-309
lines changed

Cargo.lock

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

_docker/compose/.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=0.24.12
1+
VERSION=0.24.13
22
ENV=production
33
LOG_LEVEL=debug
44

subvt-app-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subvt-app-service"
3-
version = "0.24.12"
3+
version = "0.24.13"
44
edition = "2021"
55
rust-version = "1.67.0"
66

subvt-block-processor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subvt-block-processor"
3-
version = "0.24.12"
3+
version = "0.24.13"
44
edition = "2021"
55
rust-version = "1.67.0"
66

subvt-block-processor/src/lib.rs

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ impl BlockProcessor {
289289
block_number: u64,
290290
persist_era_reward_points: bool,
291291
) -> anyhow::Result<()> {
292+
log::info!("Process ASSET_HUB finalized block {}.", block_number);
292293
let block_hash = substrate_client.get_block_hash(block_number).await?;
293294
let block_header = substrate_client.get_block_header(&block_hash).await?;
294295
let runtime_upgrade_info = substrate_client
@@ -319,12 +320,15 @@ impl BlockProcessor {
319320
runtime_information.epoch_index,
320321
)
321322
};
323+
log::info!("Get active validator account ids.");
322324
let active_validator_account_ids = relay_substrate_client
323325
.get_active_validator_account_ids(&relay_block_hash)
324326
.await?;
327+
log::info!("Get active era.");
325328
let active_era = substrate_client
326329
.get_active_era(&block_hash, &relay_substrate_client.metadata)
327330
.await?;
331+
log::info!("Get current epoch.");
328332
let current_epoch = relay_substrate_client
329333
.get_current_epoch(&active_era, &relay_block_hash)
330334
.await?;
@@ -427,22 +431,6 @@ impl BlockProcessor {
427431
runtime_information.era_index = active_era.index;
428432
runtime_information.epoch_index = current_epoch.index;
429433
}
430-
431-
if !postgres.era_exists(active_era.index).await? {
432-
log::info!("Era doesn't exist - persist.");
433-
let total_stake = substrate_client
434-
.get_era_total_stake(active_era.index, &block_hash)
435-
.await?;
436-
let era_stakers = substrate_client
437-
.get_era_stakers(&active_era, &block_hash)
438-
.await?;
439-
postgres
440-
.save_era(&active_era, total_stake, &era_stakers)
441-
.await?;
442-
}
443-
let current_epoch = relay_substrate_client
444-
.get_current_epoch(&active_era, &relay_block_hash)
445-
.await?;
446434
log::info!("Persist era reward points.");
447435
if persist_era_reward_points {
448436
self.persist_era_reward_points(
@@ -469,7 +457,7 @@ impl BlockProcessor {
469457
block_number
470458
);
471459

472-
log::info!("Save block.");
460+
log::info!("Save finalized block {}.", block_number);
473461
let block_timestamp = substrate_client.get_block_timestamp(&block_hash).await?;
474462
let runtime_version = substrate_client.last_runtime_upgrade_info.spec_version as i16;
475463
postgres
@@ -483,10 +471,12 @@ impl BlockProcessor {
483471
(14, runtime_version),
484472
)
485473
.await?;
474+
log::info!("Saved finalized block {}.", block_number);
486475
// process/persist events
487476
let mut extrinsic_event_map: HashMap<u32, Vec<(usize, SubstrateEvent)>> =
488477
HashMap::default();
489478
for (index, event_result) in event_results.iter().enumerate() {
479+
log::info!("Process event #{} of block {}.", index, block_number);
490480
match event_result {
491481
Ok(event) => {
492482
if let Some(extrinsic_index) = event.get_extrinsic_index() {
@@ -542,8 +532,10 @@ impl BlockProcessor {
542532
},
543533
}
544534
}
535+
log::info!("Processed events in block {}.", block_number);
545536
// persist extrinsics
546537
for (index, extrinsic_result) in extrinsic_results.iter().enumerate() {
538+
log::info!("Process extrinsic #{} of block {}.", index, block_number);
547539
match extrinsic_result {
548540
Ok(extrinsic) => {
549541
// check events for batch & batch_all

subvt-config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subvt-config"
3-
version = "0.24.12"
3+
version = "0.24.13"
44
edition = "2021"
55
rust-version = "1.67.0"
66

subvt-governance/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subvt-governance"
3-
version = "0.24.12"
3+
version = "0.24.13"
44
edition = "2021"
55
rust-version = "1.67.0"
66

subvt-kline-updater/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subvt-kline-updater"
3-
version = "0.24.12"
3+
version = "0.24.13"
44
edition = "2021"
55
rust-version = "1.67.0"
66

subvt-logging/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subvt-logging"
3-
version = "0.24.12"
3+
version = "0.24.13"
44
edition = "2021"
55
rust-version = "1.67.0"
66

subvt-metrics/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subvt-metrics"
3-
version = "0.24.12"
3+
version = "0.24.13"
44
edition = "2021"
55
rust-version = "1.67.0"
66

@@ -10,4 +10,4 @@ once_cell = "1"
1010
prometheus = "0.14"
1111
thiserror = { workspace = true }
1212
tokio = { version = "1.47", features = ["time", "rt-multi-thread"] }
13-
warp = { version = "0.3", default-features = false }
13+
warp = { version = "0.4", features = ["server"] }

0 commit comments

Comments
 (0)