-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
Add newPendingRawTransactions to filter system to save bandwidth #24524
Comments
Could you provide some more details about what you're trying to use it for? We do have a few ideas in mind too, but curious about your case. |
Hey, In my case, the node that I'm hosting is mostly being used for various trading related applications. But currently working on a MEV tracking case, where we need to record all the pending transactions across multiple nodes. I believe in most use cases that uses pending transaction filter are being used in tranding / gaming related applications. And in these cases, the exact transaction data is needed. |
it would be nice for example i want to listen on new pending transactions and check if receiver address is in my database , execute callback for my application ,but now because i have only txId and i should call 1 http per tx it would not be cool trezor blockbook is good example it provider transaction detail on new pending transaction not just txId example
|
@karalabe would you accept PRs that provide the functionality? |
We should review and merge the feature I guess. |
@lmittmann |
Hey, I have implemented newPendingRawTransactions on my test node and I suggest that raw RLP is sent instead of Json if performance is concern. RLP encoding seems to be much faster than json encode. Probably RLP is Pooled and now need to ecrecover + keccak? |
Hey, can you share the implementation details with us? Thanks |
@Anti83 You have to update your RPC client to send the additional go-ethereum/ethclient/gethclient/gethclient.go Lines 178 to 181 in 4a69d76
|
Did you figure out what is the right way? |
Fixed by #25186 |
thanks 😍 |
Hey all, is it possible to toggle this back to receiving only tx hashes with the latest update? @holiman |
@jwelch-qn It did have supported, ref https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub#newpendingtransactions eg:
|
what is version your geth? |
Hmm, this is helpful, but this change is causing issues with |
you must be extend class Web3Subscription, refrence : https://docs.web3js.org/guides/events_subscriptions/custom_subscriptions/ or use my package for subscription : |
v1.12.0 |
imo this is the web3j’s issue, not geth’s, and you should file an issue in web3j’s repo |
Hey,
In use cases where client subscribes to newPendingTransactions and gets txhashes would typically re-request transaction content from the node. In public nodes or nodes that serve many simultaneous clients, this would cause some additional load.
It would be nice, and quite easy to implement another subscription of newPendingRawTransactions, which would directly send the raw transaction instead of just tx hash. Then the client can decode the raw transaction without re-requesting json'd eth_getTransactionByHash.
I think this should be easily implemented. Instead of sending tx.Hash(), a tx.MarshalBinary() would be sent to the subscription channel.
(I can do the commit if this gets green light from the maintainers)
The text was updated successfully, but these errors were encountered: