Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
9bcbff0
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
bc21f03
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
6070c3d
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
145240f
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
f792484
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
2efe8dd
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
71a603e
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
2c0ce86
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
31f3acc
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
88cedb5
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
013a580
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
98bd7d0
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
46e2794
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
74d2855
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
64cb305
changes to test machines
chopperbrian Feb 16, 2025
97e823f
more testing
chopperbrian Feb 16, 2025
4a51a48
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
ee7f78b
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
eddc6b8
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
ceceb79
testing
chopperbrian Feb 16, 2025
c9682f3
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
e1697a7
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
ce05a86
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
2b9804d
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
8ad7a08
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
64a7e78
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
f7bd941
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
0d3d65e
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
74ef3e7
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
aed588d
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
15bf598
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
5f3cc56
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
79feff2
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
9d5932c
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
3d00487
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
34fb01e
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
154ae58
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
33e1bba
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
779bc15
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
ead63f8
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
6c844a1
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
1a06abd
testing
chopperbrian Feb 16, 2025
e950eb8
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
90f2c10
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
81871f5
Update mposCompatibility.js
chopperbrian Feb 16, 2025
3fbc6e0
tests
chopperbrian Feb 16, 2025
63bd2a1
Update shareProcessor.js
chopperbrian Feb 16, 2025
ae22332
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
e5a2610
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
1f0a53c
tests
chopperbrian Feb 16, 2025
f684d8b
Update shareProcessor.js
chopperbrian Feb 16, 2025
f40c356
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
b7812d3
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
0ec9708
Update mposCompatibility.js
chopperbrian Feb 16, 2025
d7e9ee5
Update mposCompatibility.js
chopperbrian Feb 16, 2025
4d351f3
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
dd5c269
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
f132d6e
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
cf54a82
Update digibyte.sha256.json
chopperbrian Feb 16, 2025
4c5ad1f
Update digibyte.sha256.json
chopperbrian Feb 17, 2025
fe2bece
Update digibyte.sha256.json
chopperbrian Feb 17, 2025
b045879
Update digibyte.sha256.json
chopperbrian Feb 17, 2025
dfdda4c
logging
chopperbrian Feb 17, 2025
8602a32
logging
chopperbrian Feb 17, 2025
63f692b
Update digibyte.sha256.json
chopperbrian Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion coins/digibyte.sha256.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"peerMagic": "fac3b6da",
"version-rolling": true,
"allowAsicboost": true,
"version_mask": "0x1fffe0000",
"version_mask": "1fffe000",
"min-bit-count": 16,
"coinbase": "DigiHashV2",
"getInfo": false,
"noNetworkInfo": false,
Expand Down
12 changes: 11 additions & 1 deletion libs/mposCompatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,22 @@ module.exports = function(logger, poolConfig){

this.handleShare = function(isValidShare, isValidBlock, shareData){

var difficulty = shareData.difficulty;

// Ensure difficulty is not below a certain threshold
if (difficulty < poolConfig.minDiff) {
difficulty = poolConfig.minDiff;
}

// Log difficulty values for debugging
logger.debug(logIdentify, logComponent, `MPOSCompatibility - Processing share with difficulty: ${difficulty}`);

var dbData = [
shareData.ip,
shareData.worker,
isValidShare ? 'Y' : 'N',
isValidBlock ? 'Y' : 'N',
shareData.difficulty * (poolConfig.coin.mposDiffMultiplier || 1),
difficulty, // Use the adjusted difficulty
typeof(shareData.error) === 'undefined' ? null : shareData.error,
shareData.blockHash ? shareData.blockHash : (shareData.blockHashInvalid ? shareData.blockHashInvalid : '')
];
Expand Down
11 changes: 7 additions & 4 deletions libs/shareProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,24 @@ module.exports = function(logger, poolConfig){
this.handleShare = function(isValidShare, isValidBlock, shareData) {

var redisCommands = [];


// Log difficulty values for debugging
logger.debug(logSystem, logComponent, `ShareProcessor - Processing share with difficulty: ${shareData.difficulty}`);

if (isValidShare) {
redisCommands.push(['hincrbyfloat', coin + ':shares:roundCurrent', shareData.worker, shareData.difficulty]);
redisCommands.push(['hincrby', coin + ':stats', 'validShares', 1]);
} else {
redisCommands.push(['hincrby', coin + ':stats', 'invalidShares', 1]);
}

/* Stores share diff, worker, and unique value with a score that is the timestamp. Unique value ensures it
doesn't overwrite an existing entry, and timestamp as score lets us query shares from last X minutes to
generate hashrate for each worker and pool. */
var dateNow = Date.now();
var hashrateData = [ isValidShare ? shareData.difficulty : -shareData.difficulty, shareData.worker, dateNow];
redisCommands.push(['zadd', coin + ':hashrate', dateNow / 1000 | 0, hashrateData.join(':')]);

if (isValidBlock){
redisCommands.push(['rename', coin + ':shares:roundCurrent', coin + ':shares:round' + shareData.height]);
redisCommands.push(['rename', coin + ':shares:timesCurrent', coin + ':shares:times' + shareData.height]);
Expand All @@ -92,7 +95,7 @@ module.exports = function(logger, poolConfig){
else if (shareData.blockHash){
redisCommands.push(['hincrby', coin + ':stats', 'invalidBlocks', 1]);
}

connection.multi(redisCommands).exec(function(err, replies){
if (err)
logger.error(logSystem, logComponent, logSubCat, 'Error with share processor multi ' + JSON.stringify(err));
Expand Down
4 changes: 2 additions & 2 deletions pool_configs/digibyte.sha256.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"diff": 2500000,
"tls": false,
"varDiff": {
"minDiff": 10000,
"maxDiff": 100000000,
"minDiff": 250000,
"maxDiff": 25000000,
"targetTime": 15,
"retargetTime": 75,
"variancePercent": 30
Expand Down