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

Hostnames in config #861

Draft
wants to merge 17 commits into
base: dev
Choose a base branch
from
Draft

Conversation

nikicat
Copy link

@nikicat nikicat commented Apr 19, 2024

This patch allows to specify hostnames in config files instead of just IP addresses. It uses net::ToSocketAddrs to resolve the entry in the config file and proceeds with the first resolved entry. It is useful for cases when an IP address of a peer is not known in advance like running inside Kubernetes or Docker Compose.

@nikicat nikicat marked this pull request as draft April 19, 2024 12:30
@plebhash
Copy link
Collaborator

thanks @nikicat, this looks like a nice improvement

do you have any suggestion with regards to a local setup where these changes could be tested?

@nikicat
Copy link
Author

nikicat commented Apr 24, 2024

I use Docker Compose to test it locally. Actually, this setup was the cause of this PR.

@Fi3
Copy link
Collaborator

Fi3 commented Apr 26, 2024

you can test it using localhost:port or mining.dmnd.work:port port would be 1000 for sv1 or 2000 for sv2

@Fi3 Fi3 deleted the branch stratum-mining:dev May 3, 2024 09:37
@Fi3 Fi3 closed this May 3, 2024
@Fi3 Fi3 reopened this May 3, 2024
@Fi3
Copy link
Collaborator

Fi3 commented May 3, 2024

This PR needs to be rebased on dev

@plebhash
Copy link
Collaborator

plebhash commented May 9, 2024

hey @nikicat I tested this PR and it seems like a great improvement!

we had some changes to the dev branch recently, which forced everyone to rebase their PRs against dev

could you do that on your hostname-in-config branch?

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.

None yet

6 participants