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

Commit

Permalink
Merge pull request #886 from coinfoundry/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Oliver Weichhold authored Jun 30, 2021
2 parents a0099d1 + 3b0046e commit 48a70d6
Show file tree
Hide file tree
Showing 209 changed files with 893 additions and 4,479 deletions.
123 changes: 123 additions & 0 deletions examples/callisto_pool.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"logging": {
"level": "info",
"enableConsoleLog": true,
"enableConsoleColors": true,
"logFile": "",
"apiLogFile": "",
"logBaseDirectory": "",
"perPoolLogFile": false
},
"banning": {
"manager": "integrated",
"banOnJunkReceive": false,
"banOnInvalidShares": false
},
"notifications": {
"enabled": false,
"email": {
"host": "smtp.example.com",
"port": 587,
"user": "user",
"password": "password",
"fromAddress": "[email protected]",
"fromName": "pool 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": 100,
"shareRecoveryFile": "recovered-shares.txt"
},
"api": {
"enabled": true,
"listenAddress": "*",
"port": 4000,
"metricsIpWhitelist": [],
"rateLimiting": {
"disabled": true,
"rules": [
{
"Endpoint": "*",
"Period": "1s",
"Limit": 5
}
],
"ipWhitelist": [
""
]
}
},
"clusterName": "eu1",
"pools": [
{
"id": "clo1",
"enabled": true,
"coin": "callisto",
"address": "0xF8470A06f46Ab6340f94d8E153cB9c548744546E",
"rewardRecipients": [
{
"type": "op",
"address": "0xF8470A06f46Ab6340f94d8E153cB9c548744546E",
"percentage": 1.0
}
],
"blockRefreshInterval": 120,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 50
},
"ports": {
"4073": {
"name": "GPU-SMALL",
"listenAddress": "*",
"difficulty": 0.1,
"varDiff": {
"minDiff": 0.1,
"maxDiff": null,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
},
"chainTypeOverride": "Callisto",
"dagDir": "<Your directory for the dag file>",
"daemons": [
{
"host": "127.0.0.1",
"port": 8545,
"user": "",
"password": ""
}
],
"paymentProcessing": {
"enabled": true,
"minimumPayment": 1,
"payoutScheme": "PPLNS",
"payoutSchemeConfig": {
"factor": 0.5
},
"keepUncles": false,
"keepTransactionFees": false
}
}
]
}
104 changes: 52 additions & 52 deletions examples/ethereum_pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,60 +64,60 @@
},
"clusterName": "eu1",
"pools": [
{
"id": "eth1",
"enabled": true,
"coin": "ethereum",
{
"id": "eth1",
"enabled": true,
"coin": "ethereum",
"address": "0xF8470A06f46Ab6340f94d8E153cB9c548744546E",
"rewardRecipients": [
{
"type": "op",
"address": "0xF8470A06f46Ab6340f94d8E153cB9c548744546E",
"rewardRecipients": [
{
"type": "op",
"address": "0xF8470A06f46Ab6340f94d8E153cB9c548744546E",
"percentage": 1.0
}
],
"blockRefreshInterval": 120,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 50
},
"ports": {
"4073": {
"name": "GPU-SMALL",
"listenAddress": "*",
"difficulty": 0.1,
"varDiff": {
"minDiff": 0.1,
"maxDiff": null,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
},
"chainTypeOverride": "Mainnet",
"dagDir": "<Your directory for the dag file>",
"daemons": [
{
"host": "127.0.0.1",
"port": 8545,
"user": "",
"password": ""
}
],
"paymentProcessing": {
"enabled": true,
"minimumPayment": 1,
"payoutScheme": "PPLNS",
"payoutSchemeConfig": {
"factor": 0.5
},
"keepUncles": false,
"keepTransactionFees": false
"percentage": 1.0
}
],
"blockRefreshInterval": 120,
"clientConnectionTimeout": 600,
"banning": {
"enabled": true,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 50
},
"ports": {
"4073": {
"name": "GPU-SMALL",
"listenAddress": "*",
"difficulty": 0.1,
"varDiff": {
"minDiff": 0.1,
"maxDiff": null,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
},
"chainTypeOverride": "Ethereum",
"dagDir": "<Your directory for the dag file>",
"daemons": [
{
"host": "127.0.0.1",
"port": 8545,
"user": "",
"password": ""
}
],
"paymentProcessing": {
"enabled": true,
"minimumPayment": 1,
"payoutScheme": "PPLNS",
"payoutSchemeConfig": {
"factor": 0.5
},
"keepUncles": false,
"keepTransactionFees": false
}
}
]
}
8 changes: 8 additions & 0 deletions src/Miningcore/Api/Controllers/PoolApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,14 @@ private PoolConfig GetPool(string poolId)

switch(mode)
{
case SampleRange.Hour:
end = end.AddSeconds(-end.Second);

start = end.AddHours(-1);

stats = await cf.Run(con => statsRepo.GetMinerPerformanceBetweenThreeMinutelyAsync(con, pool.Id, address, start, end));
break;

case SampleRange.Day:
// set range
if(end.Minute < 30)
Expand Down
20 changes: 0 additions & 20 deletions src/Miningcore/Api/Responses/GetAdminStatsResponse.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/*
Copyright 2017 Coin Foundry (coinfoundry.org)
Authors: Oliver Weichhold ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using System;

namespace Miningcore.Api.Responses
Expand Down
20 changes: 0 additions & 20 deletions src/Miningcore/Api/Responses/GetBalanceChangesResponse.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/*
Copyright 2017 Coin Foundry (coinfoundry.org)
Authors: Oliver Weichhold ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using System;
using Miningcore.Configuration;

Expand Down
20 changes: 0 additions & 20 deletions src/Miningcore/Api/Responses/GetBlocksResponse.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/*
Copyright 2017 Coin Foundry (coinfoundry.org)
Authors: Oliver Weichhold ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using System;

namespace Miningcore.Api.Responses
Expand Down
20 changes: 0 additions & 20 deletions src/Miningcore/Api/Responses/GetMinerStatsResponse.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/*
Copyright 2017 Coin Foundry (coinfoundry.org)
Authors: Oliver Weichhold ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using System;
using System.Collections.Generic;

Expand Down
20 changes: 0 additions & 20 deletions src/Miningcore/Api/Responses/GetPaymentsResponse.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/*
Copyright 2017 Coin Foundry (coinfoundry.org)
Authors: Oliver Weichhold ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using System;
using Miningcore.Configuration;

Expand Down
20 changes: 0 additions & 20 deletions src/Miningcore/Api/Responses/GetPoolStatsResponse.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/*
Copyright 2017 Coin Foundry (coinfoundry.org)
Authors: Oliver Weichhold ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using System;

namespace Miningcore.Api.Responses
Expand Down
Loading

0 comments on commit 48a70d6

Please sign in to comment.