Skip to content

feat(ethexe/node-loader): support multiple validator nodes#5208

Open
playX18 wants to merge 20 commits intomasterfrom
ap-multi-validator-loader
Open

feat(ethexe/node-loader): support multiple validator nodes#5208
playX18 wants to merge 20 commits intomasterfrom
ap-multi-validator-loader

Conversation

@playX18
Copy link
Member

@playX18 playX18 commented Mar 10, 2026

Added support for multiple-validator nodes in node-loader. It will randomly switch between them and reconenct to them if API fails. In case of too many fails connection is removed, and on all connections dead program terminates.

Also added start-local-network.sh script that allows users to start proper Vara.eth network with multiple validators that are all connected to single Anvil instance. It is also possible to start-up node-loader automatically this way.

@playX18 playX18 requested a review from grishasobol March 10, 2026 05:35
@playX18 playX18 self-assigned this Mar 10, 2026
@playX18 playX18 added A0-pleasereview PR is ready to be reviewed by the team D8-ethexe ethexe-related PR labels Mar 10, 2026
@semanticdiff-com
Copy link

semanticdiff-com bot commented Mar 10, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  ethexe/node-loader/src/args.rs  66% smaller
  ethexe/node-loader/src/batch.rs  33% smaller
  ethexe/node-loader/src/main.rs  5% smaller
  Cargo.lock Unsupported file format
  ethexe/node-loader/Cargo.toml Unsupported file format
  ethexe/node-loader/src/batch/rpc_pool.rs  0% smaller
  ethexe/node-loader/src/fuzz/mod.rs  0% smaller
  ethexe/node-loader/src/utils.rs  0% smaller
  ethexe/scripts/start-local-network.sh Unsupported file format

@gemini-code-assist
Copy link
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 support for multiple validator nodes in the node-loader, improving its robustness and ability to handle API failures. It also includes a script to easily start a local Vara.eth network with multiple validators, streamlining the development and testing process.

Highlights

  • Multiple Validator Support: The node-loader now supports connecting to multiple validator nodes, enhancing resilience and load distribution.
  • Randomized Node Switching: The node-loader randomly switches between validator nodes and reconnects upon API failures.
  • Local Network Script: A new start-local-network.sh script simplifies setting up a Vara.eth network with multiple validators connected to a single Anvil instance.
Changelog
  • ethexe/node-loader/src/args.rs
    • The ethexe_node argument was replaced with ethexe_nodes to accept a list of validator node endpoints.
  • ethexe/node-loader/src/batch.rs
    • Introduced EthexeRpcPool to manage multiple RPC endpoints for validator nodes.
    • Implemented retry logic with reconnection for RPC requests to handle potential failures.
    • Modified BatchPool::new to accept a list of ethexe RPC URLs and initialize the EthexeRpcPool.
  • ethexe/node-loader/src/main.rs
    • Updated BatchPool::new call to pass the list of ethexe nodes.
  • ethexe/scripts/start-local-network.sh
    • Added a new script to automate the setup of a local Vara.eth network with multiple validators.
Activity
  • Added support for multiple validator nodes.
  • Implemented random switching and reconnection logic.
  • Introduced start-local-network.sh script for easy local network setup.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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
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 support for multiple validator nodes in the node-loader. It adds an EthexeRpcPool to manage connections to multiple ethexe-node endpoints, with logic for random selection, reconnection, and retries on failure. A new script, start-local-network.sh, is also included to facilitate setting up a local test network with multiple validators.

My review focuses on the new connection management and retry logic. I've identified a potential race condition in connection handling that could lead to creating unnecessary connections, and significant code duplication in the retry logic for RPC calls. I've provided suggestions to improve both of these aspects for better performance and maintainability.

@playX18 playX18 requested a review from ark0f March 16, 2026 01:16
@playX18
Copy link
Member Author

playX18 commented Mar 16, 2026

/gemini review

Copy link
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 support for multiple validator nodes in the node-loader, enhancing its resilience by allowing it to switch between endpoints and reconnect on failure. A new EthexeRpcPool is added to manage the connections, including retry logic and cooldown periods. Additionally, a comprehensive shell script start-local-network.sh is included to simplify setting up a local multi-validator test environment.

My review focuses on the correctness and maintainability of the new connection pooling and retry logic. I've identified a discrepancy between the described and implemented failure handling, and an opportunity to reduce code duplication in the retry mechanism. Overall, this is a great step towards a more robust testing tool.

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

Labels

A0-pleasereview PR is ready to be reviewed by the team D8-ethexe ethexe-related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants