You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@shonve
Good idea.
As you mentioned, in Ethereum, many clients such as web3j provide a listener module, which helps developers to listen to new tx or blocks. such as the PendingTransactionFilter object, to observe tx events and invoke the callback function to do some local logic.
On the other hand, there are some concerns that we may need to think twice about before implementing this feature. As we know, the listener needs to connect to a remote RPC endpoint/fullnode. below are some risks and considerations :
Resource Consumption: Listeners need to remain running continuously and actively monitor events on the network. This can consume system resources, including network bandwidth and computational power. If the listener runs for an extended period or handles a large number of events, it may impact the performance of the node.
Event Processing Delay: Listeners are asynchronous and rely on remote fullnode to deliver events to them. As a result, there may be some delay in processing events, and real-time event retrieval may not be achievable.
增加类似listener监听器模块,当有新交易或者新的区块出现时进行监听回调
The text was updated successfully, but these errors were encountered: