feat(ethexe-rpc): add top-up option for reply calculation#5556
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 introduces an optional top-up mechanism for reply calculations in the ethexe-rpc layer. By adding a 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 introduces support for executing programs with an automatic balance top-up during overlay execution for replies. It adds a with_top_up flag to the execution payload, handles the corresponding top-up event generation in the processor, and exposes this functionality via the RPC and SDK layers. The review feedback correctly points out that adding with_top_up: bool as a mandatory parameter to the JSON-RPC method is a breaking change for existing clients. It is recommended to change this parameter to Option<bool> to maintain backwards compatibility, defaulting to false when omitted.
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.
|
Claude finished @playX18's task in 1m 56s —— View job PR Review: feat(ethexe-rpc): add top-up option for reply calculation
SummaryThis PR adds an optional The implementation is clean and the approach is sound. A few findings below. medium:
The public method gained a required low:
The derive_more // current
"Execution for reply at height {height} timestamp {timestamp}: \
program_id: {program_id}, source: {source}, payload len: {}, \
value: {value}, gas_allowance: {gas_allowance}", payload.len()
// suggested
"Execution for reply at height {height} timestamp {timestamp}: \
program_id: {program_id}, source: {source}, payload len: {}, \
value: {value}, gas_allowance: {gas_allowance}, with_top_up: {with_top_up}", payload.len()low:
The constant is used to compute // Value-per-gas ratio used to ensure the program has enough executable
// balance to cover the full gas_allowance during overlay reply calculation.
const EXECUTION_FOR_REPLY_TOP_UP_VALUE_PER_GAS: u128 = 100;What's done well
|
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #5332
Summary
Adds a
with_top_upparameter to theprogram_calculateReplyForHandleRPC so callers can optionally calculate replies for programs with depleted executable balance.When enabled, the processor performs an internal overlay-only executable balance top-up before executing the query. Existing behavior remains unchanged when
with_top_upisfalse. The SDK also exposes an opt-in helper for top-up reply calculation.How to test
Notes
The RPC signature changes by adding the with_top_up boolean parameter. Existing SDK behavior remains unchanged through the default calculate_reply_for_handle path.
Checklist