mirror of
https://github.com/GOSTSec/ccminer
synced 2025-02-02 01:44:32 +00:00
last minute changes to repo (v0.1 release)
This commit is contained in:
parent
6aac3fbba5
commit
f67ee69819
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
HeavyCUDA release Mar 18th 2014 - Initial Release
|
ccMiner release Mar 18th 2014 - Initial Release
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
|
|
||||||
***************************************************************
|
***************************************************************
|
||||||
@ -108,7 +108,7 @@ and also many thanks to anyone else who contributed to the original
|
|||||||
cpuminer application (Jeff Garzik, pooler), it's original HVC-fork
|
cpuminer application (Jeff Garzik, pooler), it's original HVC-fork
|
||||||
and the HVC-fork available at hvc.1gh.com
|
and the HVC-fork available at hvc.1gh.com
|
||||||
|
|
||||||
Source code is included to satisfy GNU GPL V2 requirements.
|
Source code is included to satisfy GNU GPL V3 requirements.
|
||||||
|
|
||||||
|
|
||||||
With kind regards,
|
With kind regards,
|
||||||
|
14
cpu-miner.c
14
cpu-miner.c
@ -179,9 +179,8 @@ static char const usage[] = "\
|
|||||||
Usage: " PROGRAM_NAME " [OPTIONS]\n\
|
Usage: " PROGRAM_NAME " [OPTIONS]\n\
|
||||||
Options:\n\
|
Options:\n\
|
||||||
-a, --algo=ALGO specify the algorithm to use\n\
|
-a, --algo=ALGO specify the algorithm to use\n\
|
||||||
scrypt scrypt(1024, 1, 1) (default)\n\
|
fugue256 Fuguecoin hash\n\
|
||||||
sha256d SHA-256d\n\
|
heavy Heavycoin hash\n\
|
||||||
heavy Heavycoin hash\n\
|
|
||||||
-v, --vote=VOTE block reward vote\n\
|
-v, --vote=VOTE block reward vote\n\
|
||||||
-m, --trust-pool trust the max block reward vote (maxvote) sent by the pool\n\
|
-m, --trust-pool trust the max block reward vote (maxvote) sent by the pool\n\
|
||||||
-o, --url=URL URL of mining server\n\
|
-o, --url=URL URL of mining server\n\
|
||||||
@ -190,7 +189,7 @@ Options:\n\
|
|||||||
-p, --pass=PASSWORD password for mining server\n\
|
-p, --pass=PASSWORD password for mining server\n\
|
||||||
--cert=FILE certificate for mining server using SSL\n\
|
--cert=FILE certificate for mining server using SSL\n\
|
||||||
-x, --proxy=[PROTOCOL://]HOST[:PORT] connect through a proxy\n\
|
-x, --proxy=[PROTOCOL://]HOST[:PORT] connect through a proxy\n\
|
||||||
-t, --threads=N number of miner threads (default: number of processors)\n\
|
-t, --threads=N number of miner threads (default: number of nVidia GPUs)\n\
|
||||||
-r, --retries=N number of times to retry if a network call fails\n\
|
-r, --retries=N number of times to retry if a network call fails\n\
|
||||||
(default: retry indefinitely)\n\
|
(default: retry indefinitely)\n\
|
||||||
-R, --retry-pause=N time to pause between retries, in seconds (default: 30)\n\
|
-R, --retry-pause=N time to pause between retries, in seconds (default: 30)\n\
|
||||||
@ -666,13 +665,13 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
|
|||||||
if (opt_algo == ALGO_HEAVY)
|
if (opt_algo == ALGO_HEAVY)
|
||||||
heavycoin_hash(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
|
heavycoin_hash(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
|
||||||
else
|
else
|
||||||
sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
|
fugue256_hash(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
|
||||||
for (i = 0; i < sctx->job.merkle_count; i++) {
|
for (i = 0; i < sctx->job.merkle_count; i++) {
|
||||||
memcpy(merkle_root + 32, sctx->job.merkle[i], 32);
|
memcpy(merkle_root + 32, sctx->job.merkle[i], 32);
|
||||||
if (opt_algo == ALGO_HEAVY)
|
if (opt_algo == ALGO_HEAVY)
|
||||||
heavycoin_hash(merkle_root, merkle_root, 64);
|
heavycoin_hash(merkle_root, merkle_root, 64);
|
||||||
else
|
else
|
||||||
sha256d(merkle_root, merkle_root, 64);
|
fugue256_hash(merkle_root, merkle_root, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Increment extranonce2 */
|
/* Increment extranonce2 */
|
||||||
@ -811,6 +810,7 @@ static void *miner_thread(void *userdata)
|
|||||||
|
|
||||||
/* scan nonces for a proof-of-work hash */
|
/* scan nonces for a proof-of-work hash */
|
||||||
switch (opt_algo) {
|
switch (opt_algo) {
|
||||||
|
/*
|
||||||
case ALGO_SCRYPT:
|
case ALGO_SCRYPT:
|
||||||
rc = scanhash_scrypt(thr_id, work.data, scratchbuf, work.target,
|
rc = scanhash_scrypt(thr_id, work.data, scratchbuf, work.target,
|
||||||
max_nonce, &hashes_done);
|
max_nonce, &hashes_done);
|
||||||
@ -820,7 +820,7 @@ static void *miner_thread(void *userdata)
|
|||||||
rc = scanhash_sha256d(thr_id, work.data, work.target,
|
rc = scanhash_sha256d(thr_id, work.data, work.target,
|
||||||
max_nonce, &hashes_done);
|
max_nonce, &hashes_done);
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
case ALGO_HEAVY:
|
case ALGO_HEAVY:
|
||||||
rc = scanhash_heavy(thr_id, work.data, work.target,
|
rc = scanhash_heavy(thr_id, work.data, work.target,
|
||||||
max_nonce, &hashes_done, work.maxvote);
|
max_nonce, &hashes_done, work.maxvote);
|
||||||
|
@ -72,3 +72,11 @@ extern "C" int scanhash_fugue256(int thr_id, uint32_t *pdata, const uint32_t *pt
|
|||||||
*hashes_done = pdata[19] - start_nonce + 1;
|
*hashes_done = pdata[19] - start_nonce + 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fugue256_hash(unsigned char* output, const unsigned char* input, int len)
|
||||||
|
{
|
||||||
|
sph_fugue256_context ctx;
|
||||||
|
sph_fugue256_init(&ctx);
|
||||||
|
sph_fugue256(&ctx, input, len);
|
||||||
|
sph_fugue256_close(&ctx, (void *)output);
|
||||||
|
}
|
||||||
|
1
miner.h
1
miner.h
@ -211,6 +211,7 @@ extern int scanhash_fugue256(int thr_id, uint32_t *pdata,
|
|||||||
const uint32_t *ptarget, uint32_t max_nonce,
|
const uint32_t *ptarget, uint32_t max_nonce,
|
||||||
unsigned long *hashes_done);
|
unsigned long *hashes_done);
|
||||||
|
|
||||||
|
extern void fugue256_hash(unsigned char* output, const unsigned char* input, int len);
|
||||||
extern void heavycoin_hash(unsigned char* output, const unsigned char* input, int len);
|
extern void heavycoin_hash(unsigned char* output, const unsigned char* input, int len);
|
||||||
|
|
||||||
struct thr_info {
|
struct thr_info {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user