Skip to content
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

[BUG] Nonce synchronisation #107

Open
erdzan12 opened this issue Jul 13, 2021 · 1 comment
Open

[BUG] Nonce synchronisation #107

erdzan12 opened this issue Jul 13, 2021 · 1 comment
Labels

Comments

@erdzan12
Copy link
Member

The issue #70 was in general fixed by requesting the current nonce from the geth network before submitting a transaction.
However, when two user for example are trying to register themselves near simultaneously the same nonce will be used and thus one transaction will fail as only one transaction can be processed with one nonce, and thus that one nonce is "used up".
The other user will receive an error message.
Therefore, in a distributed environment as in the case of las2peer where one account can be used by different services to submit transactions, which can happen simultaneously the nonce in these situations must be synchronised.

@erdzan12 erdzan12 added the bug label Jul 13, 2021
@erdzan12
Copy link
Member Author

A proposed solution is to synchronise the nonce using las2peers distributed storage. This allows for example near simultaneous registrations to be possible as in these case the appropriate nonce is taken.
To allow the modification of the getter methods for the nonce, in the solution a StaticNonceRawTransactionManager wich extends the FastRawTransactionManager is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant