It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
C:\Users\user\Documents\GitHub> npm update
npm http GET https://registry.npmjs.org/stratum-pool
npm http 304 https://registry.npmjs.org/stratum-pool
npm http GET https://registry.npmjs.org/base58-native
npm http GET https://registry.npmjs.org/bignum
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/bignum
npm http 304 https://registry.npmjs.org/base58-native
npm http GET https://registry.npmjs.org/bignum/0.6.2
npm http GET https://registry.npmjs.org/base58-native/0.1.3
npm http 304 https://registry.npmjs.org/bignum/0.6.2
> [email protected] install C:\Users\user\Documents\GitHub\node_modules\stratum-p
ool\node_modules\bignum
> node-gyp configure build
C:\Users\user\Documents\GitHub\node_modules\stratum-pool\node_modules\bignum
>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_mod
ules\node-gyp\bin\node-gyp.js" configure build
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:101:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\user\Documents\GitHub\node_modules\stratum-pool\node_m
odules\bignum
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls bignum
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "update"
npm ERR! cwd C:\Users\user\Documents\GitHub
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/base58-native/0.1.3
> [email protected] install C:\Users\user\Documents\GitHub\node_modules\stratum-p
ool\node_modules\base58-native\node_modules\bignum
> node-gyp configure build
C:\Users\user\Documents\GitHub\node_modules\stratum-pool\node_modules\base58
-native\node_modules\bignum>node "C:\Program Files\nodejs\node_modules\npm\bin\n
ode-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:101:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\user\Documents\GitHub\node_modules\stratum-pool\node_m
odules\base58-native\node_modules\bignum
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/bindings
> [email protected] install C:\Users\user\Documents\GitHub\node_modules\st
ratum-pool\node_modules\multi-hashing
> node-gyp rebuild
C:\Users\user\Documents\GitHub\node_modules\stratum-pool\node_modules\multi-
hashing>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\n
ode_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:101:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\user\Documents\GitHub\node_modules\stratum-pool\node_m
odules\multi-hashing
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\user\Documents\GitHub\npm-debug.log
npm ERR! not ok code 0
C:\Users\user\Documents\GitHub>
npm update
$ node stratum.js
module.js:340
throw err;
^
Error: Cannot find module 'x11-hash'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.(/home/gpson/tmp/node_modules/stratum-pool/lib/jobManager.js:9:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
npm -v
1.4.3
node -v
v0.10.26
var myCoin = {
"name": "Dogecoin",
"symbol": "DOGE",
"algorithm": "scrypt", //or "sha256", "scrypt-jane", "scrypt-n", "quark", "x11"
"txMessages": false, //or true (not required, defaults to false)
};
var myCoin = {
"name": "Freecoin",
"symbol": "FEC",
"algorithm": "scrypt-jane",
"chainStartTime": 1375801200, //defaults to 1367991200 (YACoin) if not used
"nMin": 6, //defaults to 4 if not used
"nMax": 32 //defaults to 30 if not used
};
var myCoin = {
"name": "Execoin",
"symbol": "EXE",
"algorithm": "scrypt-n",
/* This defaults to Vertcoin's timetable if not used. It is required for scrypt-n coins that have
modified their N-factor timetable to be different than Vertcoin's. */
"timeTable": {
"2048": 1390959880,
"4096": 1438295269,
"8192": 1485630658,
"16384": 1532966047,
"32768": 1580301436,
"65536": 1627636825,
"131072": 1674972214,
"262144": 1722307603
}
};
var Stratum = require('stratum-pool');
var pool = Stratum.createPool({
"coin": myCoin,
"address": "mi4iBXbBsydtcc5yFmsff2zCFVX4XG7qJc", //Address to where block rewards are given
"blockRefreshInterval": 1000, //How often to poll RPC daemons for new blocks, in milliseconds
/* How many milliseconds should have passed before new block transactions will trigger a new
job broadcast. */
"txRefreshInterval": 20000,
/* Some miner software is bugged and will consider the pool offline if it doesn't receive
anything for around a minute, so every time we broadcast jobs, set a timeout to rebroadcast
in this many seconds unless we find a new job. Set to zero or remove to disable this. */
"jobRebroadcastTimeout": 55,
//instanceId: 37, //Recommend not using this because a crypto-random one will be generated
/* Some attackers will create thousands of workers that use up all available socket connections,
usually the workers are zombies and don't submit shares after connecting. This features
detects those and disconnects them. */
"connectionTimeout": 600, //Remove workers that haven't been in contact for this many seconds
/* If a worker is submitting a good deal of invalid shares we can temporarily ban them to
reduce system/network load. Also useful to fight against flooding attacks. */
"banning": {
"enabled": true,
"time": 600, //How many seconds to ban worker for
"invalidPercent": 50, //What percent of invalid shares triggers ban
"checkThreshold": 500, //Check invalid percent when this many shares have been submitted
"purgeInterval": 300 //Every this many seconds clear out the list of old bans
},
/* Each pool can have as many ports for your miners to connect to as you wish. Each port can
be configured to use its own pool difficulty and variable difficulty settings. varDiff is
optional and will only be used for the ports you configure it for. */
"ports": {
"3032": { //A port for your miners to connect to
"diff": 32, //the pool difficulty for this port
/* Variable difficulty is a feature that will automatically adjust difficulty for
individual miners based on their hashrate in order to lower networking overhead */
"varDiff": {
"minDiff": 8, //Minimum difficulty
"maxDiff": 512, //Network difficulty will be used if it is lower than this
"targetTime": 15, //Try to get 1 share per this many seconds
"retargetTime": 90, //Check to see if we should retarget every this many seconds
"variancePercent": 30 //Allow time to very this % from target without retargeting
}
},
"3256": { //Another port for your miners to connect to, this port does not use varDiff
"diff": 256 //The pool difficulty
}
},
/* Recommended to have at least two daemon instances running in case one drops out-of-sync
or offline. For redundancy, all instances will be polled for block/transaction updates
and be used for submitting blocks. Creating a backup daemon involves spawning a daemon
using the "-datadir=/backup" argument which creates a new daemon instance with it's own
RPC config. For more info on this see:
- https://en.bitcoin.it/wiki/Data_directory
- https://en.bitcoin.it/wiki/Running_bitcoind */
"daemons": [
{ //Main daemon instance
"host": "localhost",
"port": 19332,
"user": "litecoinrpc",
"password": "testnet"
},
{ //Backup daemon instance
"host": "localhost",
"port": 19344,
"user": "litecoinrpc",
"password": "testnet"
}
],
/* This allows the pool to connect to the daemon as a node peer to recieve block updates.
It may be the most efficient way to get block updates (faster than polling, less
intensive than blocknotify script). However its still under development (not yet working). */
"p2p": {
"enabled": false,
"host": "localhost",
"port": 19333,
/* Magic value is different for main/testnet and for each coin. It is found in the daemon
source code as the pchMessageStart variable.
For example, litecoin mainnet magic: http://git.io/Bi8YFw
And for litecoin testnet magic: http://git.io/NXBYJA
*/
"magic": "fcc1b7dc",
//Found in src as the PROTOCOL_VERSION variable, for example: http://git.io/KjuCrw
"protocolVersion": 70002,
}
}, function(ip, workerName, password, callback){ //stratum authorization function
console.log("Authorize " + workerName + ":" + password + "@" + ip);
callback({
error: null,
authorized: true,
disconnect: false
});
});
/*
'data' object contains:
job: 4, //stratum work job ID
ip: '71.33.19.37', //ip address of client
worker: 'matt.worker1', //stratum worker name
difficulty: 64, //stratum client difficulty
reward: 5000000000, //the number of satoshis received as payment for solving this block
height: 443795, //block height
networkDifficulty: 3349 //network difficulty for this block
//solution is set if block was found
solution: '110c0447171ad819dd181216d5d80f41e9218e25d833a2789cb8ba289a52eee4',
//tx is the coinbase transaction hash from the block
tx: '41bb22d6cc409f9c0bae2c39cecd2b3e3e1be213754f23d12c5d6d2003d59b1d,
error: 'low share difficulty' //set if share is rejected for some reason
*/
pool.on('share', function(isValidShare, isValidBlock, data){
if (isValidBlock)
console.log('Block found');
else if (isValidShare)
console.log('Valid share submitted');
else if (data.solution)
console.log('We thought a block solution was found but it was rejected by the daemon');
else
console.log('Invalid share submitted')
console.log('share data: ' + JSON.stringify(data));
});
/*
'severity': can be 'debug', 'warning', 'error'
'logKey': can be 'system' or 'client' indicating if the error
was caused by our system or a stratum client
*/
pool.on('log', function(severity, logKey, logText){
console.log(severity + ': ' + '[' + logKey + '] ' + logText);
});
pool.start();