Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli: fix inflation rewards effective slot, block time #4226

Merged

Conversation

CriesofCarrots
Copy link

Problem

As of partitioned epoch rewards activation, the effective slots and block times returned from solana inflation reward that are incorrect, since the cli assumes that all rewards have been delivered in the same slot.

Summary of Changes

  • Remove general effective slot and block time from human-readable output
  • Deprecate these fields in CliEpochRewardsMetadata and populate with 0 for json output
  • Add verbose display that includes effective slot and blocktime for every reward
  • Query for correct block time for all reward slots

Fixes #3984

cli/src/inflation.rs Outdated Show resolved Hide resolved
Copy link

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great! Just the bit about the deprecated fields

cli-output/src/cli_output.rs Outdated Show resolved Hide resolved
cli/src/inflation.rs Outdated Show resolved Hide resolved
Copy link

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great!

@CriesofCarrots CriesofCarrots merged commit ae6e34c into anza-xyz:master Jan 8, 2025
40 checks passed
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.

Cli: inflation rewards Reward Slot no longer accurate for multiple accounts
2 participants