Skip to content

Commit

Permalink
add rainforest algo (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot authored Aug 29, 2018
1 parent d1ba34e commit 902da54
Show file tree
Hide file tree
Showing 7 changed files with 842 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stratum/algos/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SOURCES=lyra2re.c lyra2v2.c Lyra2.c lyra2z.c Lyra2-z.c Sponge.c allium.c \
a5a.c a5amath.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 hex.c \
phi.c phi2.c polytimos.c skunk.c sib.c veltor.c gost.c aergo.c
phi.c phi2.c polytimos.c rainforest.c skunk.c sib.c veltor.c gost.c aergo.c

OBJECTS=$(SOURCES:%.c=%.o) $(SOURCES:%.cpp=%.o)
OUTPUT=libalgos.a
Expand Down
802 changes: 802 additions & 0 deletions stratum/algos/rainforest.c

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions stratum/algos/rainforest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef RAINFOREST_H
#define RAINFOREST_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

void rf256_hash(void *out, const void *in, size_t len);
static inline void rainforest_hash(const char* input, char* output, uint32_t len) {
rf256_hash(output, input, len);
}

#ifdef __cplusplus
}
#endif

#endif
15 changes: 15 additions & 0 deletions stratum/config.sample/rainforest.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[TCP]
server = yaamp.com
port = 7443
password = tu8tu5

[SQL]
host = yaampdb
database = yaamp
username = root
password = patofpaq

[STRATUM]
algo = rainforest
difficulty = 1
max_ttf = 400000000
1 change: 1 addition & 0 deletions stratum/stratum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ YAAMP_ALGO g_algos[] =
{"lbry", lbry_hash, 0x100, 0, 0},
{"luffa", luffa_hash, 1, 0, 0},
{"penta", penta_hash, 1, 0, 0},
{"rainforest", rainforest_hash, 0x100, 0, 0},
{"skein2", skein2_hash, 1, 0, 0},
{"yescrypt", yescrypt_hash, 0x10000, 0, 0},
{"yescryptR16", yescryptR16_hash, 0x10000, 0, 0 },
Expand Down
1 change: 1 addition & 0 deletions stratum/stratum.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len);
#include "algos/lbry.h"
#include "algos/luffa.h"
#include "algos/pentablake.h"
#include "algos/rainforest.h"
#include "algos/whirlpool.h"
#include "algos/whirlpoolx.h"
#include "algos/skein2.h"
Expand Down
3 changes: 3 additions & 0 deletions web/yaamp/core/functions/yaamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function yaamp_get_algos()
'polytimos',
'quark',
'qubit',
'rainforest',
'c11',
'x11',
'x11evo',
Expand Down Expand Up @@ -174,6 +175,7 @@ function getAlgoColors($algo)
'nist5' => '#c0e0e0',
'quark' => '#c0c0c0',
'qubit' => '#d0a0f0',
'rainforest' => '#d0f0a0',
'lyra2' => '#80a0f0',
'lyra2v2' => '#80c0f0',
'lyra2z' => '#80b0f0',
Expand Down Expand Up @@ -260,6 +262,7 @@ function getAlgoPort($algo)
'vanilla' => 5755,
'blake2s' => 5766,
'penta' => 5833,
'rainforest' => 7443,
'luffa' => 5933,
'm7m' => 6033,
'veltor' => 5034,
Expand Down

0 comments on commit 902da54

Please sign in to comment.