Compare commits

...

10 Commits

Author SHA1 Message Date
Sai Raj
533f0f346e
changing bignum version to 0.12.1 2021-06-03 16:50:24 +05:30
Matthew Little
f45984792e
Merge pull request #186 from dogui1718/patch-1
Update package.json
2020-11-30 14:13:06 +01:00
Marcos Ramos
6768df06eb
Update package.json
Updating bignum to v0.13.1
2020-11-21 19:03:33 +03:00
Matthew Little
3f321bfe45
Merge pull request #182 from fujicoin/fix_for_v0.20
Fix for COINBASE_FLAGS removed in Bitcoin v0.20.0
2020-06-16 11:23:47 +02:00
motty
f663457e2a Fix for COINBASE_FLAGS removed in Bitcoin v0.20.0 2020-06-15 06:26:34 +09:00
Matthew Little
57982f88b1
Merge pull request #177 from cpuchain/p2p
fix p2p peer node disconnected issue while p2p enabled
2019-12-04 13:50:15 -05:00
Min Khang Aung
96ee77913d
fix p2p peer node disconnected issue while p2p enabled 2019-11-21 00:08:04 +00:00
Ryan Hein
9c4baf14ac Add x16r and x16rv2 algorithms. (#175)
* Add x16r algorithm.

* Add x16rv2 algorithm.

* Update README.md
2019-09-10 11:51:33 -04:00
darcymei
1f35bb34c4 Update package.json (#161)
edit bignum version from '*' to '0.12.5'
2018-09-27 11:38:01 -07:00
aciddude
a5c3b3fa2c Added NeoScrypt (#158)
* added neoscrypt

* Update algoProperties.js

* Update jobManager.js
2018-09-09 14:28:47 -07:00
6 changed files with 41 additions and 14 deletions

View File

@ -50,6 +50,8 @@ Features
* ✓ __Quark__ (Quarkcoin [QRK])
* ✓ __X11__ (Darkcoin [DRK], Hirocoin, Limecoin)
* ✓ __X13__ (MaruCoin, BoostCoin)
* ✓ __X16R__ (PexaCoin, RavenCoin)
* ✓ __X16RV2__ (PexaCoin, RavenCoin)
* ✓ __NIST5__ (Talkcoin)
* ✓ __Keccak__ (Maxcoin [MAX], HelixCoin, CryptoMeth, Galleon, 365coin, Slothcoin, BitcointalkCoin)
* ✓ __Skein__ (Skeincoin [SKC])

View File

@ -73,6 +73,7 @@ var algos = module.exports = global.algos = {
}
}
},
sha1: {
hash: function(){
return function(){
@ -108,6 +109,22 @@ var algos = module.exports = global.algos = {
}
}
},
x16r: {
multiplier: Math.pow(2, 8),
hash: function(){
return function(){
return multiHashing.x16r.apply(this, arguments);
}
}
},
x16rv2: {
multiplier: Math.pow(2, 8),
hash: function(){
return function(){
return multiHashing.x16rv2.apply(this, arguments);
}
}
},
nist5: {
hash: function(){
return function(){
@ -145,6 +162,14 @@ var algos = module.exports = global.algos = {
}
}
},
neoscrypt: {
multiplier: Math.pow(2, 5),
hash: function(){
return function(){
return multiHashing.neoscrypt.apply(this, arguments);
}
}
},
skein: {
hash: function(){
return function(){

View File

@ -69,7 +69,6 @@ var JobManager = module.exports = function JobManager(options){
var coinbaseHasher = (function(){
switch(options.coin.algorithm){
case 'keccak':
case 'blake':
case 'fugue':
case 'groestl':
if (options.coin.normalHashing === true)
@ -90,12 +89,6 @@ var JobManager = module.exports = function JobManager(options){
return util.reverseBuffer(hashDigest.apply(this, arguments));
};
}
case 'scrypt-og':
if (options.coin.reward === 'POS') {
return function (d) {
return util.reverseBuffer(hashDigest.apply(this, arguments));
};
}
case 'scrypt-jane':
if (options.coin.reward === 'POS') {
return function (d) {
@ -103,7 +96,6 @@ var JobManager = module.exports = function JobManager(options){
};
}
case 'scrypt-n':
case 'sha1':
return function (d) {
return util.reverseBuffer(util.sha256d(d));
};
@ -236,7 +228,12 @@ var JobManager = module.exports = function JobManager(options){
//Check if share is a block candidate (matched network difficulty)
if (job.target.ge(headerBigNum)){
blockHex = job.serializeBlock(headerBuffer, coinbaseBuffer).toString('hex');
blockHash = blockHasher(headerBuffer, nTime).toString('hex');
if (options.coin.algorithm === 'blake' || options.coin.algorithm === 'neoscrypt') {
blockHash = util.reverseBuffer(util.sha256d(headerBuffer, nTime)).toString('hex');
}
else {
blockHash = blockHasher(headerBuffer, nTime).toString('hex');
}
}
else {
if (options.emitInvalidBlockHashes)

View File

@ -188,6 +188,9 @@ var Peer = module.exports = function (options) {
_this.emit('connected');
}
break;
case commands.version.toString():
SendMessage(commands.verack, Buffer.alloc(0));
break;
default:
break;
}

View File

@ -245,7 +245,7 @@ exports.CreateGeneration = function(rpcData, publicKey, extraNoncePlaceholder, r
var scriptSigPart1 = Buffer.concat([
util.serializeNumber(rpcData.height),
new Buffer(rpcData.coinbaseaux.flags, 'hex'),
new Buffer([]),
util.serializeNumber(Date.now() / 1000 | 0),
new Buffer([extraNoncePlaceholder.length])
]);

View File

@ -12,9 +12,9 @@
"litecoin",
"scrypt"
],
"homepage": "https://github.com/zone117x/node-stratum-pool",
"homepage": "https://github.com/ranchimall/node-stratum-pool",
"bugs": {
"url": "https://github.com/zone117x/node-stratum-pool/issues"
"url": "https://github.com/ranchimall/node-stratum-pool/issues"
},
"license": "GPL-2.0",
"author": "Matthew Little",
@ -25,11 +25,11 @@
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "https://github.com/zone117x/node-stratum-pool.git"
"url": "https://github.com/ranchimall/node-stratum-pool.git"
},
"dependencies": {
"multi-hashing": "git://github.com/zone117x/node-multi-hashing.git",
"bignum": "*",
"bignum": "0.12.1",
"base58-native": "*",
"async": "*"
},