Skip to content

feat: mining-state-machine, display inactive reasons #494

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dan-da
Copy link
Collaborator

@dan-da dan-da commented Mar 7, 2025

draft PR for now. I will add some screenshots and notes later.


closes #423

implements a custom finite-state-machine that processes events in the mining loop and handles state-transitions.

benefits/reasons:

  1. Simplify the complex code in the mining loop so it is more maintainable.

  2. move towards a lock-free mining loop, which means less possibility of delay for miners.

  3. Cleanly support granular display of mining-status, so user can see a message like "waiting for block proposal" rather than just "inactive".

  4. consolidate/unify pause and unpause logic, since pausing can occur for different reasons.

  5. Make the core logic of transitioning between mining states testable via unit tests.

closes Neptune-Crypto#423

implements a custom finite-state-machine that processes events in the
mining loop and handles state-transitions.

benefits/reasons:

1. Simplify the complex code in the mining loop so it is more
   maintainable.

2. move towards a lock-free mining loop, which means less possibility of
   delay for miners.

3. Cleanly support granular display of mining-status, so user can see
   a message like "waiting for block proposal" rather than just "inactive".

4. consolidate/unify pause and unpause logic, since pausing can occur for
   different reasons.

5. Make the core logic of transitioning between mining states testable via
   unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MiningStatus::Inactive is ambiguous.
1 participant