Skip to content

Conversation

@arad-starkware
Copy link
Collaborator

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

This change is Reviewable


Note

Adds a flow test for get_stakers validating zero-balance/new staker visibility across epochs and updates the flow ideas doc.

  • Tests:
    • Add get_stakers_zero_balance_flow_test in workspace/apps/staking/contracts/src/flow_test/test.cairo to validate get_stakers returns:
      • Empty set for current and next epoch after staking.
      • Inclusion with full STRK_WEIGHT_FACTOR and Option::None public key starting the following epoch, persisting thereafter.
  • Docs:
    • Update flow_ideas.md under get_stakers by removing the zero-balance case entry.

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

@arad-starkware arad-starkware self-assigned this Nov 17, 2025
@arad-starkware arad-starkware marked this pull request as ready for review November 17, 2025 12:50
@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_with_zero_balance_flow branch from 28e5e23 to 8622540 Compare November 17, 2025 13:10
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.39%. Comparing base (0d4c1ff) to head (82c2b26).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
- Coverage   95.74%   95.39%   -0.35%     
==========================================
  Files          47       45       -2     
  Lines       11159     9362    -1797     
==========================================
- Hits        10684     8931    -1753     
+ Misses        475      431      -44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_with_zero_balance_flow branch from 8622540 to bf7e058 Compare November 17, 2025 13:16
Copy link
Collaborator

@noa-starkware noa-starkware left a comment

Choose a reason for hiding this comment

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

@noa-starkware reviewed 1 of 2 files at r1.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @NirLevi-starkware)


workspace/apps/staking/contracts/src/flow_test/test.cairo line 1890 at r2 (raw file):

    let staking_consensus = system.staking.consensus_dispatcher();

    // Test balance with get_stakers

Suggestion:

Test same epoch.

Copy link
Collaborator Author

@arad-starkware arad-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @NirLevi-starkware)


workspace/apps/staking/contracts/src/flow_test/test.cairo line 1890 at r2 (raw file):

    let staking_consensus = system.staking.consensus_dispatcher();

    // Test balance with get_stakers

Done

@arad-starkware arad-starkware force-pushed the arad/test_add_get_stakers_with_zero_balance_flow branch from bf7e058 to 82c2b26 Compare November 19, 2025 11:48
Copy link
Collaborator

@noa-starkware noa-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @NirLevi-starkware)

@arad-starkware arad-starkware merged commit 84af108 into main Nov 19, 2025
5 of 7 checks passed
@arad-starkware arad-starkware deleted the arad/test_add_get_stakers_with_zero_balance_flow branch November 19, 2025 12:34
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.

3 participants