mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
tribus algo, nothing complicated...
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
This commit is contained in:
parent
14740a09cb
commit
c3721b77c9
8 changed files with 74 additions and 1 deletions
1
rc.local
1
rc.local
|
@ -32,6 +32,7 @@ screen -dmS xevan $STRATUM_DIR/run.sh xevan
|
|||
screen -dmS timetravel $STRATUM_DIR/run.sh timetravel
|
||||
screen -dmS bitcore $STRATUM_DIR/run.sh bitcore
|
||||
screen -dmS hmq1725 $STRATUM_DIR/run.sh hmq1725
|
||||
screen -dmS tribus $STRATUM_DIR/run.sh tribus
|
||||
|
||||
screen -dmS sha $STRATUM_DIR/run.sh sha
|
||||
screen -dmS sha256t $STRATUM_DIR/run.sh sha256t
|
||||
|
|
|
@ -9,7 +9,7 @@ CFLAGS= $(CXXFLAGS) -std=gnu99
|
|||
LDFLAGS=-O2 -lgmp
|
||||
|
||||
SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2z.c Sponge.c \
|
||||
blake.c scrypt.c c11.c x11.c x13.c sha256.c sha256t.c jha.c keccak.c deep.c \
|
||||
blake.c scrypt.c c11.c x11.c x13.c sha256.c sha256t.c jha.c keccak.c deep.c tribus.c \
|
||||
x14.c x15.c x17.c nist5.c fresh.c quark.c neoscrypt.c scryptn.c qubit.c skein.c groestl.c \
|
||||
bitcore.c timetravel.c xevan.c bastion.c hmq17.c \
|
||||
skein2.c zr5.c bmw.c luffa.c pentablake.c whirlpool.c whirlpoolx.c blakecoin.c \
|
||||
|
|
34
stratum/algos/tribus.c
Normal file
34
stratum/algos/tribus.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sha3/sph_jh.h>
|
||||
#include <sha3/sph_keccak.h>
|
||||
#include <sha3/sph_echo.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
void tribus_hash(const char* input, char* output, uint32_t len)
|
||||
{
|
||||
uint8_t _ALIGN(64) hash[64];
|
||||
|
||||
sph_jh512_context ctx_jh;
|
||||
sph_keccak512_context ctx_keccak;
|
||||
sph_echo512_context ctx_echo;
|
||||
|
||||
sph_jh512_init(&ctx_jh);
|
||||
sph_jh512(&ctx_jh, input, 80);
|
||||
sph_jh512_close(&ctx_jh, (void*) hash);
|
||||
|
||||
sph_keccak512_init(&ctx_keccak);
|
||||
sph_keccak512(&ctx_keccak, (const void*) hash, 64);
|
||||
sph_keccak512_close(&ctx_keccak, (void*) hash);
|
||||
|
||||
sph_echo512_init(&ctx_echo);
|
||||
sph_echo512(&ctx_echo, (const void*) hash, 64);
|
||||
sph_echo512_close(&ctx_echo, (void*) hash);
|
||||
|
||||
memcpy(output, hash, 32);
|
||||
}
|
||||
|
16
stratum/algos/tribus.h
Normal file
16
stratum/algos/tribus.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef TRIBUS_H
|
||||
#define TRIBUS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void tribus_hash(const char* input, char* output, uint32_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
16
stratum/config.sample/tribus.conf
Normal file
16
stratum/config.sample/tribus.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
[TCP]
|
||||
server = yaamp.com
|
||||
port = 8533
|
||||
password = tu8tu5
|
||||
|
||||
[SQL]
|
||||
host = yaampdb
|
||||
database = yaamp
|
||||
username = root
|
||||
password = patofpaq
|
||||
|
||||
[STRATUM]
|
||||
algo = tribus
|
||||
difficulty = 0.25
|
||||
max_ttf = 4000000
|
||||
|
|
@ -132,6 +132,7 @@ YAAMP_ALGO g_algos[] =
|
|||
{"dmd-gr", groestl_hash, 0x100, 0, 0}, /* diamond (double groestl) */
|
||||
{"myr-gr", groestlmyriad_hash, 1, 0, 0}, /* groestl + sha 64 */
|
||||
{"skein", skein_hash, 1, 0, 0},
|
||||
{"tribus", tribus_hash, 1, 0, 0},
|
||||
{"keccak", keccak256_hash, 0x80, 0, sha256_hash_hex },
|
||||
|
||||
{"bmw", bmw_hash, 1, 0, 0},
|
||||
|
@ -382,6 +383,7 @@ void *stratum_thread(void *p)
|
|||
if(sock <= 0)
|
||||
{
|
||||
stratumlog("%s accept error %d %d\n", g_current_algo->name, res, errno);
|
||||
usleep(10000);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -171,6 +171,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len);
|
|||
#include "algos/hive.h"
|
||||
#include "algos/sib.h"
|
||||
#include "algos/m7m.h"
|
||||
#include "algos/tribus.h"
|
||||
#include "algos/veltor.h"
|
||||
#include "algos/velvet.h"
|
||||
#include "algos/argon2a.h"
|
||||
|
|
|
@ -45,6 +45,7 @@ function yaamp_get_algos()
|
|||
'skein',
|
||||
'skein2',
|
||||
'timetravel',
|
||||
'tribus',
|
||||
'vanilla',
|
||||
'veltor',
|
||||
'velvet',
|
||||
|
@ -152,6 +153,7 @@ function getAlgoColors($algo)
|
|||
'skein2' => '#c8a060',
|
||||
'timetravel' => '#f0b0d0',
|
||||
'bitcore' => '#f790c0',
|
||||
'tribus' => '#c0d0d0',
|
||||
'vanilla' => '#f0f0f0',
|
||||
'velvet' => '#aac0cc',
|
||||
'whirlpool' => '#d0e0e0',
|
||||
|
@ -220,6 +222,7 @@ function getAlgoPort($algo)
|
|||
'velvet' => 6133,
|
||||
'yescrypt' => 6233,
|
||||
'bastion' => 6433,
|
||||
'tribus' => 8533,
|
||||
);
|
||||
|
||||
global $configCustomPorts;
|
||||
|
|
Loading…
Add table
Reference in a new issue