Skip to content

Commit 01e8582

Browse files
author
Hüseyin Uslu
committed
Merge pull request #402 from CoiniumServ/develop
sync 0.1.3-alpha to master
2 parents 41ed39d + 485bfe1 commit 01e8582

File tree

301 files changed

+3489
-2340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+3489
-2340
lines changed

.gitmodules

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
[submodule "deps/gibbed.io"]
2-
path = deps/gibbed.io
3-
url = https://github.com/CoiniumServ/Gibbed.IO.git
4-
[submodule "deps/jsonconfig"]
5-
path = deps/jsonconfig
6-
url = https://github.com/CoiniumServ/JsonConfig.git
71
[submodule "deps/csredis"]
82
path = deps/csredis
93
url = https://github.com/CoiniumServ/csredis.git

Changelog.md

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
##### [v0.1.3 alpha - Piri Reis](https://github.com/CoiniumServ/CoiniumServ/releases/tag/v0.1.3-alpha) - 03.09.2014
2+
3+
**Storage**
4+
* Implemented storage layers support; hybrid-storage (redis+mysql) and mpos compatibility (mysql).
5+
* Major changes in storage configuration - you need to update per-pool configuration files.
6+
* Added migration support, CoiniumServ will manage required tables on it's own in hybrid-storage mode.
7+
8+
**Coin**
9+
* Fixed a bug with coin's that was returning non-standard version reply in getinfo().
10+
* Added initial proof-of-stake coin support.
11+
* Added automatic detection support for proof-of-stake coins.
12+
13+
**Statistics & API**
14+
* Re-developed statistics & api sub-system from stratch.
15+
* Pool api now can expose more details.
16+
* Fixed a bug where authenticated miner count was reported incorrectly.
17+
18+
**Web**
19+
* Improved index page layout.
20+
21+
**Misc**
22+
* Updated dependency packages.
23+
* File path handling improvements.
24+
* Fixed app.config.
25+
126
##### [v0.1.2 alpha - Piri Reis](https://github.com/CoiniumServ/CoiniumServ/releases/tag/v0.1.2-alpha) - 14.08.2014
227

328
**Payments**

README.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# ![Screenshot](http://coinium.org/assets/images/logo/coinium-icon-48.png) CoiniumServ [![Build Status](https://travis-ci.org/CoiniumServ/CoiniumServ.svg?branch=develop)](https://travis-ci.org/CoiniumServ/CoiniumServ) [![Build status](https://ci.appveyor.com/api/projects/status/3x349ig9dt14943t)](https://ci.appveyor.com/project/raistlinthewiz/coiniumserv)
22

3-
[CoiniumServ](https://github.com/CoiniumServ/CoiniumServ) is an high performance, extremely efficient, platform-agnostic, easy to setup pool server implementation. It features a stratum and vanilla services, reward / payment / share processors, user-friendly front-end website and a full-stack API.
3+
[CoiniumServ](https://github.com/CoiniumServ/CoiniumServ) is a high performance, extremely efficient, platform-agnostic, easy to setup pool server implementation. It features stratum and vanilla services, reward, payment, share processors, vardiff & ban managers, user-friendly embedded web-server & front-end and a full-stack API.
44

55
CoiniumServ was created to be used for [Coinium.org](http://www.coinium.org) mining pool network at first hand. You can check [some of pools](https://github.com/CoiniumServ/CoiniumServ/wiki/Pools) of the pools running CoiniumServ.
66

77
* Official pools: [coinium.org](http://www.coinium.org)
88

9-
![CoiniumServ running over mono & ubuntu](http://i.imgur.com/izIB5nq.png)
9+
![CoiniumServ running over mono & ubuntu](http://i.imgur.com/HvaPVrZ.png)
1010

1111
### Support
1212

@@ -15,6 +15,7 @@ Start by reading our [FAQ](https://github.com/CoiniumServ/CoiniumServ/wiki/FAQ)
1515
You can also use our [issues](https://github.com/CoiniumServ/CoiniumServ/issues) page to report bugs.
1616

1717
* Official site: [coiniumserv.com](http://www.coiniumserv.com)
18+
* [Paid support & consulting options](https://github.com/CoiniumServ/CoiniumServ#consulting)
1819
* [Support forums](http://forum.coinium.org/forum/19-support/)
1920
* IRC (**irc.freenode.net**):
2021
- **#coiniumserv** [user support](http://webchat.freenode.net/?channels=%23coiniumserv&prompt=1&uio=OT10cnVlde)
@@ -68,19 +69,20 @@ Can run on these platforms;
6869
###### Multiplexed Structure
6970
* Multiple pools & ports.
7071
* Multiple coin daemon connection support.
71-
* Multiple database layers.
72+
* Multiple storage layers.
7273

7374
###### Functionality
7475
* Stratum server (over TCP sockets).
7576
* Stratum show_message support (MOTD & messages).
7677
* Vanilla server (getwork over http server). [experimental]
7778
* Daemon RPC interface.
79+
* Storage layers support
7880
* Block template / job managment.
7981
* Generation transaction builder.
8082
* Share processor.
8183
* Payment processor.
82-
* Proof of Work (PoW) and Proof of Stake (PoS) [in-development] support.
83-
* Transaction messages support [in-development].
84+
* Proof of Work (PoW) and Proof of Stake (PoS) support.
85+
* Transaction messages support.
8486
* Vardiff support.
8587
* Ban manager support that can handles miners flooding with invalid shares.
8688
* Embedded web-server & front-end
@@ -111,6 +113,13 @@ _Under Development_
111113
*__NIST5__
112114
*__Qubit__
113115
*__Hefty1__
116+
117+
###### Persistance & Storage Layers
118+
119+
CoiniumServ supports storage layer interfaces that you can extend to implement your own persistance logic. By default, it supports two layers; a high performance hybrid layer and mpos compatibility layer.
120+
121+
* __Hybrid Layer__: a custom hybrid layer that utilizes redis + mysql together that is carefully designed for high performance persistance support.
122+
* __MPOS Layer__: a compatibility layer based on mysql that supports MPOS whenever you want payments to be handled by MPOS.
114123

115124
###### Development Model
116125
* Strictly [follows](https://github.com/CoiniumServ/CoiniumServ/tree/develop/src/Tests) the [Test Driven Development](http://en.wikipedia.org/wiki/Test-driven_development) model. We have implemented extensive [tests](https://github.com/CoiniumServ/CoiniumServ/tree/develop/src/Tests) for all important functionality and never merge in code that breaks tests and stuff. Yet again, when a new functionality is introduced we also expect proper tests to be implemented within the PR. In simple words, most probably you won't notice any functionality-breaking changes within the repository.
@@ -140,10 +149,14 @@ Start reading by these;
140149
* [Developer's Guide](https://github.com/CoiniumServ/CoiniumServ/wiki/Developer's-Guide)
141150
* [Technical Documentation](https://github.com/CoiniumServ/CoiniumServ/wiki/Technical-Documentation)
142151

152+
### Consulting
153+
154+
Additional to free [support](https://github.com/CoiniumServ/CoiniumServ#support) methods, we offer paid remote support & consulting services for whom would like to get professional support. Contact us over [here](http://blog.coinium.org/coiniumserv/consulting/) and we will get back to you to discuss your needs.
155+
143156
### License
144157

145158
Copyright (C) 2013 - 2014, CoiniumServ Project - http://www.coinium.org -
146-
http://www.coiniumserv.com - https://github.com/CoiniumServ/CoiniumServ
159+
http://www.coiniumserv.com
147160

148161
This software is dual-licensed: you can redistribute it and/or modify
149162
it under the terms of the GNU General Public License as published by

build/CoiniumServ.sln

-40
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoiniumServ", "..\src\Coini
1414
EndProject
1515
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "..\src\Tests\Tests.csproj", "{73CE2C0A-12E6-42FD-8021-C75827D014E3}"
1616
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gibbed.IO", "..\deps\gibbed.io\Gibbed.IO.csproj", "{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}"
18-
EndProject
19-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonConfig", "..\deps\jsonconfig\JsonConfig\JsonConfig.csproj", "{10095092-E1E5-441F-9380-B6329F3CFEB4}"
20-
EndProject
2117
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoiniumServGui", "..\src\CoiniumServGui\CoiniumServGui.csproj", "{1E2AF218-156A-40A0-8DA3-95DD13D93810}"
2218
EndProject
2319
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSRedis", "..\deps\csredis\CSRedis\CSRedis.csproj", "{D35E185E-A7E1-41E1-846C-21944F56074F}"
@@ -71,42 +67,6 @@ Global
7167
{73CE2C0A-12E6-42FD-8021-C75827D014E3}.Testing|Mixed Platforms.Build.0 = Release|Any CPU
7268
{73CE2C0A-12E6-42FD-8021-C75827D014E3}.Testing|x86.ActiveCfg = Release|Any CPU
7369
{73CE2C0A-12E6-42FD-8021-C75827D014E3}.Testing|x86.Build.0 = Release|Any CPU
74-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
76-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
77-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
78-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|x86.ActiveCfg = Debug|Any CPU
79-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Debug|x86.Build.0 = Debug|Any CPU
80-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
81-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Any CPU.Build.0 = Release|Any CPU
82-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
83-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
84-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|x86.ActiveCfg = Release|Any CPU
85-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Release|x86.Build.0 = Release|Any CPU
86-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Any CPU.ActiveCfg = Release|Any CPU
87-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Any CPU.Build.0 = Release|Any CPU
88-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Mixed Platforms.ActiveCfg = Release|Any CPU
89-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|Mixed Platforms.Build.0 = Release|Any CPU
90-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|x86.ActiveCfg = Release|Any CPU
91-
{047857BA-DAA3-4CA7-AFB8-A1B082B28C6A}.Testing|x86.Build.0 = Release|Any CPU
92-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
93-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
94-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
95-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
96-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|x86.ActiveCfg = Debug|Any CPU
97-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Debug|x86.Build.0 = Debug|Any CPU
98-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
99-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Any CPU.Build.0 = Release|Any CPU
100-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
101-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
102-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|x86.ActiveCfg = Release|Any CPU
103-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Release|x86.Build.0 = Release|Any CPU
104-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Any CPU.ActiveCfg = Testing|Any CPU
105-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Any CPU.Build.0 = Testing|Any CPU
106-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Mixed Platforms.ActiveCfg = Testing|Any CPU
107-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|Mixed Platforms.Build.0 = Testing|Any CPU
108-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|x86.ActiveCfg = Testing|Any CPU
109-
{10095092-E1E5-441F-9380-B6329F3CFEB4}.Testing|x86.Build.0 = Testing|Any CPU
11070
{1E2AF218-156A-40A0-8DA3-95DD13D93810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
11171
{1E2AF218-156A-40A0-8DA3-95DD13D93810}.Debug|Any CPU.Build.0 = Debug|Any CPU
11272
{1E2AF218-156A-40A0-8DA3-95DD13D93810}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

deps/csredis

Submodule csredis updated 55 files

deps/gibbed.io

-1
This file was deleted.

deps/jsonconfig

-1
This file was deleted.

src/CoiniumServ/App.config

+8-16
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,6 @@
88
<startup>
99
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
1010
</startup>
11-
<runtime>
12-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
13-
<dependentAssembly>
14-
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
15-
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
16-
</dependentAssembly>
17-
<dependentAssembly>
18-
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
19-
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
20-
</dependentAssembly>
21-
<dependentAssembly>
22-
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
23-
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
24-
</dependentAssembly>
25-
</assemblyBinding>
26-
</runtime>
2711
<appSettings>
2812
<add key="webPages:Enabled" value="false" />
2913
</appSettings>
@@ -34,4 +18,12 @@
3418
</namespaces>
3519
</pages>
3620
</system.web.webPages.razor>
21+
<runtime>
22+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
23+
<dependentAssembly>
24+
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
25+
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
26+
</dependentAssembly>
27+
</assemblyBinding>
28+
</runtime>
3729
</configuration>

src/CoiniumServ/Banning/BanConfig.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524
using Serilog;
2625

src/CoiniumServ/Banning/BanManager.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524
using System.Collections.Generic;
2625
using System.Linq;
2726
using System.Net;
2827
using System.Threading;
2928
using CoiniumServ.Miners;
30-
using CoiniumServ.Pools.Config;
29+
using CoiniumServ.Pools;
3130
using CoiniumServ.Server.Mining.Stratum.Sockets;
3231
using CoiniumServ.Server.Mining.Vanilla;
3332
using CoiniumServ.Shares;

src/CoiniumServ/Banning/IBanConfig.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using CoiniumServ.Configuration;
2524

2625
namespace CoiniumServ.Banning

src/CoiniumServ/Banning/IBanManager.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System.Net;
2524

2625
namespace CoiniumServ.Banning

src/CoiniumServ/Blocks/BlockProcessor.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System.Linq;
2524
using CoiniumServ.Daemon;
2625
using CoiniumServ.Daemon.Exceptions;
2726
using CoiniumServ.Daemon.Responses;
28-
using CoiniumServ.Pools.Config;
27+
using CoiniumServ.Pools;
2928
using Serilog;
3029

3130
namespace CoiniumServ.Blocks

src/CoiniumServ/Blocks/IBlockProcessor.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using CoiniumServ.Daemon.Responses;
2524

2625
namespace CoiniumServ.Blocks

src/CoiniumServ/Coin/Address/Base58.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524
using System.Linq;
2625
using System.Text;

src/CoiniumServ/Coin/Address/Exceptions/AddressFormatException.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524

2625
namespace CoiniumServ.Coin.Address.Exceptions

src/CoiniumServ/Coin/Address/Exceptions/InvalidWalletAddressException.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524

2625
namespace CoiniumServ.Coin.Address.Exceptions

src/CoiniumServ/Coin/Coinbase/Serializers.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524
using System.IO;
2625
using System.Text;
@@ -42,8 +41,9 @@ public static class Serializers
4241
/// <param name="job"></param>
4342
/// <param name="header"></param>
4443
/// <param name="coinbase"></param>
44+
/// <param name="IsPOSCoin">Are we serializing a proof-of-stake coin block</param>
4545
/// <returns></returns>
46-
public static byte[] SerializeBlock(IJob job, byte[] header, byte[] coinbase)
46+
public static byte[] SerializeBlock(IJob job, byte[] header, byte[] coinbase, bool IsPOSCoin = false)
4747
{
4848
byte[] result;
4949

@@ -58,7 +58,8 @@ public static byte[] SerializeBlock(IJob job, byte[] header, byte[] coinbase)
5858
stream.WriteBytes(transaction.Data.HexToByteArray());
5959
}
6060

61-
// need to implement POS support too.
61+
if (IsPOSCoin) // check if we are serializing a block for proof-of-stake coin.
62+
stream.WriteByte(0); // proof-of-stake coins require a zero byte appended to block which the daemon replaces with signature.
6263

6364
result = stream.ToArray();
6465
}

src/CoiniumServ/Coin/Coinbase/Utils.cs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524
using System.IO;
2625
using System.Linq;

src/CoiniumServ/Coin/Config/CoinConfig.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// license or white-label it as set out in licenses/commercial.txt.
2121
//
2222
#endregion
23-
2423
using System;
2524
using Serilog;
2625

@@ -33,17 +32,26 @@ public class CoinConfig : ICoinConfig
3332
public string Symbol { get; private set; }
3433
public string Algorithm { get; private set; }
3534
public bool SupportsTxMessages { get; private set; }
35+
public bool IsPOS { get; set; }
3636
public string BlockExplorer { get; private set; }
3737
public dynamic Options { get; private set; }
3838

3939
public CoinConfig(dynamic config)
4040
{
4141
try
4242
{
43+
// set the coin data.
4344
Name = config.name;
4445
Symbol = config.symbol;
4546
Algorithm = config.algorithm;
4647
SupportsTxMessages = config.txMessages;
48+
49+
// check the coin type.
50+
if (string.IsNullOrEmpty(config.reward)) // if no value is set, behave it as a proof-of-work coin by default.
51+
IsPOS = false;
52+
else // if we have a reward value set.
53+
IsPOS = config.reward.ToString().ToLower() == "pos"; // see if it's a proof-of-stake coin or proof-of-work coin.
54+
4755
BlockExplorer = string.IsNullOrEmpty(config.blockExplorer) ? "https://altexplorer.net" : config.blockExplorer;
4856
Options = config;
4957

0 commit comments

Comments
 (0)