Skip to content

feat(taiko-client): validate the payload before caching it && only cache the preconf block request after sent #19487

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 4 commits into from
May 19, 2025

Conversation

davidtaikocha
Copy link
Contributor

No description provided.

@davidtaikocha davidtaikocha changed the title feat(taiko-client): validate the payload before caching it feat(taiko-client): validate the payload before caching it && only cache the preconf block request after sent May 19, 2025
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

Adds upfront payload validation in the L2 payload handlers and enhances transaction decoding logs

  • Moves ValidateExecutionPayload checks to the start of OnUnsafeL2Payload and OnUnsafeL2Response
  • Removes redundant validation blocks further down in each handler
  • Expands the log.Info call in ValidateExecutionPayload to include parentHash, timestamp, and coinbase
Comments suppressed due to low confidence (2)

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

  • Add unit or integration tests for the new early-return validation in OnUnsafeL2Payload, ensuring that invalid payloads increment DriverPreconfP2PInvalidEnvelopeCounter and that no further processing occurs.
if err := s.ValidateExecutionPayload(msg.ExecutionPayload); err != nil {

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

  • [nitpick] The warning message reads slightly awkwardly; consider rephrasing to something like "Invalid preconfirmation block response payload" for clarity.
"Invalid preconfirmation block payload response",

Copy link

codecov bot commented May 19, 2025

Codecov Report

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

Project coverage is 32.40%. Comparing base (5c32d6a) to head (b4a827c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...kages/taiko-client/driver/preconf_blocks/server.go 0.00% 34 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...kages/taiko-client/driver/preconf_blocks/server.go 10.23% <0.00%> (-0.10%) ⬇️

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 5c32d6a...b4a827c. 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.

@cyberhorsey cyberhorsey added this pull request to the merge queue May 19, 2025
Merged via the queue into main with commit 973929b May 19, 2025
9 checks passed
@cyberhorsey cyberhorsey deleted the validate-before-cache branch May 19, 2025 19:39
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.

3 participants