test: add update_rewards strk pool flow#46
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
+ Coverage 95.43% 95.61% +0.17%
==========================================
Files 45 45
Lines 9446 9806 +360
==========================================
+ Hits 9015 9376 +361
+ Misses 431 430 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a8941d5 to
d077709
Compare
d077709 to
15ddf08
Compare
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 4 unresolved discussions (waiting on @arad-starkware)
src/flow_test/utils.cairo line 1525 at r2 (raw file):
self.set_consensus_rewards_first_epoch(:epoch_id); self.advance_k_epochs(); }
different trait?
Code quote:
fn start_consensus_rewards(self: SystemState) {
let epoch_id = self.staking.get_current_epoch() + K.into();
self.set_consensus_rewards_first_epoch(:epoch_id);
self.advance_k_epochs();
}src/flow_test/test.cairo line 2762 at r2 (raw file):
/// Flow: /// Start consensus rewards. /// Staker stake with STRK pool.
Is it the same behavior with empty BTC pool? Do we want to test that?
src/flow_test/test.cairo line 2767 at r2 (raw file):
/// update_rewards. /// Test staker rewards. /// Test delegator rewards.
Unnecessary IMO
Code quote:
Test delegator rewards.src/flow_test/test.cairo line 2795 at r2 (raw file):
); let staker_rewards = system.staker_claim_rewards(:staker); let delegator_rewards = system.delegator_claim_rewards(:delegator, :pool);
Unnecessary
a8d6962 to
1ca1905
Compare
15ddf08 to
0b4b53b
Compare
1ca1905 to
7de0c7c
Compare
5f1b470 to
636625a
Compare
arad-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 4 unresolved discussions (waiting on @noa-starkware)
src/flow_test/test.cairo line 2762 at r2 (raw file):
Previously, noa-starkware wrote…
Is it the same behavior with empty BTC pool? Do we want to test that?
There's a different flow for that, or I didn't understand
src/flow_test/test.cairo line 2767 at r2 (raw file):
Previously, noa-starkware wrote…
Unnecessary IMO
Why not test the expected behavior? Is this tested somewhere else?
src/flow_test/utils.cairo line 1525 at r2 (raw file):
Previously, noa-starkware wrote…
different trait?
Done.
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @arad-starkware)
src/flow_test/test.cairo line 2767 at r2 (raw file):
Previously, arad-starkware wrote…
Why not test the expected behavior? Is this tested somewhere else?
It is not related to this test. And it should be tested somewhere. But i dont care to leave it
src/flow_test/utils.cairo line 578 at r4 (raw file):
} fn start_consensus_rewards(self: SystemState) {
I think it should be in the same trait of advance epoch
7de0c7c to
670c521
Compare
636625a to
b2047ee
Compare
670c521 to
ff2da76
Compare
b2047ee to
00c2854
Compare
arad-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @noa-starkware)
src/flow_test/test.cairo line 2767 at r2 (raw file):
Previously, noa-starkware wrote…
It is not related to this test. And it should be tested somewhere. But i dont care to leave it
I'd rather leave it then
src/flow_test/utils.cairo line 578 at r4 (raw file):
Previously, noa-starkware wrote…
I think it should be in the same trait of advance epoch
Done.
00c2854 to
c622701
Compare
ff2da76 to
ca26d90
Compare
0d5e8ea to
dec5ece
Compare
noa-starkware
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, all discussions resolved (waiting on @arad-starkware)
dec5ece to
ea61d51
Compare
ea61d51 to
5b22f3d
Compare
Merge activity
|

This change is
Note
Adds a flow test for
update_rewardswith a STRK pool under consensus rewards and astart_consensus_rewardshelper; updates flow ideas.update_rewards_strk_pool_flow_testinsrc/flow_test/test.cairoto validate staker rewards post-update_rewardsand delegator rewards after next epoch under consensus STRK pool.SystemState.start_consensus_rewards()insrc/flow_test/utils.cairoto setconsensus_rewards_first_epochand advanceKepochs.src/flow_test/flow_ideas.mdby removing STRK-only pool case fromupdate_rewardsideas.Written by Cursor Bugbot for commit 5b22f3d. This will update automatically on new commits. Configure here.