This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Staking miner: Check the queue one last time before submission #3740
Labels
U1-asap
No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Such submissions are failing because the miner checks the queue once (which is empty), and then computes a solution for 20 seconds, and then submits it, assuming that the queue is still empty. It should check one last time, after the mining is finish, if the anything exists in the queue or not.
The root cause of this is that the current code requires a full
ext
to check the queue:polkadot/utils/staking-miner/src/monitor.rs
Line 49 in 0a86997
And the
ext
that we are accessing is simply outdated, because it was fetched some 20 seconds ago.The way to solve this is to:
ensure_no_previous_solution
such that it directly query the chain state, not requiring an ext, so that we can be sure that no other solution from us lives in the queue.ensure_no_better_solution
that works in the same manner, but checks that no better solution exists in the queue.The text was updated successfully, but these errors were encountered: