Skip to content

Conversation

@imabdulbasit
Copy link
Contributor

@imabdulbasit imabdulbasit commented Dec 2, 2025

The query returns reward accounts where created <= requested height, but if the node's merklized state lags behind, we could return stale balances from an older height. This adds a check to ensure the reward-state-v2 has data up to the requested height before returning results, so that we return the latest account balances as of that height.

@jbearer
Copy link
Member

jbearer commented Dec 2, 2025

This seems like a good candidate for a regression test

@imabdulbasit imabdulbasit enabled auto-merge (squash) December 2, 2025 22:39
@imabdulbasit imabdulbasit disabled auto-merge December 2, 2025 22:39
@imabdulbasit imabdulbasit enabled auto-merge (squash) December 2, 2025 22:40
@imabdulbasit imabdulbasit disabled auto-merge December 2, 2025 22:40
@imabdulbasit imabdulbasit merged commit 7d8a9d6 into main Dec 2, 2025
135 of 141 checks passed
@imabdulbasit imabdulbasit deleted the ab/check-state-height branch December 2, 2025 22:40
imabdulbasit added a commit that referenced this pull request Dec 4, 2025
* check merklized state height before returning reward accounts

* fix existing test and add regression test
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.

3 participants