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

multi: single miner endpoint. #274

Merged
merged 14 commits into from
Dec 10, 2020
Merged

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Oct 27, 2020

No description provided.

@dnldd dnldd force-pushed the single_miner_endpoint branch 2 times, most recently from fb2a537 to 240f0dc Compare November 3, 2020 10:22
This updates the miner connection config options,
removing the individual config ports for supported
miners in favour of a single miner connection port
(--minerport).
This updates the reported miner version in a
mining.subscribe message to exclude the appBuild.
This updates the endpoint config to allow finding a
connected miner's difficulty. Helpers have also been
added to identify a miner based on th user agent
provided  in its mining.subscribe message. A client
disconnection process has also been added. The hub
ha also been updated to only create one endpoint for
all miner types.
This adds  --monitorcycle and --maxupgradetries config
options to allow configuring the the time spent monitoring
miners for upgrades if possible.
This updates the client to provide more context for message
related errors and also provides an upgrade process that
monitors clients that qualify for upgrades.
This adds aditional error checks and clamp the minimum
value of the difference in expected submissons and actual
submissions to one.
@dnldd
Copy link
Member Author

dnldd commented Nov 27, 2020

Tested miner monitoring and upgrade logic with a DR5 on mainnet. Initially recognized as a DR3 and later upgrading to a DR5 per the upgrade path.

2020-11-27 19:26:11.637 [INF] POOL: listening on :5550
2020-11-27 19:29:25.140 [DBG] POOL: Mining client connected. extranonce1=ca750c60, addr=166.170.24.8:35258
2020-11-27 19:29:32.007 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:29:33.659 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:29:40.999 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:29:46.569 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:29:48.109 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:29:52.109 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:29:56.349 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:06.370 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:09.189 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:15.849 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:22.246 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:25.340 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:38.170 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:46.229 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:30:50.579 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:31:01.999 [ERR] POOL: submitted work from ca750c60/antminerdr3 is not less than the network target difficulty
2020-11-27 19:31:25.143 [INF] POOL: upgrading ca750c60/antminerdr3 to ca750c60/antminerdr5
2020-11-27 19:31:25.143 [INF] POOL: updated difficulty (228174.031) for ca750c60/antminerdr5 sent
2020-11-27 19:33:06.719 [ERR] POOL: submitted work from ca750c60/antminerdr5 is not less than the network target difficulty
2020-11-27 19:34:43.039 [ERR] POOL: submitted work from ca750c60/antminerdr5 is not less than the network target difficulty
2020-11-27 19:35:13.256 [ERR] POOL: submitted work from ca750c60/antminerdr5 is not less than the network target difficulty
2020-11-27 19:35:38.966 [ERR] POOL: submitted work from ca750c60/antminerdr5 is not less than the network target difficulty
2020-11-27 19:35:46.516 [ERR] POOL: submitted work from ca750c60/antminerdr5 is not less than the network target difficulty

@dnldd dnldd marked this pull request as ready for review November 30, 2020 13:18
README.md Outdated Show resolved Hide resolved
gui/assets/templates/index.html Outdated Show resolved Hide resolved
gui/assets/templates/index.html Show resolved Hide resolved
gui/assets/templates/index.html Outdated Show resolved Hide resolved
gui/assets/templates/index.html Outdated Show resolved Hide resolved
pool/client_test.go Show resolved Hide resolved
pool/client_test.go Outdated Show resolved Hide resolved
pool/endpoint.go Outdated Show resolved Hide resolved
pool/endpoint.go Outdated Show resolved Hide resolved
pool/hub.go Outdated Show resolved Hide resolved
This splits client related tests into focused
units to test out targetted functionality.
Copy link
Member

@jholdstock jholdstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me! Thanks for taking the time to split up the tests, they will definitely be more manageable going forward.

@dnldd dnldd merged commit 305453d into decred:master Dec 10, 2020
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.

2 participants