Bitcoin Forum

Bitcoin => Mining => Topic started by: jgarzik on April 09, 2011, 10:09:02 PM



Title: Pool server auto-configuration: /config.json
Post by: jgarzik on April 09, 2011, 10:09:02 PM

Currently, pool server extensions such as long-polling (http://deepbit.net/longpolling.php) provide static configuration information -- the long-polling URL -- via a special HTTP header.  This is sub-optimal, because the long-polling URL is unlikely to change, yet many pool servers utilize the simple approach and send the same LP URL to each mining client, over and over again, wasting bandwidth.

A server list, used in mining client fail-over (something I have been pushing for), would be another example of static configuration information communicated from pool server to client.

Therefore, I began updating cpuminer to download $POOL_SERVER/config.json.  This will look something like

Code:
{ "name" : "slush",
    "description" : "slush's super-big pool",
   "longpoll" : "/LP",
   "ntime" : true,
   "server_list" : [ { "url" : "http://srv1.net" }, { "url":"http://srv2.net" } ]
   "xslush" : {
       "my server-specific option #1" : "my value",
       "my server-specific option #2" : "my value"
   }
}

This should give pool servers a lot more flexibility in defining optional features and metadata, without needing to transmit that information redundantly in every single 'getwork' HTTP header.