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

Handling of 'nonce too low' error by the oracle #98

Closed
akolotov opened this issue Jun 7, 2019 · 1 comment · Fixed by #99
Closed

Handling of 'nonce too low' error by the oracle #98

akolotov opened this issue Jun 7, 2019 · 1 comment · Fixed by #99
Labels
bug Something isn't working oracle related to TokenBridge oracle

Comments

@akolotov
Copy link
Collaborator

akolotov commented Jun 7, 2019

There are two scenarios when the oracle sender could start receiving the message like this:

Jun 06 19:32:20 POA_AWS bridge_bridge_senderforeign_1/7bf82289aae5: {"level":50, "time":1559849540490,"msg":"Tx Failed for event Tx 0x659f73508bf4fb595b175945fd8c334072ca28efac8d79f1ee933044f221c516. nonce too low","name":"sender-foreign","eventTransactionHash":"0x659f73508bf4fb595b175945fd8c334072ca28efac8d79f1ee933044f221c516","error":"nonce too low","v":1}
  1. A validator picked up a low gas price for the transaction and the transaction was dropped out by timeout for the txpool.
  2. A transaction was sent manually by using the same private key as the bridge validator has.

As soon as the issue happens it is necessary to restart the corresponding validator's node.

It is necessary to investigate the ability to handle such cases automatically as so the node will recover without an admin intervention.

@akolotov akolotov added bug Something isn't working oracle related to TokenBridge oracle labels Jun 7, 2019
@patitonar
Copy link
Contributor

Handling the nonce too low error is considered on the code. When this error appears, the sender is forced to read the nonce again from the blockchain instead of getting it from redis, which later is updated.

https://github.com/poanetwork/tokenbridge/blob/a669ea622cb4ae3cb694a119242ba1c6c1482a94/oracle/src/sender.js#L155-L160

It seems that the error message changed a little and now is nonce too low instead of Transaction nonce is too low. It makes sense to update line 156 to nonce too low to catch the two variations of the error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working oracle related to TokenBridge oracle
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants