Skip to content

v4.0: fix(version): correct version!() macro for v4::Version (backport of #10883)#10911

Merged
t-nelson merged 1 commit into
v4.0from
mergify/bp/v4.0/pr-10883
Mar 4, 2026
Merged

v4.0: fix(version): correct version!() macro for v4::Version (backport of #10883)#10911
t-nelson merged 1 commit into
v4.0from
mergify/bp/v4.0/pr-10883

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Mar 2, 2026

Problem

v4.0.0.alpha.0 bins emit the Debug string when passed the --version flag

Summary of Changes

fix the stupid, superfluous version!() macro for how v4::Version behaves


This is an automatic backport of pull request #10883 done by Mergify.

@mergify mergify Bot requested a review from a team as a code owner March 2, 2026 19:12
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.7%. Comparing base (ea743f9) to head (85b6a43).

Additional details and impacted files
@@            Coverage Diff            @@
##             v4.0   #10911     +/-   ##
=========================================
+ Coverage    83.0%    83.7%   +0.7%     
=========================================
  Files         836      822     -14     
  Lines      316338   311717   -4621     
=========================================
- Hits       262659   261049   -1610     
+ Misses      53679    50668   -3011     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@steviez
Copy link
Copy Markdown

steviez commented Mar 2, 2026

$ solana validators -ut | grep tsb1
  tsb1gMZHE525nMy9jWAqdvfN5P1EtLucmGeoh5TwdCq   7XNHYsLZt7rmR3jXDgLhH2gpND2VREj87NH6ww3Sb9sz  100%  392103004 (  0)  392102961 ( -4)   0.11%  2529961  4.32768.0 Unknown         7693640.487254579 SOL (2.47%)

I guess the Unknown might be related to #7817, but the 2^15 + 2 value for the minor version seems suspect

@levsha
Copy link
Copy Markdown

levsha commented Mar 2, 2026

$ solana validators -ut | grep tsb1
  tsb1gMZHE525nMy9jWAqdvfN5P1EtLucmGeoh5TwdCq   7XNHYsLZt7rmR3jXDgLhH2gpND2VREj87NH6ww3Sb9sz  100%  392103004 (  0)  392102961 ( -4)   0.11%  2529961  4.32768.0 Unknown         7693640.487254579 SOL (2.47%)

I guess the Unknown might be related to #7817, but the 2^15 + 2 value for the minor version seems suspect

2^15 + 2 sounds expected when solana binary doesn't contain v4 naming schema change. However the same is also when the edge binary is used:

levsha@levsha-mbp ~> ssh mcs6 solana -ut validators|fgrep tsb1
  tsb1gMZHE525nMy9jWAqdvfN5P1EtLucmGeoh5TwdCq   7XNHYsLZt7rmR3jXDgLhH2gpND2VREj87NH6ww3Sb9sz  100%  392104707 (  0)  392104676 (  0)   0.11%  2552952  4.32768.0   7693640.487254579 SOL (2.47%)
levsha@levsha-mbp ~> ssh mce6 solana -ut validators|fgrep tsb1
  tsb1gMZHE525nMy9jWAqdvfN5P1EtLucmGeoh5TwdCq   7XNHYsLZt7rmR3jXDgLhH2gpND2VREj87NH6ww3Sb9sz  100%  392104811 (  0)  392104763 (-13)   0.11%  2554248  4.32768.0 Unknown         7693640.487254579 SOL (2.47%)
levsha@levsha-mbp ~> ssh mce6 solana --version
solana-cli 4.1.0-alpha.0 (src:d9e28999; feat:726278a3, client:Agave)

@steviez
Copy link
Copy Markdown

steviez commented Mar 2, 2026

However the same is also when the edge binary is used:

Right, this was my finding as well (ran on tsb1 with edge bin)

@t-nelson
Copy link
Copy Markdown

t-nelson commented Mar 2, 2026

what bin you use is irrelevant. the rpc node does the stringification. we'll bp to v3.1 once this bakes for a bit

Copy link
Copy Markdown

@steviez steviez left a comment

Choose a reason for hiding this comment

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

the rpc node does the stringification

Gotcha + confirmed by restarting my node with RPC:

$ solana validators -u localhost
...
Stake By Version:
4.1.0-alpha.0 -    2 current validators ( 0.03%)
4.0.0   -    4 current validators ( 0.12%)   1 delinquent validators ( 0.00%)
4.0.0-beta.0 -    1 current validators ( 0.01%)
3.1.10  -    3 current validators ( 0.04%)
...

We probably have a fixed width field in there to cleanup, but that can be handled separately so this LGTM

@steviez steviez requested a review from levsha March 2, 2026 22:37
@t-nelson
Copy link
Copy Markdown

t-nelson commented Mar 2, 2026

ah yeah must've only got the one from validator/gossip dumps ('cause there was a test for them 🫠)

@t-nelson t-nelson merged commit 48f817c into v4.0 Mar 4, 2026
50 checks passed
@t-nelson t-nelson deleted the mergify/bp/v4.0/pr-10883 branch March 4, 2026 16:11
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