Skip to content

test: add update_rewards same epoch flow#89

Open
arad-starkware wants to merge 1 commit into
arad/test_add_update_rewards_staker_intent_flowfrom
arad/test_add_update_rewards_same_epoch_flow
Open

test: add update_rewards same epoch flow#89
arad-starkware wants to merge 1 commit into
arad/test_add_update_rewards_staker_intent_flowfrom
arad/test_add_update_rewards_same_epoch_flow

Conversation

@arad-starkware

@arad-starkware arad-starkware commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

This change is Reviewable


Note

Adds a test ensuring update_rewards yields identical rewards when called twice within the same epoch (even after a block), and updates ideas accordingly.

  • Tests:
    • Add update_rewards_same_epoch_flow_test in src/flow_test/test.cairo to assert rewards remain unchanged when calling update_rewards twice in the same epoch, including after advancing one block.
  • Docs:
    • Update src/flow_test/flow_ideas.md by removing the corresponding test idea under update_rewards.
  • Minor:
    • Small formatting tidy-up in a calculate_staker_strk_rewards_with_balances_v3 call.

Written by Cursor Bugbot for commit e4e5171. This will update automatically on new commits. Configure here.

arad-starkware commented Nov 27, 2025

Copy link
Copy Markdown
Contributor Author

@noa-starkware noa-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @arad-starkware)


src/flow_test/test.cairo line 3777 at r1 (raw file):

    let staker = system.new_staker(amount: stake_amount);
    let commission = 200;
    system.stake(:staker, amount: stake_amount, pool_enabled: false, :commission);

Please add strk delegate and btc delegate and test all the rewards

@arad-starkware arad-starkware force-pushed the arad/test_add_update_rewards_same_epoch_flow branch from 555b38d to 453b967 Compare November 28, 2025 09:51
@arad-starkware arad-starkware force-pushed the arad/test_add_update_rewards_staker_intent_flow branch from 3bc8d51 to 8904b34 Compare November 28, 2025 09:51
@arad-starkware arad-starkware force-pushed the arad/test_add_update_rewards_staker_intent_flow branch from 8904b34 to 701fb46 Compare December 1, 2025 13:18
@arad-starkware arad-starkware force-pushed the arad/test_add_update_rewards_same_epoch_flow branch from 453b967 to e4e5171 Compare December 1, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants