Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Smaller changes regarding stats and sample poolserver configs.

  • Loading branch information...
commit 1c7e05bfc01637e4c5b8f0e09240ede5a67789bf 1 parent 5ce2499
@fbettag authored
View
2  .gitignore
@@ -64,4 +64,4 @@ tm.out
*.tm.epoch
multiverse.log
-src/main/resources/props/default.props
+src/main/resources/props/*.default.props
View
4 configs/blkmon.cfg
@@ -0,0 +1,4 @@
+host=127.0.0.1
+port=8332
+pid=/tmp/pushpoold.pid
+
View
507 configs/local-daemon.properties
@@ -0,0 +1,507 @@
+################################################################
+# Includes #
+################################################################
+
+### This allows you to include other properties files by including a comma delimited list of filenames.
+### The path is relative to the location of THIS properties file.
+###
+### This may be useful for testing/troubleshooting scenarios allowing you split database config or
+### any other block of config to a seperate file for easy changes.
+###
+### Properties are accumlated and overwritten in order. e.g. if the same property appears in this
+### file and in one the include files the include property will take precedence.
+### Included properties files can also use the include property. File are processes by walking the tree
+### e.g. this file, 1st include file, 1st include file's include file, 2nd include file.
+### If you precede the list with a '!' char this will prevent conficts and throw an error if any
+### included property overwrites one that is already set. Child properties can also set this flag.
+### prefix with '!!' will force the conflicts flag to be inherited and conflict flags in child properties
+### will be ignored. You can set the inheritance flag in a child properties file and it will only apply
+### to children of that properties file.
+
+#include=props1/debug.properties
+
+################################################################
+# General Config #
+################################################################
+
+### Turns on logging of full stacks traces. This could potentially make your error log huge so don't use unless
+### unless you're trying to track down a known problem.
+debug=true
+logStacktraces=true
+pidFile=tmp/poolserverj.pid
+
+### Typically only used for stress testing and benchmarking. Sets difficult to
+### target that requires only 1-2 hashes to solve a block.
+useEasiestDifficulty=false
+
+### This is for beta testing only, this will be deprecated after confirming valid blocks are always
+### pushed up to a local bitcoin daemon
+forceAllSubmitsUpstream=true
+
+### default: true. Safe restart cause the server to dump it's mappings of work to worker to a file on shutdown
+### and reload them on next startup. This is only relevant if the server is going to be restarted in the
+### current block or next block. If the server is started any later than that the map will be discarded after
+### it is reloaded.
+### for small pools this should have a negligible delay but for larger pools the map can be of the order of
+### a few hundred MB with an increase in shutdown/start time of a few seconds. The highest seen under load tests
+### is 10-20 seconds each way.
+### the file is located at tmp/workmap-<listen port>.bin
+
+enableSafeRestart=true
+
+### currently only HTTP JSON-RPC supported
+listen.http.json-rpc.port=8337
+listen.http.json-rpc.path=/
+
+listen.longpoll.enable=true
+
+### listen.longpoll.http.json-rpc.port=8999 ##deprecated now parsed from listen.longpoll.http.json-rpc.url
+### pass the full url not just the path
+### IMPORTANT! longpoll path MUST END WITH A TRAILING SLASH. If it does not it will be added. Java servlets are fussy
+### about URLs conforming to spec.
+### Also note that some miners do not handle the X-Long-Polling header properly (e.g. Phoenix). It is supposed
+### to be able to handle a full URL including port but Phoenix 1.50 for example will poll the new url on the main port even
+### if a different port is specified so for this reason we recommend using the same port as the main listener.
+
+listen.longpoll.http.json-rpc.url=http://localhost:8337/LP
+
+### There is a theoretical limit based on server resources so it should be configurable.
+### as of beta 0.2.0 this is not longer relevant. Any number of LP connections can be supported.
+#listen.longpoll.http.json-rpc.maxConnections=1000
+
+### in seconds
+#listen.longpoll.http.json-rpc.timeout=600
+
+
+################################
+# DDos Resilience #
+################################
+
+### There are two options for DDos resilience, both provide significant protection against low level DDoS attacks.
+### They can be enabled individually or together. Each will add a slight overhead to request processing so if you
+### already have DDoS protection consider disabling.
+### Note that this protection is at the webserver level. If you are under an attack large enough to clag your
+### ip stack then the requests may not even be getting this far. Consider using a more low level type protection if
+### DDoS is a real threat for your pool.
+
+### QoS Filter prioritizes incoming requests for authenticated users. It also grants additional priority to those
+### users that have submitted valid proof of work in the current or previous blocks. This provides some level of
+### protection against a flood of useless requests.
+
+enableQoS=true
+QoSMaxRequestsToServiceConcurrently=55
+
+### DoSFilter provides rate limiting and throttling on a per connection (ip + port) basis.
+### Adds an additional level of DoS protection against a single client DoS attacks but QoS Filter will probably
+### be more effective against DDoS.
+
+enableDoSFilter=false
+DoSFilterMaxRequestsPerSecondBeforeThrottle=10
+
+################################
+# Notifications #
+################################
+
+### If set PoolServerJ will send a notification on block change so you know when to process shares
+### without needing to constantly poll the database.
+### Currently only method support is httpget - if you can suggest any other push type methods let us know.
+### get will be sent with params: ?blockchange=true&blockwon=<true|false>&source=<source.name>
+### This url is not part of PoolServerJ. You can implement a PHP page for example that will react to the call
+### and do you payment processing cycle.
+
+#notify.blockchange.method=httpget
+
+### highly recommend this is not a publicly accessible URL or that you at least check the request is from localhost
+### or you could be open to a DoS by forcing constant payout processing.
+
+#notify.blockchange.url=http://localhost:10001/notifyblockchange-downstream
+
+### server will probably be flat out for a few seconds after a block change servicing getworks so you may not want
+### to be doing huge database queries to process payouts straight away.
+### milliseconds - default 5000
+
+notify.blockchange.delay=5000
+
+################################
+# Management Interface #
+################################
+
+### Allows some calls to be issued to server using HTTP GET requests.
+### Recommended you block this port on your firewall as well but it will ignore all requests unless from an address in
+### the allowedManagementAddresses property
+### current functions supported:
+### flushWorker - removes worker from cache, call this if the worker is changed by your frontend.
+### e.g. http://localhost:8331/?method=flushWorker&name=myworker
+### e.g. http://localhost:8331/?method=shutdown
+
+enableManagementInterface=true
+allowShutdownByManagementInterface=true
+
+### MUST be different to both listen.http.json-rpc.port and longpoll port
+managementInterfacePort=8997
+
+### Forces mgmt interface to only bind to 127.0.0.1
+bindManagementInterfaceOnlyToLocahost=true
+### comma delimited for multiple addresses. This doesn't affect interface bindings, it it verification after the request is received.
+### If bindManagementInterfaceOnlyToLocahost=true this won't work for any addresses other than localhost.
+### If bindManagementInterfaceOnlyToLocahost=false and you only have 127.0.0.1 as an allowed addres external client can still hit the
+## interface but will get an unauthorized response.
+###
+allowedManagementAddresses=127.0.0.1
+
+### Immediately after a block change is the busiest time for both your server and the upstream server trying to refill
+### caches with fresh work. If set true this will allow the weightings to be temporarily skewed by servicing downstream
+### requests from any source that fresh work available. The weightings should even up after a short while but if you
+### have slower pool members that take a long time to process blocks chances are the slower members will spend more time
+### processing work from local sources than the weighting specifies and high speed members will be wieghted more towards
+### remote blocks. Setting to false will mean it takes slightly longer to fill all the getwork requests immediately after
+### a block change. Whether either scenario is better than the other is up to you.
+###
+### not implemented yet
+allowBreakWeightingRulesAfterBlockChange=true
+
+################################
+# Memory Management #
+################################
+
+### Sleep interval (in seconds) before checking worker and work caches for expired entries. This may still happen while sleeping as all entries
+### are checked for expiry conditions whenever they are retrieved.
+flushCacheInterval=20
+
+### In seconds. Period to cache workers in memory to avoid constant hits to the database. You can set this to a long value if you
+### use the flushworker call (see allowedManagementAddresses)
+### This also caches unknown usernames to protect against a flood of database hits from unregistered workers.
+workerCacheExpiry=3600
+
+### When work is issued a unique portion is stored internally in a map. This map can grow very large.
+### If a worker submits work and it is not in this map an 'unknown-work' response will be issued unless
+### the work is in the previous block's map in which case a 'stale-work' will be issued.
+### pushpoold has a hardcoded cache timeout of 120 seconds. So it's reasonable to expect that most miners
+### will not try to retain work for longer than this period. Shorten it at your peril.
+### -1 = no trimming of work map. This *may* yield small performance improvements at the cost of quite a lot
+### of memory usage (especially on long blocks).
+### (seconds)
+maxAgeToMapWorkSource=130
+
+
+################################
+# X-Mining-Extensions #
+################################
+
+### NOTE: As of v0.2.3 mining extensions are only partially implemented and not functional.
+
+### To understand what the different mining extensions do see https://en.bitcoin.it/wiki/Getwork
+
+### float. Noncerange is calculated based on hashrate reported by the miner. So to ensure
+### The range provides enough space that miner doesn't run out of nonces in 1 second we can
+### pad the nonce range to allow some headroom.
+### basically this number is the approximate number of seconds the noncerange should last for
+### before the miner uses up all the nonce space. If rollNTime is enabled then 2 should be
+### plenty of headroom. If not then you'll probably want a much bigger number like 120
+### so the worker doesn't need to refresh work for 2 minutes.
+### set to -1 to disable nonceRange
+#nonceRangePaddingFactor=20.0
+
+### This is the period (in seconds) that the miner is allowed to roll the timestamp of the delivered
+### work and still have it considered valid when submitted as a share
+### THIS MUST BE <= maxAgeToMapWorkSource. If it is not then work entries may be deleted from the work map
+### whilst the miner is still working on it and when it does eventually submit it will receive a 'stale'.
+### It is recommended to set this a few seconds below maxAgeToMapWorkSource.
+### set to -1 to disable rollNTime
+#rollNTimeExpire=120
+
+################################################################
+# Logging #
+################################################################
+
+### output to logs and to database will be in the same format as pushpool. Use this if you want a drop in replacement for pushpool.
+### if false you will get some extra data logged including blocknumber and the name of the work source that provided each share.
+### Note: the database definition will be slightly different for non-compatability mode in the shares table:
+### time column should be a TIMESTAMP
+### our_result and upstream result should be a BOOLEAN or INT(1)
+
+## ensure db.stmt.insertShare is set to the appropriate INSERT statement
+usePushPoolCompatibleFormat=true
+
+### if path is relative it will be relative to the directory that the runtime jar file
+### windows users use forward slashes or double backslashes i.e.
+### C:/pool/log/error.log or C:\\pool\\log\\error.log
+#errorLogFile=log/error.log
+#stdOutLogFile=log/out.log
+
+### the following two can be commented out if you don't want file logging. Note though that requests are not logged to database
+### so this is your only option for if you want to record them.
+sharesLogFile=log/client-shares.log
+requestsLogFile=log/client-requests.log
+
+
+################################################################
+# Logging Requests #
+################################################################
+
+### don't cache requests, flush straight to file.
+request.flushToFilesImmedate=false
+request.maxRequestsToQueueBeforeCommit=100
+### seconds
+request.maxRequestAgeBeforeCommit=5
+### send requests to stdout
+requestsToStdout=false
+
+################################################################
+# Logging Shares #
+################################################################
+
+### flush new shares straight to file. - database logging will still use caching if enabled.
+shares.flushToFilesImmedate=false
+### to disable caching and force direct database write set this to 0.
+shares.maxEntrysToQueueBeforeCommit=5000
+### seconds
+shares.maxEntryAgeBeforeCommit=10
+### send shares to stdout
+sharesToStdout=false
+
+################################################################
+# Submitting Shares Upstream #
+################################################################
+
+### Hardcoded maximum of 10
+submit.maxConcurrentSubmitRequests=5
+### in milliseconds = max 1000
+submit.minIntervalBetweenHttpRequests=0
+### max 3
+submit.maxSubmitRetryOnConnectionFail=3
+
+################################################################
+# Database #
+################################################################
+
+################################
+# Custom Engines #
+################################
+
+### if you want to replace the standard engines for authetication with different implementations
+### you can set these options. You must specify the engines using the fully qualified class name
+### If specifying a custom engine you provide an engine with specific constructor signature
+### as the engine are instantiated by reflection.
+
+### This engine manages the fetching of workers from the database (or whereever else you want to
+### store them.
+### Required Constructor signature: (String[] extraParams)
+#db.engine.workerFetch=com.shadworld.poolserver.db.worker.WorkerDBFetchEngine
+
+### This allows some extra config of your custom engine. It is a comma delimited list
+### which will be passed to your constructor as an array of strings (String[] extraParams). An empty
+### entry in the list i.e. 'param1,,param3' will be passed as an empty string
+### If you require non String arguments you must parse these into the appropriate type in
+### you constructor. e.g. Integer.parseInt(extraParams[0]);
+### Sorry no escape char. If you need to use a delimited list as one of your params you'll need
+### to use a different delimiter.
+#db.engine.workerFetch.extraParamps=param1,,param3
+
+### This engine allows for customised Authentication behaviour. Not really a database engine
+### but better to keep them all together.
+### Required Constructor signature: (WorkerProxy workerProxy, String[] extraParams)
+#authenticatorEngine=com.shadworld.poolserver.servlet.auth.WorkerAuthenticator
+### @see comments for #db.engine.workerFetch.extraParams property
+#authenticatorEngine.extraParams=param1,param2,param3
+
+#authenticatorEngine=com.shadworld.poolserver.servlet.auth.AnyPasswordWorkerAuthenticator
+
+#authenticatorEngine.extraParams=true,false
+
+### This engine handles logging of shares to database (it is separate from file and stdout logging)
+### Required Constructor signature: (ShareLogger shareLogger, String tempFilename, String[] extraParams)
+#db.engine.shareLogging=com.shadworld.poolserver.db.shares.DefaultPreparedStatementSharesDBFlushEngine
+
+### @see comments for #db.engine.workerFetch.extraParams property
+#db.engine.shareLogging.extraParams=param1,param2
+
+### see source for other available engines
+#db.engine.shareLogging=com.shadworld.poolserver.db.shares.bulkload.JavaPipesBulkLoader
+#db.engine.shareLogging=com.shadworld.poolserver.db.shares.bulkload.DirectFifoBulkLoader
+
+
+### Only required for some of the BulkLoader engines that use local fifos or temp files.
+### See notes in source of those engines for requirements to use these features.
+#db.engine.shareLogging.tempfile=/tmp/mysql/fifo
+
+################################
+# Database Connections #
+################################
+
+### Shares and Workers operation use two seperate connections internally. By default
+### these both use the same set of parameters. If you want to use different connections
+### you specify either some or all connection parameters individually.
+### The set of parameters that can be set like this are:
+### db.engine, db.host, db.port, db.name, db.schema, db.file, db.user, db.password, db.url
+###
+### To customise a parameter simply add a new property in the following format:
+### db.shares.schema=shares_schema or sb.worker.schema=worker_schema
+###
+### The config process will first check for a customised parameter and if not present
+### will fall back to the standard parameter i.e. db.schema
+### If you only want to change one you can use the standard parameters for all except the
+### one that differs.
+
+db.column.username=username
+db.column.password=password
+db.column.id=id
+### this column should contain a comma delimited list of ip addresses or hostnames.
+### if this property is not set then host validation will be disabled.
+#db.column.allowHosts=allowed_hosts
+
+
+### postgresql ###
+
+db.engine=postgresql
+db.host=127.0.0.1
+db.name=pushpool
+#db.schema=poolserverj_native
+db.port=5432
+db.user=pushpool
+db.password=
+
+db.stmt.selectWorker=SELECT * FROM pool_worker WHERE username = ?
+db.stmt.insertShare=INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, timestamp_c, source) values (?, ?, ? :: boolean, ? :: boolean, ?, decode(?, 'hex'), NOW(), ?)
+
+################################################################
+# Upstream Sources #
+################################################################
+
+
+###
+### These are your sources of work. Local sources are typically bitcoin daemons.
+###
+### You can have more than one of either type of source. For example your bitcoin daemon may be struggling to keep
+### up with requests so you can run a 2nd daemon on another machine and use it as a 2nd source to speed up your getwork
+### delivery.
+###
+### If you do have more than a single source it is recommended
+### that you add a 'source' column to your shares table in your database so you can track which source winning blocks
+### came from.
+###
+### To use multiple sources simply use a different numbered prefix for each of the properties.
+### i.e. source.local.1.name=local bitcoin daemon1
+### source.local.2.name=local bitcoin daemon2
+### Make sure you do this for each of the properties for that source and make sure you give them all unique names
+### for tracking.
+### Make sure you read the comment for the source.local.1.weighting property, this explains how work is divided among
+### sources.
+
+#################################################
+# Local Source #
+#################################################
+
+
+#source.local.1.disabled=true
+
+source.local.1.name=localmachine
+source.local.1.url=http://127.0.0.1:8332/
+source.local.1.username=my-bitcoind-user
+source.local.1.password=my-bitcoind-pass
+
+### Perhaps the most important setting, weighting determines how many requests will come from each source.
+### The approximate percentage of requests serviced but this source is weighting / sum(all weightings) * 100.
+### e.g. if you have source.local.1.weighting=25 and source.remote.1.weighting=75, 25% of requests will be serviced
+### by source.local.1
+source.local.1.weighting=100
+
+### this is per source, so don't go overboard if you've got multiple sources or you might clog up your machine with masses of concurrent threads
+### with a local client testing has shown 10 is a good number. More or Less reduced performance. For high latency connection you may want to try higher.
+### BUT if the source supports multiget mode you probably don't want this much higher than 3.
+source.local.1.maxConcurrentDownloadRequests=20
+### no need to go to high since submits are far more rare than requests.
+source.local.1.maxConcurrentUpstreamSubmits=3
+### in seconds - age is the time between now and when the work was fetched from the source.
+source.local.1.maxWorkAgeToFlush=3000
+### in milliseconds = max 1000
+source.local.1.minIntervalBetweenHttpRequests=0
+### in milliseconds = max 1000 - alternate value used immediately after a block change
+source.local.1.minIntervalBetweenHttpRequestsWhenFrantic=0
+### max works to cache. Server will continually poll upstream until the cache has reached this limit.
+
+### as soon as it drops under this number it will start polling again to keep the cache full.
+### work can be removed from cache either by delivering to a client or by sitting there for longer than
+### maxWorkAgeToFlush
+source.local.1.maxCacheSize=10000
+### maximum time in milliseconds to wait for the cache to return work before giving up and returning an error result.
+source.local.1.cacheWaitTimeout=3000
+
+### The following settings are only relevant to local sources:
+
+### allow non getwork requests to be passed through to this source as a proxy.
+### If true methods allowed are filtered by source.local.1.allowPassthruMethods
+### getblocknumber is always allowed and returns the latest block number from any source
+source.local.1.allowJSON-RPCPassthru=false
+
+### comma delimited list of method names that are allowed to pass through.
+source.local.1.allowedPassthruMethods=
+
+### defaults to min difficulty: ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
+### don't know why you'd want different difficulty per source but it's there if you need it.
+#source.local.1.rewriteDifficultyTarget=ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
+
+###default true = set to false if you want to PoolServerJ as a proxy for non-pool mining
+#source.local.1.rewriteDifficulty=false
+
+
+##################################################
+## remote Source #
+##################################################
+
+source.remote.1.disabled=true
+
+### This should be unique. If you are not using pushpool compatability mode for logging then this will be added
+### to share logs so you can track where the shares are going.
+source.remote.1.name=backup
+
+### url including port i.e. http://localhost:8332/
+source.remote.1.url=http://backuphost:8332/
+### json-rpc username - for standard bitcoind this is set in bitcoin.conf (rpcuser)
+source.remote.1.username=rpcuser
+### json-rpc password - for standard bitcoind this is set in bitcoin.conf (rpcpassword)
+source.remote.1.password=rpcpassword
+
+### Perhaps the most important setting, weighting determines how many requests will come from each source.
+### The approximate percentage of requests serviced but this source is weighting / sum(all weightings) * 100.
+### e.g. if you have source.local.1.weighting=25 and source.remote.1.weighting=75, 25% of requests will be serviced
+### by source.local.1
+source.remote.1.weighting=50
+
+### this is per source, so don't go overboard if you've got multiple sources or you might clog up your machine with masses of concurrent threads
+### with a local client testing has shown 10 is a good number. More or Less reduced performance. For high latency connection you may want to try higher.
+### BUT if the source supports multiget mode you probably don't want this much higher than 3.
+source.remote.1.maxConcurrentDownloadRequests=20
+### no need to go to high since submits are far more rare than requests.
+source.remote.1.maxConcurrentUpstreamSubmits=3
+### in seconds - age is the time between now and when the work was fetched from the source.
+source.remote.1.maxWorkAgeToFlush=3000
+### in milliseconds = max 1000
+source.remote.1.minIntervalBetweenHttpRequests=0
+### in milliseconds = max 1000 - alternate value used immediately after a block change
+source.remote.1.minIntervalBetweenHttpRequestsWhenFrantic=0
+### max works to cache. Server will continually poll upstream until the cache has reached this limit.
+### as soon as it drops under this number it will start polling again to keep the cache full.
+### work can be removed from cache either by delivering to a client or by sitting there for longer than
+### maxWorkAgeToFlush
+source.remote.1.maxCacheSize=10000
+### maximum time in milliseconds to wait for the cache to return work before giving up and returning an error result.
+source.remote.1.cacheWaitTimeout=30000
+
+### The following settings are only relevant to local sources:
+
+### allow non getwork requests to be passed through to this source as a proxy.
+### If true methods allowed are filtered by source.local.1.allowPassthruMethods
+### getblocknumber is always allowed and returns the latest block number from any source
+source.remote.1.allowJSON-RPCPassthru=false
+
+### comma delimited list of method names that are allowed to pass through.
+source.remote.1.allowedPassthruMethods=
+
+### defaults to min difficulty: ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
+### don't know why you'd want different difficulty per source but it's there if you need it.
+#source.remote.1.rewriteDifficultyTarget=ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000
+
+###default true = set to false if you want to PoolServerJ as a proxy for non-pool mining
+#source.remote.1.rewriteDifficulty=false
+
View
66 configs/server.json
@@ -0,0 +1,66 @@
+{
+ # network ports
+ "listen" : [
+ # binary protocol (default), port 8336
+ { "host" : "0.0.0.0", "port" : 8336 },
+
+ # HTTP JSON-RPC protocol, port 8337
+ { "host" : "0.0.0.0", "port" : 8337, "protocol" : "http-json" }
+
+ # HTTP JSON-RPC protocol, port 8339,
+ # with trusted proxy appserver.example.com forwarding
+ # requests to us
+ #{ "port" : 8337, "protocol" : "http-json",
+ # "proxy" : "appserver.example.com" },
+
+ # binary protocol, localhost-only port 8338
+ #{ "host" : "127.0.0.1", "port" : 8338, "protocol" : "binary" }
+ ],
+
+ # database settings
+ "database" : {
+ "engine" : "postgresql",
+
+ "host" : "localhost",
+
+ "port" : 5432,
+
+ "name" : "pushpool",
+ "username" : "pushpool",
+ "password" : "mypassword",
+
+ "sharelog" : true,
+ "stmt.pwdb" : "SELECT password FROM pool_worker WHERE username = $1",
+ "stmt.sharelog" : "INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution, timestamp_c) values ($1, $2, $3, $4, $5, decode($6, 'hex'), NOW())"
+
+ },
+
+ # cache settings
+ "memcached" : {
+ "servers" : [
+ { "host" : "127.0.0.1", "port" : 11211 }
+ ]
+ },
+
+ "pid" : "/tmp/pushpoold.pid",
+
+ # overrides local hostname detection
+ "forcehost" : "coinmines",
+
+ "log.requests" : "/opt/pushpool/tmp/request.log",
+ "log.shares" : "/opt/pushpool/tmp/shares.log",
+
+ # the server assumes longpolling (w/ SIGUSR1 called for each blk)
+ "longpoll.disable" : false,
+
+ # length of time to cache username/password credentials, in seconds
+ "auth.cred_cache.expire" : 75,
+
+ # RPC settings
+ "rpc.url" : "http://127.0.0.1:8332/",
+ "rpc.user" : "my-bitcoind-user",
+ "rpc.pass" : "my-bitcoind-pass",
+
+ # rewrite returned 'target' to difficulty-1?
+ "rpc.target.rewrite" : true
+}
View
5 src/main/scala/code/model/Share.scala
@@ -76,4 +76,9 @@ class Share extends LongKeyedMapper[Share] with IdPK {
override def dbNotNull_? = true
}
+ object source extends MappedString(this, 255) {
+// override def dbNotNull_? = true
+ }
+
+
}
View
13 src/main/scala/code/snippet/Stats.scala
@@ -64,19 +64,28 @@ class Stats extends Loggable {
case _ => 0.0
}
}
+
+ def poolworkers = PoolWorker.count(By_>(PoolWorker.hashrate, 0))
/* snippets */
+ def hostname = "*" #> S.hostName
+
def global = {
".global_hashrate *" #> "%.1f GH/sec".format(hashrate(Empty) / 1000.0) &
+ ".global_workers *" #> poolworkers.toString &
".global_payout *" #> "%.2f BTC".format(50.00)
}
def user = {
val user = User.currentUser.open_!
- ".user_hashrate *" #> "%s MH/sec".format(hashrate(Full(user))) &
- ".global_payout *" #> "%.2f BTC".format(50.00)
+ ".user_hashrate *" #> "%s MH/sec".format(user.hashrate.toFloat) &
+ ".user_shares_total *" #> user.shares_total.toString &
+ ".user_shares_round *" #> user.shares_round.toString &
+ ".user_shares_stale *" #> user.shares_stale.toString &
+ ".user_shares_round_estimate *" #> user.shares_round_estimate.toString &
+ ".user_payout *" #> "%.2f BTC".format(0.00)
}
}
View
8 src/main/webapp/account.html
@@ -95,8 +95,8 @@
</span>
<span class="bio">
- <strong>poclbm.exe --host=coinmines.host --port=8337 --user=worker_name --pass=worker_pwd -d 1</strong><br/><br/>
- <strong>phoenix.exe -u http://worker_name:worker_pwd@the.coinmines.com:8337/ -k poclbm DEVICE=1</strong><br/><br/>
+ <strong>poclbm.exe --host=<span class="lift:Stats.hostname"></span> --port=8337 --user=worker_name --pass=worker_pwd -d 1</strong><br/><br/>
+ <strong>phoenix.exe -u http://worker_name:worker_pwd@<span class="lift:Stats.hostname"></span>:8337/ -k poclbm DEVICE=1</strong><br/><br/>
</span>
</div>
@@ -106,8 +106,8 @@
</span>
<span class="bio">
- <strong>./poclbm.py --host=coinmines.host --port=8337 --user=worker_name --pass=worker_pwd -d 1</strong><br/><br/>
- <strong>./phoenix.py -u http://worker_name:worker_pwd@the.coinmines.com:8337/ -k poclbm DEVICE=1</strong><br/><br/>
+ <strong>./poclbm.py --host=<span class="lift:Stats.hostname"></span> --port=8337 --user=worker_name --pass=worker_pwd -d 1</strong><br/><br/>
+ <strong>./phoenix.py -u http://worker_name:worker_pwd@<span class="lift:Stats.hostname"></span>:8337/ -k poclbm DEVICE=1</strong><br/><br/>
<br/>
</span>
</div>
View
25 src/main/webapp/stats.html
@@ -13,6 +13,23 @@
<th>Hashrate</th>
<td class="user_hashrate"></td>
</tr>
+ <tr>
+ <th>Shares Total</th>
+ <td class="user_shares_total"></td>
+ </tr>
+ <tr>
+ <th>Shares this Round</th>
+ <td class="user_shares_round"></td>
+ </tr>
+ <tr>
+ <th>Stale Shares</th>
+ <td class="user_shares_stale"></td>
+ </tr>
+ <tr>
+ <th>Payed out to date</th>
+ <td class="user_payout"></td>
+ </tr>
+
</table>
</div>
</div>
@@ -29,6 +46,14 @@
<th>Hashrate</th>
<td class="global_hashrate"></td>
</tr>
+ <tr>
+ <th>Active Workers</th>
+ <td class="global_workers"></td>
+ </tr>
+ <tr>
+ <th>Payed out to date</th>
+ <td class="global_payout"></td>
+ </tr>
</table>
</div>
</div>
View
2  src/main/webapp/templates-hidden/about.html
@@ -1,7 +1,7 @@
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
<span class="primary">
- <strong><a href="/" class="fn url">&copy; 2011 CoinMines</a></strong>
+ <strong><a href="http://coinmines.com" class="fn url">&copy; 2011 CoinMines</a></strong>
<span class="role">Bitcoin Mining Pool</span>
</span>
Please sign in to comment.
Something went wrong with that request. Please try again.