feat(kms-connector): event listening via eth_getLogs#2166
Merged
mergify[bot] merged 12 commits intomainfrom Mar 26, 2026
Merged
feat(kms-connector): event listening via eth_getLogs#2166mergify[bot] merged 12 commits intomainfrom
mergify[bot] merged 12 commits intomainfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
7290ed6 to
28d6226
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
ecfe9e7 to
92ab2b9
Compare
Co-authored-by: David <[email protected]>
dvdplm
approved these changes
Mar 26, 2026
Contributor
dvdplm
left a comment
There was a problem hiding this comment.
LGTM (this time for reals!)
Contributor
Author
|
@Mergifyio queue |
Merge Queue Status
Required conditions to enter a queue
|
Contributor
Author
|
@Mergifyio refresh |
✅ Pull request refreshed |
isaacdecoded
approved these changes
Mar 26, 2026
Contributor
Author
|
@Mergifyio refresh |
69 tasks
Merge Queue Status
This pull request spent 1 hour 19 minutes 4 seconds in the queue, including 51 minutes 58 seconds running CI. Required conditions to merge
|
✅ Pull request refreshed |
This was referenced Mar 26, 2026
76 tasks
eudelins-zama
added a commit
that referenced
this pull request
Mar 27, 2026
* feat(kms-connector): eth_getLogs event listening * chore(kms-connector): event listener error handling * chore(kms-connector): code cleaning * fix(kms-connector): error metric handling * fix(kms-connector): fix flaky tests * chore(kms-connector): batch db insertion * chore(kms-connector): rename metric * chore(kms-connector): code cleaning * fix(kms-connector): fix ob1 error * chore(kms-connector): docs * chore(kms-connector): docs Co-authored-by: David <[email protected]> * chore(kms-connector): u8 to usize --------- Co-authored-by: David <[email protected]>
eudelins-zama
added a commit
that referenced
this pull request
Mar 27, 2026
feat(kms-connector): event listening via eth_getLogs (#2166) * feat(kms-connector): eth_getLogs event listening * chore(kms-connector): event listener error handling * chore(kms-connector): code cleaning * fix(kms-connector): error metric handling * fix(kms-connector): fix flaky tests * chore(kms-connector): batch db insertion * chore(kms-connector): rename metric * chore(kms-connector): code cleaning * fix(kms-connector): fix ob1 error * chore(kms-connector): docs * chore(kms-connector): docs * chore(kms-connector): u8 to usize --------- Co-authored-by: David <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Replaces the per-event-type subscription model (
eth_newFilter+eth_getFilterChanges) with a simpler, batchedeth_getLogspolling approach. This improves reliability (no more stale server-side filters).Closes https://github.com/zama-ai/fhevm-internal/issues/1189
Core architecture change
EventType(7 total), each creating a server-side filter viaeth_newFilterand polling events viaeth_getFilterChanges. A separate catchup phase was usingeth_getFilterLogsto recover missed events on startup.DecryptionandKmsGeneration), each running arun_poll_loopthat callseth_getLogswith explicitfromBlock/toBlockranges. The catchup phase is "merged" with the core listening phase.Key changes
eth_getLogsresponse are published in one DB transaction (publish_batch), replacing individualpublish_eventcalls.ticker.reset_immediately()triggers the next poll without waiting.max_consecutive_polling_errorsconfig (default 20) stops the listener after repeated failures instead of failing on the first error.event_received_errors→event_listening_errors, now labeled bycontractinstead ofevent_type.