feat: events: Implement API for clients to subscribe to and consume built-in Actor events #11457
Open
4 of 9 tasks
Labels
kind/feature
Kind: Feature
Checklist
Ideas
.Lotus component
What is the motivation behind this feature request? Is your feature request related to a problem? Please describe.
Once filecoin-project/builtin-actors#1464 lands, built-in Actors will start emitting important lifecycle events that clients can subscribe to for tracking sector and deal lifecycle transitions.
We need to implement an API in Lotus for Lotus clients to be able to subscribe to these built-in Actor events.
1. Implement a new API for users to be able to consume (FEVM + built-in Actor) events that does not aggregate events by the tipsets/blocks they are interested in
We can implement a new API for clients to subscribe to (FEVM + built-in Actor) events i.e. all events emitted by a Filecoin node.
This API will provide an "here are the events you are interested in" view of the world rather than a "here's a new tipset/block and it has the following events you are interested in" i.e. it will not aggregate events by tipsets/blocks in it's response.
Emitted events will still contain information about the tipset/message they were included in/caused by.
This API will not emit information about tipset changes, message execution, mpool updates etc and clients can continue using the existing
EthEventAPI
or the existingChainNotify
API for those use cases.Data Structures
Event Subscription API
2. Build a new API that allows clients to subscribe to (FEVM + built-in Actor events) aggregated by the blocks/tipsets they occur in
This API aggregates events by blocks/tipsets they are included in so clients can track event emission within the context of tipset changes.
This will need more development work as the existing event filter and Indexer does not already aggregate events by the tipsets they occur in.
The text was updated successfully, but these errors were encountered: