Skip to content

Conversation

d4mr
Copy link
Member

@d4mr d4mr commented Oct 9, 2025

  • Added logic to update health timestamps for nonce movement and confirmations in both the EoaExecutorWorker and ResetNoncesTransaction implementations.
  • Ensured health data reflects the latest nonce movement even when confirmations are ahead of the latest state.

Summary by CodeRabbit

  • Bug Fixes

    • Ensures activity and confirmation timestamps update correctly after nonce resets and successful confirmations, improving accuracy of status displays.
  • Chores

    • Added safeguards and logging around health data updates to enhance reliability and observability.

- Added logic to update health timestamps for nonce movement and confirmations in both the EoaExecutorWorker and ResetNoncesTransaction implementations.
- Ensured health data reflects the latest nonce movement even when confirmations are ahead of the latest state.
Copy link

coderabbitai bot commented Oct 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds health timestamp updates in two places: during ResetNoncesTransaction validation and after successful transaction confirmations. Both set last_nonce_movement_at and last_confirmation_at to the current time and persist the health record, with logging on failure in the confirmation worker.

Changes

Cohort / File(s) Summary
EOA health timestamp updates
executors/src/eoa/store/atomic.rs, executors/src/eoa/worker/confirm.rs
Update health data to set last_nonce_movement_at and last_confirmation_at to now: in nonce reset validation (after trimming nonce_resets) and post-confirmation when any successes occur; persist updates and warn on failure (confirmation worker).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor W as Confirm Worker
  participant T as Tx Processor
  participant H as Health Store

  W->>T: Process pending txs
  T-->>W: Confirmed results (some successes?)
  alt Any successes
    W->>H: Fetch health
    W->>H: Set last_nonce_movement_at = now<br/>Set last_confirmation_at = now
    H-->>W: Persist result (ok / error)
    opt Persist error
      Note over W,H: Log warning on health update failure
    end
  else No successes
    Note over W: Skip health timestamp update
  end
Loading
sequenceDiagram
  autonumber
  actor V as ResetNonces Validation
  participant H as Health Store
  participant C as Clock

  V->>H: Append new nonce to nonce_resets
  V->>H: Trim nonce_resets to last 5
  V->>C: now()
  C-->>V: timestamp
  V->>H: Set last_nonce_movement_at = now<br/>Set last_confirmation_at = now
  H-->>V: Persist updated health
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pb/health-update-at-reset

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 15e488f and 1b2d976.

📒 Files selected for processing (2)
  • executors/src/eoa/store/atomic.rs (1 hunks)
  • executors/src/eoa/worker/confirm.rs (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@d4mr d4mr merged commit 436b1f4 into main Oct 9, 2025
2 of 3 checks passed
@d4mr d4mr deleted the pb/health-update-at-reset branch October 9, 2025 19:46
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.

1 participant