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

Make miner slightly more cautious about state #1077

Merged
merged 5 commits into from
Aug 23, 2022

Conversation

area
Copy link
Member

@area area commented Aug 1, 2022

A recent incident revealed the reputation miner was a bit brittle. It submitted a new reputation hash, but the account being submitted from had (very nearly) run out of xdai, so the transaction was not able to be mined, and just sat pending in the pool with the client awaiting it. When I topped up the miner, the transaction was mined, and the miner continued, but had missed several cycles and so ended up out-of-sync. This PR is intended to fix that issue, by having the miner check that the on-chain accepted state is the one it expects before applying a reputation update log and continuing to mine.

While I was in there, I took the opportunity to abstract some test logic that was repeated in the relevant tests.

@area area force-pushed the maint/miner-slow-mine-fix branch from c8cad03 to 3795492 Compare August 8, 2022 14:27
@area area force-pushed the maint/miner-slow-mine-fix branch from 60cf3c5 to 34b0a03 Compare August 17, 2022 16:21
@kronosapiens kronosapiens merged commit bd192cb into develop Aug 23, 2022
@kronosapiens kronosapiens deleted the maint/miner-slow-mine-fix branch August 23, 2022 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants