Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Dev (#180)
Browse files Browse the repository at this point in the history
- Support ZMQ block notify for Bitcoin family. Fixes #151.
- Adjust Lyra2v2 Hashrate multiplier. Fixes #168
- Made RPC polling optional
- Updated configuration examples to be closer to real world usage
- Added no RPC polling config example
  • Loading branch information
Oliver Weichhold authored Jan 15, 2018
1 parent 5bd7574 commit 2c62848
Show file tree
Hide file tree
Showing 17 changed files with 247 additions and 49 deletions.
6 changes: 3 additions & 3 deletions examples/dash_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"perPoolLogFile": false
},
"banning": {
"manager": "integrated"
"manager": "integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
Expand Down Expand Up @@ -53,8 +53,8 @@
"address": "XgmfWd5DXWGcYhxPcDPUJk44Cnh2e8tZk7",
"percentage": 0
}],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
93 changes: 93 additions & 0 deletions examples/dash_pool_no_polling.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"logging": {
"level": "info",
"enableConsoleLog": true,
"enableConsoleColors": true,
"logFile": "",
"logBaseDirectory": "",
"perPoolLogFile": false
},
"banning": {
"manager": "integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
"notifications": {
"enabled": true,
"email": {
"host": "smtp.example.com",
"port": 587,
"user": "user",
"password": "password",
"fromAddress": "[email protected]",
"fromName": "support"
},
"admin": {
"enabled": false,
"emailAddress": "[email protected]",
"notifyBlockFound": true
}
},
"persistence": {
"postgres": {
"host": "127.0.0.1",
"port": 5432,
"user": "miningcore",
"password": "password",
"database": "miningcore"
}
},
"paymentProcessing": {
"enabled": true,
"interval": 600,
"shareRecoveryFile": "recovered-shares.txt"
},
"pools": [{
"id": "dash1",
"enabled": true,
"coin": {
"type": "DASH"
},
"address": "XgmfWd5DXWGcYhxPcDPUJk44Cnh2e8tZk7",
"rewardRecipients": [{
"address": "XgmfWd5DXWGcYhxPcDPUJk44Cnh2e8tZk7",
"percentage": 0
}],
"zmqBlockNotifySocket": "tcp://127.0.0.1:3000",
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 50
},
"ports": {
"3062": {
"listenAddress": "0.0.0.0",
"difficulty": 1024,
"name": "ASIC Mining",
"varDiff": {
"minDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
},
"daemons": [{
"host": "127.0.0.1",
"port": 9998,
"user": "user",
"password": "password"
}],
"paymentProcessing": {
"enabled": true,
"minimumPayment": 0.5,
"payoutScheme": "PPLNS",
"payoutSchemeConfig": {
"factor": 2.0
}
}
}]
}
6 changes: 3 additions & 3 deletions examples/digibyte_scrypt_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"perPoolLogFile": false
},
"banning": {
"manager": "integrated"
"manager": "integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
Expand Down Expand Up @@ -56,8 +56,8 @@
"percentage": 1.0
}
],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
6 changes: 3 additions & 3 deletions examples/digibyte_sha256_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"perPoolLogFile": false
},
"banning": {
"manager": "integrated"
"manager": "integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
Expand Down Expand Up @@ -56,8 +56,8 @@
"percentage": 1
}
],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
3 changes: 1 addition & 2 deletions examples/ethereum_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
"address": "0x0942e9144606ad43f2e61a7ee332fe9914424712",
"percentage": 0
}],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
6 changes: 3 additions & 3 deletions examples/litecoin_dash_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"perPoolLogFile": false
},
"banning": {
"manager": "integrated"
"manager": "integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
Expand Down Expand Up @@ -53,8 +53,8 @@
"address": "LUWYwkz6DQLVeqJqHRtGjNhWUxBvBmE3SX",
"percentage": 1
}],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
6 changes: 3 additions & 3 deletions examples/litecoin_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"perPoolLogFile": false
},
"banning": {
"manager": "integrated"
"manager": "integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
Expand Down Expand Up @@ -55,8 +55,8 @@
"percentage": 1.0
}
],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
3 changes: 1 addition & 2 deletions examples/monero_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
"percentage": 1
}
],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
4 changes: 2 additions & 2 deletions examples/straks_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
"percentage": 1.0
}
],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
6 changes: 3 additions & 3 deletions examples/zcash_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"perPoolLogFile": false
},
"banning": {
"manager": "integrated"
"manager": "integrated",
"banOnJunkReceive": true,
"banOnInvalidShares": false
},
Expand Down Expand Up @@ -58,8 +58,8 @@
"percentage": 1.5
}
],
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 10,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
Expand Down
5 changes: 5 additions & 0 deletions src/MiningCore/Blockchain/Bitcoin/BitcoinConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public class BitcoinConstants
public static double Pow2x32 = Math.Pow(2, 32);
public static readonly BigInteger Diff1 = BigInteger.Parse("00ffff0000000000000000000000000000000000000000000000000000", NumberStyles.HexNumber);
public const int CoinbaseMinConfimations = 102;

public const string ZmqPublisherTopicBlockHash = "hashblock";
public const string ZmqPublisherTopicTxHash = "hashtx";
public const string ZmqPublisherTopicBlockRaw = "rawblock";
public const string ZmqPublisherTopicTxRaw = "rawtx";
}

public class KnownAddresses
Expand Down
Loading

0 comments on commit 2c62848

Please sign in to comment.