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

Add PartitionData reward type #34761

Closed

Conversation

CriesofCarrots
Copy link
Contributor

@CriesofCarrots CriesofCarrots commented Jan 12, 2024

Problem

See problem description on #34624
The PDA that PR adds will be useful for clients querying a running RPC node for rewards. However, other clients may only have access to historical ledger.

Summary of Changes

Add a new RewardType::PartitionData to record the num_partitions in an optional Reward field. This reward gets written to the first block of an epoch (essentially replacing the list of stake and vote rewards in epochs before partitioned-rewards feature activation)
To find a specific reward, clients can examine the rewards in the first block of the epoch to get the num_partitions and use the previous_blockhash in the block metadata to create an EpochRewardsHasher.

@CriesofCarrots CriesofCarrots force-pushed the partition-reward-type branch 4 times, most recently from 4cf19b7 to c8d2383 Compare January 12, 2024 17:19
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: Patch coverage is 62.31884% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 81.8%. Comparing base (4385ed1) to head (72951ca).
Report is 311 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34761   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         825      825           
  Lines      223078   223140   +62     
=======================================
+ Hits       182497   182554   +57     
- Misses      40581    40586    +5     

@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jan 29, 2024
@CriesofCarrots CriesofCarrots removed the stale [bot only] Added to stale content; results in auto-close after a week. label Feb 2, 2024
@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Feb 19, 2024
@CriesofCarrots CriesofCarrots added do-not-close Add this tag to exempt an issue/PR from being closed by the stalebot and removed stale [bot only] Added to stale content; results in auto-close after a week. labels Feb 23, 2024
@willhickey
Copy link
Contributor

This repository is no longer in use. Please re-open this pull request in the agave repo: https://github.com/anza-xyz/agave

@willhickey willhickey closed this Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
do-not-close Add this tag to exempt an issue/PR from being closed by the stalebot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants