Description
Checklist
- This is not a security-related bug/issue. If it is, please follow please follow the security policy.I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.I am running the
Latest release
, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.I did not make any code changes to lotus.
Lotus component
- lotus daemon - chain synclotus fvm/fevm - Lotus FVM and FEVM interactionslotus miner/worker - sealinglotus miner - proving(WindowPoSt/WinningPoSt)lotus JSON-RPC APIlotus message management (mpool)Other
Lotus Version
Daemon: lotus version 1.33.1-dev+2k+git.fb24904a9.dirty (The patch is for local drand nodes).
Repro Steps
This behavior was seen while running Antithesis simulation, where we called Filecoin.ChainGetTipSet with selector safe, it returns these logs:
2025-06-09T00:39:17.328Z WARN rpc go-jsonrpc@v0.8.0/handler.go:425 error in RPC call to 'Filecoin.ChainGetTipSet': getting latest finalized tipset:
github.com/filecoin-project/lotus/node/impl/full.(*ChainModuleV2).getLatestSafeTipSet
node/impl/full/chain_v2.go:77
- height -819 is negative:
github.com/filecoin-project/lotus/chain/store.(*ChainStore).GetTipsetByHeight
chain/store/store.go:1266
Because safeHeight is defined by height - policy.Chainfinality, which is I believe 900. So it returns height is negative.
Describe the Bug
JsonRPC request to v2 API returns negative if called before 900 epochs aka policy.ChainFinality.
Logging Information
2025-06-09T00:39:17.328Z WARN rpc go-jsonrpc@v0.8.0/handler.go:425 error in RPC call to 'Filecoin.ChainGetTipSet': getting latest finalized tipset:
github.com/filecoin-project/lotus/node/impl/full.(*ChainModuleV2).getLatestSafeTipSet
node/impl/full/chain_v2.go:77
- height -819 is negative:
github.com/filecoin-project/lotus/chain/store.(*ChainStore).GetTipsetByHeight
chain/store/store.go:1266
Activity
BigLep commentedon Jun 13, 2025
Thanks for reporting. We'll look into this next week (week of 2025-06-16).
Assert that EC finalized tipset height is never negative in v2 APIs
fix: assert that EC finalized tipset height is never negative in v2 A…