From 6f79a8a90b1820f9c1363270f43aa99408da5b9a Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Sun, 16 Jul 2023 00:04:55 +0000 Subject: [PATCH] Added BTRM --- README.md | 2 ++ deployment/base.sql | 2 ++ ex_keys.example.json | 6 +++++- lib/coins/xmr.js | 22 ++++++++++++++-------- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6bb423d1..2ed160e5 100644 --- a/README.md +++ b/README.md @@ -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``` diff --git a/deployment/base.sql b/deployment/base.sql index 5c1bb605..b8e034f0 100644 --- a/deployment/base.sql +++ b/deployment/base.sql @@ -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'); @@ -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'); diff --git a/ex_keys.example.json b/ex_keys.example.json index 34181689..0e0c903b 100644 --- a/ex_keys.example.json +++ b/ex_keys.example.json @@ -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" } \ No newline at end of file diff --git a/lib/coins/xmr.js b/lib/coins/xmr.js index dc01a0a3..9bf249d7 100644 --- a/lib/coins/xmr.js +++ b/lib/coins/xmr.js @@ -48,6 +48,7 @@ const port2coin = { "2086" : "BLOC", "9053" : "ERG", "9998" : "RTM", + "10225" : "BTRM", "17767" : "ZEPH", }; const port2blob_num = { @@ -80,6 +81,7 @@ const port2blob_num = { "2086" : 1, // BLOC "9053" : 103, // ERG "9998" : 104, // RTM + "10225": 104, // BTRM }; const port2algo = { @@ -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(); @@ -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)); @@ -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) { @@ -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)); @@ -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: [{ @@ -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); }); @@ -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"]; @@ -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 @@ -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