Fixing replacing transaction with lower gas_price result. #1343
Conversation
There were the following issues with your Pull Request
Guidelines are available at https://github.com/ethcore/parity This message was auto-generated by https://gitcop.com |
2 similar comments
There were the following issues with your Pull Request
Guidelines are available at https://github.com/ethcore/parity This message was auto-generated by https://gitcop.com |
There were the following issues with your Pull Request
Guidelines are available at https://github.com/ethcore/parity This message was auto-generated by https://gitcop.com |
why would |
This should never happen if we assume that queue is always notified by state changes (which should actually be the case right know through The case described here assumes that |
the possibility that it can happen seems like a major bug in itself, no? |
Hmm, It might actually happen when you send transactions locally and manage nonce on your own, but it's imho highly improbable. |
it should be impossible. can you outline when the transactionqueue would get into such a state? |
|
this could be fixed by having transaction queue notified of nonce-changes after block imports, right? |
because 3 is a really big problem - it's very important future transactions get into current when the nonce changes. |
Transaction queue is notified about that, but because we have separate locks for transaction queue and state (client) described situation may happen - i.e. lock for queue can be held (in RPC), and in the meantime state is updated, but transaction queue is not yet notified because we're waiting for lock (in client). |
ahh so s/is not notified/is not yet notified/ |
tx=(sender1, nonce, gas_price)
in future.tx2=(sender1, nonce, gas_price+k)
to current (state nonce changed in the meantime)tx2
should be imported to current (and it was) but error was returned (which was incorrect)