Skip to content

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