test: block rewards by timestamp flows#98
Merged
noa-starkware merged 2 commits intoApr 5, 2026
Conversation
5036954 to
ce8d6f9
Compare
6cbd473 to
f9adaa8
Compare
remollemo
approved these changes
Mar 22, 2026
remollemo
left a comment
Contributor
There was a problem hiding this comment.
@remollemo reviewed 19 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on NirLevi-starkware).
ce8d6f9 to
0682062
Compare
f9adaa8 to
e3e9325
Compare
e3e9325 to
0ec7e12
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #98 +/- ##
==========================================
+ Coverage 95.80% 95.91% +0.10%
==========================================
Files 43 43
Lines 10517 10797 +280
==========================================
+ Hits 10076 10356 +280
Misses 441 441 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Low Risk
Changes are confined to test flows and test harness utilities; primary risk is brittle/incorrect assumptions in new reward calculations or role setup causing flaky tests rather than production impact.
Overview
Adds several new flow tests in
flow_test/test.cairoto validate timestamp-based rewards behavior: average block duration calculation across mixed block times, identical rewards within the same epoch, correct accrual whenupdate_rewardsskips blocks/epochs, and reward changes when updating epoch length or the reward supplier’s block-duration config.Updates the flow-test harness (
flow_test/utils.cairo) to support new reward-supplier governance roles (app_role_admin,app_governor) and exposes a helper to callset_block_duration_configvia the config dispatcher. Test utilities addsplit_pool_rewardsand clarifyavg_block_timeunits used bycalculate_current_block_rewards_with_avg_block_time_v3.Reviewed by Cursor Bugbot for commit ad43fab. Bugbot is set up for automated code reviews on this repo. Configure here.
This change is