-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
optimizing the event service #6153
Comments
Which specific nodes are event service originally designed for ? |
Agree |
@abn2357 Nodes that require event subscription. Event service provided event subscription, supporting subscription of chain data, such as block, transaction, contract log, contract event and so on, so developers can get events triggered on the chain by the event plugin. |
This issue has been added to the tronprotocol/pm#112, welcome to share the latest progress @xxo1shine , and discuss together with @zeusoo001 @Sunny6889 @abn2357. |
Background
The event service was designed for use by specific nodes and is not widely utilize. However, it is tightly coupled with the main process and has some issues when handling block rollback.
Currently, the event service is coupled with block execution, and the coupling has a negative impact on the efficiency of block execution. If the event service fails, it may cause block processing failure, thus affecting block broadcasting and synchronization.
Rationale
The system should prevent block processing from failure due to event service processing malfunctions, which could otherwise affect block broadcast and synchronization.
Therefore, the logic of event service, in the scenario of switching blockchain failure, should be optimized.
The event service should be decoupled from the block execution logic and designed as an independent module, which would no longer affect execution of the main process, thus avoiding the event service exception causing node to fail to operate normally.
Once the event service is decoupled, the efficiency of block execution can be improved. And since the event service is independent, the scalability can be enhanced, which is convenient for the access of other events.
The text was updated successfully, but these errors were encountered: