ChainSafe / ChainSafe/forest

`MempoolFilter` should collect pending transaction data

Open
#7,091 0 comments 0 reactions 1 assignee Claimed by @akaladarshi View on GitHub
Type: Bug
Dominant language
Rust
Stars
697
Forks
200
Avg merge
1d 5h
Merged PRs (30d)
65

Description

## Describe the bug

Right now `MempoolFilter` is supposed to collect the hashes of the `pending transactions` which are received by the message pool, instead it is collecting the hashes of the messages present in the latest tipset (that are already part of the chain), through the `EventsFilter` which is what the `TipsetFilter` suppose to do.

Check how the `MempoolFilter` collects the hashes [here](https://github.com/ChainSafe/forest/blob/3b7dcd76f9a72dc5751572e78b4f74a62837f671/src/rpc/methods/eth.rs#L3373)

## Expected behaviour

`MempoolFilter` should only return the hashes of the messages which were added to the message pool:
- Only return the `Added` messages through the filter
- Ignore the messages which were `Removed` from the message pool

There is a a test for the API, but it waits for sometimes after sending transaction which obviously get include in the next tipset and hence `MempoolFilter` gets the latest tipset and returns the hashes.

## Screenshots

## Environment (please complete the following information):

- OS:
- Branch/commit: `main branch`
- Hardware

## Other information and links

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.