Skip to content

Validator History: Fix gossip version - #295

Open
aoikurokawa wants to merge 5 commits into
masterfrom
ak/gossip
Open

Validator History: Fix gossip version#295
aoikurokawa wants to merge 5 commits into
masterfrom
ak/gossip

Conversation

@aoikurokawa

@aoikurokawa aoikurokawa commented May 23, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates validator-history’s gossip Version deserialization to match Agave/Solana v4’s packed minor/prerelease wire format, preventing prerelease versions (e.g., 4.0.0-rc.1) from being misrecorded on-chain. Also adds a small CLI “info” subcommand to report the number of ValidatorHistory accounts.

Changes:

  • Implement Agave v4-compatible Version (de)serialization using a packed-minor wrapper and add unit tests for stable vs prerelease encodings.
  • Add InfoValidatorHistoryCount CLI subcommand and wire it into the validator-history CLI command tree.
  • Introduce a new commands::info module for CLI “info” commands.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
utils/validator-history-cli/src/main.rs Wires a new InfoValidatorHistoryCount subcommand into the CLI.
utils/validator-history-cli/src/commands/mod.rs Exposes the new info commands module.
utils/validator-history-cli/src/commands/info/mod.rs Adds the info module entrypoint.
utils/validator-history-cli/src/commands/info/validator_history_count.rs Implements the on-chain ValidatorHistory account counting command with optional JSON output.
programs/validator-history/src/crds_value.rs Fixes gossip Version wire decoding for Agave v4 packed-minor prerelease format; adds focused unit tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread utils/validator-history-cli/src/main.rs Outdated
Comment thread utils/validator-history-cli/src/commands/info/validator_history_count.rs Outdated
@aoikurokawa
aoikurokawa marked this pull request as ready for review May 26, 2026 04:33

@ebatsell ebatsell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could we get an integration test on this instruction that uses the 4.0.0-rc.1 version as input in the format we're getting from gossip as a ContactInfo?

@aoikurokawa

Copy link
Copy Markdown
Collaborator Author

They bring new tag (prerelease tag) which is not stored in Validator History account.
We will keep tracking of only major, minor and patch only.

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.

3 participants