-
Notifications
You must be signed in to change notification settings - Fork 25
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
An eth_estimate
request uses stale state in a mining node.
#109
Comments
given issue could be solved by executing so if refreshPending() is executed whether or not mining token is acquired, pending state will update the current block as soon as it's propagated.
need more check if any side effects though.. |
In Ethereum v1.10.15 using PoW, In Wemix, however, |
For reference, this issue does not occur on the mainnet. This is because miners on the mainnet do not receive transactions directly. There are two ways to resolve this issue:
Option 1 is more desirable because it reflects the transactions of the currently created block in the pending state. In option 2, since the transaction receipts cannot yet be obtained, it is not possible to reflect the currently processed transactions in the pending state, and the only option is to refresh with the state of the latest block. |
After investigating this issue, I hope to solve the following three problems.
|
the issue is fixed in #111. close the issue |
System information
All go-wemix version.
Expected behaviour
Some tx to a mining node is failed as the tx processor does not refer the latest state.
But other call requests getting some info are processed successfully.
The difference between the tx request and the information inquiry request is that the tx request gets the state through the
pending
block, and the information inquiry request gets the state through thelatest
block.When we analyzed the cause, it was a problem that the update of the pending block was a little late, in Wemix, the logic of updating the
pending
block in the EN node and mining node is slightly different.Here is debugging log.
Based on the above log, the following logic sequence can be found.
mining token
(not mining in this turn)mining token
.Expected behavior
mining node should update pending block as soon as possible when it receives new block
Steps to reproduce the behaviour
reproduction conditions:
Backtrace
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: