-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(coprocessor): host-listener, report any update during a catchup #1378
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
Conversation
There was a problem hiding this 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 ofResult<(), 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
catchupis 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.
2613247 to
3dd1c02
Compare
obatirou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, minor nit
3dd1c02 to
d104368
Compare
d104368 to
d5a373c
Compare
No description provided.