Post
Topic
Board Pools
Re: Stratum protocol documentation
by
-ck
on 28/05/2014, 10:49:54 UTC
"client.reconnect" discussion

Quote
server restart notification [with timer] so a pool can attempt a graceful restart rather than suddenly dropping connections.

What's the use case for this? If I want to restart the server I can do it without such command as it doesn't require any action from the miner side.

Maybe I can add "wait" option to existing client.reconnect() instead?


The thinking is for when a pool is doing some kind of maintenance (either to update their code/settings, or reboot the machine).  It's "good manners" for the pool to notify the miner in ADVANCE, that way they can move to a fallback pool/server before suddenly losing connection.  A "retry/wait" time should also be included in the restart method, so the miner knows how long it should wait before trying to reconnect.

Example:
Code:
{"id": 0, "method": "client.reconnect", "params":["stratum-lb-usa48.btcguild.com",3333,0]}
The parameters are [URL, port, wait time] as string, integer, integer

If client.reconnect is sent without parameters, the miner is to assume it's to reconnect to the same port and URL.