SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.08k stars 128 forks source link

Add libcurl to p2pool Dockerfile #174

Closed bladedoyle closed 2 years ago

bladedoyle commented 2 years ago

Add libcurl to p2pool Dockerfile Adjust a few monerod options

bladedoyle commented 2 years ago

@SChernykh Was there any change made for p2pool to exit on EOF or not having any STDIN? The latest version exits immediately when run in a docker container (no terminal):

p2pool-p2pool  | 2022-06-15 00:12:24.0040 SideChain consensus ID = 22af7ee7************************************************4407f918
p2pool-p2pool  | 2022-06-15 00:12:24.0042 RandomX_Hasher allocated 2592 MB
p2pool-p2pool  | 2022-06-15 00:12:24.0045 ConsoleCommands started
p2pool-p2pool  | 2022-06-15 00:12:24.0065 ConsoleCommands EOF, stopping
p2pool-p2pool  | 2022-06-15 00:12:24.0065 P2Pool uv_run exited, result = 1
p2pool-p2pool  | 2022-06-15 00:12:24.0065 P2Pool stopped

monerod for example has --non-interactive flag to allow for this.

Edit: I added docker-compose settings to give p2pool a stdin and tty, but maybe consider adding a flag.

Edit2: Still, even though it doesnt exit, p2pool doesnt seen to be running - no logs past "p2pool-p2pool | 2022-06-15 01:39:19.9884 ConsoleCommands started" is there some command needed to make it run now?

Edit3: Hm, its not clear whats going on there. unless you can make a suggestion I'll keep digging and submit a fix when I can.

SChernykh commented 2 years ago

Was there any change made for p2pool to exit on EOF or not having any STDIN? The latest version exits immediately when run in a docker container (no terminal):

Yes. It was probably some debugging that I did while adding libcurl, it shouldn't be there. Submitted the fix: https://github.com/SChernykh/p2pool/commit/921cbb0b69b81478b4aa3e490a409505467c2713

bladedoyle commented 2 years ago

Awesome. That worked.

However, there is another issue I see with p2pool where if monero rpc isnt up yet, the first call from p2pool fails and hangs. No further attempts are made. starting / restarting p2pool only after the moneord process is fully up does work, so I can update the container logic to wait ... but I think it would be much better if p2pool would continue to try even after an rpc call failure. (note this is without using the rpc login and password flag)

I can file an issue for this a bit later today.

bladedoyle commented 2 years ago

This PR is ready to merge.

SChernykh commented 2 years ago

However, there is another issue I see with p2pool where if monero rpc isnt up yet, the first call from p2pool fails and hangs. No further attempts are made.

It should keep retrying. I'll check it.

SChernykh commented 2 years ago

if monero rpc isnt up yet, the first call from p2pool fails and hangs

I couldn't reproduce it during normal operation (not in docker), and it takes too much time to test in docker (monerod sync is slow). Can you start p2pool with log level 6 and paste the p2pool log?