Skip to content

Commit

Permalink
Merge pull request #1718 from eqlabs/krisztian/feeder-gateway-downloa…
Browse files Browse the repository at this point in the history
…d-state-update-with-block

feat(pathfinder/sync/l2): download block and state update with a single request
  • Loading branch information
Mirko-von-Leipzig authored Feb 1, 2024
2 parents 34e48cf + 92efb05 commit 5c07d6f
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 294 deletions.
4 changes: 1 addition & 3 deletions crates/pathfinder/src/state/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ async fn consumer(mut events: Receiver<SyncEvent>, context: ConsumerContext) ->

let download_time = (timings.block_download
+ timings.class_declaration
+ timings.state_diff_download
+ timings.signature_download)
.as_secs_f64();

Expand All @@ -446,15 +445,14 @@ async fn consumer(mut events: Receiver<SyncEvent>, context: ConsumerContext) ->
tracing::info!("Updated Starknet state with block {}", block_number)
}
Some(_) => {
tracing::debug!("Updated Starknet state with block {} after {:2}s ({:2}s avg). contracts ({:2}s), {} storage updates ({:2}s). Block downloaded in {:2}s, state diff in {:2}s, signature in {:2}s",
tracing::debug!("Updated Starknet state with block {} after {:2}s ({:2}s avg). contracts ({:2}s), {} storage updates ({:2}s). Block downloaded in {:2}s, signature in {:2}s",
block_number,
block_time.as_secs_f32(),
block_time_avg.as_secs_f32(),
timings.class_declaration.as_secs_f32(),
storage_updates,
update_t.as_secs_f32(),
timings.block_download.as_secs_f32(),
timings.state_diff_download.as_secs_f32(),
timings.signature_download.as_secs_f32(),
);
}
Expand Down
Loading

0 comments on commit 5c07d6f

Please sign in to comment.