-
Notifications
You must be signed in to change notification settings - Fork 50
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
invalid nonce on parallel tests via transact()
#254
Comments
So a couple questions first:
Also, the following processes transactions sequentially anyways for tokio spawned tasks: for task in tasks {
task.await??;
} You can try using |
I'm still @workspaces 0.6.1, so that might possibly fix it. Sorry for not checking that I'm on the latest version before opening a ticket. I'm on Linux Manjaro 22. I did not specify worker threads, so it should be 16, 1 for each CPU. The tasks are not run sequentially, since they are spawned via |
No worries, let me know if that fixes things. If not I'll take a deeper look when i get the chance.
nevermind about this one. They should be running in the background. |
So with workspaces >= 0.7 this error should never be displayed where
|
@Tarnadas hmm, now that's quite peculiar. If you don't mind, can I take a look at your repo to see what's up? And this is still for calls to |
Hey, sorry for late reply. I'm still looking into making this open source and will keep you updated once it's done. Yes this is using |
Does this issue still persist @Tarnadas ? |
Hey,
in my integration tests I have couple of tests that send very many transactions in parallel.
It's in fact so many, that I got an OS error, because it could not make that many requests in parallel, so I at most send 1k tx now in parallel and then wait until some of them have finished to send the next batch.
I found some issues (#163, #228), but am not sure how they relate.
I use
transact()
instead oftransact_async()
. Honestly I have noticed the _async function too late, which is why I still usetransact()
.The problem is that the bug is not easily reproducible, because it only happens about 1 out of 10 times maybe when running one of these long running tests.
The error looks as follows:
To make it run in parallel I spawn async tasks via
tokio
and put them into a task queue like this:I might be able to give you the full repo soon™, since we're about to open source it at some point.
If you wan't to I can try to make it run with
transact_async()
, but it's quite some refactoring that I need to do for this to work, because in my integration tests it checks dynamically whether a transaction can be async or not based on a scenario I give it as an input, which is defined in a struct like so:If
ExecutableOrderWithOutcome#outcome
isNone
, then it can run in parallel, otherwise it waits until all tx have finished up until that pointThe text was updated successfully, but these errors were encountered: