-
Notifications
You must be signed in to change notification settings - Fork 112
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
Generated transaction IDs are not unique #1557
Comments
Hi @OlegMazurov, and thank you for raising this issue. To give you an update -- it is currently in progress :) |
Hi @OlegMazurov, would like to request more info from your side:
|
Here is the command line:
Note that the current |
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Signed-off-by: Nikita Lebedev <nikita.lebedev@limechain.tech>
Unsure if this one is related but even since I installed 2.29.0 I've been running into this error from time to time: Hedera transaction Note that there are only 3 decimal places in the nanosecond part, and the rest is zero. This seems unusual. I rolled back to 2.28.0 and my code worked without issues. |
See also hashgraph/hedera-services#7959 |
Thanks, I had a look but it's not clear on what I need to do. It appears to be resolved in v0.42 - is that for com.hedera.hashgraph:hedera-protobuf-java-api:0.42.0 ? I'm not including that one in my build.gradle. I was only using "com.hedera.hashgraph:sdk:2.29.0" |
Description
I generate many transactions in parallel from the same account (it's a setup stage in a benchmark built on top of the Java Client SDK; the transactions are
AccountCreateTransaction
). Occasionally, the same ID is generated for two different transactions. If those transactions are submitted to the same node I get theDUPLICATE_TRANSACTION
error for the last one. If, however, they are submitted to different nodes, it becomes possible to get a receipt for a different transaction that is accepted as valid. In particular,AccountCreateTransaction
receives a wrong account ID that can not be used with the key provided with the transaction.The problem is with the
TransactionId.generate()
method:The randomization works OK at a low speed but at a high TPS (up to 25K in my case) the probability of generating the same value becomes significant. A strictly monotonic clock source is required here. Unfortunately, existing Java clock sources do not provide such guarantee in multithreaded environment.
Thanks to the possibility of setting my own transaction ID, I have been able to implement the following scheme that works reliably in my benchmark:
Something along those lines should be implemented in Client SDKs.
Steps to reproduce
I used Load Generator to run
CryptoTransferLoadTest
against a 7-node network.Additional context
No response
Hedera network
other
Version
v2.24.0
Operating system
Linux
The text was updated successfully, but these errors were encountered: