Skip to content

Conversation

@whankinsiv
Copy link
Collaborator

@whankinsiv whankinsiv commented Oct 29, 2025

This PR implements reward processing in historical_accounts_state and adds the /accounts/{stake_address}/rewards REST handler in rest_blockfrost as part of #256.

Main changes:

  • Refactored StakeRewardDeltasMessage to exclude MIR reward deltas.
  • Expanded StakeRewardDelta to include reward type and pool information.
  • Updated accounts_state to credit MIRs immediately instead of at epoch transition, preventing balance underflow when users withdraw rewards early.
  • Implemented handle_rewards, get_reward_history, and GetAccountRewardHistory query handler in historical_accounts_state.
  • Added and registered the /accounts/{stake_address}/rewards endpoint via handle_account_rewards_blockfrost.

Next steps:

  • A follow up PR will implement address deltas processing in historical_accounts_state and the corresponding /accounts/{stake_address}/addresses REST endpoint.

@whankinsiv whankinsiv marked this pull request as ready for review October 30, 2025 18:49
Signed-off-by: William Hankins <[email protected]>
@whankinsiv whankinsiv merged commit dc556bf into main Oct 31, 2025
2 checks passed
@whankinsiv whankinsiv deleted the whankinsiv/historical-accounts-reward-processing branch October 31, 2025 01:39
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