-
Notifications
You must be signed in to change notification settings - Fork 41
test: add balances delay (more balance changes) flow #84
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_accrue_rewards_across_versions_flow
Are you sure you want to change the base?
test: add balances delay (more balance changes) flow #84
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. |
29def9f to
13c90aa
Compare
955c4b6 to
d4eef5d
Compare
13c90aa to
db7bd8c
Compare
a1b33ff to
92ca6e9
Compare
db7bd8c to
3f023b2
Compare
92ca6e9 to
8c226f7
Compare
3f023b2 to
b5c1e5a
Compare
8c226f7 to
c719119
Compare
b5c1e5a to
3023c5c
Compare
| .delegator_claim_rewards(delegator: strk_delegator, pool: strk_pool); | ||
| let btc_delegator_rewards = system | ||
| .delegator_claim_rewards(delegator: btc_delegator, pool: btc_pool); | ||
| assert!(wide_abs_diff(strk_delegator_rewards, expected_strk_pool_rewards) <= 1); |
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.
Bug: Inconsistent tolerance for STRK delegator rewards assertion
The final STRK delegator rewards assertion uses wide_abs_diff with a tolerance of 1, while all other reward assertions in this flow (including the BTC delegator rewards on the next line) use exact equality. This inconsistency differs from the similar BalancesDelayBalanceChangeFlow which uses exact equality for all delegator reward checks. This suggests a potential rounding issue being masked rather than properly addressed, or an unintended deviation from the established pattern.
3023c5c to
dbfa1a6
Compare
c719119 to
b3861f8
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, 3 unresolved discussions (waiting on @arad-starkware)
-- commits line 2 at r2:
Rename the PR
src/flow_test/flow_ideas.md line 38 at r2 (raw file):
- staker enter in V2, advance epoch, upgrade to V3, advance epoch, attest, - staker in V2, update balance staker+update balance pool, upgrade, attest in current epoch, attest in next epoch, attest in next next epoch - staker in V2, advance epoch, update balance staker+update balance pool, advance epoch, update balance staker+update balance pool, upgrade, update balance staker+update balance pool, attest in current epoch, attest in next epoch, attest in next next epoch
Do you implemented 2 tests or one for both lines?
b3861f8 to
947e295
Compare
dbfa1a6 to
6303786
Compare
arad-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, 1 unresolved discussion (waiting on @arad-starkware and @noa-starkware)
src/flow_test/flow_ideas.md line 38 at r2 (raw file):
Previously, noa-starkware wrote…
Do you implemented 2 tests or one for both lines?
We discussed offline, the second test eclipses the first one, so only the second one is implemented
947e295 to
3a74b0a
Compare
3a74b0a to
3c30c03
Compare
6303786 to
a4c915a
Compare

This change is
Note
Adds a new BalancesDelayMoreBalanceChangeFlow covering multi-epoch stake/delegation changes around upgrade and registers its mainnet fork test; also prunes an obsolete idea from flow_ideas.md.
BalancesDelayMoreBalanceChangeFlow: Adds a comprehensive flow insrc/flow_test/flows.cairothat validates total staking power and STRK/BTC rewards across multiple epochs with additional balance changes pre/post-upgrade, including attestation and delegator/staker reward assertions.balances_delay_more_balance_change_flow_testinsrc/flow_test/fork_test.cairo.src/flow_test/flow_ideas.md.Written by Cursor Bugbot for commit 3c30c03. This will update automatically on new commits. Configure here.