This commit is contained in:
Tanguy Pruvot 2015-07-10 18:05:31 +02:00
parent c2ff5018c3
commit 307fba924d
7 changed files with 47 additions and 2 deletions

View file

@ -15,6 +15,7 @@ screen -dmS main /var/web/main.sh
screen -dmS loop2 /var/web/loop2.sh
screen -dmS blocks /var/web/blocks.sh
screen -dmS bmw /var/stratum/run.sh bmw
screen -dmS c11 /var/stratum/run.sh c11
screen -dmS x11 /var/stratum/run.sh x11
screen -dmS x13 /var/stratum/run.sh x13

21
stratum/algos/bmw.c Normal file
View file

@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "bmw.h"
#include "../sha3/sph_bmw.h"
void bmw_hash(const char* input, char* output, uint32_t len)
{
uint32_t hash[32];
sph_bmw256_context ctx_bmw;
sph_bmw256_init(&ctx_bmw);
sph_bmw256 (&ctx_bmw, input, 80);
sph_bmw256_close(&ctx_bmw, hash);
memcpy(output, hash, 32);
}

16
stratum/algos/bmw.h Normal file
View file

@ -0,0 +1,16 @@
#ifndef BMW_H
#define BMW_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
void bmw_hash(const char* input, char* output, uint32_t len);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -9,7 +9,7 @@ LDFLAGS=-O2
SOURCES=Lyra2RE.c Lyra2.c Sponge.c blake.c scrypt.c c11.c x11.c x13.c sha256.c keccak.c \
x14.c x15.c nist5.c fresh.c quark.c neoscrypt.c scryptn.c qubit.c skein.c groestl.c \
skein2.c zr5.c drop.c
skein2.c zr5.c drop.c bmw.c
OBJECTS=$(SOURCES:.c=.o)
OUTPUT=libalgos.a

View file

@ -107,6 +107,7 @@ YAAMP_ALGO g_algos[] =
{"skein", skein_hash, 1, 0, 0},
{"keccak", keccak_hash, 1, 0, 0},
{"bmw", bmw_hash, 1, 0, 0},
{"skein2", skein2_hash, 1, 0, 0},
{"zr5", zr5_hash, 1, 0, 0},
{"drop", drop_hash, 0x10000, 0x10000, 0},

View file

@ -137,6 +137,7 @@ void sha256_double_hash_hex(const char *input, char *output, unsigned int len);
#include "algos/skein.h"
#include "algos/keccak.h"
#include "algos/bmw.h"
//#include "algos/whirlpoolx.h"
#include "algos/skein2.h"
#include "algos/zr5.h"

View file

@ -18,6 +18,7 @@ function yaamp_get_algos()
'groestl', // dmd-gr -m 256
'skein',
'skein2',
'bmw',
'drop',
'zr5',
);
@ -48,6 +49,7 @@ function yaamp_get_algo_norm($algo)
'skein2' => 300,
'zr5' => 5.5,
'drop' => 1.5,
'bmw' => 100,
);
if(!isset($a[$algo]))
@ -76,6 +78,7 @@ function getAlgoColors($algo)
'skein2' => '#a0a0a0',
'zr5' => '#d0b0d0',
'drop' => '#d0b0d0',
'bmw' => '#a0a0a0',
);
if(!isset($a[$algo]))
@ -110,6 +113,7 @@ function getAlgoPort($algo)
'skein2' => 5233,
'groestl' => 5333,
'zr5' => 5533,
'bmw' => 5633,
);
if(!isset($a[$algo]))
@ -148,8 +152,9 @@ function yaamp_fee($algo)
$fee = 25.0; // i don't like this one :p
break;
case 'zr5':
$fee = 5.0;
$fee = 15.0;
break;
// case 'bmw':
case 'drop':
$fee *= 2.0;
break;