Refactor chain- and epoch-specific state manager tests into a dedicated file

Open
#7,723 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@akaladarshi is already working on this.

Since Oct 7, 2026.

Assessment

This issue has not been assessed yet.

Description

Summary

Move chain- and epoch-specific tests out of src/state_manager/utils.rs into a dedicated test file or test module. This is a follow-up refactor to PR #7709. It does not change state manager or RPC behavior.

Rationale

src/state_manager/utils.rs contains state-computation helpers and tests for specific network epochs. A dedicated test file will separate these responsibilities and make the snapshot-based tests easier to find and maintain.

Required changes

  • Move cargo_test_reward_distribution_calibnet_4109134 into a dedicated test file or test module.
  • Move the related chain- and epoch-specific replay and state-validation tests from state_compute::tests into the dedicated test organization.
  • Review the generated state-computation test inclusion and keep generated tests discoverable.
  • Keep reusable snapshot download and state preparation helpers available to the moved tests.
  • Preserve test names, assertions, Tokio runtime settings, and #[fickle::fickle] annotations.

Affected areas

  • src/state_manager/utils.rs, particularly state_compute::tests.
  • The new dedicated state manager test file or test module.
  • Test module declarations and generated-test inclusion, as needed.

Acceptance criteria

  • Chain- and epoch-specific tests no longer reside in src/state_manager/utils.rs.
  • The moved tests remain discoverable and retain their existing coverage.
  • Snapshot loading, state-root checks, reward accounting assertions, and cache assertions remain unchanged.
  • Relevant tests pass under the existing test workflow.
  • No production state manager or RPC behavior changes.

References

Dominant language
Rust
Stars
700
Forks
201
Avg merge
1d 17h
Merged PRs (30d)
65

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ChainSafe/forest

All issues in ChainSafe/forest

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.