Skip to content

Conversation

@zadykian
Copy link
Contributor

@zadykian zadykian commented Mar 30, 2025

Block Metrics Adjustments

Changed block-related metrics published by Sync Committee to match the new batching model:

  • Replaced totalMainBlocksFetched metric with totalBatchesCreated (counter);
  • Fixed the way batchSizeBlocks metric is collected (moved it to RecordBatchCreated method);
  • Replaced txPerSingleProposal metric published by Proposer with batchSizeTxs updated by Aggregator;
  • Renaming: total_l1_tx_sent -> total_l1_state_updates; block_total_time_ms -> batch_total_proof_time_ms;

Block Fetching Lag Tracker

Implemented new background worker to track per-shard block fetching lag and publish corresponding metrics to SigNoz. By default, lag metrics are collected every 5 minutes

  • Defined LagTracker - new Sync Committee worker, responsible for fetching lag tracking;
  • Extended SyncCommitteeMetricsHandler with new blockFetchingLag metric;

@notion-workspace
Copy link

@zadykian zadykian marked this pull request as ready for review March 31, 2025 11:10
@zadykian zadykian force-pushed the sync-committee/batch-metrics branch from 5a4d78d to 813819b Compare March 31, 2025 13:18
Copy link
Contributor

@akokoshn akokoshn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be keep aggregator in core directory and move lag_tracker to the metrics

zadykian added 2 commits April 2, 2025 10:06
Changed block-related metrics published by `Sync Committee` to match the new batching model:

* Replaced `totalMainBlocksFetched` metric with `totalBatchesCreated` (counter);
* Fixed the way `batchSizeBlocks` metric is collected (moved it to `RecordBatchCreated` method);
* Replaced `txPerSingleProposal` metric published by `Proposer` with `batchSizeTxs` updated by `Aggregator`;
* Renaming: `total_l1_tx_sent` -> `total_l1_state_updates`; `block_total_time_ms` -> `batch_total_proof_time_ms`;
Implemented new background worker to track per-shard block fetching lag and publish corresponding metrics to `SigNoz`

* Defined `LagTracker` - new `Sync Committee` worker, responsible for fetching lag tracking;
* Extended `SyncCommitteeMetricsHandler` with new `blockFetchingLag` metric;
@zadykian zadykian force-pushed the sync-committee/batch-metrics branch from 769f8cc to ea3fed9 Compare April 2, 2025 10:10
@zadykian
Copy link
Contributor Author

zadykian commented Apr 2, 2025

May be keep aggregator in core directory and move lag_tracker to the metrics

Package core is becoming quite large, the intention here is to split it into smaller subpackages

I think fetching is a good place for Aggregator since its' main purpose is L2 block fetching and aggregation :)

And I'd like to keep LagTracker there too, because it contains some specific L2-specific logic

@zadykian zadykian requested a review from akokoshn April 2, 2025 12:53
Copy link
Contributor

@akokoshn akokoshn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another idea - rename fetching to aggregator, but up to you)

)

lagTracker := fetching.NewLagTracker(
client, blockStorage, metricsHandler, fetching.NewDefaultLagTrackerConfig(), logger,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to have pass LagTrackerConfig options from command line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can do it later if needed, for now let's keep configuration as compact as possible

@zadykian zadykian added this pull request to the merge queue Apr 3, 2025
Merged via the queue into main with commit df509cf Apr 3, 2025
15 checks passed
@zadykian zadykian deleted the sync-committee/batch-metrics branch April 3, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants