Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
2516b08
Fixing tests to use proper function signature. Removing dev donations
Jun 8, 2021
3df6984
Adding CodeOwners and first pass at PPSPaymentScheme.cs
Jun 9, 2021
51a1aa8
Merge pull request #1 from FishyJoel/master
FishyJoel Jun 9, 2021
95f4c1b
CODEOWNERS for real this time
Jun 9, 2021
f770e26
Merge branch 'develop' of https://github.com/FishyJoel/miningcore int…
Jun 9, 2021
25728f6
PPS Build fix
Jun 10, 2021
1aebbe8
Update README.md
FishyJoel Jun 10, 2021
db2c518
Added log for PPS3 analysis
Jun 10, 2021
11ca07d
Merge pull request #3 from kabilanvk/develop
FishyJoel Jun 10, 2021
0351c1b
Trying quick payout w/o block check
Jun 11, 2021
9ae8e10
Removing the config
Jun 11, 2021
129b2ef
Added PPS3 payment method
Jun 11, 2021
e0e84ca
Merge pull request #2 from FishyJoel/Joel-update-Readme
FishyJoel Jun 12, 2021
e721d6d
Adjusted PPS3 calc to get more rewards
Jun 12, 2021
75c5d7d
Added log for total rewards
Jun 12, 2021
43a748c
Added logs for analysis
Jun 12, 2021
d90eff5
Removed debug logs
Jun 12, 2021
7bbad2d
Logged account unlock errors
Jun 12, 2021
b43f9d1
Corrected the log for accumulated rewards
Jun 13, 2021
251b705
Merge pull request #4 from kabilanvk/develop
FishyJoel Jun 13, 2021
52125f9
Fix for no block under PPLNS
Jun 14, 2021
95d9013
Merge pull request #5 from FishyJoel/joel-goldimage-fix
FishyJoel Jun 14, 2021
caf8dcb
Updated to .net 5
Jun 14, 2021
d18c371
docker image support
Jun 15, 2021
cc1d52b
Set up CI with Azure Pipelines
kabilanvk Jun 15, 2021
9525788
Merge branch 'develop' of https://github.com/kabilanvk/miningcore int…
Jun 15, 2021
97d979a
Added docker installer
kabilanvk Jun 15, 2021
103798c
Merge branch 'develop' of https://github.com/kabilanvk/miningcore int…
kabilanvk Jun 15, 2021
768d7cf
Adjusting dockerfile path
kabilanvk Jun 15, 2021
a56b7c8
Added docker start
kabilanvk Jun 15, 2021
90247ff
Merge branch 'develop' of https://github.com/kabilanvk/miningcore int…
kabilanvk Jun 15, 2021
3655d75
Merge branch 'dotnet5' of https://github.com/kabilanvk/miningcore int…
kabilanvk Jun 15, 2021
9cf2ce8
Updated agent info
kabilanvk Jun 15, 2021
c679237
Fixed vm image name
kabilanvk Jun 15, 2021
ddc616b
Updated build context path
kabilanvk Jun 15, 2021
e730e4e
Adding a base config without credentials
Jun 15, 2021
b747039
Merge branch 'dotnet5' of https://github.com/kabilanvk/miningcore int…
Jun 15, 2021
edc8be8
Added repo config
kabilanvk Jun 15, 2021
83086a5
Updated registry info
kabilanvk Jun 15, 2021
0bbf2a4
Add option to load comfig.json from azure app configuration service.
Jun 16, 2021
7614cf7
log network difficulty
schandan-nlok Jun 16, 2021
bb9c59b
Merge pull request #7 from FishyJoel/schandan_add_ntw_diff_log
schandan-nlok Jun 16, 2021
db68843
Merge pull request #6 from FishyJoel/tuong-read-clusterconfig-from-az…
tuonghuynh Jun 17, 2021
b933b8a
Read key vault secrets when referred from azure app configuration
Jun 17, 2021
f534183
Merge pull request #8 from FishyJoel/tuong-add-keyvault-config
FishyJoel Jun 17, 2021
e80f405
Using env config to override default config
Jun 18, 2021
20eacf9
Merge branch 'dotnet5' of https://github.com/kabilanvk/miningcore int…
Jun 18, 2021
d3637b7
Cleaned up tasks
kabilanvk Jun 18, 2021
7e30435
Switching to beta repo
kabilanvk Jun 18, 2021
fad6722
Added logs for clarity
Jun 18, 2021
3565c22
Merge branch 'dotnet5' of https://github.com/kabilanvk/miningcore int…
Jun 18, 2021
8bbcb30
Merge pull request #1 from kabilanvk/dotnet5
kabilanvk Jun 18, 2021
04f051f
Added logs for payment analysis
Jun 18, 2021
bb794f8
Hard coded gas price to 20Gwei for transaction
Jun 18, 2021
fa7033c
Set gas to 20k
Jun 18, 2021
257fdfd
Made gas configurable
Jun 18, 2021
1da5110
Merged changes from develop
Jun 18, 2021
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
33 changes: 33 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# Thse users will be requested for
# review when someone opens a pull request.
* @FishyJoel @abaratham-nlok @swatichilka @kabilanvk @schandan-nlok

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
# *.js @js-owner

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
# /build/logs/ @doctocat

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
# docs/* docs@example.com

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.
# apps/ @octocat

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository and any of its
# subdirectories.
# /docs/ @doctocat
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

38 changes: 12 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build status](https://ci.appveyor.com/api/projects/status/github/minernl/miningcore?branch=master&svg=true)](https://ci.appveyor.com/project/minernl/miningcore)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()

MinerNL - Miningcore 2.0 Stratum Pool
Miningcore 2.0 Stratum Pool
=================================

![Miningcore running ubuntu](http://i.imgur.com/sYF5s2c.jpg)
Expand All @@ -17,7 +17,7 @@ If you already running a build with postgres database. You need to update you da

In this release we use a new column "connectedworkers" in table "poolstats"
````console
sudo wget https://raw.githubusercontent.com/minernl/miningcore/master/src/Miningcore/DataStore/Postgres/Scripts/db_change_20210225.sql
sudo wget https://raw.githubusercontent.com/FishyJoel/miningcore/master/src/Miningcore/DataStore/Postgres/Scripts/db_change_20210225.sql

sudo -u postgres -i
psql -d miningcore -f db_change_20210225.sql
Expand All @@ -33,7 +33,7 @@ exit
- Session management for purging DDoS/flood initiated zombie workers
- Payment processing
- Banning System
- Live Stats [API](https://github.com/minernl/miningcore/wiki/API) on Port 4000
- Live Stats [API](https://github.com/FishyJoel/miningcore/wiki/API) on Port 4000
- WebSocket streaming of notable events like Blocks found, Blocks unlocked, Payments and more
- POW (proof-of-work) & POS (proof-of-stake) support
- Detailed per-pool logging to console & filesystem
Expand All @@ -49,20 +49,6 @@ In our wiki we have a complete list of supported coins.
[Checkout the coins list here](https://github.com/minernl/miningcore/wiki/Supported-Coins)


### Donations

This software comes with a built-in donation of 0.1% per block-reward to support the ongoing development of this project.
You can also send donations directly to the developemers using the following accounts:

* BTC: `3QT2WreQtanPHcMneg9LT2aH3s5nrSZsxr`
* LTC: `LTVnLEv8Xj6emGbf981nTyN54Mnyjbfgrg`
* DASH: `Xc2vm9SfRn8t1hyQgqi8Zrt3oFeGcQtw`
* ETH: `0xBfD360CDd9014Bc5B348B65cBf79F78381694f4E`
* ETC: `0xF4BFFC324bbeB63348F137B84f8d1Ade17B507E4`
* XMR: `44riGcQcDp4EsboDJP284CFCnJ2qP7y8DAqGC4D9WtVbEqzxQ3qYXAUST57u5FkrVF7CXhsEc63QNWazJ5b9ygwBJBtB2kT`
* ZEC: `t1JtJtxTdgXCaYm1wzRfMRkGTJM4qLcm4FQ`


### Running Miningcore on Windows

- [.Net Core 3.1 Runtime](https://www.microsoft.com/net/download/core)
Expand All @@ -74,7 +60,7 @@ You can also send donations directly to the developemers using the following acc
- Download miningcore-win-x64.zip from the latest [Release](https://github.com/minernl/miningcore/releases)
- Extract the Archive
- Setup the database as outlined below
- Create a configuration file <code>config.json</code> as described [here](https://github.com/minernl/miningcore/wiki/Configuration)
- Create a configuration file <code>config.json</code> as described [here](https://github.com/FishyJoel/miningcore/wiki/Configuration)
- Run <code>dotnet Miningcore.dll -c config.json</code>


Expand Down Expand Up @@ -146,7 +132,7 @@ $ exit

- Import Miningcore database tables
````console
sudo wget https://raw.githubusercontent.com/minernl/miningcore/master/src/Miningcore/DataStore/Postgres/Scripts/createdb.sql
sudo wget https://raw.githubusercontent.com/FishyJoel/miningcore/master/src/Miningcore/DataStore/Postgres/Scripts/createdb.sql

sudo -u postgres -i
psql -d miningcore -f createdb.sql
Expand Down Expand Up @@ -187,29 +173,29 @@ lookup for the pools id in you config.json file. In this example pools id is Ver
````console
sudo apt-get update -y
sudo apt-get install git cmake build-essential libssl-dev pkg-config libboost-all-dev libsodium-dev libzmq5
sudo git clone https://github.com/minernl/miningcore
sudo git clone https://github.com/FishyJoel/miningcore
cd miningcore/src/Miningcore
dotnet publish -c Release --framework netcoreapp3.1 -o ../../build
````
- Running Miningcore

Create a configuration file <code>config.json</code> as described [here](https://github.com/minernl/miningcore/wiki/Configuration)
Create a configuration file <code>config.json</code> as described [here](https://github.com/FishyJoel/miningcore/wiki/Configuration)
````console
cd ../../build
dotnet Miningcore.dll -c config.json
````

### [Configuration](https://github.com/minernl/miningcore/wiki/Configuration)
### [Configuration](https://github.com/FishyJoel/miningcore/wiki/Configuration)

### [API](https://github.com/minernl/miningcore/wiki/API)
### [API](https://github.com/FishyJoel/miningcore/wiki/API)


#### Building on Windows

Download and install the [.Net Core 3.1 SDK](https://www.microsoft.com/net/download/core)

````console
git clone https://github.com/minernl/miningcore
git clone https://github.com/FishyJoel/miningcore
cd miningcore/src/Miningcore
dotnet publish -c Release --framework netcoreapp3.1 -o ..\..\build
````
Expand All @@ -225,15 +211,15 @@ dotnet publish -c Release --framework netcoreapp3.1 -o ..\..\build

#### Running Miningcore

Create a configuration file <code>config.json</code> as described [here](https://github.com/minernl/miningcore/wiki/Configuration)
Create a configuration file <code>config.json</code> as described [here](https://github.com/FishyJoel/miningcore/wiki/Configuration)

````console
cd ../../build
dotnet Miningcore.dll -c config.json
````

A public production pool requires a web-frontend for your users to check their hashrate, earnings etc.
You can use the web frontend that come with this fork [Miningcore.Web](https://github.com/minernl/miningcore/src/Miningcore.WebUI)
You can use the web frontend that come with this fork [Miningcore.Web](https://github.com/FishyJoel/miningcore/src/Miningcore.WebUI)

## ShareRelay (ZeroMQ) needs .NET core 2.1 runtime

Expand Down
42 changes: 42 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

trigger:
- develop

resources:
- repo: self

variables:
tag: '$(Build.BuildId)'

stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: ubuntu-latest
steps:
- task: DockerInstaller@0
enabled: false
inputs:
dockerVersion: '20.10.7'
- task: Bash@3
enabled: false
inputs:
targetType: 'inline'
script: 'sudo systemctl start docker'
- task: Docker@2
displayName: Build an image
inputs:
containerRegistry: 'beta-repo'
repository: 'miningcore'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
buildContext: '$(Build.Repository.LocalPath)'
tags: |
latest
$(tag)
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.4'

services:
miningcore:
image: miningcore
ports:
- "3072:3072"
- "3073:3073"
- "4000:4000"
build:
context: .
dockerfile: src/Miningcore/Dockerfile
36 changes: 18 additions & 18 deletions src/Miningcore.Tests/Crypto/CrytonoteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using Miningcore.Extensions;
using Miningcore.Native;
using Xunit;
using static Miningcore.Native.LibCryptonight;
using static Miningcore.Native.LibCryptonight;

namespace Miningcore.Tests.Crypto
{
public class CrytonoteTests : TestBase
Expand All @@ -14,13 +14,13 @@ public void Crytonight()
var blobConverted = "0106a2aaafd505583cf50bcc743d04d831d2b119dc94ad88679e359076ee3f18d258ee138b3b42580100a4b1e2f4baf6ab7109071ab59bc52dba740d1de99fa0ae0c4afd6ea9f40c5d87ec01".HexToByteArray();
var buf = new byte[32];

LibCryptonight.Cryptonight(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.Cryptonight(blobConverted,"" ,buf, CryptonightVariant.VARIANT_0, 0);
var result = buf.ToHexString();
Assert.Equal("a845ffbdf83ae9a8ffa504a1011efbd5ed2294bb9da591d3b583740568402c00", result);

Array.Clear(buf, 0, buf.Length);

LibCryptonight.Cryptonight(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.Cryptonight(blobConverted,"" , buf, CryptonightVariant.VARIANT_0, 0);
result = buf.ToHexString();
Assert.Equal("a845ffbdf83ae9a8ffa504a1011efbd5ed2294bb9da591d3b583740568402c00", result);
}
Expand All @@ -31,30 +31,30 @@ public void Crytonight_Variant_1()
var blobConverted = "0106a2aaafd505583cf50bcc743d04d831d2b119dc94ad88679e359076ee3f18d258ee138b3b42580100a4b1e2f4baf6ab7109071ab59bc52dba740d1de99fa0ae0c4afd6ea9f40c5d87ec01".HexToByteArray();
var buf = new byte[32];

LibCryptonight.Cryptonight(blobConverted, buf, CryptonightVariant.VARIANT_1, 0);
LibCryptonight.Cryptonight(blobConverted,"" , buf, CryptonightVariant.VARIANT_1, 0);
var result = buf.ToHexString();
Assert.Equal("c41ec6434df8b2307ff3105ae15206f3fbdf5a99b35879c0a27b8b85a8e2704f", result);

Array.Clear(buf, 0, buf.Length);

LibCryptonight.Cryptonight(blobConverted, buf, CryptonightVariant.VARIANT_1, 0);
LibCryptonight.Cryptonight(blobConverted,"" , buf, CryptonightVariant.VARIANT_1, 0);
result = buf.ToHexString();
Assert.Equal("c41ec6434df8b2307ff3105ae15206f3fbdf5a99b35879c0a27b8b85a8e2704f", result);
}
}

[Fact]
public void Crytonight_Variant_4()
{
var blobConverted = "0106a2aaafd505583cf50bcc743d04d831d2b119dc94ad88679e359076ee3f18d258ee138b3b42580100a4b1e2f4baf6ab7109071ab59bc52dba740d1de99fa0ae0c4afd6ea9f40c5d87ec01".HexToByteArray();
var buf = new byte[32];

LibCryptonight.Cryptonight(blobConverted, buf, CryptonightVariant.VARIANT_4, 0);
LibCryptonight.Cryptonight(blobConverted,"" , buf, CryptonightVariant.VARIANT_4, 0);
var result = buf.ToHexString();
Assert.Equal("3e69817268c70010f793d53ba1a9f12af21753c723c7d7990a8eefccc6d163ba", result);

Array.Clear(buf, 0, buf.Length);

LibCryptonight.Cryptonight(blobConverted, buf, CryptonightVariant.VARIANT_4, 0);
LibCryptonight.Cryptonight(blobConverted,"" , buf, CryptonightVariant.VARIANT_4, 0);
result = buf.ToHexString();
Assert.Equal("3e69817268c70010f793d53ba1a9f12af21753c723c7d7990a8eefccc6d163ba", result);
}
Expand All @@ -76,13 +76,13 @@ public void Crytonight_Light()
var blobConverted = "0106f1adafd505583cf50bcc743d04d831d2b119dc94ad88679e359076ee3f18d258ee138b3b42597710c48c6d885e2622f40f82ecd9b9fd538f28df9b0557e07cd3237a31c76569ada98001".HexToByteArray();
var buf = new byte[32];

LibCryptonight.CryptonightLight(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.CryptonightLight(blobConverted,"" , buf, CryptonightVariant.VARIANT_0, 0);
var result = buf.ToHexString();
Assert.Equal("0769caee428a232cffb76fa200f174ff962734f24e7b3bf8d1b0d4e8ba6ceebf", result);

Array.Clear(buf, 0, buf.Length);

LibCryptonight.CryptonightLight(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.CryptonightLight(blobConverted,"" , buf, CryptonightVariant.VARIANT_0, 0);
result = buf.ToHexString();
Assert.Equal("0769caee428a232cffb76fa200f174ff962734f24e7b3bf8d1b0d4e8ba6ceebf", result);
}
Expand All @@ -93,13 +93,13 @@ public void Crytonight_Light_Variant_1()
var blobConverted = "0106f1adafd505583cf50bcc743d04d831d2b119dc94ad88679e359076ee3f18d258ee138b3b42597710c48c6d885e2622f40f82ecd9b9fd538f28df9b0557e07cd3237a31c76569ada98001".HexToByteArray();
var buf = new byte[32];

LibCryptonight.CryptonightLight(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.CryptonightLight(blobConverted,"" , buf, CryptonightVariant.VARIANT_0, 0);
var result = buf.ToHexString();
Assert.Equal("0769caee428a232cffb76fa200f174ff962734f24e7b3bf8d1b0d4e8ba6ceebf", result);

Array.Clear(buf, 0, buf.Length);

LibCryptonight.CryptonightLight(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.CryptonightLight(blobConverted,"" , buf, CryptonightVariant.VARIANT_0, 0);
result = buf.ToHexString();
Assert.Equal("0769caee428a232cffb76fa200f174ff962734f24e7b3bf8d1b0d4e8ba6ceebf", result);
}
Expand All @@ -110,13 +110,13 @@ public void Crytonight_Heavy()
var blobConverted = "0106f1adafd505583cf50bcc743d04d831d2b119dc94ad88679e359076ee3f18d258ee138b3b42597710c48c6d885e2622f40f82ecd9b9fd538f28df9b0557e07cd3237a31c76569ada98001".HexToByteArray();
var buf = new byte[32];

LibCryptonight.CryptonightHeavy(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.CryptonightHeavy(blobConverted,"" , buf, CryptonightVariant.VARIANT_0, 0);
var result = buf.ToHexString();
Assert.Equal("93b6815d8f19abe0ff8ba8d8cf951cd264aa123e450bd52dc806fac298f83d9f", result);

Array.Clear(buf, 0, buf.Length);

LibCryptonight.CryptonightHeavy(blobConverted, buf, CryptonightVariant.VARIANT_0, 0);
LibCryptonight.CryptonightHeavy(blobConverted,"" , buf, CryptonightVariant.VARIANT_0, 0);
result = buf.ToHexString();
Assert.Equal("93b6815d8f19abe0ff8ba8d8cf951cd264aa123e450bd52dc806fac298f83d9f", result);
}
Expand All @@ -127,13 +127,13 @@ public void Crytonight_Heavy_Variant_1()
var blobConverted = "0106f1adafd505583cf50bcc743d04d831d2b119dc94ad88679e359076ee3f18d258ee138b3b42597710c48c6d885e2622f40f82ecd9b9fd538f28df9b0557e07cd3237a31c76569ada98001".HexToByteArray();
var buf = new byte[32];

LibCryptonight.CryptonightHeavy(blobConverted, buf, CryptonightVariant.VARIANT_1, 0);
LibCryptonight.CryptonightHeavy(blobConverted,"" , buf, CryptonightVariant.VARIANT_1, 0);
var result = buf.ToHexString();
Assert.Equal("342418ec4bf806aafb102b34d64fc33ab91d89ad40786b92d1b54ceeb4d50822", result);

Array.Clear(buf, 0, buf.Length);

LibCryptonight.CryptonightHeavy(blobConverted, buf, CryptonightVariant.VARIANT_1, 0);
LibCryptonight.CryptonightHeavy(blobConverted,"" , buf, CryptonightVariant.VARIANT_1, 0);
result = buf.ToHexString();
Assert.Equal("342418ec4bf806aafb102b34d64fc33ab91d89ad40786b92d1b54ceeb4d50822", result);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Miningcore.Tests/Miningcore.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
<Platforms>AnyCPU</Platforms>
<AssemblyName>Miningcore.Tests</AssemblyName>
Expand Down
1 change: 1 addition & 0 deletions src/Miningcore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{71672AAD-51F8-49EC-9EFD-E504D65A765A}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
..\docker-compose.yml = ..\docker-compose.yml
EndProjectSection
EndProject
Global
Expand Down
4 changes: 4 additions & 0 deletions src/Miningcore/AutofacModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ protected override void Load(ContainerBuilder builder)
.Keyed<IPayoutScheme>(PayoutScheme.SOLO)
.SingleInstance();

builder.RegisterType<PPS3PaymentScheme>()
.Keyed<IPayoutScheme>(PayoutScheme.PPS3)
.SingleInstance();

//////////////////////
// Bitcoin and family

Expand Down
Loading