mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
handle allium algo, kind of double lyra2
This commit is contained in:
parent
daac1a10c6
commit
b43d646548
8 changed files with 85 additions and 2 deletions
3
rc.local
3
rc.local
|
@ -49,7 +49,8 @@ screen -dmS jha $STRATUM_DIR/run.sh jha
|
||||||
#screen -dmS dmd-gr $STRATUM_DIR/run.sh dmd-gr
|
#screen -dmS dmd-gr $STRATUM_DIR/run.sh dmd-gr
|
||||||
screen -dmS myr-gr $STRATUM_DIR/run.sh myr-gr
|
screen -dmS myr-gr $STRATUM_DIR/run.sh myr-gr
|
||||||
screen -dmS lbry $STRATUM_DIR/run.sh lbry
|
screen -dmS lbry $STRATUM_DIR/run.sh lbry
|
||||||
screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2
|
screen -dmS allium $STRATUM_DIR/run.sh allium
|
||||||
|
#screen -dmS lyra2 $STRATUM_DIR/run.sh lyra2
|
||||||
screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2
|
screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2
|
||||||
screen -dmS zero $STRATUM_DIR/run.sh lyra2z
|
screen -dmS zero $STRATUM_DIR/run.sh lyra2z
|
||||||
|
|
||||||
|
|
46
stratum/algos/allium.c
Normal file
46
stratum/algos/allium.c
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
#include <memory.h>
|
||||||
|
|
||||||
|
#include "sha3/sph_blake.h"
|
||||||
|
#include "sha3/sph_groestl.h"
|
||||||
|
#include "sha3/sph_skein.h"
|
||||||
|
#include "sha3/sph_keccak.h"
|
||||||
|
#include "sha3/sph_cubehash.h"
|
||||||
|
|
||||||
|
#include "Lyra2.h"
|
||||||
|
|
||||||
|
void allium_hash(const char* input, char* output, uint32_t len)
|
||||||
|
{
|
||||||
|
uint32_t hashA[8], hashB[8];
|
||||||
|
|
||||||
|
sph_blake256_context ctx_blake;
|
||||||
|
sph_keccak256_context ctx_keccak;
|
||||||
|
sph_cubehash512_context ctx_cubehash;
|
||||||
|
sph_skein256_context ctx_skein;
|
||||||
|
sph_groestl256_context ctx_groestl;
|
||||||
|
|
||||||
|
sph_blake256_init(&ctx_blake);
|
||||||
|
sph_blake256(&ctx_blake, input, 80);
|
||||||
|
sph_blake256_close(&ctx_blake, hashA);
|
||||||
|
|
||||||
|
sph_keccak256_init(&ctx_keccak);
|
||||||
|
sph_keccak256(&ctx_keccak, hashA, 32);
|
||||||
|
sph_keccak256_close(&ctx_keccak, hashB);
|
||||||
|
|
||||||
|
LYRA2(hashA, 32, hashB, 32, hashB, 32, 1, 8, 8);
|
||||||
|
|
||||||
|
sph_cubehash256_init(&ctx_cubehash);
|
||||||
|
sph_cubehash256(&ctx_cubehash, hashA, 32);
|
||||||
|
sph_cubehash256_close(&ctx_cubehash, hashB);
|
||||||
|
|
||||||
|
LYRA2(hashA, 32, hashB, 32, hashB, 32, 1, 8, 8);
|
||||||
|
|
||||||
|
sph_skein256_init(&ctx_skein);
|
||||||
|
sph_skein256(&ctx_skein, hashA, 32);
|
||||||
|
sph_skein256_close(&ctx_skein, hashB);
|
||||||
|
|
||||||
|
sph_groestl256_init(&ctx_groestl);
|
||||||
|
sph_groestl256(&ctx_groestl, hashB, 32);
|
||||||
|
sph_groestl256_close(&ctx_groestl, hashA);
|
||||||
|
|
||||||
|
memcpy(output, hashA, 32);
|
||||||
|
}
|
16
stratum/algos/allium.h
Normal file
16
stratum/algos/allium.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#ifndef ALLIUM_H
|
||||||
|
#define ALLIUM_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
void allium_hash(const char* input, char* output, uint32_t len);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -8,7 +8,7 @@ CXXFLAGS = -O2 -I.. -march=native
|
||||||
CFLAGS= $(CXXFLAGS) -std=gnu99
|
CFLAGS= $(CXXFLAGS) -std=gnu99
|
||||||
LDFLAGS=-O2 -lgmp
|
LDFLAGS=-O2 -lgmp
|
||||||
|
|
||||||
SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2z.c Sponge.c \
|
SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2z.c Sponge.c allium.c \
|
||||||
blake.c scrypt.c c11.c x11.c x12.c x13.c sha256.c sha256t.c jha.c keccak.c deep.c tribus.c \
|
blake.c scrypt.c c11.c x11.c x12.c x13.c sha256.c sha256t.c jha.c keccak.c deep.c tribus.c \
|
||||||
hsr14.c sm3.c \
|
hsr14.c sm3.c \
|
||||||
x14.c x15.c x17.c nist5.c fresh.c quark.c neoscrypt.c scryptn.c qubit.c skein.c groestl.c \
|
x14.c x15.c x17.c nist5.c fresh.c quark.c neoscrypt.c scryptn.c qubit.c skein.c groestl.c \
|
||||||
|
|
15
stratum/config.sample/allium.conf
Normal file
15
stratum/config.sample/allium.conf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[TCP]
|
||||||
|
server = yaamp.com
|
||||||
|
port = 4443
|
||||||
|
password = tu8tu5
|
||||||
|
|
||||||
|
[SQL]
|
||||||
|
host = yaampdb
|
||||||
|
database = yaamp
|
||||||
|
username = root
|
||||||
|
password = patofpaq
|
||||||
|
|
||||||
|
[STRATUM]
|
||||||
|
algo = allium
|
||||||
|
difficulty = 0.01
|
||||||
|
max_ttf = 4000000
|
|
@ -133,6 +133,7 @@ YAAMP_ALGO g_algos[] =
|
||||||
|
|
||||||
{"jha", jha_hash, 0x10000, 0},
|
{"jha", jha_hash, 0x10000, 0},
|
||||||
|
|
||||||
|
{"allium", allium_hash, 1, 0, 0},
|
||||||
{"lyra2", lyra2re_hash, 0x80, 0, 0},
|
{"lyra2", lyra2re_hash, 0x80, 0, 0},
|
||||||
{"lyra2v2", lyra2v2_hash, 0x100, 0, 0},
|
{"lyra2v2", lyra2v2_hash, 0x100, 0, 0},
|
||||||
{"lyra2z", lyra2z_hash, 0x100, 0, 0},
|
{"lyra2z", lyra2z_hash, 0x100, 0, 0},
|
||||||
|
|
|
@ -164,6 +164,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len);
|
||||||
#include "algos/hsr14.h"
|
#include "algos/hsr14.h"
|
||||||
#include "algos/quark.h"
|
#include "algos/quark.h"
|
||||||
#include "algos/neoscrypt.h"
|
#include "algos/neoscrypt.h"
|
||||||
|
#include "algos/allium.h"
|
||||||
#include "algos/lyra2re.h"
|
#include "algos/lyra2re.h"
|
||||||
#include "algos/lyra2v2.h"
|
#include "algos/lyra2v2.h"
|
||||||
#include "algos/lyra2z.h"
|
#include "algos/lyra2z.h"
|
||||||
|
|
|
@ -8,6 +8,7 @@ function yaamp_get_algos()
|
||||||
'sha256t',
|
'sha256t',
|
||||||
'scrypt',
|
'scrypt',
|
||||||
'scryptn',
|
'scryptn',
|
||||||
|
'allium',
|
||||||
'argon2',
|
'argon2',
|
||||||
'bastion',
|
'bastion',
|
||||||
'bitcore',
|
'bitcore',
|
||||||
|
@ -148,6 +149,7 @@ function getAlgoColors($algo)
|
||||||
'x16s' => '#f0b080',
|
'x16s' => '#f0b080',
|
||||||
'x17' => '#f0b0a0',
|
'x17' => '#f0b0a0',
|
||||||
'xevan' => '#f0b0a0',
|
'xevan' => '#f0b0a0',
|
||||||
|
'allium' => '#80a0d0',
|
||||||
'argon2' => '#e0d0e0',
|
'argon2' => '#e0d0e0',
|
||||||
'bastion' => '#e0b0b0',
|
'bastion' => '#e0b0b0',
|
||||||
'blake' => '#f0f0f0',
|
'blake' => '#f0f0f0',
|
||||||
|
@ -227,6 +229,7 @@ function getAlgoPort($algo)
|
||||||
'neoscrypt' => 4233,
|
'neoscrypt' => 4233,
|
||||||
'argon2' => 4234,
|
'argon2' => 4234,
|
||||||
'scryptn' => 4333,
|
'scryptn' => 4333,
|
||||||
|
'allium' => 4443,
|
||||||
'lyra2' => 4433,
|
'lyra2' => 4433,
|
||||||
'lyra2v2' => 4533,
|
'lyra2v2' => 4533,
|
||||||
'lyra2z' => 4553,
|
'lyra2z' => 4553,
|
||||||
|
|
Loading…
Add table
Reference in a new issue