xeth: added a transact mu#1663
Conversation
Added a transact mutex. The transact mutex will fix an issue where transactions were created with the same nonce resulting in some transactions being dropped. This happened when two concurrent calls would call the `Transact` method (which is OK) which would both call `GetNonce`. While the managed is thread safe it does not help us in this case.
|
Any anticipated impact on performance with this lock? I assume it should slow down when lots of successive transactions are being generated or generated in parallel |
|
Would be also my concern, though i prefer not dropped transactions 👍 |
|
I would argue that the performance hit would be negligible as far as I understand it mutex locks happening in userland so no context switching is needed. I think the better question is who would need to generate so many transactions all at once that this could actually be noticeable. 👍 |
Testnet spam? 😆 |
|
@tgerring yes, valid concern but I think it's alright. If people would like to spam faster than geth can generate nonces, lock/unlock and add transactions, people can pre-generate the transaction elsewhere and propagate them to the network using |
|
👍 |
* chore: bump alpine image in release dockerfile (ethereum#1661) * go mod tidy & comment e2e-test
Added a transact mutex. The transact mutex will fix an issue where
transactions were created with the same nonce resulting in some
transactions being dropped. This happened when two concurrent calls
would call the
Transactmethod (which is OK) which would both callGetNonce. While the managed is thread safe it does not help us in thiscase.
Closes #1662