-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
5,791 additions
and
1,748 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,2 +1,38 @@ | ||
# ccminer-dev | ||
mtp ccminer developpment | ||
ccminer | ||
======= | ||
|
||
Based on Christian Buchner's & Christian H.'s CUDA project, no more active on github recently. | ||
|
||
Fork by tpruvot@github with X14,X15,X17,Blake256,BlakeCoin,Lyra2RE,Skein,ZR5 and others, check the [README.txt](README.txt) | ||
|
||
BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo | ||
[![tip for next commit](https://tip4commit.com/projects/927.svg)](https://tip4commit.com/github/tpruvot/ccminer) | ||
|
||
A part of the recent algos were originally written by [djm34](https://github.com/djm34). | ||
|
||
This variant was tested and built on Linux (ubuntu server 14.04) and VStudio 2013 on Windows 7. | ||
|
||
Note that the x86 releases are generally faster than x64 ones on Windows. | ||
|
||
The recommended CUDA Toolkit version is [6.5.19](http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.19_windows_general_64.exe), but some light algos could be faster with the version 7.5 (like blake and skein). | ||
|
||
About source code dependencies | ||
------------------------------ | ||
|
||
This project requires some libraries to be built : | ||
|
||
- OpenSSL (prebuilt for win) | ||
|
||
- Curl (prebuilt for win) | ||
|
||
- pthreads (prebuilt for win) | ||
|
||
The tree now contains recent prebuilt openssl and curl .lib for both x86 and x64 platforms (windows). | ||
|
||
To rebuild them, you need to clone this repository and its submodules : | ||
git clone https://github.com/peters/curl-for-windows.git compat/curl-for-windows | ||
|
||
On Linux, you can use the helper ./build.sh (edit it if required) | ||
|
||
There is also an old [Tutorial for windows](http://cudamining.co.uk/url/tutorials/id/3) on [CudaMining](http://cudamining.co.uk) website. | ||
|
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 @@ | ||
rem Release\ccminer -a lyra2Z -o http://13.76.210.1:18888 -u zcoindev -p EDk1vvzAx6N67DND9YqyzwSUbhVvZPecVvQHmXc8MPRtest1 | ||
rem x64\Release\ccminer -a lyra2Z -o stratum+tcp://xzc.suprnova.cc:1598 -u djm34.1 -p password -i 22 | ||
x64\Release\ccminer -a lyra2rev2 -o stratum+tcp://mona.suprnova.cc:2995 -u djm34.1 -p password -i 22 -d 1070 | ||
rem x64\Release\ccminer -a lyra2Z -o http://127.0.0.1:9898 -u djm34 -p password -d gtx1080 --debug --protocol-dump --no-getwork --no-longpoll | ||
x64\Release\ccminer -a mtp -o http://127.0.0.1:8382 -u djm34 -p password --coinbase-addr TFGK4rUcabyrj9ZdPDNq8EznCb4YCAxz4Q -d gtx1080 --debug --no-getwork --no-longpoll | ||
rem Release\ccminer -a lyra2 -o stratum+tcp://dash80.suprnova.cc:80 -u djm34.1 -p password --cpu-priority 4 | ||
pause |
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
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,125 @@ | ||
/* | ||
* Copyright 2012 Luke Dashjr | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the standard MIT license. See COPYING for more details. | ||
*/ | ||
//#include <arpa/inet.h> | ||
|
||
#include <stdbool.h> | ||
#include <stdio.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <jansson.h> | ||
//uint32_t htonla(uint32_t); | ||
|
||
static const int8_t b58digits[] = { | ||
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, | ||
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, | ||
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, | ||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8,-1,-1,-1,-1,-1,-1, | ||
-1, 9,10,11,12,13,14,15, 16,-1,17,18,19,20,21,-1, | ||
22,23,24,25,26,27,28,29, 30,31,32,-1,-1,-1,-1,-1, | ||
-1,33,34,35,36,37,38,39, 40,41,42,43,-1,44,45,46, | ||
47,48,49,50,51,52,53,54, 55,56,57,-1,-1,-1,-1,-1, | ||
}; | ||
|
||
static bool _blkmk_b58tobin(void *bin, size_t binsz, const char *b58, size_t b58sz) | ||
{ | ||
const unsigned char *b58u = (const unsigned char*)b58; | ||
unsigned char *binu = (unsigned char *)bin; | ||
const size_t outisz = ( ((size_t)26) + 3) / 4; | ||
uint32_t outi[outisz]; | ||
uint64_t t; | ||
uint32_t c; | ||
size_t i, j; | ||
uint8_t bytesleft = binsz % 4; | ||
uint32_t zeromask = ~((1 << ((bytesleft) * 8)) - 1); | ||
|
||
if (!b58sz) | ||
b58sz = strlen(b58); | ||
|
||
memset(outi, 0, outisz * sizeof(*outi)); | ||
|
||
for (i = 0; i < b58sz; ++i) | ||
{ | ||
if (b58u[i] & 0x80) | ||
// High-bit set on invalid digit | ||
return false; | ||
if (b58digits[b58u[i]] == -1) | ||
// Invalid base58 digit | ||
return false; | ||
c = b58digits[b58u[i]]; | ||
for (j = outisz; j--; ) | ||
{ | ||
t = ((uint64_t)outi[j]) * 58 + c; | ||
c = (t & 0x3f00000000) >> 32; | ||
outi[j] = t & 0xffffffff; | ||
} | ||
if (c) | ||
// Output number too big (carry to the next int32) | ||
return false; | ||
if (outi[0] & zeromask) | ||
// Output number too big (last int32 filled too far) | ||
return false; | ||
} | ||
|
||
j = 0; | ||
switch (bytesleft) { | ||
case 3: | ||
*(binu++) = (outi[0] & 0xff0000) >> 16; | ||
case 2: | ||
*(binu++) = (outi[0] & 0xff00) >> 8; | ||
case 1: | ||
*(binu++) = (outi[0] & 0xff); | ||
++j; | ||
default: | ||
break; | ||
} | ||
|
||
for (; j < outisz; ++j) | ||
{ | ||
|
||
*((uint32_t*)binu) = _byteswap_ulong(outi[j]); | ||
binu += sizeof(uint32_t); | ||
} | ||
return true; | ||
} | ||
|
||
extern "C" bool base58_decode(const char *input, char *output) | ||
{ | ||
unsigned char output_bin[32] = { 0 }; | ||
bool b = _blkmk_b58tobin(output_bin, 26, input, 0); | ||
output[0] = '\0'; | ||
|
||
if(!b) return false; | ||
|
||
for(int i=2; i < 22; i++) | ||
sprintf(output+strlen(output), "%02x", output_bin[i]); | ||
|
||
return true; | ||
} | ||
|
||
|
||
#define TX_VALUE(v, s) ((unsigned int)(v>>s)&0xff) | ||
|
||
extern "C" void encode_tx_value(char *encoded, json_int_t value) | ||
{ | ||
sprintf(encoded, "%02x%02x%02x%02x%02x%02x%02x%02x", | ||
TX_VALUE(value, 0), TX_VALUE(value, 8), TX_VALUE(value, 16), TX_VALUE(value, 24), | ||
TX_VALUE(value, 32), TX_VALUE(value, 40), TX_VALUE(value, 48), TX_VALUE(value, 56)); | ||
} | ||
|
||
extern "C" void job_pack_tx(char *data, json_int_t amount, char *key) | ||
{ | ||
int ol = strlen(data); | ||
char evalue[32]; | ||
encode_tx_value(evalue, amount); | ||
|
||
sprintf(data + strlen(data), "%s", evalue); | ||
|
||
// sprintf(data + strlen(data), "1976a914%s88ac", key ? key : coind->script_pubkey); | ||
sprintf(data + strlen(data), "1976a914%s88ac", key ); | ||
|
||
} | ||
|
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
Oops, something went wrong.