blackmennewstyle / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows.
MIT License
17 stars 35 forks source link

ZEPHYR #55

Closed cimam95 closed 5 months ago

cimam95 commented 6 months ago

Hi Cedric,

Never dealt with RandomX coins before and trying to set it up with the latest release but having a few issues. I followed the steps from monero setup by OliverW. I'm trying to run Zephyr node on the pool as service code:

[Unit]
Description=Zephyr Service
After=network.target

[Service]
Type=forking
User=max
Group=max
WorkingDirectory=/home/max/.zephyr/
ExecStart=/usr/local/bin/zephyrd  --data-dir /home/max/.zephyr/ --log-file /home/max/.zephyr/zephyr.log --non-interactive --rpc-bind-ip 127.0.0.1 --out-peers 32 --p2p-bind-ip 0.0.0.0 --p2p-bind-port 18080
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=10s
StartLimitInterval=120s
StartLimitBurst=5

[Install]
WantedBy=multi-user.target

Getting the following error:

2023-12-30 07:03:48.539     7f81e11b27c0        INFO    global  src/daemon/main.cpp:309 Zephyr 'Osiris' (v1.0.3-31b02c010)
2023-12-30 07:03:48.539     7f81e11b27c0        INFO    global  src/daemon/protocol.h:53        Initializing cryptonote protocol...
2023-12-30 07:03:48.539     7f81e11b27c0        INFO    global  src/daemon/protocol.h:58        Cryptonote protocol initialized OK
2023-12-30 07:03:48.539     7f81e11b27c0        INFO    global  src/daemon/core.h:64    Initializing core...
2023-12-30 07:03:48.539     7f81e11b27c0        INFO    global  src/cryptonote_core/cryptonote_core.cpp:523     Loading blockchain from folder /home/max/.zephyr/lmdb ...
2023-12-30 07:03:48.563     7f81e11b27c0        INFO    global  src/cryptonote_core/cryptonote_core.cpp:698     Loading checkpoints
2023-12-30 07:03:48.563     7f81e11b27c0        INFO    global  src/daemon/core.h:81    Core initialized OK
2023-12-30 07:03:48.563     7f81e11b27c0        INFO    global  src/daemon/p2p.h:64     Initializing p2p server...
2023-12-30 07:03:48.564     7f81e11b27c0        INFO    global  src/daemon/p2p.h:69     p2p server initialized OK
2023-12-30 07:03:48.564     7f81e11b27c0        INFO    global  src/daemon/rpc.h:63     Initializing core RPC server...
2023-12-30 07:03:48.564     7f81e11b27c0        INFO    global  contrib/epee/include/net/http_server_impl_base.h:79     Binding on 127.0.0.1 (IPv4):17767
2023-12-30 07:03:48.564     7f81e11b27c0        INFO    global  src/daemon/rpc.h:69     core RPC server initialized OK on port: 17767
2023-12-30 07:03:48.565     7f81e11b27c0        INFO    global  src/daemon/rpc.h:74     Starting core RPC server...
2023-12-30 07:03:48.565 [SRV_MAIN]      INFO    global  src/daemon/rpc.h:79     core RPC server started ok
2023-12-30 07:03:48.565 [SRV_MAIN]      INFO    global  src/daemon/p2p.h:79     Starting p2p net loop...
2023-12-30 07:03:49.778 [P2P5]  INFO    global  src/cryptonote_protocol/cryptonote_protocol_handler.inl:406     [168.119.137.28:17766 OUT] Sync data returned a new top block candidate: 121059 -> 152851 [Your node is 31792 blocks (22.1 days) behind]
2023-12-30 07:03:49.778 [P2P5]  INFO    global  src/cryptonote_protocol/cryptonote_protocol_handler.inl:406     SYNCHRONIZATION started
2023-12-30 07:04:01.410 [SRV_MAIN]      INFO    global  src/daemon/p2p.h:81     p2p net loop stopped
2023-12-30 07:04:01.411 [SRV_MAIN]      INFO    global  src/daemon/rpc.h:84     Stopping core RPC server...
2023-12-30 07:04:01.412 [SRV_MAIN]      INFO    global  src/daemon/daemon.cpp:228       Node stopped.
2023-12-30 07:04:01.412 [SRV_MAIN]      INFO    global  src/daemon/rpc.h:96     Deinitializing core RPC server...
2023-12-30 07:04:01.412 [SRV_MAIN]      INFO    global  src/daemon/p2p.h:91     Deinitializing p2p...
2023-12-30 07:04:01.423 [SRV_MAIN]      INFO    global  src/daemon/core.h:102   Deinitializing core...
2023-12-30 07:04:01.429 [SRV_MAIN]      INFO    global  src/daemon/protocol.h:75        Stopping cryptonote protocol...
2023-12-30 07:04:01.429 [SRV_MAIN]      INFO    global  src/daemon/protocol.h:79        Cryptonote protocol stopped successfully

It probably is something super simple that I'm missing. Any help would be highly appreciated! Keep up the amazing work!

blackmennewstyle commented 6 months ago

I don't really understand what is your problem here? There is no error. Your node is syncing...

cimam95 commented 6 months ago

If you could kindly share your execution codes for zephyrd and zephyr-wallet-rpc please. Maybe that will help me narrow down where I went wrong.

cimam95 commented 6 months ago

I don't really understand what is your problem here? There is no error. Your node is syncing...

It looks like it starts to sync but then it goes on in the loop without the sync process kicking in, then it completely stops :(

cimam95 commented 6 months ago

Disregard, figured it out. Thank you so much for this release! 💯

cimam95 commented 6 months ago

Sorry another issue. Everything seems to be running and the pool is accepting shares but then MC is spitting out the following issue.

[2023-12-30 03:28:31.5456] [I] [zephyr] [0HN0924MBKJEF] Share accepted: D=7500 
[2023-12-30 03:28:32.4905] [I] [zephyr] [0HN0924MBKJEF] Share accepted: D=7500 
[2023-12-30 03:28:32.5541] [I] [zephyr] [0HN0924MBKJEF] Share accepted: D=7500 
[2023-12-30 03:28:33.7743] [W] [zephyr] Unable to update job. Daemon responded with: Connection refused (127.0.0.1:18081) Code -500 
[2023-12-30 03:28:33.9644] [I] [PayoutManager] Processing payments for pool zephyr 
[2023-12-30 03:28:33.9708] [E] [PayoutManager] [zephyr] Payment processing failed System.Net.Http.HttpRequestException: Connection refused (127.0.0.1:18081)
 ---> System.Net.Sockets.SocketException (111): Connection refused
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Miningcore.Rpc.RpcClient.RequestAsync(ILogger logger, CancellationToken ct, DaemonEndpointConfig endPoint, String method, Object payload) in /home/max/miningcore/src/Miningcore/Rpc/RpcClient.cs:line 188
   at Miningcore.Rpc.RpcClient.ExecuteAsync[TResponse](ILogger logger, String method, CancellationToken ct, Object payload, Boolean throwOnError) in /home/max/miningcore/src/Miningcore/Rpc/RpcClient.cs:line 87
   at Miningcore.Blockchain.Cryptonote.CryptonotePayoutHandler.UpdateNetworkTypeAsync(CancellationToken ct) in /home/max/miningcore/src/Miningcore/Blockchain/Cryptonote/CryptonotePayoutHandler.cs:line 112
   at Miningcore.Blockchain.Cryptonote.CryptonotePayoutHandler.ConfigureAsync(ClusterConfig cc, PoolConfig pc, CancellationToken ct) in /home/max/miningcore/src/Miningcore/Blockchain/Cryptonote/CryptonotePayoutHandler.cs:line 362
   at Miningcore.Payments.PayoutManager.ProcessPoolsAsync(CancellationToken ct) in /home/max/miningcore/src/Miningcore/Payments/PayoutManager.cs:line 99    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Miningcore.Rpc.RpcClient.RequestAsync(ILogger logger, CancellationToken ct, DaemonEndpointConfig endPoint, String method, Object payload) in /home/max/miningcore/src/Miningcore/Rpc/RpcClient.cs:line 188
   at Miningcore.Rpc.RpcClient.ExecuteAsync[TResponse](ILogger logger, String method, CancellationToken ct, Object payload, Boolean throwOnError) in /home/max/miningcore/src/Miningcore/Rpc/RpcClient.cs:line 87
   at Miningcore.Blockchain.Cryptonote.CryptonotePayoutHandler.UpdateNetworkTypeAsync(CancellationToken ct) in /home/max/miningcore/src/Miningcore/Blockchain/Cryptonote/CryptonotePayoutHandler.cs:line 112
   at Miningcore.Blockchain.Cryptonote.CryptonotePayoutHandler.ConfigureAsync(ClusterConfig cc, PoolConfig pc, CancellationToken ct) in /home/max/miningcore/src/Miningcore/Blockchain/Cryptonote/CryptonotePayoutHandler.cs:line 362
   at Miningcore.Payments.PayoutManager.ProcessPoolsAsync(CancellationToken ct) in /home/max/miningcore/src/Miningcore/Payments/PayoutManager.cs:line 99

and this

[2023-12-30 03:33:56.4706] [W] [zephyr] Unable to update job. Daemon responded with: Connection refused (127.0.0.1:18081) Code -500
[2023-12-30 03:33:56.9688] [W] [zephyr] Unable to update job. Daemon responded with: Connection refused (127.0.0.1:18081) Code -500
[2023-12-30 03:33:57.4691] [W] [zephyr] Unable to update job. Daemon responded with: Connection refused (127.0.0.1:18081) Code -500
[2023-12-30 03:33:57.9692] [W] [zephyr] Unable to update job. Daemon responded with: Core is busy Code -9
[2023-12-30 03:33:58.4720] [W] [zephyr] Unable to update job. Daemon responded with: Core is busy Code -9
blackmennewstyle commented 6 months ago

Your wallet-daemon is setup incorrectly, there is an example in the old wiki.

Monero uses a RPC protocol not fully supported by miningcore, so you must follow the directive which disables the rpc-login.

WARNING: Please make sure to do not expose that port to the world wide web, otherwise people will be able to steal your funds.

You can also use the default ports of ZEPH. Uses zephyrd --help in order to get them. Do the same with the wallet-daemon.

I can't really help you more at the moment, i don't have access to my computer but the XMR wiki should help you in order to configure both daemons, don't be afraid to read it.

You should master these daemons if you want to run a XMR/ZEPH minng pool, it's your first duty as a mining pool operator.