forked from lucasjones/cpuminer-multi
-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tanguy Pruvot <[email protected]>
- Loading branch information
Showing
10 changed files
with
110 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
Version 1.3.6 (dev) | ||
- Add alliumv2 algo | ||
|
||
Version 1.3.5 | ||
- Add allium algo | ||
- Add x12 algo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#include <memory.h> | ||
|
||
#include "sha3/sph_blake.h" | ||
#include "sha3/sph_groestl.h" | ||
#include "sha3/sph_cubehash.h" | ||
#include "sha3/sph_skein.h" | ||
#include "sha3/sph_keccak.h" | ||
|
||
#include "lyra2/Lyra2.h" | ||
|
||
#include "miner.h" | ||
|
||
void alliumV2_hash(void *state, const void *input) | ||
{ | ||
uint32_t _ALIGN(128) hashA[8], hashB[8]; | ||
|
||
sph_blake256_context ctx_blake; | ||
sph_keccak256_context ctx_keccak; | ||
sph_cubehash256_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, 4, 4); | ||
|
||
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, 4, 4); | ||
|
||
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(state, hashA, 32); | ||
} | ||
|
||
int scanhash_alliumV2(int thr_id, struct work *work, uint32_t max_nonce, uint64_t *hashes_done) | ||
{ | ||
uint32_t _ALIGN(128) hash[8]; | ||
uint32_t _ALIGN(128) endiandata[20]; | ||
uint32_t *pdata = work->data; | ||
uint32_t *ptarget = work->target; | ||
|
||
const uint32_t Htarg = ptarget[7]; | ||
const uint32_t first_nonce = pdata[19]; | ||
uint32_t nonce = first_nonce; | ||
|
||
if (opt_benchmark) | ||
ptarget[7] = 0x0000ff; | ||
|
||
for (int i=0; i < 19; i++) { | ||
be32enc(&endiandata[i], pdata[i]); | ||
} | ||
|
||
do { | ||
be32enc(&endiandata[19], nonce); | ||
alliumV2_hash(hash, endiandata); | ||
|
||
if (hash[7] <= Htarg && fulltest(hash, ptarget)) { | ||
work_set_target_ratio(work, hash); | ||
pdata[19] = nonce; | ||
*hashes_done = pdata[19] - first_nonce; | ||
return 1; | ||
} | ||
nonce++; | ||
|
||
} while (nonce < max_nonce && !work_restart[thr_id].restart); | ||
|
||
pdata[19] = nonce; | ||
*hashes_done = pdata[19] - first_nonce + 1; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
AC_INIT([cpuminer-multi], [1.3.5]) | ||
AC_INIT([cpuminer-multi], [1.3.6]) | ||
|
||
AC_PREREQ([2.59c]) | ||
AC_CANONICAL_SYSTEM | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters