-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
Transactions not added to the pool when making repeated calls to sendRawTransaction from the same account #14405
Comments
I experimented a bit with this, by running it
So apparently, it caps the
And indeed:
So what's happening is that since you're throwing all txs in no particular order, most of them will wind up in And queued will start evicting the higher-nonces transactions after there's already 64 of them in there. So it's basically expected behaviour. In this case, I can't see any performance gain in sending async over sync (even if we 'fix' this isuse, you're just shuffling work from the js-side over to the geth-side). Transactions are inherently sequential, what you can benefit from is paralellising signing. However, if you really want to use this approach, you need to batch it in sizes below |
Thank you for your response. Actually, I was using asynchronous calls because, at least using web3js in Node.js, the rate at which geth receives transactions is much higher than the synchronous version. Maybe the overhead in waiting for the RPC response before making the next call may explain this. Nonetheless, I was making quick tests here and found another weird behavior here. Could you take a look into this to see if I'm making a mistake? If it is a bug, I can open a new issue here. The problem is very simple: I sent 50 transactions asynchronously to geth using
This issue does not seem to happen if I send the transactions synchronously. Is this expected behavior? I was trying to call this function to derive the correct nonce for future transactions. Thank you again for your help. |
Also correct.
Now, this can be a cause of confusion.
This is almost the same as above, but the question that we're asking is "what's the nonce of Geth cobbles together a So, TLDR; there's a difference between the |
Thank you for the explanation. I thought |
I guess we'll have to ping @fjl about that. |
This issue has been resolved as of #14523 .
|
System information
Geth version: 1.6.0-stable
OS & Version: Arch Linux
Issue description
I'm sending multiple transactions using
sendRawTransaction
calls asynchronously, but some of them seem to be dropped by geth and are not added to the transaction pool. I thought my issue was related to #14375, but in my tests, I define the transaction nonces manually before sending them to geth.Expected behaviour
All transactions are received by geth and added to the transaction pool as pending transactions.
Actual behaviour
All transactions are received by geth (they are logged in geth's console), but some of them are not added to the transaction pool. No error messages are displayed.
Steps to reproduce the behaviour
I've uploaded sample scripts in this repository.
The text was updated successfully, but these errors were encountered: