Skip to content

Conversation

@GabrielePicco
Copy link
Collaborator

@GabrielePicco GabrielePicco commented Aug 26, 2025

Greptile Summary

This PR enhances the getVersion RPC endpoint by adding git commit information and extending the version response structure. The changes involve four main components:

  1. New git-version dependency: Added to magicblock-version/Cargo.toml to enable compile-time git commit hash extraction using the git_version::git_version!() macro.

  2. Enhanced Version struct: Modified magicblock-version/src/lib.rs to include a new solana_core field for tracking the underlying Solana version, updated commit computation to use the git-version macro instead of environment variables, and changed the default client identifier from SolanaLabs to MagicBlock.

  3. Extended RPC response structure: Created a new RpcVersionInfoExt struct in magicblock-rpc/src/traits/rpc_minimal.rs that provides more detailed version information including separate fields for solana-core version, feature-set, git-commit (as hex string), and magicblock-core version.

  4. Updated RPC handler: Modified the get_version method implementation in magicblock-rpc/src/handlers/minimal.rs to return the new extended version info structure, formatting the git commit as an 8-character hexadecimal string and properly populating all version fields.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 3 comments

Edit Code Review Bot Settings | Greptile

GabrielePicco and others added 4 commits August 26, 2025 09:41
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Copy link
Contributor

@lucacillario lucacillario left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Dodecahedr0x Dodecahedr0x left a comment

Choose a reason for hiding this comment

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

Small nit but otherwise LGTM

@GabrielePicco GabrielePicco merged commit 9a862f5 into master Aug 26, 2025
4 checks passed
@GabrielePicco GabrielePicco deleted the feat/add-commit-to-get-version branch August 26, 2025 16:58
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.

4 participants