Skip to content

Implement state fork handler in state manager call_raw #6446

@sudo-shashank

Description

@sudo-shashank

Describe the bug

StateManager::call_raw evaluates messages on tipset.parent_state() without running cron or migrations for epochs between the parent and target tipset. In cases with upgrade boundaries in that gap, RPC calls (StateCall / eth_call) can return incorrect results because the correct state requires fork logic that isn’t applied in the call path.

To reproduce

  1. Start Forest on a chain that includes an upgrade boundary.
  2. Pick a tipset where parent_epoch < upgrade_epoch <= tipset_epoch.
  3. Run a call at that tipset (Filecoin.StateCall or eth_call).
  4. Compare the result against full chain execution (or Lotus, which runs fork logic in CallInternal).

Other information and links

#3733: https://github.com/filecoin-project/lotus/blob/0b0d7c96df590ab6ac2db3fb975a112a9a220199/chain/stmgr/call.go#L74C1-L267

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions