Skip to content

Conversation

@imabdulbasit
Copy link
Contributor

No description provided.

@imabdulbasit imabdulbasit force-pushed the ab/per-epoch-reward-distribution branch from cdbcce2 to 97a2584 Compare January 12, 2026 14:31
@imabdulbasit imabdulbasit force-pushed the ab/per-epoch-reward-distribution branch from 9c7021e to 74d7737 Compare January 14, 2026 15:21
@imabdulbasit imabdulbasit changed the title per epoch reward distribution Switch from per block to per epoch reward distribution ( V6 Upgrade) Jan 15, 2026
@imabdulbasit imabdulbasit force-pushed the ab/per-epoch-reward-distribution branch from bdd2790 to fb10f82 Compare January 27, 2026 11:04
reward_calculator.spawn_background_task(
prev_epoch,
epoch_height,
validated_state.reward_merkle_tree_v2.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know for sure this is the correct merkle tree to pass in here, I feel it could be arbitrarily old. Maybe we can check the header.reward_merkle_tree_root == validated_state.reward_merkle_tree_v2.root and if false just pass in the empty tree with the root from the prev_epoch_header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made that change in this commit bcbc39d

bfish713 and others added 7 commits February 2, 2026 11:59
* use new merkle tree if our root doesn't match the header

* get full tree from correct header

* make sure we have the full randomized stake table for the epoch

* order the validators before indexing

* bail if reward root doesn't equal header

---------

Co-authored-by: imabdulbasit <[email protected]>
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