Skip to content

Conversation

@rudy-6-4
Copy link
Contributor

No description provided.

@cla-bot cla-bot bot added the cla-signed label Nov 20, 2025
@rudy-6-4 rudy-6-4 requested a review from Copilot November 20, 2025 15:38
Copilot finished reviewing on behalf of rudy-6-4 November 20, 2025 15:39
Copy link

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 modifies the host-listener component to track and report database insertions/updates during catchup operations. The primary purpose is to detect and warn about missed events that are discovered during catchup by tracking whether database operations actually inserted new rows.

Key changes:

  • Modified multiple database methods to return Result<bool, SqlxError> instead of Result<(), SqlxError>, where the boolean indicates if any rows were inserted/updated
  • Added logic to aggregate insertion status using the |= operator across multiple database operations
  • Added warning log when a missed event is detected during catchup (when catchup is true and data was inserted)

Reviewed Changes

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

File Description
tfhe_event_propagate.rs Updated database insertion methods to track and return whether rows were affected, including insert_tfhe_event, insert_computation_inner, handle_acl_event, insert_pbs_computations, and insert_allowed_handle
cmd/mod.rs Added logic to capture the insertion status from insert_tfhe_event and log a warning when missed events are detected during catchup
Comments suppressed due to low confidence (1)

coprocessor/fhevm-engine/host-listener/src/cmd/mod.rs:884

  • The return value from handle_acl_event is not captured or used here. Similar to insert_tfhe_event (line 925), this should capture the boolean return value and log a warning when block_logs.catchup is true and data was inserted, to consistently detect all missed events during catchup.
                db.handle_acl_event(
                    &mut tx,
                    &event,
                    &log.transaction_hash,
                    &log.block_number,
                )
                .await?;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants