test: add update_rewards old delegator flow#94
Open
arad-starkware wants to merge 14 commits into
Open
Conversation
This was referenced Nov 27, 2025
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8114c54 to
f4d55a7
Compare
11dc7bf to
2e31872
Compare
2fdc3f1 to
eb07598
Compare
2e31872 to
fa6010f
Compare
noa-starkware
requested changes
Nov 27, 2025
noa-starkware
left a comment
Collaborator
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @arad-starkware)
src/flow_test/flows.cairo line 9103 at r1 (raw file):
system.stake(:staker, amount: stake_amount, pool_enabled: true, :commission); let pool = system.staking.get_pool(:staker); system.delegate(:delegator, :pool, amount: delegated_amount);
Add BTC delegate if version is V2 and test his rewards
src/flow_test/flows.cairo line 9124 at r1 (raw file):
let delegated_amount = self.delegated_amount.unwrap(); let pool = self.pool.unwrap();
Do we want add one attest here?
eb07598 to
3b2272c
Compare
6eab75d to
74cbcfc
Compare
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.

This change is
Note
Implements consensus block rewards based on average block duration with configurable bounds, integrates caching in staking, adds RewardSupplier EIC, and updates docs/tests accordingly.
update_current_epoch_block_rewardsreturning per-block STRK/BTC rewards using yearly mint and measured avg block duration (avg_block_duration).block_snapshotand clamp withBlockDurationConfig; exposeget_block_duration_configandset_block_duration_config(app governor only).avg_block_duration,block_snapshot,block_duration_config,BLOCK_DURATION_SCALE,DEFAULT_*, use sharedSECONDS_IN_YEAR.RewardSupplierEICinitializing avg/min/max block duration with validation.BLOCK_DURATION_OVERFLOW,INVALID_{BLOCK_NUMBER,BLOCK_TIMESTAMP,MIN_MAX_BLOCK_DURATION,AVG_BLOCK_DURATION}.block_rewardswithlast_calculated_epoch.set_consensus_rewards_first_epoch, pre-initialize block rewards;update_rewardsnow uses cached per-block rewards.update_current_epoch_block_rewards,get_block_duration_config,set_block_duration_config), new errorINVALID_MIN_MAX_BLOCK_DURATION, and structBlockDurationConfig; clarifycalculate_current_epoch_rewardsusage.starkware_utils/testing git revs.Written by Cursor Bugbot for commit 3b2272c. This will update automatically on new commits. Configure here.