Skip to content

Commit 59acd08

Browse files
author
uPlexa
authored
Merge pull request #1 from QuantumLeaper/upxtwo
Add UPXTWO Support
2 parents d112019 + 2424e83 commit 59acd08

File tree

2 files changed

+14
-66
lines changed

2 files changed

+14
-66
lines changed

README.md

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# xmr-node-proxy
22

3-
:warning: **[Monero will change PoW algorithm on October 18] Please update this proxy to the latest version and please put "algo": "cn/2" into your pool section of config.json** :warning:
3+
:warning: **[uPlexa will change PoW algorithm on April 29, 2019] Please update this proxy to the latest version and please put "algo": "cryptonight-upx" into your pool section of config.json** :warning:
44

5-
Supports all known cryptonight/heavy/light coins:
5+
Supports:
66

7-
* Monero (XMR), MoneroV (XMV), Monero Original (XMO), Monero Classic (XMC), ...
8-
* Wownero (WOW), Masari (MSR), Electroneum (ETN), Graft (GRFT), Intense (ITNS)
9-
* Stellite (XTL)
10-
* Aeon (AEON), Turtlecoin (TRTL), IPBC/BitTube (TUBE)
117
* uPlexa (UPX)
12-
* Sumokoin (SUMO), Haven (XHV), Loki (LOKI)
13-
* ...
8+
* uPlexa v2 (UPXTWO)
149

1510
## Setup Instructions
1611

@@ -162,55 +157,3 @@ Many smaller VMs come with ulimits set very low. We suggest looking into setting
162157

163158
In your `packages.json`, do a `npm install`, and it should pass.
164159

165-
166-
## Performance
167-
168-
The proxy gains a massive boost over a basic pool by accepting that the majority of the hashes submitted _will_ not be valid (does not exceed the required difficulty of the pool). Due to this, the proxy doesn't bother with attempting to validate the hash state nor value until the share difficulty exceeds the pool difficulty.
169-
170-
In testing, we've seen AWS t2.micro instances take upwards of 2k connections, while t2.small taking 6k. The proxy is extremely light weight, and while there are more features on the way, it's our goal to keep the proxy as light weight as possible.
171-
172-
## Configuration Guidelines
173-
174-
Please check the [wiki](https://github.com/MoneroOcean/xmr-node-proxy/wiki/config_review) for information on configuration
175-
176-
Developer Donations
177-
===================
178-
If you'd like to make a one time donation, the addresses are as follows:
179-
* XMR - ```44qJYxdbuqSKarYnDSXB6KLbsH4yR65vpJe3ELLDii9i4ZgKpgQXZYR4AMJxBJbfbKZGWUxZU42QyZSsP4AyZZMbJBCrWr1```
180-
* AEON - ```WmsEg3RuUKCcEvFBtXcqRnGYfiqGJLP1FGBYiNMgrcdUjZ8iMcUn2tdcz59T89inWr9Vae4APBNf7Bg2DReFP5jr23SQqaDMT```
181-
* ETN - ```etnkQMp3Hmsay2p7uxokuHRKANrMDNASwQjDUgFb5L2sDM3jqUkYQPKBkooQFHVWBzEaZVzfzrXoETX6RbMEvg4R4csxfRHLo1```
182-
* SUMO - ```Sumoo1DGS7c9LEKZNipsiDEqRzaUB3ws7YHfUiiZpx9SQDhdYGEEbZjRET26ewuYEWAZ8uKrz6vpUZkEVY7mDCZyGnQhkLpxKmy```
183-
* GRFT - ```GACadqdXj5eNLnyNxvQ56wcmsmVCFLkHQKgtaQXNEE5zjMDJkWcMVju2aYtxbTnZgBboWYmHovuiH1Ahm4g2N5a7LuMQrpT```
184-
* MSR - ```5hnMXUKArLDRue5tWsNpbmGLsLQibt23MEsV3VGwY6MGStYwfTqHkff4BgvziprTitbcDYYpFXw2rEgXeipsABTtEmcmnCK```
185-
* ITNS - ```iz53aMEaKJ25zB8xku3FQK5VVvmu2v6DENnbGHRmn659jfrGWBH1beqAzEVYaKhTyMZcxLJAdaCW3Kof1DwTiTbp1DSqLae3e```
186-
* WOW - ```Wo3yjV8UkwvbJDCB1Jy7vvXv3aaQu3K8YMG6tbY3Jo2KApfyf5RByZiBXy95bzmoR3AvPgNq6rHzm98LoHTkzjiA2dY7sqQMJ```
187-
* XMV - ```4BDgQohRBqg2wFZ5ezYqCrNGjgECAttARdbh1fNkuAbd3HnNkSgas11QD9VFQMzbnvDD3Mfcky1LAFihkbEYph5oGAMLurw```
188-
* RYO - ```RYoLsi22qnoKYhnv1DwHBXcGe9QK6P9zmekwQnHdUAak7adFBK4i32wFTszivQ9wEPeugbXr2UD7tMd6ogf1dbHh76G5UszE7k1```
189-
* XTL - ```Se3Qr5s83AxjCtYrkkqg6QXJagCVi8dELbHb5Cnemw4rMk3xZzEX3kQfWrbTZPpdAJSP3enA6ri3DcvdkERkGKE518vyPQTyi```
190-
* XHV - ```hvxyEmtbqs5TEk9U2tCxyfGx2dyGD1g8EBspdr3GivhPchkvnMHtpCR2fGLc5oEY42UGHVBMBANPge5QJ7BDXSMu1Ga2KFspQR```
191-
* TUBE - ```bxcpZTr4C41NshmJM9Db7FBE5crarjaDXVUApRbsCxHHBf8Jkqjwjzz1zmWHhm9trWNhrY1m4RpcS7tmdG4ykdHG2kTgDcbKJ```
192-
* LOKI - ```L6XqN6JDedz5Ub8KxpMYRCUoQCuyEA8EegEmeQsdP5FCNuXJavcrxPvLhpqY6emphGTYVrmAUVECsE9drafvY2hXUTJz6rW```
193-
* TRTL - ```TRTLv2x2bac17cngo1r2wt3CaxN8ckoWHe2TX7dc8zW8Fc9dpmxAvhVX4u4zPjpv9WeALm2koBLF36REVvsLmeufZZ1Yx6uWkYG```
194-
* BTC - ```3BzvMuLStA388kYZ9nudfm8L22937dSPS3```
195-
* BCH - ```qrhww48p5s6zw9twhc7cujgwp7vym2k4vutem6f92p```
196-
* ETH - ```0xCF8BABC074C487Ae17F9Ce0394eab492E6A35658```
197-
* LTC - ```MCkjQo99VzoeZQ1piDzLDb4uqNSDRZpx55```
198-
199-
## Known Working Pools
200-
201-
* [XMRPool.net](https://xmrpool.net)
202-
* [supportXMR.com](https://supportxmr.com)
203-
* [pool.xmr.pt](https://pool.xmr.pt)
204-
* [minemonero.pro](https://minemonero.pro)
205-
* [XMRPool.xyz](https://xmrpool.xyz)
206-
* [ViaXMR.com](https://viaxmr.com)
207-
* [mine.MoneroPRO.com](https://mine.moneropro.com)
208-
* [MinerCircle.com](https://www.minercircle.com)
209-
* [xmr.p00ls.net](https://www.p00ls.net)
210-
* [MoriaXMR.com](https://moriaxmr.com)
211-
* [MoneroOcean.stream](https://moneroocean.stream)
212-
* [SECUmine.net](https://secumine.net)
213-
* [Chinaenter.cn](http://xmr.chinaenter.cn)
214-
* [XMRPool.eu](https://xmrpool.eu)
215-
216-
If you'd like to have your pool added, please make a pull request here, or contact MoneroOcean at [email protected]!

lib/xmr.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,17 @@ function parse_algo_variant(algo_str, variant) {
9191
case 'cn/rto':
9292
case 'cryptonight/rto': return 7;
9393

94-
case 'cn/2':
95-
case 'cryptonight/2': return 8;
94+
case 'cn-upx/2':
95+
case 'cryptonight-upx/2': return 8;
96+
97+
case 'cn/upxtwo':
98+
case 'cryptonight-upxtwo': return 8;
9699
}
97100
return 1;
98101
}
99102

100103
function detectAlgo(default_pool_algo_set, block_version) {
101-
if ("cn/2" in default_pool_algo_set && "cn/1" in default_pool_algo_set) return block_version >= 8 ? "cn/2" : "cn/1"; // monero fork
104+
if ("cn/2" in default_pool_algo_set && "cn/1" in default_pool_algo_set) return block_version >= 11 ? "cn/2" : "cn/1"; // monero fork
102105
const default_pool_algo_arr = Object.keys(default_pool_algo_set);
103106
if (default_pool_algo_arr.length == 1) return default_pool_algo_arr[0];
104107
console.error("Can't not correctly detect block template algorithm from the list of provided default algorithms (please reduce it to single item): " + default_pool_algo_arr.join(", "));
@@ -303,9 +306,11 @@ function processShare(miner, job, blockTemplate, nonce, resultHash) {
303306
// Validate share with CN hash, then if valid, blast it up to the master.
304307
let shareBuffer = cnUtil.construct_block_blob(template, new Buffer(nonce, 'hex'), blockTemplate.blob_type);
305308
let convertedBlob = cnUtil.convert_blob(shareBuffer, blockTemplate.blob_type);
306-
//let foo = parse_algo_func(blockTemplate.algo);
307-
//hash = foo(convertedBlob, parse_algo_variant(blockTemplate.algo, blockTemplate.variant));
308-
hash = multiHashing.cryptonight_upx(convertedBlob, 1);
309+
var hard_fork_version = convertedBlob[0];
310+
hash = multiHashing.cryptonight_upx(convertedBlob, 1);
311+
if(hard_fork_version>=11){
312+
hash = multiHashing.cryptonight(convertedBlob, 8);
313+
}
309314
if (hash.toString('hex') !== resultHash) {
310315
console.error(global.threadName + "Bad share from miner " + miner.logString);
311316
miner.messageSender('job', miner.getJob(miner, blockTemplate, true));

0 commit comments

Comments
 (0)