Skip to content

Commit

Permalink
Added BTRM
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Jul 16, 2023
1 parent 74674b6 commit 6f79a8a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ If you'd like to make a one time donation, the addresses are as follows:
* DERO - ```dero1qygrgnz9gea2rqgwhdtpfpa3mvagt5uyq0g92nurwrpk6wnn7hdnzqgudsv6t```
* CCX - ```ccx7dmnBBoRPuVcpKJSAVZKdSDo9rc7HVijFbhG34jsXL3qiqfRwu7A5ecem44s2rngDd8y8N4QnYK6WR3mXAcAZ5iXun9BQBx```
* BLOC - ```abLoc5iUG4a6oAb2dqygxkS5M2uHWx16zHb9fUWMzpSEDwm6T7PSq2MLdHonWZ16CGfnJKRomq75aZyviTo6ZjHeYQMzNAEkjMg```
* ZEPH - ```ZEPHYR2nic7ULkkmgZNX8a9i2tMbkxuCqjgWZYuee3awX7RhtmhoT98CwGEGrruWZVSKtA7Z7JC8m7oeYHtBD9cBEZzdEh9BSdq4q```
* RVN - ```RLVJv9rQNHzXS3Zn4JH8hfAHmm1LfECMxy```
* RTM - ```RUCyaEZxQu3Eure73XPQ57si813RYAMQKC```
* BTRM - ```Bfhtr2g56tg73TNZBRCu6fJUD39Kur6SGG```
* ERG - ```9fe533kUzAE57YfPP6o3nzsYMKN2W2uCxvg8KG8Vn5DDeJGetRw```
* BTC - ```3HRbMgcvbqHVW7P34MNGvF2Gh3DE26iHdw```
* BCH - ```18sKoDSjLCFW9kZrXuza1qzEERnKi7bx8S```
Expand Down
2 changes: 2 additions & 0 deletions deployment/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('daemon', 'coinHashFactorBLOC', '0', 'float', 'BLOC algo hash price factor relative to coinHashFactor');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('daemon', 'coinHashFactorERG', '0', 'float', 'ERG algo hash price factor relative to coinHashFactor');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('daemon', 'coinHashFactorRTM', '0', 'float', 'RTM algo hash price factor relative to coinHashFactor');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('daemon', 'coinHashFactorBTRM', '0', 'float', 'BTRM algo hash price factor relative to coinHashFactor');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('daemon', 'coinHashFactorZEPH', '0', 'float', 'ZEPH algo hash price factor relative to coinHashFactor');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('daemon', 'enableAlgoSwitching', 'false', 'bool', 'Enable smart miners (need additional altblockManager module)');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('daemon', 'verifyHost', '', 'string', 'Use to extra daemon height verify check');
Expand Down Expand Up @@ -324,6 +325,7 @@ INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('pool', 'address_9053', '', 'string', 'Address to mine to for 9053 (ERG) port.');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('pool', 'address_9998', '', 'string', 'Address to mine to for 9998 (RTM) port.');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('pool', 'address_17767', '', 'string', 'Address to mine to for 17767 (ZEPH) port.');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('pool', 'address_10225', '', 'string', 'Address to mine to for 10225 (BTRM) port.');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('payout', 'feeAddress', '', 'string', 'Address that pool fees are sent to.');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('general', 'cmcKey', '', 'string', 'CMC API Key for notification');
INSERT INTO pool.config (module, item, item_value, item_type, Item_desc) VALUES ('general', 'mailgunKey', '', 'string', 'MailGun API Key for notification');
Expand Down
6 changes: 5 additions & 1 deletion ex_keys.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
"COINEX": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"COINEX_SECRET": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"SEVENSEAS": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"SEVENSEAS_SECRET": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
"SEVENSEAS_SECRET": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XEGGEX": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XEGGEX_SECRET": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"TXBIT": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"TXBIT_SECRET": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
22 changes: 14 additions & 8 deletions lib/coins/xmr.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const port2coin = {
"2086" : "BLOC",
"9053" : "ERG",
"9998" : "RTM",
"10225" : "BTRM",
"17767" : "ZEPH",
};
const port2blob_num = {
Expand Down Expand Up @@ -80,6 +81,7 @@ const port2blob_num = {
"2086" : 1, // BLOC
"9053" : 103, // ERG
"9998" : 104, // RTM
"10225": 104, // BTRM
};

const port2algo = {
Expand Down Expand Up @@ -112,6 +114,7 @@ const port2algo = {
"2086" : "cn-heavy/xhv", // BLOC
"9053" : "autolykos2", // ERG
"9998" : "ghostrider", // RTM
"10225": "ghostrider", // BTRM
};

const mm_nonce_size = cnUtil.get_merged_mining_nonce_size();
Expand Down Expand Up @@ -344,7 +347,7 @@ function Coin(data){
return callback(true, body);
}
});
} else if (port == 8766 || port == 9998) {
} else if (port == 8766 || port == 9998 || port == 10225) {
global.support.rpcPortDaemon2(port, '', { method: 'getblockhash', params: [ blockId ] }, function (body) {
if (!body || !body.result) {
console.error("getPortBlockHeaderByID(" + port + ", " + blockId + "): " + JSON.stringify(body));
Expand Down Expand Up @@ -417,14 +420,14 @@ function Coin(data){
}
return callback(null, body);
});
} else if (port == 8766 || port == 9998) {
} else if (port == 8766 || port == 9998 || port == 10225) {
global.support.rpcPortDaemon2(port, '', { method: 'getblock', params: [ blockHash ] }, function (body) {
if (!body || !body.result) {
console.error("getPortBlockHeaderByHash(" + port + ", " + blockHash + "): " + JSON.stringify(body));
return callback(true, body);
}
body.result.reward = (port == 8766 ? 2500 : 3750) * 100000000;
if (port == 9998) body.result.difficulty *= 0xFFFFFFFF;
if (port == 9998 || port == 10225) body.result.difficulty *= 0xFFFFFFFF;
return callback(null, body.result);
});
} else if (port == 8545 || port == 8645) {
Expand Down Expand Up @@ -573,7 +576,7 @@ function Coin(data){
return callback(true, body);
}
});
} else if (port == 8766 || port == 9998) {
} else if (port == 8766 || port == 9998 || port == 10225) {
global.support.rpcPortDaemon2(port, '', { method: 'getbestblockhash' }, function (body) {
if (!body || !body.result) {
console.error("getPortLastBlockHeader(" + port + "): " + JSON.stringify(body));
Expand Down Expand Up @@ -629,7 +632,7 @@ function Coin(data){
return callback(body ? body : null);
});

} else if (port == 8766 || port == 9998) {
} else if (port == 8766 || port == 9998 || port == 10225) {
global.support.rpcPortDaemon2(port, '', {
method: 'getblocktemplate',
params: [{
Expand All @@ -638,8 +641,9 @@ function Coin(data){
}]
}, function(body) {
if (body && body.result) switch (parseInt(port)) {
case 8766: return callback(cnUtil.RavenBlockTemplate(body.result, global.config.pool["address_" + port.toString()]));
case 9998: return callback(cnUtil.RtmBlockTemplate(body.result, global.config.pool["address_" + port.toString()]));
case 8766: return callback(cnUtil.RavenBlockTemplate(body.result, global.config.pool["address_" + port.toString()]));
case 9998: return callback(cnUtil.RtmBlockTemplate(body.result, global.config.pool["address_" + port.toString()]));
case 10225: return callback(cnUtil.RtmBlockTemplate(body.result, global.config.pool["address_" + port.toString()]));
} else return callback(null);
});

Expand Down Expand Up @@ -993,7 +997,7 @@ function Coin(data){

if ("kawpow" in algos_perf) coin_perf["RVN"] = algos_perf["kawpow"];

if ("ghostrider" in algos_perf) coin_perf["RTM"] = algos_perf["ghostrider"];
if ("ghostrider" in algos_perf) coin_perf["RTM"] = coin_perf["BTRM"] = algos_perf["ghostrider"];

if ("ethash" in algos_perf) coin_perf["ETC"] = algos_perf["ethash"];
if ("etchash" in algos_perf) coin_perf["ETC"] = algos_perf["etchash"];
Expand Down Expand Up @@ -1047,6 +1051,7 @@ function Coin(data){
case 2086: return multiHashing.cryptonight_heavy(convertedBlob, 1); // BLOC
case 8766: return multiHashing.kawpow(convertedBlob, Buffer.from(nonce, 'hex'), Buffer.from(mixhash, 'hex')); // RVN
case 9998: return multiHashing.cryptonight(convertedBlob, 18); // RTM
case 10225: return multiHashing.cryptonight(convertedBlob, 18); // BTRM
case 8545: return multiHashing.ethash(convertedBlob, Buffer.from(nonce, 'hex'), blockTemplate.height); // ETH
case 8645: return multiHashing.etchash(convertedBlob, Buffer.from(nonce, 'hex'), blockTemplate.height); // ETC
case 9053: return multiHashing.autolykos2_hashes(convertedBlob, blockTemplate.height); // ERG
Expand Down Expand Up @@ -1161,6 +1166,7 @@ function Coin(data){
case 9053: return "erg"; // ERG
case 9231: return "cryptonote_loki"; // XEQ
case 9998: return "raptoreum"; // RTM
case 10225: return "raptoreum"; // BTRM
//case 11181: return "aeon"; // Aeon
case 11898: return "forknote2"; // TRTL
case 13007: return "forknote2"; // Iridium
Expand Down

0 comments on commit 6f79a8a

Please sign in to comment.