feat(ethexe/rpc): Add streaming subscription for all ethexe promises to RPC#5604
feat(ethexe/rpc): Add streaming subscription for all ethexe promises to RPC#5604vobradovich wants to merge 10 commits into
Conversation
Summary of ChangesHello, 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 enhances the Highlights
Using Gemini Code AssistThe 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
Customization To customize the 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request implements server-side filtering for the subscribe_promises RPC subscription in ethexe, allowing clients to filter computed promises by reply code (Success, Error, or an exact hex code). It introduces the PromiseSubscriptionFilter and ReplyCodeFilter types, integrates a global broadcast channel into the PromiseSubscriptionManager, and spawns background tasks to drive subscriptions. Feedback suggests optimizing the promise broadcast by checking the receiver count before cloning the promise payload, and simplifying the hex parsing logic by validating ASCII hex digits upfront to avoid UTF-8 decoding overhead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…e` values with sender/destination/reply-code filtering
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements the subscribe_promises JSON-RPC subscription for the ethexe RPC layer, allowing clients to subscribe to a stream of newly computed promises. It introduces a filtering mechanism (PromiseSubscriptionFilter) to filter promises by sender, destination, and reply code, and utilizes a broadcast channel to fan out computed promises to active subscribers. Comprehensive tests are added to verify the subscription, filtering, and broadcast behavior. The reviewer suggests a minor improvement in filter.rs to use T: Deserialize<'de> instead of T: serde::de::DeserializeOwned for the FilterSet deserialization implementation to make it more idiomatic and flexible.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…agged-subscriber fix
Closes #5165
Summary
Adds the
injected_subscribePromises/injected_unsubscribePromisesJSON-RPC subscription toethexe-rpc.Clients receive newly computed
PromiseEnvelopevalues containing:PromiseSubscriptions support optional server-side filtering by sender, destination, and reply code.
New API
PromiseEnvelope:The filter supports:
sender: one address or an array of addressesdestination: one actor ID or an array of actor IDsreplyCode:{ "type": "success" }{ "type": "error" }{ "type": "exact", "code": "0x00010000" }Values within one array use OR semantics. Different filter fields use AND semantics. Omitted or empty fields act as wildcards. Malformed exact reply codes are rejected during deserialization.
Architecture
filter.rsdefinesPromiseEnvelope, filter builders, serde behavior, and matching.PromiseSubscriptionManagerenriches each computed promise once from the stored signed transaction and broadcasts a sharedArc<PromiseEnvelope>.If the originating signed transaction is absent from the database, the promise remains persisted for receipt processing, but no global envelope is broadcast.
How to test
Coverage includes:
Checklist