Skip to content

test: staker migration more flows#80

Merged
noa-starkware merged 1 commit intomainfrom
noa/staking/v3/test/staker-migration-more-flows
Nov 27, 2025
Merged

test: staker migration more flows#80
noa-starkware merged 1 commit intomainfrom
noa/staking/v3/test/staker-migration-more-flows

Conversation

@noa-starkware
Copy link
Collaborator

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

Note

Adds three staker attestation migration flows (V0/V1 paths) with reward assertions and wires them into MAINNET_LATEST fork tests; updates flow ideas doc.

  • Tests/Flows:
    • StakerV0AttestFlow: stake in V0, upgrade, multi-epoch attest/increase sequences; assert staker rewards via calculate_staker_strk_rewards_with_balances_v2.
    • StakerV1AttestFlow: stake/increase in V1, upgrade, attest/increase across epochs; assert rewards consistency before/after increases.
    • StakerV1ChangeBalanceAttestFlow: multiple stake increases in V1, upgrade, attest; verify expected rewards.
  • Fork Tests:
    • Add MAINNET fork tests for the three new flows in src/flow_test/fork_test.cairo.
  • Docs:
    • Update src/flow_test/flow_ideas.md with additional staker migration scenarios.

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


This change is Reviewable

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (e565455) to head (2ac7a0e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   95.71%   95.71%           
=======================================
  Files          42       42           
  Lines        9959     9959           
=======================================
  Hits         9532     9532           
  Misses        427      427           

☔ 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.

Copy link
Collaborator

@NirLevi-starkware NirLevi-starkware left a comment

Choose a reason for hiding this comment

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

@NirLevi-starkware reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @noa-starkware)


src/flow_test/flow_ideas.md line 48 at r1 (raw file):

- staker enter in V2, advance epoch, upgrade to V3, advance epoch, attest,
- staker enter in V0, upgrade to V3, attest
- staker enter in V0, advance epoch, update balance, upgrade to V3, attest, update balance, advance epoch, attest

i dont see this flow


src/flow_test/flow_ideas.md line 50 at r1 (raw file):

- staker enter in V0, advance epoch, update balance, upgrade to V3, attest, update balance, advance epoch, attest
- staker enter in V1, advance epoch, update balance, upgrade to V3, attest, update balance, advance epoch, attest
- staker enter in V0, advance epoch, update balance, advance epoch, update balance, upgrade to V3, attest

i dont see this flow

Copy link
Collaborator Author

@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.

Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @NirLevi-starkware)


src/flow_test/flow_ideas.md line 48 at r1 (raw file):

Previously, NirLevi-starkware (Nir Levi) wrote…

i dont see this flow

No epochs in V0


src/flow_test/flow_ideas.md line 50 at r1 (raw file):

Previously, NirLevi-starkware (Nir Levi) wrote…

i dont see this flow

same

Copy link
Collaborator

@NirLevi-starkware NirLevi-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:

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

@noa-starkware noa-starkware force-pushed the noa/staking/v3/test/staker-migration-more-flows branch from 7462d37 to 2ac7a0e Compare November 27, 2025 11:01
@noa-starkware noa-starkware enabled auto-merge (squash) November 27, 2025 11:01
@noa-starkware noa-starkware merged commit a26081a into main Nov 27, 2025
7 of 8 checks passed
@noa-starkware noa-starkware deleted the noa/staking/v3/test/staker-migration-more-flows branch November 27, 2025 11:08
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