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

Solution Tracking #592

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

JamesPiechota
Copy link
Collaborator

@JamesPiechota JamesPiechota commented Jul 17, 2024

PR in process to allow tracking solution status as it is updated. PR grew into a refactoring of the CM/Pool code since solution status can be updated at any of several nodes depending on the mining configuration.

One change not yet implemented that I'd plan to do later: have nodes report solution status to each other via a new POST /xxxx endpoint rather than have the solution status be returned in an HTTP response. This is to avoid having long running HTTP requests waiting on a tree of other HTTP requests before they learn the solution status.

@ldmberman also suggested an improvement: have some generic way for all nodes to report status to the Pool Server or CM exit node. When we revisit this PR it may be worht giving some thought to how nodes communicate status with each other - i.e. we may not need a dedicated "solution status" endpoint but rather a generic "status" endpoint that all nodes use to keep each other up today.

This change was also beginning to deduplicate the communication protocol - there are several CM and Pool endpoints that do the same thing. When we revist this PR we can also look into having CM operate more like a Pool (e.g. use jobs) this may also allow us to simplify a lot of code by removing redundant endpoints and communication channels.

Also introduce ar_mining_router to route requests based on the
node configuration, e.g.:
solo miner vs. cm miner vs. cm exit node vs. pool miner vs. pool cm
Also consolidate duplicate code for loading PoA from disk or peers
- get rid of the solution evnts and use direct casts
@JamesPiechota JamesPiechota changed the title Track solutions found and rejected for a solo miner Solution Tracking Jul 31, 2024
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.

1 participant