Skip to content

fix(ethexe/node-loader): fix program creation ratio + script#5400

Open
playX18 wants to merge 1 commit intomasterfrom
ap/ethexe-loader-fix
Open

fix(ethexe/node-loader): fix program creation ratio + script#5400
playX18 wants to merge 1 commit intomasterfrom
ap/ethexe-loader-fix

Conversation

@playX18
Copy link
Copy Markdown
Member

@playX18 playX18 commented May 1, 2026

No description provided.

@playX18 playX18 requested a review from grishasobol May 1, 2026 11:11
@playX18 playX18 self-assigned this May 1, 2026
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented May 1, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  ethexe/node-loader/src/batch.rs  15% smaller
  ethexe/node-loader/src/batch/generator/batch.rs  9% smaller
  ethexe/node-loader/README.md Unsupported file format
  ethexe/node-loader/src/args.rs  0% smaller
  ethexe/scripts/start-local-network.sh Unsupported file format

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhancements to the ethexe node-loader to improve its flexibility and reliability during load testing. By adding configurable program creation ratios and a more intelligent, dynamic watchdog timeout system, the loader can better adapt to varying network conditions and testing requirements. Additionally, the local environment setup script has been updated to better support Podman-based container execution.

Highlights

  • Program Creation Control: Added a new --program-creation-ratio flag to the node-loader to allow fine-grained control over new program creation frequency after the initial bootstrap phase.
  • Dynamic Watchdog Timeouts: Implemented a dynamic batch watchdog timeout mechanism that scales based on the specific batch type and workload, improving stability during slower operations like code validation.
  • Podman Compatibility: Updated the local network startup script to include --userns=keep-id when running via Podman, ensuring proper container permission handling.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces dynamic watchdog timeouts for the node loader, allowing timeouts to scale based on batch complexity and size. It also implements a --program-creation-ratio flag to control the workload mix between program creation and steady-state traffic, and updates the local network script for Podman compatibility. Feedback is provided regarding the reachability of UPLOAD_CODE_BATCH_ID in the batch generator and a suggestion to clarify the inclusive range in the documentation.


fn select_non_creation_batch_id(&mut self, context: &Context) -> u8 {
let mut viable = vec![1, 2];
let mut viable = vec![SEND_MESSAGE_BATCH_ID];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

In select_non_creation_batch_id, UPLOAD_CODE_BATCH_ID was removed, which seems correct as it's not part of steady-state traffic. However, it was not added to select_program_creation_batch_id. This makes UPLOAD_CODE_BATCH_ID unreachable from the main batch generation logic in select_batch_id, effectively disabling standalone upload_code batches.

If this is not intended, select_program_creation_batch_id should be updated to include UPLOAD_CODE_BATCH_ID as a possible outcome. For example:

fn select_program_creation_batch_id(&mut self, context: &Context) -> u8 {
    if context.all_code_ids().is_empty() {
        // Must upload a program to get a code ID.
        return UPLOAD_PROGRAM_BATCH_ID;
    }

    // A possible distribution, please adjust to desired workload.
    match self.batch_gen_rng.gen_range(0..3) {
        0 => UPLOAD_PROGRAM_BATCH_ID,
        1 => CREATE_PROGRAM_BATCH_ID,
        _ => UPLOAD_CODE_BATCH_ID,
    }
}

- `--max-top-up-value <u128>` in WVARA smallest units
- `--total-msg-value-budget <u128>` in wei
- `--total-top-up-budget <u128>` in WVARA smallest units
- `--program-creation-ratio <0..100>` controls new program creation after bootstrapping
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation for --program-creation-ratio specifies the range as <0..100>, which can be ambiguous. The implementation in args.rs uses an inclusive range 0..=100. To improve clarity and prevent misinterpretation, please consider updating the documentation to explicitly show an inclusive range, for example <0-100> or <0..=100>.

Suggested change
- `--program-creation-ratio <0..100>` controls new program creation after bootstrapping
- --program-creation-ratio <0-100> controls new program creation after bootstrapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants