Skip to content

chore(taiko-client): add more preconfirmation metrics #19342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 2, 2025

Conversation

davidtaikocha
Copy link
Contributor

No description provided.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds new metrics for preconfirmation events in the taiko-client to enhance monitoring of P2P envelope handling.

  • Introduces three new counters in the metrics package for tracking invalid, outdated, and cached envelopes.
  • Updates the preconfirmation server to increment the new metrics based on envelope validation and caching events.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/taiko-client/internal/metrics/metrics.go Adds three new counter metrics for tracking preconfirmation envelope statuses
packages/taiko-client/driver/preconf_blocks/server.go Integrates metric counter increments at key points during envelope processing
Comments suppressed due to low confidence (3)

packages/taiko-client/driver/preconf_blocks/server.go:194

  • Consider adding unit tests to verify that the metric counter for invalid envelopes is incremented as expected when an invalid envelope is encountered.
metrics.DriverPreconfP2PInvalidEnvelopeCounter.Inc()

packages/taiko-client/driver/preconf_blocks/server.go:204

  • Consider adding unit tests to confirm that the outdated envelope counter increments correctly when the block number is less than or equal to the current head L1 origin block ID.
metrics.DriverPreconfP2POutdatedEnvelopeCounter.Inc()

packages/taiko-client/driver/preconf_blocks/server.go:253

  • Consider adding unit tests to ensure that the envelope cached counter is properly incremented when an envelope is added to the payloads cache.
metrics.DriverPreconfP2PEnvelopeCachedCounter.Inc()

@davidtaikocha davidtaikocha enabled auto-merge April 28, 2025 05:40
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 38.65%. Comparing base (1dce498) to head (bf997d3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...kages/taiko-client/driver/preconf_blocks/server.go 0.00% 3 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
packages/taiko-client/internal/metrics/metrics.go 0.00% <ø> (ø)
...kages/taiko-client/driver/preconf_blocks/server.go 17.91% <0.00%> (-0.15%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dce498...bf997d3. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davidtaikocha davidtaikocha added this pull request to the merge queue May 2, 2025
Merged via the queue into main with commit 669ab99 May 2, 2025
9 checks passed
@davidtaikocha davidtaikocha deleted the more-preconf-metrics-2 branch May 2, 2025 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants