Skip to content

Commit

Permalink
sha256t algo (3x sha256, not sha256d)
Browse files Browse the repository at this point in the history
Signed-off-by: Tanguy Pruvot <[email protected]>
  • Loading branch information
tpruvot committed Mar 7, 2017
1 parent 3d70026 commit ebef3c8
Show file tree
Hide file tree
Showing 9 changed files with 647 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ccminer_SOURCES = elist.h miner.h compat.h \
quark/quarkcoin.cu quark/cuda_quark_compactionTest.cu \
neoscrypt/neoscrypt.cpp neoscrypt/neoscrypt-cpu.c neoscrypt/cuda_neoscrypt.cu \
pentablake.cu skein.cu cuda_skeincoin.cu skein2.cpp zr5.cu \
sha256/sha256t.cu sha256/cuda_sha256t.cu \
sia/sia.cu sia/sia-rpc.cpp sph/blake2b.c \
sph/bmw.c sph/blake.c sph/groestl.c sph/jh.c sph/keccak.c sph/skein.c \
sph/cubehash.c sph/echo.c sph/luffa.c sph/sha2.c sph/shavite.c sph/simd.c \
Expand Down
2 changes: 2 additions & 0 deletions algos.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ enum sha_algos {
ALGO_QUBIT,
ALGO_SCRYPT,
ALGO_SCRYPT_JANE,
ALGO_SHA256T,
ALGO_SIA,
ALGO_SIB,
ALGO_SKEIN,
Expand Down Expand Up @@ -90,6 +91,7 @@ static const char *algo_names[] = {
"qubit",
"scrypt",
"scrypt-jane",
"sha256t",
"sia",
"sib",
"skein",
Expand Down
1 change: 1 addition & 0 deletions bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ void algo_free_all(int thr_id)
free_qubit(thr_id);
free_skeincoin(thr_id);
free_skein2(thr_id);
free_sha256t(thr_id);
free_sia(thr_id);
free_sib(thr_id);
free_s3(thr_id);
Expand Down
6 changes: 6 additions & 0 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ Options:\n\
penta Pentablake hash (5x Blake 512)\n\
quark Quark\n\
qubit Qubit\n\
sha256t SHA256 x3\n\
sia SIA (Blake2B)\n\
sib Sibcoin (X11+Streebog)\n\
scrypt Scrypt\n\
Expand Down Expand Up @@ -878,6 +879,7 @@ static bool submit_upstream_work(CURL *curl, struct work *work)
case ALGO_BLAKECOIN:
case ALGO_BLAKE2S:
case ALGO_BMW:
case ALGO_SHA256T:
case ALGO_VANILLA:
// fast algos require that... (todo: regen hash)
check_dups = true;
Expand Down Expand Up @@ -2099,6 +2101,7 @@ static void *miner_thread(void *userdata)
case ALGO_BLAKE:
case ALGO_BMW:
case ALGO_DECRED:
case ALGO_SHA256T:
//case ALGO_WHIRLPOOLX:
minmax = 0x40000000U;
break;
Expand Down Expand Up @@ -2292,6 +2295,9 @@ static void *miner_thread(void *userdata)
case ALGO_SKEIN2:
rc = scanhash_skein2(thr_id, &work, max_nonce, &hashes_done);
break;
case ALGO_SHA256T:
rc = scanhash_sha256t(thr_id, &work, max_nonce, &hashes_done);
break;
case ALGO_SIA:
rc = scanhash_sia(thr_id, &work, max_nonce, &hashes_done);
break;
Expand Down
2 changes: 2 additions & 0 deletions ccminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@
<CudaCompile Include="scrypt\titan_kernel.cu">
<CodeGeneration>compute_35,sm_35;compute_50,sm_50</CodeGeneration>
</CudaCompile>
<CudaCompile Include="sha256\cuda_sha256t.cu" />
<CudaCompile Include="sha256\sha256t.cu" />
<CudaCompile Include="zr5.cu" />
<CudaCompile Include="heavy\cuda_blake512.cu">
</CudaCompile>
Expand Down
9 changes: 9 additions & 0 deletions ccminer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
<Filter Include="Source Files\CUDA\lbry">
<UniqueIdentifier>{3079ea1f-f768-455a-acd6-f517fac535b4}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\sha256">
<UniqueIdentifier>{86a896c0-1688-4854-98e3-285d166069a3}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\sia">
<UniqueIdentifier>{86a896c0-1688-4854-98e0-285d166069a3}</UniqueIdentifier>
</Filter>
Expand Down Expand Up @@ -832,6 +835,12 @@
<CudaCompile Include="lbry\lbry.cu">
<Filter>Source Files\CUDA\lbry</Filter>
</CudaCompile>
<CudaCompile Include="sha256\cuda_sha256t.cu">
<Filter>Source Files\sha256</Filter>
</CudaCompile>
<CudaCompile Include="sha256\sha256t.cu">
<Filter>Source Files\sha256</Filter>
</CudaCompile>
<CudaCompile Include="sia\sia.cu">
<Filter>Source Files\sia</Filter>
</CudaCompile>
Expand Down
3 changes: 3 additions & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ extern int scanhash_nist5(int thr_id, struct work *work, uint32_t max_nonce, uns
extern int scanhash_pentablake(int thr_id, struct work *work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_quark(int thr_id, struct work *work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_qubit(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_sha256t(int thr_id, struct work *work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_sia(int thr_id, struct work *work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_sib(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
extern int scanhash_skeincoin(int thr_id, struct work* work, uint32_t max_nonce, unsigned long *hashes_done);
Expand Down Expand Up @@ -349,6 +350,7 @@ extern void free_nist5(int thr_id);
extern void free_pentablake(int thr_id);
extern void free_quark(int thr_id);
extern void free_qubit(int thr_id);
extern void free_sha256t(int thr_id);
extern void free_sia(int thr_id);
extern void free_sib(int thr_id);
extern void free_skeincoin(int thr_id);
Expand Down Expand Up @@ -869,6 +871,7 @@ void quarkhash(void *state, const void *input);
void qubithash(void *state, const void *input);
void scrypthash(void* output, const void* input);
void scryptjane_hash(void* output, const void* input);
void sha256t_hash(void *output, const void *input);
void sibhash(void *output, const void *input);
void skeincoinhash(void *output, const void *input);
void skein2hash(void *output, const void *input);
Expand Down
Loading

0 comments on commit ebef3c8

Please sign in to comment.