Skip to content

Use inclusive ramp-start condition in initial pledge calculation #7501

Description

@coderabbitai

Summary

Update the initial pledge ramp-start condition in src/rpc/methods/state.rs to use an inclusive comparison (<=) where Forest aligns with the Lotus reference implementation.

Rationale

The current condition differs from Lotus. The inclusive boundary affects the ramp-start epoch calculation for initial pledge values.

Affected area

  • src/rpc/methods/state.rs
  • compute_initial_pledge_for_power and the ramp-start epoch handling

Required change

Compare the Forest condition with the referenced Lotus implementation and change the condition to the inclusive form when the semantics match.

Acceptance criteria

  • Forest uses the inclusive ramp-start condition consistent with Lotus.
  • The initial pledge calculation uses the correct ramp parameters at the boundary epoch.
  • Add or update a focused regression test for the boundary epoch, if practical.

References

Requested by: @LesnyRumcajs

Metadata

Metadata

Type

No type

Projects

Status
New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions