Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement chain events #4740

Open
8 tasks
elmattic opened this issue Sep 6, 2024 · 8 comments
Open
8 tasks

Implement chain events #4740

elmattic opened this issue Sep 6, 2024 · 8 comments
Assignees
Labels
Type: Epic A feature or collection of issues that achieve a greater goal

Comments

@elmattic
Copy link
Contributor

elmattic commented Sep 6, 2024

Issue summary

Currently PR #4691 is blocked by the lack of events in Forest.

Task summary

  • Propose a storage solution for events (i.e., that could be another column in paritydb). On Lotus side, a relational database is used (SQLite).
  • Is it expected for our users to interact directly with this DB outside of Forest? What is the expected size of the DB when running Lotus on mainnet? What are the expected performance characteristics (see last point).
  • Implement a minimal feature set (EventIndex, CollecteEvent types); we don't necessarily need to support all the features from the git-go, only what's required to unblock the above-mentioned PR.
  • Figure out if we need to implement a similar DB migration scheme to Lotus (that's very unlikely as their storage choice seems implementation-specific). Using a similar relational DB, we could use their most up-to-date schema.
  • Do we want to make historical events optional, and how? (if we still want to serve RPC requests, determine the endpoints that won't be supported). For example, a node without RPC enabled doesn't need this feature.
  • Determine if we need support for actor events? (usually, yes, since we're interested in EVM actor logs)
  • Implement rigorous testing
  • Understand performance characteristics that we need to support, depending on:
    • Frequency of events
    • Mean/max number of filters used by node operators

Feel free to break down the issue into new tasks if needed, i.e., a research spike, etc..

Other information and links

Lotus events implementation: https://github.com/filecoin-project/lotus/tree/master/chain/events

Related FIPs:

@elmattic
Copy link
Contributor Author

elmattic commented Sep 6, 2024

Here's a non-exhaustive list of methods that are likely blocked by this issue:

  • Filecoin.EthGetTransactionReceipt
  • Filecoin.EthGetTransactionReceiptLimited
  • Filecoin.EthGetFilterChange
  • Filecoin.EthGetFilterLogs
  • Filecoin.EthGetLogs
  • Filecoin.EthNewPendingTransactionFilter

@LesnyRumcajs
Copy link
Member

LesnyRumcajs commented Sep 6, 2024

@elmattic is EthNewPendingTransactionFilter blocked? There's a PR for it #4725. Or does it lack something?

@elmattic
Copy link
Contributor Author

elmattic commented Sep 6, 2024

@elmattic is EthNewPendingTransactionFilter blocked? There's a PR for it #4725. Or does it lack something?

We could probably remove this one for now. We should be able to create a new filter even without directly supporting events.

Testing this endpoint properly would require something like Filecoin.EthGetFilterChange, which is on my list.

@sudo-shashank What do you think?

@sudo-shashank
Copy link
Contributor

@elmattic is EthNewPendingTransactionFilter blocked? There's a PR for it #4725. Or does it lack something?

We could probably remove this one for now. We should be able to create a new filter even without directly supporting events.

Testing this endpoint properly would require something like Filecoin.EthGetFilterChange, which is on my list.

@sudo-shashank What do you think?

yes the list of methods shared above is blocked on the points mentioned in this issue

@LesnyRumcajs LesnyRumcajs added the Type: Epic A feature or collection of issues that achieve a greater goal label Sep 12, 2024
@LesnyRumcajs
Copy link
Member

@elmattic Does it also block these methods? Any others?

@elmattic
Copy link
Contributor Author

Does it also block these methods?

Indeed.

@elmattic
Copy link
Contributor Author

Any others?

SubscribeActorEventsRaw

@elmattic
Copy link
Contributor Author

EthSubscribe as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Epic A feature or collection of issues that achieve a greater goal
Projects
None yet
Development

No branches or pull requests

3 participants