Skip to content

feat: validator node functionality#107

Open
martinserts wants to merge 2 commits intotari-project:mainfrom
martinserts:validator-nodes
Open

feat: validator node functionality#107
martinserts wants to merge 2 commits intotari-project:mainfrom
martinserts:validator-nodes

Conversation

@martinserts
Copy link
Contributor

@martinserts martinserts commented Mar 20, 2026

Description

Adds:

  • RegisterValidatorNode
  • SubmitValidatorNodeExit
  • SubmitValidatorEvictionProof

Motivation and Context

Wallet must support L2 related functionality

How Has This Been Tested?

What process can a PR reviewer use to test or verify this change?

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@martinserts martinserts self-assigned this Mar 20, 2026
@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 integrates essential Layer 2 (L2) related functionality into the wallet, expanding its capabilities to support the Tari sidechain ecosystem. It introduces new CLI commands and underlying transaction logic, enabling users to manage validator node lifecycle events directly, from registration to exit and eviction proof submission.

Highlights

  • Validator Node Registration: Added RegisterValidatorNode functionality to allow wallets to register validator nodes on the Tari base layer by creating, signing, and broadcasting pay-to-self transactions with embedded validator node public keys and signatures.
  • Validator Node Exit: Implemented SubmitValidatorNodeExit to enable validator nodes to signal their intention to exit the active set by creating, signing, and broadcasting pay-to-self transactions with embedded exit signatures.
  • Validator Node Eviction Proof: Introduced SubmitValidatorEvictionProof for submitting self-validating eviction proofs to the base layer, embedding sidechain quorum certificates and Merkle inclusion proofs into pay-to-self transactions.
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.

@gemini-code-assist
Copy link
Contributor

Warning

Gemini is experiencing higher than usual traffic and was unable to create the review. Please try again in a few hours by commenting /gemini review.

@martinserts
Copy link
Contributor Author

/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 significant new functionality for validator node operations, including registration, exit, and eviction, accessible through the wallet's command-line interface. The implementation is well-structured, separating CLI parsing, command handling, and transaction creation logic into distinct modules. The core logic correctly follows the pay-to-self transaction pattern required for these operations, including necessary signature validations. My review includes a couple of suggestions to enhance maintainability by reducing code duplication in the command handlers and simplifying a piece of logic for improved clarity. Overall, the changes are robust and well-implemented.

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.

1 participant