mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-02 18:15:13 +00:00
groestl: fix the algos mismatches, make 2
This commit is contained in:
parent
e34da61806
commit
8c97bba761
6 changed files with 40 additions and 33 deletions
4
rc.local
4
rc.local
|
@ -32,7 +32,8 @@ screen -dmS nist5 $STRATUM_DIR/run.sh nist5
|
||||||
screen -dmS penta $STRATUM_DIR/run.sh penta
|
screen -dmS penta $STRATUM_DIR/run.sh penta
|
||||||
screen -dmS quark $STRATUM_DIR/run.sh quark
|
screen -dmS quark $STRATUM_DIR/run.sh quark
|
||||||
screen -dmS qubit $STRATUM_DIR/run.sh qubit
|
screen -dmS qubit $STRATUM_DIR/run.sh qubit
|
||||||
#screen -dmS groestl $STRATUM_DIR/run.sh groestl # dmd-gr -m 256
|
#screen -dmS dmd-gr $STRATUM_DIR/run.sh dmd-gr
|
||||||
|
screen -dmS myr-gr $STRATUM_DIR/run.sh myr-gr
|
||||||
screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2
|
screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2
|
||||||
screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2
|
screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2
|
||||||
|
|
||||||
|
@ -40,6 +41,5 @@ screen -dmS skein $STRATUM_DIR/run.sh skein
|
||||||
screen -dmS skein2 $STRATUM_DIR/run.sh skein2
|
screen -dmS skein2 $STRATUM_DIR/run.sh skein2
|
||||||
screen -dmS zr5 $STRATUM_DIR/run.sh zr5
|
screen -dmS zr5 $STRATUM_DIR/run.sh zr5
|
||||||
screen -dmS sib $STRATUM_DIR/run.sh sib
|
screen -dmS sib $STRATUM_DIR/run.sh sib
|
||||||
#screen -dmS hive $STRATUM_DIR/run.sh hive
|
|
||||||
screen -dmS m7m $STRATUM_DIR/run.sh m7m
|
screen -dmS m7m $STRATUM_DIR/run.sh m7m
|
||||||
|
|
||||||
|
|
|
@ -3,39 +3,22 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "../sha3/sph_blake.h"
|
|
||||||
#include "../sha3/sph_bmw.h"
|
|
||||||
#include "../sha3/sph_groestl.h"
|
|
||||||
#include "../sha3/sph_jh.h"
|
|
||||||
#include "../sha3/sph_keccak.h"
|
|
||||||
#include "../sha3/sph_skein.h"
|
|
||||||
#include "../sha3/sph_luffa.h"
|
|
||||||
#include "../sha3/sph_cubehash.h"
|
|
||||||
#include "../sha3/sph_shavite.h"
|
|
||||||
#include "../sha3/sph_simd.h"
|
|
||||||
#include "../sha3/sph_echo.h"
|
|
||||||
#include "../sha3/sph_hamsi.h"
|
|
||||||
#include "../sha3/sph_fugue.h"
|
|
||||||
#include "../sha3/sph_shabal.h"
|
|
||||||
#include "../sha3/sph_whirlpool.h"
|
#include "../sha3/sph_whirlpool.h"
|
||||||
|
|
||||||
void whirlpoolx_hash(const char* input, char* output, uint32_t len)
|
void whirlpoolx_hash(const char* input, char* output, uint32_t len)
|
||||||
{
|
{
|
||||||
unsigned char hash[64];
|
unsigned char hash[64] = { 0 };
|
||||||
memset(hash, 0, sizeof(hash));
|
unsigned char hash_xored[32] = { 0 };
|
||||||
|
int i;
|
||||||
|
|
||||||
sph_whirlpool_context ctx_whirlpool;
|
sph_whirlpool_context ctx_whirlpool;
|
||||||
|
|
||||||
sph_whirlpool_init(&ctx_whirlpool);
|
sph_whirlpool_init(&ctx_whirlpool);
|
||||||
sph_whirlpool(&ctx_whirlpool, input, len);
|
sph_whirlpool(&ctx_whirlpool, input, len); /* 80 */
|
||||||
sph_whirlpool_close(&ctx_whirlpool, hash);
|
sph_whirlpool_close(&ctx_whirlpool, hash);
|
||||||
|
|
||||||
unsigned char hash_xored[sizeof(hash) / 2];
|
for (i = 0; i < 32; i++) {
|
||||||
|
hash_xored[i] = hash[i] ^ hash[i + 16];
|
||||||
uint32_t i;
|
|
||||||
for (i = 0; i < (sizeof(hash) / 2); i++)
|
|
||||||
{
|
|
||||||
hash_xored[i] = hash[i] ^ hash[i + ((sizeof(hash) / 2) / 2)];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(output, hash_xored, 32);
|
memcpy(output, hash_xored, 32);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[TCP]
|
[TCP]
|
||||||
server = yaamp.com
|
server = yaamp.com
|
||||||
port = 5033
|
port = 5333
|
||||||
password = tu8tu5
|
password = tu8tu5
|
||||||
|
|
||||||
[SQL]
|
[SQL]
|
||||||
|
@ -10,7 +10,7 @@ username = root
|
||||||
password = patofpaq
|
password = patofpaq
|
||||||
|
|
||||||
[STRATUM]
|
[STRATUM]
|
||||||
algo = groestl
|
algo = dmd-gr
|
||||||
difficulty = 0.1
|
difficulty = 0.1
|
||||||
max_ttf = 200000000000000
|
max_ttf = 20000000000
|
||||||
|
|
16
stratum/config.sample/myr-gr.conf
Normal file
16
stratum/config.sample/myr-gr.conf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[TCP]
|
||||||
|
server = yaamp.com
|
||||||
|
port = 5433
|
||||||
|
password = tu8tu5
|
||||||
|
|
||||||
|
[SQL]
|
||||||
|
host = yaampdb
|
||||||
|
database = yaamp
|
||||||
|
username = root
|
||||||
|
password = patofpaq
|
||||||
|
|
||||||
|
[STRATUM]
|
||||||
|
algo = myr-gr
|
||||||
|
difficulty = 0.1
|
||||||
|
max_ttf = 20000000000
|
||||||
|
|
|
@ -101,7 +101,9 @@ YAAMP_ALGO g_algos[] =
|
||||||
{"quark", quark_hash, 1, 0, 0},
|
{"quark", quark_hash, 1, 0, 0},
|
||||||
{"nist5", nist5_hash, 1, 0, 0},
|
{"nist5", nist5_hash, 1, 0, 0},
|
||||||
{"qubit", qubit_hash, 1, 0, 0},
|
{"qubit", qubit_hash, 1, 0, 0},
|
||||||
{"groestl", groestl_hash, 1, 0, 0},
|
{"groestl", groestl_hash, 1, 0, 0}, /* diamond (double groestl) */
|
||||||
|
{"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */
|
||||||
|
{"myr-gr", groestlmyriad_hash, 0x100, 0, 0}, /* groestl + sha 64 */
|
||||||
{"skein", skein_hash, 1, 0, 0},
|
{"skein", skein_hash, 1, 0, 0},
|
||||||
{"keccak", keccak_hash, 1, 0, 0},
|
{"keccak", keccak_hash, 1, 0, 0},
|
||||||
|
|
||||||
|
@ -114,7 +116,7 @@ YAAMP_ALGO g_algos[] =
|
||||||
{"hive", hive_hash, 0x10000, 0, 0},
|
{"hive", hive_hash, 0x10000, 0, 0},
|
||||||
{"sib", sib_hash, 1, 0, 0},
|
{"sib", sib_hash, 1, 0, 0},
|
||||||
|
|
||||||
// {"whirlpoolx", whirlpoolx_hash, 1, 0, 0},
|
{"whirlpoolx", whirlpoolx_hash, 1, 0, 0},
|
||||||
// {"jha", jha_hash, 1, 0, 0},
|
// {"jha", jha_hash, 1, 0, 0},
|
||||||
{"m7m", m7m_hash, 0x10000, 0, 0},
|
{"m7m", m7m_hash, 0x10000, 0, 0},
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,9 @@ function yaamp_get_algos()
|
||||||
'x11',
|
'x11',
|
||||||
'x13',
|
'x13',
|
||||||
'x15',
|
'x15',
|
||||||
'groestl', // dmd-gr -m 256
|
'groestl', // dmd-gr -m 256 (deprecated)
|
||||||
|
'dmd-gr',
|
||||||
|
'myr-gr',
|
||||||
'm7m',
|
'm7m',
|
||||||
'sib',
|
'sib',
|
||||||
'skein',
|
'skein',
|
||||||
|
@ -74,7 +76,9 @@ function getAlgoColors($algo)
|
||||||
'x13' => '#d0f0c0',
|
'x13' => '#d0f0c0',
|
||||||
'x14' => '#a0f0c0',
|
'x14' => '#a0f0c0',
|
||||||
'x15' => '#f0b0a0',
|
'x15' => '#f0b0a0',
|
||||||
'hive' => '#d0a0a0',
|
'groestl' => '#d0a0a0',
|
||||||
|
'dmd-gr' => '#a0c0f0',
|
||||||
|
'myr-gr' => '#a0c0f0',
|
||||||
'luffa' => '#a0c0c0',
|
'luffa' => '#a0c0c0',
|
||||||
'm7m' => '#d0a0a0',
|
'm7m' => '#d0a0a0',
|
||||||
'penta' => '#80c0c0',
|
'penta' => '#80c0c0',
|
||||||
|
@ -122,7 +126,9 @@ function getAlgoPort($algo)
|
||||||
'sib' => 5033,
|
'sib' => 5033,
|
||||||
'keccak' => 5133,
|
'keccak' => 5133,
|
||||||
'skein2' => 5233,
|
'skein2' => 5233,
|
||||||
'groestl' => 5333,
|
//'groestl' => 5333,
|
||||||
|
'dmd-gr' => 5333,
|
||||||
|
'myr-gr' => 5433,
|
||||||
'zr5' => 5533,
|
'zr5' => 5533,
|
||||||
// 5555 to 5683 reserved
|
// 5555 to 5683 reserved
|
||||||
'blake' => 5733,
|
'blake' => 5733,
|
||||||
|
|
Loading…
Add table
Reference in a new issue