-
Notifications
You must be signed in to change notification settings - Fork 41
test: add update_rewards old delegator flow #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: arad/test_add_update_rewards_transition_with_balance_change_flow
Are you sure you want to change the base?
test: add update_rewards old delegator flow #94
Conversation
|
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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.