Finish the mpool fixes
- Dominant language
- Rust
- Stars
- 697
- Forks
- 200
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 65
Description
**Issue summary**
This is a follow up issue of PR #2847. PR 2847 is adding a per actor limit but doesn't check for a global mpool upper bound. This is problematic because it still leaves a door open for spamming a forest node using many account actors together.
We also need to add some purging mechanism for messages that reach forest mpool but don't managed to get included in the blockchain (for whatever reason).
Indeed, those messages could hinder inclusion of legit messages in forest mpool and then later in the filecoin blockchain.
**Task summary**
- [ ] Implement global bound checking using values defined in`MpoolConfig`
- [ ] Implement a mpool pruning trigger
- [ ] Implement all possible test cases
**Acceptance Criteria**
- [ ] Mpool pruning works
- [ ] Spamming forest with messages is now impossible
**Other information and links**
https://github.com/ChainSafe/forest/blob/main/blockchain/message_pool/src/config.rs#L24-L25
https://github.com/filecoin-project/lotus/blob/master/chain/messagepool/pruning.go
You can check if a message in forest mpool needed to be prune by looking at its cid on a filecoin explorer, i.e:
cid: `bafy2bzacecogoslgpllxnwzywo6q7phw5ig42tqf6ytzu7cbffxqq2gmzgkh4`
filscan: https://calibration.filscan.io/no-result?key=bafy2bzacecogoslgpllxnwzywo6q7phw5ig42tqf6ytzu7cbffxqq2gmzgkh4
If you can't see it included in a block after a while (one hour?), that means you have to let it go.
Contributor guide
Assessment
This issue has not been assessed yet.