Improved dist configuration file

* Added more inline documentation
* Removed array notation for config
* Added defaults to documentation

This should help newcomers get setup. All options are now documented and
explained throughout the configuration file.
This commit is contained in:
Sebastian Grewe 2013-06-30 13:35:04 +02:00
parent d7182ce74f
commit 5436be049d

View File

@ -17,79 +17,222 @@ define('DEBUG', 0);
// SALT used to hash passwords // SALT used to hash passwords
define('SALT', 'PLEASEMAKEMESOMETHINGRANDOM'); define('SALT', 'PLEASEMAKEMESOMETHINGRANDOM');
$config = array(
'price' => array(
'url' => 'https://btc-e.com/api/2',
'target' => '/ltc_usd/ticker',
'currency' => 'USD' // Used in ministats template
),
/** /**
* Another Example for API * Database configuration
'price' => array( *
'url' => 'http://www.coinchoose.com', * A MySQL database backend is required for mmcfe-ng.
'target' => '/api.php', * Also ensure the database structure is imported!
'currency' => 'BTC' * The SQL file should be included in this project under the `sql` directory
), *
* Default:
* host = 'localhost'
* port = 3306
* user = 'someuser'
* pass = 'somepass'
* name = 'mmcfe_ng'
**/ **/
'ap_threshold' => array( $config['db']['host'] = 'localhost';
'min' => 1, $config['db']['user'] = 'someuser';
'max' => 250 $config['db']['pass'] = 'somepass';
), $config['db']['port'] = 3306;
'website' => array( $config['db']['name'] = 'mmcfe_ng';
'theme' => 'mmcFE', // Overall default theme
'mobile' => true, // Allow overwriting theme for mobile devices /**
'mobile_theme' => 'mobile', // Set default or custom mobile theme * Local wallet RPC configuration
'name' => 'The Pool', *
'slogan' => 'Resistance is futile', * mmcfe-ng uses the RPC backend to fetch transactions, blocks
'email' => 'test@example.com', // Mail address used for notifications * and various other things. They need to match your coind RPC
), * configuration.
// See: http://www.google.com/recaptcha *
'recaptcha' => array( * Default:
'enabled' => false, // Enable re-captcha during registraion * type = 'http'
'public_key' => 'YOUR_PUBLIC_RECAPTCHA_KEY', * host = 'localhost:19334'
'private_key' => 'YOUR_PRIVATE_RECAPTCHA_KEY' * username = 'testnet'
), * password = 'testnet'
'currency' => 'LTC', // Currency name to be used on website **/
'txfee' => 0.1, // Default tx fee added by RPC server $config['wallet']['type'] = 'http';
'block_bonus' => 0, $config['wallet']['host'] = 'localhost:19334';
'payout_system' => 'prop', // Set your payout here so template changes are activated $config['wallet']['username'] = 'testnet';
'archive_shares' => true, // Store accounted shares in archive table? $config['wallet']['password'] = 'testnet';
'blockexplorer' => 'http://explorer.litecoin.net/search?q=', // URL for block searches, prefixed to each block number
'chaininfo' => 'http://allchains.info', // Link to Allchains for Difficulty information /**
'fees' => 0, * API configuration to fetch prices for set currency
'difficulty' => '20', // Target difficulty for this pool as set in pushpoold json *
'reward' => '50', // Reward for finding blocks, fixed value but changes someday * Explanation:
'reward_type' => 'fixed', // Payout `fixed` reward as defined in reward or `block` amount * mmcfe-ng will try to fetch the current exchange rates
'confirmations' => '120', // Confirmations per block needed to credit transactions * from this API URL/target. Currently btc-e and coinchoose
'memcache' => array( * are supported in mmcfe-ng.
'enabled' => true, *
'host' => 'localhost', // Memcache Host * Default (btc-e.com):
'port' => 11211, // Memcache Port * url = `https://btc-e.com`
'keyprefix' => 'mmcfe_ng_', // Prefix for all keys * target = `/api/2/ltc_usd/ticker`
'expiration'=> '90', // Cache time * currency = `USD`
'splay' => '15' // Splay time *
), * Optional (coinchoose.com):
'wallet' => array( * url = `http://www.coinchoose.com`
'type' => 'http', // http or https are supported * target = `/api.php`
'host' => 'localhost:9332', * currency = `BTC`
'username' => 'litecoinrpc', **/
'password' => 'somepass' $config['price']['url'] = 'https://btc-e.com';
), $config['price']['target'] = '/api/2/ltc_usd/ticker';
'cashout' => array( $config['price']['currency'] = 'USD';
'min_balance' => 0.0 // Minimal balance to cash out
),
'cookie' => array( /**
'path' => '/', * Automatic payout thresholds
'name' => 'POOLERCOOKIE', *
'domain' => '' * These values define the min and max settings
), * that can be entered by a user.
'cache' => 0, // 1 to enable smarty cache in templates/cache * Defaults:
'db' => array( * `min` = `1`
'host' => 'localhost', * `max` = `250`
'user' => 'someuser', **/
'pass' => 'somepass', $config['ap_threshold']['min'] = 1;
'port' => '3306', $config['ap_threshold']['max'] = 250;
'name' => 'litecoin',
),
); /**
* Website specific configuration settings
*
* Explanation:
* name : The pool name, displayed in the header and mails
* slogan : A special slogan, also displayed in the header below name
* email : `From` addresses used in notifications
* theme : Theme used for desktop browsers
* mobile : Enable/Disable mobile theme support
* mobile_theme : Theme used for mobile browsers
*
* Defaults:
* name = `The Pool`
* slogan = `Resistance is futile`
* email = `test@example.com`
* theme = `mmcFE`
* mobile = true
* mobile_theme = `mobile`
**/
$config['website']['name'] = 'The Pool';
$config['website']['slogan'] = 'Resistance is futile';
$config['website']['email'] = 'test@example.com';
$config['website']['theme'] = 'mmcFE';
$config['website']['mobile'] = true;
$config['website']['mobile_theme'] = 'mobile';
/**
* Re-Captcha settings
* Please read http://www.google.com/recaptcha for details
**/
$config['recaptcha']['enabled'] = false;
$config['recaptcha']['public_key'] = 'YOUR_PUBLIC_RECAPTCHA_KEY';
$config['recaptcha']['private_key'] = 'YOUR_PRIVATE_RECAPTCHA_KEY';
// Currency system used in this pool, default: `LTC`
$config['currency'] = 'LTC';
// Default transaction fee, added by RPC server, default: 0.1
$config['txfee'] = 0.1;
// Payout a block bonus to block finders, default: 0 (disabled)
// This bonus is paid by the pool operator, it is not deducted from the block payout!
$config['block_bonus'] = 0;
/**
* Payout sytem in use
*
* This will modify some templates and activate the
* appropriate crons. Only ONE payout system at a time
* is supported!
*
* Available options:
* prop: Proportional payout system
* pps : Pay Per Share payout system
*
* Default:
* prop
**/
$config['payout_system'] = 'prop';
// For debugging purposes you can archive shares in the archive_shares table, default: true
$config['archive_shares'] = true;
// URL prefix for block searches, used for block links, default: `http://explorer.litecoin.net/search?q=`
$config['blockexplorer'] = 'http://explorer.litecoin.net/search?q=';
// Link to blockchain information, used for difficulty link, default: `http://allchains.info`
$config['chaininfo'] = 'http://allchains.info';
// Pool fees applied to users in percent, default: 0 (disabled)
$config['fees'] = 0;
// Pool target difficulty as set in pushpoold configuration file
// Please also read this for stratum: https://github.com/TheSerapher/php-mmcfe-ng/wiki/FAQ
$config['difficulty'] = 20;
/**
* This defines how rewards are paid to users.
*
* Available options:
* fixed : Fixed value according to `reward` setting
* block : Dynamic value based on block amount
*
* Default:
* fixed
**/
$config['reward_type'] = 'fixed';
$config['reward'] = 50;
// Confirmations per block required to credit transactions, default: 120
$config['confirmations'] = 5;
/**
* Memcache configuration
*
* Please note that a memcache is greatly increasing performance
* when combined with the `statistics.php` cronjob. Disabling this
* is not recommended in a live environment!
*
* Explanations
* keyprefix : Must be changed for multiple mmcfe-ng instances on one host
* expiration : Default expiration time in seconds of all cached keys.
* Increase if caches expire too fast.
* splay : Default randomizer for expiration times.
* This will spread expired keys across `splay` seconds.
*
* Default:
* enabled = `true`
* host = `localhost`
* port = 11211
* keyprefix = `mmcfe_ng_`
* expiration = 90
* splay = 15
**/
$config['memcache']['enabled'] = false;
$config['memcache']['host'] = 'localhost';
$config['memcache']['port'] = 11211;
$config['memcache']['keyprefix'] = 'mmcfe_ng_';
$config['memcache']['expiration'] = 90;
$config['memcache']['splay'] = 15;
/**
* Cookie configiration
*
* For multiple installations of this cookie change the cookie name
*
* Default:
* path = '/'
* name = 'POOLERCOOKIE'
* domain = ''
**/
$config['cookie']['path'] = '/';
$config['cookie']['name'] = 'POOLERCOOKIE';
$config['cookie']['domain'] = '';
// Disable or enable smarty cache
// This is usually not required, default: 0
$config['cache'] = 0;
?> ?>