Skip to content

chore(execution/evm): fix logs#3056

Merged
julienrbrt merged 4 commits intomainfrom
julien/fix-log
Feb 6, 2026
Merged

chore(execution/evm): fix logs#3056
julienrbrt merged 4 commits intomainfrom
julien/fix-log

Conversation

@julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Feb 6, 2026

Overview

Fix some execution/evm logs.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @julienrbrt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a minor logging issue within the EVM execution engine. It refines the conditions under which a specific warning message related to ExecMeta timestamp mismatches is displayed, ensuring log clarity and accuracy by preventing the warning from appearing in scenarios where it is not applicable.

Highlights

  • Logging Refinement: The warning message concerning ExecMeta timestamp mismatches has been repositioned into an else block. This ensures the warning is only logged when a timestamp mismatch genuinely occurs, preventing it from being displayed in scenarios where an elErr is present.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • execution/evm/execution.go
    • Refined the conditional logging for ExecMeta timestamp mismatches to ensure the warning message is displayed only under the correct circumstances.
Activity
  • No specific activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedFeb 6, 2026, 3:52 PM

@claude
Copy link
Contributor

claude bot commented Feb 6, 2026

Claude finished @julienrbrt's task in 1m 56s —— View job


Code Review Complete ✓

Tasks

  • Read and analyze changed files
  • Review execution.go logging changes
  • Review dependency updates
  • Provide comprehensive feedback
  • Finalize review

Summary

This PR makes minor but important improvements to logging clarity in the EVM execution engine. The changes are well-focused and correct. The main fix addresses a logging bug where a timestamp mismatch warning was being displayed even when timestamps matched. Additionally, go.mod files are updated to use local path replacements for development.

Detailed Review

1. Code Quality & Architecture ✅

Logging Fix (execution.go:722-753)

The primary change correctly moves the timestamp mismatch warning into an else block. This ensures the warning only logs when there's an actual mismatch, not when the EL lookup fails.

Before: The warning was logged regardless of whether timestamps matched or the EL lookup failed.
After: The warning only logs in the specific case of timestamp mismatch.

This is the correct fix. The logic flow is now:

  1. If block exists in EL with matching timestamp → reuse it
  2. If block lookup fails → warn about EL being behind
  3. If timestamps mismatch → warn about stale ExecMeta (this was incorrectly always executing before)

Additional Log Improvements:

  1. execution.go:743 - Improved message clarity: "EL in behind" makes the situation clearer
  2. execution.go:771 - Changed logger.Warn() to logger.Debug() for stale payload messages - appropriate since this is expected behavior after node restart

2. Error Handling & Resilience ✅

The idempotency and crash recovery logic in reconcileExecutionAtHeight is well-designed. The logging improvements help operators understand the state reconciliation process better:

  • Clear distinction between temporary issues (EL behind) vs permanent issues (stale ExecMeta)
  • Proper fallback behavior when ExecMeta is stale
  • Good defensive programming with block existence validation

3. Code Style & Go Conventions ✅

The code follows Go best practices:

  • Proper use of structured logging with zerolog
  • Clear variable names and comments
  • Consistent error handling patterns

Minor observation: The function reconcileExecutionAtHeight is quite long (117 lines). While it handles multiple related scenarios, consider whether the EL block lookup logic (lines 780-823) could be extracted into a helper function for better testability. This is not critical but would improve maintainability.

4. Dependency Management

go.mod Changes: The changes uncomment the replace directives to use local path replacements. This is standard for monorepo development.

-//replace (
-//	github.com/evstack/ev-node => ../../
-//)
+replace github.com/evstack/ev-node => ../../

Impact: This enables local development without publishing intermediate versions. The corresponding go.sum removals are correct - local replacements don't have checksums.

⚠️ Important: These replace directives should typically be commented out before release/merge to main. However, I see from recent commits that this might be intentional for the current development workflow.

5. Testing & Reliability

Test Coverage: The codecov report shows no coverage change, which is expected for logging-only changes. The logic branches are already tested.

Recommendation: Consider adding a test case specifically for the timestamp mismatch scenario to ensure the warning logs correctly (and only) in that case. This would prevent regression of the bug this PR fixes.

6. Performance & Resource Efficiency ✅

No performance impact. The changes are purely control flow adjustments for logging.

7. Security ✅

No security concerns. The changes don't affect authentication, authorization, or data validation logic.


Recommendations

  1. Testing: Add a unit test for the timestamp mismatch logging scenario
  2. Code organization: Consider extracting the EL block lookup logic (lines 780-823) into a helper function for better testability and readability
  3. Go.mod: Verify whether the replace directives should remain uncommented for main branch (appears intentional based on monorepo structure)

Verdict

LGTM ✅ - The logging fixes are correct and improve operational clarity. The changes are minimal, well-scoped, and low-risk.

The primary fix (moving timestamp mismatch warning into else block) solves a real bug where operators would see confusing warnings even when everything was working correctly.


Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a logging issue within the reconcileExecutionAtHeight function. Previously, a warning for a timestamp mismatch was logged incorrectly, even when timestamps matched. The change moves the logging statement into an else block, ensuring the warning is only emitted when a genuine timestamp mismatch occurs. This is a good fix that improves log accuracy and reduces potential confusion for operators. The change is correct and well-targeted.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.61%. Comparing base (c2afe0c) to head (61a6ac6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3056      +/-   ##
==========================================
- Coverage   61.66%   61.61%   -0.05%     
==========================================
  Files         111      111              
  Lines       11120    11120              
==========================================
- Hits         6857     6852       -5     
- Misses       3525     3530       +5     
  Partials      738      738              
Flag Coverage Δ
combined 61.61% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@julienrbrt julienrbrt requested a review from tac0turtle February 6, 2026 15:30
@tac0turtle tac0turtle enabled auto-merge February 6, 2026 15:52
@julienrbrt julienrbrt disabled auto-merge February 6, 2026 16:40
@julienrbrt julienrbrt merged commit a64c35b into main Feb 6, 2026
28 of 29 checks passed
@julienrbrt julienrbrt deleted the julien/fix-log branch February 6, 2026 16:40
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.

2 participants