forest
forest copied to clipboard
GC and send command don't work together
Issue summary
Sending FIL tokens using the send command while a Forest DB garbage collection is running will result in a failed transaction, and no message will be included in the blockchain.
The timing between sending and GCing is important, i.e. GCing DB just before sending will work, and the message will be mined.
Using a fixed timing of 4s between a forest-cli send and a forest-cli db gc is enough to reproduce the issue in a consistent way.
We're now sunsetting Forest semi-space GC to replace it with a new GC algorithm (https://github.com/ChainSafe/forest/pull/3504). That said we want to understand why the issue is happening in the first place.
Task summary
- [ ] Understand why current GC and send commands don't play well together.
- [ ] Make sure our new GC is immune to this issue.
- [ ] Make sure we cover this scenario with enough testing.
Acceptance Criteria
- [ ] GC and send commands work when used at the same time.
- [ ] Units or integration tests are passing.
Other information and links
Script to reproduce the issue: stress.txt (you'll need to modify the script by creating a sending address and fund it using a calibnet faucet).