mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
veltor algo
This commit is contained in:
parent
ac70dbe318
commit
1b4d4c788d
8 changed files with 78 additions and 1 deletions
1
rc.local
1
rc.local
|
@ -57,6 +57,7 @@ screen -dmS yescrypt $STRATUM_DIR/run.sh yescrypt
|
|||
screen -dmS zr5 $STRATUM_DIR/run.sh zr5
|
||||
screen -dmS sib $STRATUM_DIR/run.sh sib
|
||||
screen -dmS m7m $STRATUM_DIR/run.sh m7m
|
||||
screen -dmS veltor $STRATUM_DIR/run.sh veltor
|
||||
screen -dmS velvet $STRATUM_DIR/run.sh velvet
|
||||
screen -dmS argon2 $STRATUM_DIR/run.sh argon2
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c Sponge.c blake.c scrypt.c c11.c x11.c x13.c
|
|||
m7m.c magimath.cpp velvet.c \
|
||||
argon2a.c ar2/blake2b.c ar2/argon2.c ar2/ref.c ar2/cores.c ar2/ar2-scrypt-jane.c \
|
||||
hive.c pomelo.c \
|
||||
sib.c gost.c x11evo.c
|
||||
sib.c veltor.c gost.c x11evo.c
|
||||
|
||||
OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o)
|
||||
OUTPUT=libalgos.a
|
||||
|
|
40
stratum/algos/veltor.c
Normal file
40
stratum/algos/veltor.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sha3/sph_skein.h>
|
||||
#include <sha3/sph_shavite.h>
|
||||
#include <sha3/sph_shabal.h>
|
||||
//#include <sha3/sph_streebog.h>
|
||||
|
||||
#include "gost.h"
|
||||
|
||||
void veltor_hash(const char *input, char* output, uint32_t len)
|
||||
{
|
||||
uint32_t hash[16];
|
||||
|
||||
sph_skein512_context ctx_skein;
|
||||
sph_shavite512_context ctx_shavite;
|
||||
sph_shabal512_context ctx_shabal;
|
||||
sph_gost512_context ctx_gost;
|
||||
|
||||
sph_skein512_init(&ctx_skein);
|
||||
sph_skein512(&ctx_skein, input, 80);
|
||||
sph_skein512_close(&ctx_skein, (void*) hash);
|
||||
|
||||
sph_shavite512_init(&ctx_shavite);
|
||||
sph_shavite512(&ctx_shavite, (const void*) hash, 64);
|
||||
sph_shavite512_close(&ctx_shavite, (void*) hash);
|
||||
|
||||
sph_shabal512_init(&ctx_shabal);
|
||||
sph_shabal512(&ctx_shabal, (const void*) hash, 64);
|
||||
sph_shabal512_close(&ctx_shabal, (void*) hash);
|
||||
|
||||
sph_gost512_init(&ctx_gost);
|
||||
sph_gost512(&ctx_gost, (const void*) hash, 64);
|
||||
sph_gost512_close(&ctx_gost, (void*) hash);
|
||||
|
||||
memcpy(output, hash, 32);
|
||||
}
|
||||
|
16
stratum/algos/veltor.h
Normal file
16
stratum/algos/veltor.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef VELTOR_H
|
||||
#define VELTOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void veltor_hash(const char* input, char* output, uint32_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
16
stratum/config.sample/veltor.conf
Normal file
16
stratum/config.sample/veltor.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
[TCP]
|
||||
server = yaamp.com
|
||||
port = 5034
|
||||
password = tu8tu5
|
||||
|
||||
[SQL]
|
||||
host = yaampdb
|
||||
database = yaamp
|
||||
username = root
|
||||
password = patofpaq
|
||||
|
||||
[STRATUM]
|
||||
algo = veltor
|
||||
difficulty = 0.016
|
||||
max_ttf = 40000
|
||||
|
|
@ -127,6 +127,7 @@ YAAMP_ALGO g_algos[] =
|
|||
|
||||
{"hive", hive_hash, 0x10000, 0, 0},
|
||||
{"m7m", m7m_hash, 0x10000, 0, 0},
|
||||
{"veltor", veltor_hash, 1, 0, 0},
|
||||
{"velvet", velvet_hash, 0x10000, 0, 0},
|
||||
{"argon2", argon2_hash, 0x10000, 0, sha256_hash_hex },
|
||||
|
||||
|
|
|
@ -157,6 +157,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/veltor.h"
|
||||
#include "algos/velvet.h"
|
||||
#include "algos/argon2a.h"
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ function yaamp_get_algos()
|
|||
'skein',
|
||||
'skein2',
|
||||
'vanilla',
|
||||
'veltor',
|
||||
'velvet',
|
||||
'yescrypt',
|
||||
'whirlpool',
|
||||
|
@ -189,6 +190,7 @@ function getAlgoPort($algo)
|
|||
'penta' => 5833,
|
||||
'luffa' => 5933,
|
||||
'm7m' => 6033,
|
||||
'veltor' => 5034,
|
||||
'velvet' => 6133,
|
||||
'yescrypt' => 6233,
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue