Conversation
Changed Files
|
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 support for the ethexe execution model within the gtest testing framework. By allowing users to opt into this model via a new SystemBuilder, the changes enable testing of ethexe-based programs using an in-memory database and the real ethexe processor. This includes necessary infrastructure for managing ethexe-specific state, balances, and message handling, ensuring that gtest remains a versatile tool for various execution environments. 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
|
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
Code Review
This pull request introduces an Ethexe execution model to the gtest framework, enabling Gear programs to be tested using the real ethexe processor and an in-memory database. Key changes include the implementation of EthexeManager, a SystemBuilder for selecting between Vara and Ethexe execution models, and updates to Program and System to route execution and state management accordingly. Feedback focuses on performance optimizations for the block_on runtime, ensuring consistency in block height and timestamps between the Vara and Ethexe managers, and addressing the reporting of gas burned and the handling of message gas limits in Ethexe mode.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 311f869. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a501da8ab2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
After #5401 we can also pass |
Replace per-call current_thread runtime creation with a OnceLock-cached multi-threaded runtime to reduce overhead and avoid repeated initialization/drop cycles across block executions.
…ager Use blocks_manager.next_block() for ethexe run_new_block instead of hardcoded +1/+12_000 increments. This ensures block height/timestamp stay consistent between ethexe and Vara execution modes. Add ethexe support for run_to_block (delegates to run_next_block in a loop) and run_scheduled_tasks (panics with helpful message since task pool is not available in ethexe mode). Fix calculate_reply_for_handle timestamp to use BLOCK_DURATION_IN_MSECS instead of hardcoded 12_000 for consistency.
Add is_active_program() to EthexeManager that verifies the program state is Program::Active, not just present in the program_states map. Use it in send() and System::is_active_program() to prevent messages to terminated/exited programs.
Panic in ethexe mode when a per-message gas_limit other than MAX_USER_GAS_LIMIT is passed, since only block-level gas allowance applies. The methods send_bytes/send_bytes_with_value use the correct default. Add approximate_gas_burned_from_ethexe() to map executable balance burn to per-message gas entries using VALUE_PER_GAS conversion. This keeps BlockRunResult::spent_value() meaningful in ethexe mode.
|
@claude review |
|
Claude finished @playX18's task in 3m 45s —— View job Code ReviewThe PR is well-structured and the core design is sound. The severity: medium — File:
// system.rs ~583 — missing is_program guard (compare to balance_of at line 569)
pub fn executable_balance_of<ID: Into<ProgramIdWrapper>>(&self, id: ID) -> Value {
let id = id.into().0;
if let Some(ethexe) = self.ethexe() {
ethexe.borrow().executable_balance_of(id) // panics if id is not a registered program
} else {
0
}
}severity: medium — File:
At minimum the severity: low — File:
severity: low — File: Both methods work against Notes on prior automated review commentsSeveral automated findings were already correctly handled in this revision:
|
|
@cursor review |
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |

Closes #5404
Summary
Adds support for ethexe execution model to gtest
How to test
Run
cargo nextest run -p gtestChecklist
type(scope): description)Note
Medium Risk
Adds a second execution backend that changes how
SystemandProgramrun blocks/messages and introduces new balance semantics; mistakes could cause tests to behave differently or hide regressions. Scope is contained togtestand gated behindSystem::builder().execution_model(ExecutionModel::Ethexe).Overview
Adds an opt-in ethexe execution model to
gtest, letting tests run code processing and block execution through the realethexe-processorbacked by an in-memoryethexe-db(selected viaSystem::builder().execution_model(ExecutionModel::Ethexe)).Introduces an
EthexeManagerthat stores/instruments code, registers programs, queues canonical events and injected transactions, executes blocks, and supports non-committingcalculate_reply_for_handle;System/ProgramAPIs now routequeue_len, block execution, program lookup, message sending, and balance queries based on the selected model.Extends
BlockRunResultwithethexe_executable_balance_burned, adds helpers for ethexe executable/owned balance top-ups plus raw event/tx injection, updates docs and dev-deps (includingdemo-pingethexe feature), and adds unit tests covering ethexe mode behavior and charging.Reviewed by Cursor Bugbot for commit 311f869. Bugbot is set up for automated code reviews on this repo. Configure here.