forest icon indicating copy to clipboard operation
forest copied to clipboard

feat(rpc) Implement `Filecoin.EthGetLogs`

Open elmattic opened this issue 1 year ago • 4 comments

Summary of changes

Changes introduced in this pull request:

  • Partially implement RPC method Filecoin.EthGetLogs
./forest-tool api compare --lotus /ip4/127.0.0.1/tcp/1234/http --forest /ip4/127.0.0.1/tcp/2345/http forest_snapshot_calibnet_2024-10-03_height_2021383.forest.car.zst --filter EthGetLogs -n 800

| RPC Method                | Forest            | Lotus |
|---------------------------|-------------------|-------|
| Filecoin.EthGetLogs (272) | CustomCheckFailed | Valid |
| Filecoin.EthGetLogs (528) | Valid             | Valid |

This PR introduces a new flag/configuration setting (enable_event_caching) to retain events in the Tipset cache.

If neither the RPC API nor the methods related to events are used, a value of false can be passed.

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • [x] I have performed a self-review of my own code,
  • [x] I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • [x] I have added tests that prove my fix is effective or that my feature works (if possible),
  • [x] I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

elmattic avatar Sep 19 '24 11:09 elmattic

Can we have unit tests for this implementation?

LesnyRumcajs avatar Oct 11 '24 10:10 LesnyRumcajs

Can we have unit tests for this implementation?

Sure.

elmattic avatar Oct 11 '24 11:10 elmattic

@ruseinov Not too fast, buster!

elmattic avatar Oct 11 '24 13:10 elmattic

@LesnyRumcajs added a few unit tests to cover the most intricated functions

elmattic avatar Oct 17 '24 15:10 elmattic