-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Describe the bug
Forest does not currently handle "expensive forks" when executing messages, which is implemented in Lotus. Without this check, RPC calls can become very slow if an expensive migration is triggered.
Forest should return an ErrExpensiveFork error in these cases, similar to Lotus, to prevent performance degradation.
Lotus uses HasExpensiveForkBetween to check if executing tipsets between specified heights would trigger an expensive migration, excluding migrations at the target height.
Forest needs to implement similar functionality.
To reproduce
- Run Forest with RPC enabled
- Create and send a request that will trigger such expensive fork
- Observe slowdown
Log output
Log Output
paste log output...
Expected behaviour
For all RPC methods affected by this issue (an exhaustive list should be established first), we should trigger an error instead of performing the expensive migration.
It is up to the implementer to determine which network upgrades can be considered fast enough to avoid being included in the expensive fork list. Likely candidates would be upgrades that take no longer than 100ms.
Screenshots
Environment (please complete the following information):
- OS:
- Branch/commit
- Hardware
Other information and links
Look for Expensive: true in https://github.com/filecoin-project/lotus/blob/master/chain/consensus/filcns/upgrades.go
HasExpensiveForkBetween function: https://github.com/filecoin-project/lotus/blob/master/chain/stmgr/forks.go#L230-L237
Metadata
Metadata
Assignees
Labels
Type
Projects
Status