Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Skip creating reward partition account for --partitioned-epoch-rewards-force-enable-single-slot #34946

Merged
merged 7 commits into from
Jan 26, 2024

Conversation

HaoranYi
Copy link
Contributor

@HaoranYi HaoranYi commented Jan 25, 2024

Problem

A follow up PR from #34809

We can run the validator against mainnet with the new partitioned reward code by enabling --partitioned-epoch-rewards-force-enable-single-slot CLI argument.

Recently, my test node running with the above CLI fails on account hash mismatch. It turns out that the mismatch is coming from the new partition reward account introduced at the epoch, i.e. #34624.

In #34809, we solve this problem by ignoring the PDA accounts for account hash, bank capital and bank hash. This works but it is too hacky. And it turns out that keeping the PDA accounts doesn't provide any other benefit to test the related getInflactionReward RPC method.

Therefore, we want a simpler fix.

Summary of Changes

  • skip creating reward partition account when we are testing partitioned reward against mainnet with --partitioned-epoch-rewards-force-enable-single-slot
  • log when creating reward partition account

Fixes #

@HaoranYi HaoranYi changed the title skip creating reward partition account when we are testing agains mainnet Skip creating reward partition account for --partitioned-epoch-rewards-force-enable-single-slot Jan 25, 2024
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0838909) 81.6% compared to head (faf720d) 81.6%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34946   +/-   ##
=======================================
  Coverage    81.6%    81.6%           
=======================================
  Files         830      830           
  Lines      224873   224878    +5     
=======================================
+ Hits       183615   183635   +20     
+ Misses      41258    41243   -15     

Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Looks good to me. Probably should wait to merge until Tyera gives a :shipit: too.

@HaoranYi HaoranYi added the automerge Merge this Pull Request automatically once CI passes label Jan 25, 2024
@mergify mergify bot removed the automerge Merge this Pull Request automatically once CI passes label Jan 25, 2024
Copy link
Contributor

mergify bot commented Jan 25, 2024

automerge label removed due to a CI failure

@HaoranYi HaoranYi added the automerge Merge this Pull Request automatically once CI passes label Jan 26, 2024
@mergify mergify bot removed the automerge Merge this Pull Request automatically once CI passes label Jan 26, 2024
Copy link
Contributor

mergify bot commented Jan 26, 2024

automerge label removed due to a CI failure

@HaoranYi HaoranYi added the automerge Merge this Pull Request automatically once CI passes label Jan 26, 2024
@mergify mergify bot merged commit 8a0c91d into solana-labs:master Jan 26, 2024
38 checks passed
@HaoranYi HaoranYi deleted the 2024_jan_25 branch January 26, 2024 21:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants