You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of a re-org, MempoolManager.new_peak() is only called with the new peak, however the function early exits if the given peak is not a transaction block:
As such the mempool is not updated correctly in case of a re-org where the new peak is not a transaction block. Only at the next transaction block it will be corrected.
Version
master
What platform are you using?
Linux
What ui mode are you using?
CLI
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
It's not immediately obvious what the best approach to fixing this is. Maybe we could back-track to find the most recent transaction block to see if it matches the current peak.
Another approach, that might be simpler, would be to update self.peak every time we see a block, including non-transaction blocks. That way, a (non-tx) block that doesn't follow in the chain could trigger the mempool reorg
the mempool doesn't have the ability to traverse the blockchain. If it gets a non-tx block that's disconnected from its current peak, it can't step back to find the most recent transaction block.
I think this issue has to be fixed in full_node.py and make sure it only passes transaction blocks to mempool_manager.new_peak()
What happened?
In case of a re-org,
MempoolManager.new_peak()
is only called with the new peak, however the function early exits if the given peak is not a transaction block:chia-blockchain/chia/full_node/mempool_manager.py
Line 622 in cd78dba
As such the mempool is not updated correctly in case of a re-org where the new peak is not a transaction block. Only at the next transaction block it will be corrected.
Version
master
What platform are you using?
Linux
What ui mode are you using?
CLI
Relevant log output
No response
The text was updated successfully, but these errors were encountered: