Search content
Sort by

Showing 20 of 26 results by jenga
Post
Topic
Board Bitcoin Technical Support
Re: Transaction stuck, blockchain.info can't find it
by
jenga
on 18/08/2016, 00:22:07 UTC
Ok i managed to sync with pruning enabled. As soon as it finished i checked on blockchain again and to my surprise the transaction went through.

It probably needs rebroadcasting.

Nodes do not relay invalid transactions, eg. Inputs that conflicts with another inputs of a transaction in their mempool or block database. This might be the case where the nodes that you relayed it to found it invalid and decided not to relay at all. Blockchain.info do display transactions that are conflicted if they know it.

Not sure if it had to do anything with the syncing process or just a matter of waiting a bit longer to rebroadcast. Also had to move the data folder to another partition so maybe that helped too somehow. Next time i'll attempt a higher fee anyway.

Then follow the instructions at http://www.achow101.com/2016/07/Bitcoin-Core-Troubleshooting#stuck-tx to fix your problem.

tried abandontransaction right after syncing but returned error code -5 and attempted zapwallettxes but doesn't work in pruning mode, but it's ok apparently i didn't actually need to run the commands xd

Thanks all for the support
Post
Topic
Board Bitcoin Technical Support
Re: Transaction stuck, blockchain.info can't find it
by
jenga
on 16/08/2016, 15:37:17 UTC
Have you sent any transactions prior to that? Can you examine the transaction and see if you can see the unspent outputs in the address on a block explorer? It's best to not send transactions when the client is out of sync since the client can construct a transaction with spent outputs.

It's most likely an issue with the small fee. Run bitcoin core with -zapwallettxes and you can resend it.

I have sent many transactions before, last 2 months ago with similar amount and same fee.
I don't know how to examine a transaction as you said.
I'm now syncing the client. will report back when finished.

It's possible that your transaction is a double spend because you are not synced. This would make your transaction invalid and thus rejected.

You cannot cancel a transaction. Once it is broadcast, you cannot abort it.

However, you can remove the transaction from your wallet and resend it. First you need to sync your wallet. You can enable pruning to save space.

To enable pruning, add
Code:
prune=550
To the bitcoin.conf file in your data directory.

Then follow the instructions at http://www.achow101.com/2016/07/Bitcoin-Core-Troubleshooting#stuck-tx to fix your problem.

Ok didn't know pruning was a thing, now syncing everything up (the huge bump in space freed was weirdly satisfactory to watch, in case you were wondering), will report when finished (might take a while).
Even if the transaction was a double spent, shouldn't it show on blockchain anyway?
Post
Topic
Board Bitcoin Technical Support
Topic OP
Transaction stuck, blockchain.info can't find it
by
jenga
on 16/08/2016, 14:48:13 UTC
3 hours ago i committed this transaction:
552197fd89d241aa97d02846fc8f570ffe5e60e183c48c6e31848e521a719371-000
to: 1HcPgPjKsGFXwV7JKFCYFATHA8yKQbYo4T

in the client it says 0 unconfirmed with a fee of 0.00009567.
Blockchain.info cannot find this transaction, which is the worrying part.

My bitcoin core is 14 weeks behind on blockchain syncronization, thats because i run out of space to store it (am poor lol).
I don't think thats the issue because months before i sent successfully while being unsyncronized, but i say it here anyway.

Should i wait? otherwise i will remove the transaction.
Post
Topic
Board Computer hardware
Topic OP
[WTB] used EVGA GTX 750ti
by
jenga
on 13/05/2015, 13:42:35 UTC
Looking for a fully functional EVGA gtx 750 ti 2GB to use in a budget gaming pc.
It can be either the SC version or the non-SC version.
Original package not necessary.

Negotiable price is 0.35 BTC (~85 USD on BTC-E) shipping taxes excluded.

International shipping to Europe required. Pm to discuss details on shipping.
Will support escrow.
Post
Topic
Board Service Announcements
Re: SteamBits.com - Buy Video Games with Bitcoins! Sale: GRID 2!!
by
jenga
on 22/12/2013, 00:23:19 UTC
I'm looking for the latest version of Race The Sun by Flippfly. Any chance for it to be added in the near future?
Post
Topic
Board Mining speculation
Re: Bitcoin difficulty is slowing down?
by
jenga
on 10/12/2013, 08:16:49 UTC
For some reason, according to this chart, the bitcoin network hashrate is having major fluctuations and it appears as it is losing its exponential growth:
http://bitcoin.sipa.be/speed-lin.png
Why is that? Some big pool is having issues lately?

At the very end of that graph, aren't the estimate lines speeding up with a vengeance?

Not when I started the thread...
Post
Topic
Board Mining speculation
Re: Bitcoin difficulty is slowing down?
by
jenga
on 27/11/2013, 12:05:26 UTC
KNC stopped shipping?  Don't worry they will be shipping 2.5 PH/s+ pretty soon again.

Acknowledged.

Also you do understand that exponential growth forever is impossible right?  Within a couple years Bitcoin mining would use more energy than used by the human race for all other purposes combined.  Law of large numbers takes over.   When network is 1 PH/s for the network to double in a month requires 1 PH/s more hash power today it would require >5 PH/s so even if for example ASIC companies shipped out constant volume the growth as a % would decline.  For the growth % to remain constant they would need to manufacture and ship an exponential volume.  Thousands of units per month this year,  millions of units per month next year, billions of units per month the year after that, trillions of units per month the year after that, quadrillions of units per month the year after that ...

That's true of course. But one shall also consider the efficiency of new ASIC chips making the exponential growth last longer. If even asic companies sell at a constant rate, but their chips become faster and more efficient the effect is the same with lower energy consumption. As older mining rigs get replaced by new less power hungry miners the total network energy consumption may even decrease (very unlikely but hey, we are in the "speculation" subsection Tongue).
My point is that the hashrate will continue going up exponentially for an unexpectedly long amount of time.
Post
Topic
Board Mining speculation
Topic OP
Bitcoin difficulty is slowing down?
by
jenga
on 27/11/2013, 11:35:55 UTC
For some reason, according to this chart, the bitcoin network hashrate is having major fluctuations and it appears as it is losing its exponential growth:
http://bitcoin.sipa.be/speed-lin.png
Why is that? Some big pool is having issues lately?
Post
Topic
Board Lending
Re: 2 BTC loan request
by
jenga
on 28/09/2013, 21:28:28 UTC
This guys name is too close to my own. Its kind of freaking me out a bit

... Coincidence? Tongue

His mining rig is so powerful that it acquired consciousness and created an account by itself. Lips sealed
https://en.wikipedia.org/wiki/Zobrist_hashing
Post
Topic
Board Hardware
Re: Black Arrow announces 28nm 100Ghash Bitcoin ASIC from $1.49/Ghash
by
jenga
on 28/09/2013, 20:18:32 UTC
Not really following the thread but last time I checked the X-1 was 64GH/s, how comes that now it runs 100GH/s? Also the discount is now 35% from the website. Looks good, I'll consider doing a preorder if the offer lasts.
Post
Topic
Board Lending
Re: 2 BTC loan request
by
jenga
on 28/09/2013, 19:21:03 UTC
I show transaction ids then, since everyone thinks I'm a freaking terrorist.

Received 3.1 BTCs:
a6db19fb8bca10c144256de011a7d8dcc96db1cc2d5287e6fd291fbe3f245159-000

Sent 2.83 BTCs to OutCast3k:
e7bda3fcb6ef45210e014052663fbe506d507101e2d1b9ad8b90eb2dd4f269f0-000

Since I received 3 BTCs and in the end it turned out I didn't need the loan I could afford 3 BlueFurys instead of just 2.
You can see my name in OutCast3k's OP post:
https://bitcointalk.org/index.php?topic=297320.0

This guys name is too close to my own. Its kind of freaking me out a bit
Aw come on...
Post
Topic
Board Group buys
Re: [EU/UK GROUP BUY] Blue Fury USB miner 2.2 - 2.7 GH/s
by
jenga
on 27/09/2013, 16:50:02 UTC
...
j0ey2069 3 usbs paid
jml 4 usbs paid

= 398

No more orders

Can someone round it to 400? Roll Eyes
Post
Topic
Board Lending
Re: 2 BTC loan request
by
jenga
on 27/09/2013, 13:04:10 UTC
THREAD CLOSED.

I received my coins very quickly. I just had to wait a bit more. No more need for the loan.
Post
Topic
Board Lending
Re: 2 BTC loan request
by
jenga
on 27/09/2013, 11:13:49 UTC
Is it possible to buy this stuff directly with my name and address and change it when you pay back the loan?

Interesting. In this case I also get to have a collateral I guess (in the sense of: I don't pay back my loan => you keep the asics). Were you one of the guys who ordered them in the thread I linked? Only thing is that I need to be sure that such an address change can be made. I'll pm the OP for better info on expedition times and such if its ok.

In the meanwhile, I keep my loan offer up and accepting advices.
Post
Topic
Board Lending
Topic OP
2 BTC loan request
by
jenga
on 27/09/2013, 10:40:31 UTC
Hi everyone.
I request a loan and yes I'm a newbie, let me at least try to explain my situation and what I'm going to do with the loan.
I wanted to buy 2 Blue fury units from this thread:
https://bitcointalk.org/index.php?topic=297320.0

This is a short-term loan request. I'm NOT going to mine with them and then pay my debts...

In total 2 units cost 1.98 BTCs with shipping in my country.

To buy them, yesterday morning I performed a trade on LocalBitcoins.com worth 3 BTCs with SEPA transfer (pm me for details).
There is a 80% chance of completing the payment and receiving the BTCs by this evening but I don't really feel like taking this risk since the deadline for orders is this midnight.

Instead, I thought it would be faster to get a loan right now and since I'm going to get 3 BTCs I can support interests as high as 1 BTC.
In the worst case I can pay back by monday or tuesday perhaps.

Before doing any loan-related transactions, I want to wait some more hours just in case I get my coins soon.

If someone is interested, any offer is accepted with interests less than 1 BTC.
Post
Topic
Board Service Announcements
Re: CoinAd.com, a Paid-To-Click that pays you in Bitcoins!
by
jenga
on 22/09/2013, 15:24:19 UTC
Referral links basically give a bonus or something similar to the user who referred you, to encourage people to spread word about the service. They usually don't change anything the end user sees on the site.

Not sure how to interpret your comment Undecided Lemme reformulate the question. How do I become referral of someone on coinAd? Also, do I get additional ads to click if I am referral of someone?
Post
Topic
Board Service Announcements
Re: CoinAd.com, a Paid-To-Click that pays you in Bitcoins!
by
jenga
on 22/09/2013, 14:55:25 UTC
Quick noob question. Never used such sites before.
Sometimes in forums I run into urls like:
coinad.com/?r=XXXXXXXXXX

Those are referral links I guess. How do I use them? If I click on those links the main page of coinAd pops up with no options or anything.
Post
Topic
Board Mining software (miners)
Re: Performance gain with simple sha256d optimization
by
jenga
on 21/09/2013, 18:30:44 UTC
Yes.
Even the ancient RPCMiner is doing this.

Thanky, you successfully made me feel more stupid than needed in under 10 words. I guess it's some kind of world record or so Tongue
Post
Topic
Board Mining software (miners)
Topic OP
Performance gain with simple sha256d optimization
by
jenga
on 21/09/2013, 12:44:59 UTC
Has this optimization been considered before?

Basically, the nonce begins to affect the hash just after 3 rounds of the first hash.
This happens because the nonce is the 19th integer in the data array, so since the first hash starts with the 16th integer it takes 3 rounds to reach the 19th.

Given block 255123, these are the states of the first 10 rounds with nonce and nonce+1:

Midstate:
1354ff89 23d83d8b 5efb84ec 9f10b472 2d2dbe11 0308f72b 01a4ae80 03d6c229

Nonce = 79f90238
round 1: ffeb12f9 1354ff89 23d83d8b 5efb84ec 9fbf88da 2d2dbe11 0308f72b 01a4ae80
round 2: 066693d3 ffeb12f9 1354ff89 23d83d8b ed0afd1d 9fbf88da 2d2dbe11 0308f72b
round 3: cb78323a 066693d3 ffeb12f9 1354ff89 129b0013 ed0afd1d 9fbf88da 2d2dbe11
round 4: b4de2b0d cb78323a 066693d3 ffeb12f9 35085b39 129b0013 ed0afd1d 9fbf88da
round 5: 0d745a43 b4de2b0d cb78323a 066693d3 38eb1f40 35085b39 129b0013 ed0afd1d
round 6: 6427e635 0d745a43 b4de2b0d cb78323a 1ce5cef6 38eb1f40 35085b39 129b0013
round 7: 6ecb89b3 6427e635 0d745a43 b4de2b0d 1e9344c6 1ce5cef6 38eb1f40 35085b39
round 8: 0aa13a06 6ecb89b3 6427e635 0d745a43 9b084155 1e9344c6 1ce5cef6 38eb1f40
round 9: 6dec3157 0aa13a06 6ecb89b3 6427e635 364cddc1 9b084155 1e9344c6 1ce5cef6
round 10: 3483fd4f 6dec3157 0aa13a06 6ecb89b3 48bd6bea 364cddc1 9b084155 1e9344c6

Nonce = 79f90239
round 1: ffeb12f9 1354ff89 23d83d8b 5efb84ec 9fbf88da 2d2dbe11 0308f72b 01a4ae80
round 2: 066693d3 ffeb12f9 1354ff89 23d83d8b ed0afd1d 9fbf88da 2d2dbe11 0308f72b
round 3: cb78323a 066693d3 ffeb12f9 1354ff89 129b0013 ed0afd1d 9fbf88da 2d2dbe11
round 4: b4de2b0e cb78323a 066693d3 ffeb12f9 35085b3a 129b0013 ed0afd1d 9fbf88da
round 5: 514c56c4 b4de2b0e cb78323a 066693d3 3ccb1fc2 35085b3a 129b0013 ed0afd1d
round 6: 76d63ec7 514c56c4 b4de2b0e cb78323a 18b611f6 3ccb1fc2 35085b3a 129b0013
round 7: 886177ab 76d63ec7 514c56c4 b4de2b0e 6b864644 18b611f6 3ccb1fc2 35085b3a
round 8: 41d34740 886177ab 76d63ec7 514c56c4 cbd24ac7 6b864644 18b611f6 3ccb1fc2
round 9: c7abc465 41d34740 886177ab 76d63ec7 70b8c519 cbd24ac7 6b864644 18b611f6
round 10: d116caaa c7abc465 41d34740 886177ab 883466b7 70b8c519 cbd24ac7 6b864644

As you can see, the first 3 rounds look exactly the same. Precalculation increments the total hashing power by 1.2% which is not so much but its measurable... Actually, you can tell that a couple of other rounds can be partially precalculated because many integers in rounds 4 and 5 still don't change: I believe at least a 2% performance gain can be achieved with that in mind.

For an example implementation, I'm using a slightly modified version of the code posted here:
https://bitcointalk.org/index.php?topic=286532.0

Any feedback is welcome.

Here's the final code (still no SSE Embarrassed):

sha256_cpu.c
Code:
#include "sha256_cpu.h"

// Timer setup
#include

typedef struct {
    LARGE_INTEGER start;
    LARGE_INTEGER stop; } stopWatch;
  void startTimer( stopWatch *timer);
  void stopTimer( stopWatch *timer);
  double LIToSecs( LARGE_INTEGER * L);
  double getElapsedTime( stopWatch *timer);

double LIToSecs( LARGE_INTEGER * L) {
    LARGE_INTEGER frequency;
    QueryPerformanceFrequency( &frequency ) ;
    return ((double)L->QuadPart /(double)frequency.QuadPart) ; }
double getElapsedTime( stopWatch *timer) {
    LARGE_INTEGER time;
    time.QuadPart = timer->stop.QuadPart - timer->start.QuadPart;
    return LIToSecs( &time) ;
}

stopWatch s;
// End timer setup

int main() {

    // Big-endian 255123 block string
    uchar text[]="02000000"
    "61b9273640571357bdc428788b36ae9827349e9d40627d2d2d00000000000000"
    "b1eb3bce1dde137625382e9445e707e6ec3f9b46948d2a7d8d88da42a877104d"
    "5f1c2152"
    "57524119"
    "79f90238"
    "800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000280"
    ;

    // Little-endian version:

    // 000000023627b961571357407828c4bd98ae368b9d9e34272d7d62400000002d00000000ce3bebb1
    // 7613de1d942e3825e607e745469b3fec7d2a8d9442da888d4d1077a852211c5f194152573802f979
    // 00000080000000000000000000000000000000000000000000000000000000000000000000000000
    // 0000000080020000

    /** STRING PRE-PROCESS **/

    uint i;
    uchar *pos = text;
    static uint text1[32];

    // convert chars to hex values. Evil dump into text1
    for(i = 0; i < 128; i++) {
        *((uchar*)text1+i) = htochar(pos);
        pos+=2;
    }

    // Switch endianness
    // You can remove the following loop if you are already
    // working with a little-endian string
    for(i = 0; i < 32; i++) {
        text1[i] = byte_swap4(text1[i]);
    }

    // Pre-process finished.
    // String is loaded into text1 as 32 binary u-integers.

    /** MIDSTATE CALCULATION **/

    uint midstate[8], midstate2[8];
    sha256_MS(text1, midstate, midstate2);

    static uint res;
    uint *ptroff = &text1[16];

    text1[19] = 0x79f90238U;
    printf("Starting nonce: %08x\n", text1[19]);

    QueryPerformanceCounter(&s.start); // Windows API to build a timer...

    /** MAIN LOOP **/

    const uint endnonce = 0x79f90238U + 1000000U; // 860 Kh/s: hash rate on my Core 2 Duo 2.333 GHz

    for (text1[19] = 0x79f90238U; text1[19] < endnonce; text1[19]++) { // Increment nonce

        res = sha256d(midstate, midstate2, ptroff); // The kraken. Release it.
        if (res == 0) printf("Share found at nonce: %08x SUCCESS\n", text1[19]);
    }

    QueryPerformanceCounter(&s.stop);

    printf("Ending nonce: %08x\n\n", --text1[19]);
    printf("Total time taken: %f secs\n", getElapsedTime(&s));
    printf("Estimated hashrate: %f Mh/s\n", 1.0/getElapsedTime(&s) );

    // Btw real hash is:
    // e17e38f81b4af47ab2ff29fe554c8c767c03444aee9119381f00000000000000
    // 000000000000001f381991ee4a44037c768c4c55fe29ffb27af44a1bf8387ee1

    printf("You can now safely terminate the program.\n");
    getchar();
    return 0;
}

sha256_cpu.h
Code:
#include

#define uchar unsigned char
#define uint unsigned int

uchar htochar(uchar *ptr) {
    uchar value = 0;
    char ch = *ptr;

    if (ch >= '0' && ch <= '9')
        value = (value << 4) + (ch - '0');
    else
        value = (value << 4) + (ch - 'a' + 10);

    ch = *(++ptr);

    if (ch >= '0' && ch <= '9')
        value = (value << 4) + (ch - '0');
    else
        value = (value << 4) + (ch - 'a' + 10);

    return value;
}

#define byte_swap4(val)              \
         (((val & 0xff) << 24) |     \
          ((val & 0xff00) << 8) |    \
          ((val & 0xff0000) >> 8) |  \
          ((val & 0xff000000) >> 24))

#define ROTLEFT(a,b) ((a << b) | (a >> (32-b)))
#define ROTRIGHT(a,b) ((a >> b) | (a << (32-b)))

#define CH(x,y,z) ((x & y) ^ (~x & z))
#define MAJ(x,y,z) ((x & y) ^ (x & z) ^ (y & z))
#define EP0(x) (ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22))
#define EP1(x) (ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25))
#define SIG0(x) (ROTRIGHT(x,7) ^ ROTRIGHT(x,18) ^ (x >> 3))
#define SIG1(x) (ROTRIGHT(x,17) ^ ROTRIGHT(x,19) ^ (x >> 10))

static const uint k[64] = {
   0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,
   0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,
   0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,
   0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967,
   0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,
   0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,
   0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,
   0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
};


void sha256_MS(uint data[], uint midstate[], uint midstate2[]) {
    uint a,b,c,d,e,f,g,h,i=0,t1,t2,m[64];

    a = 0x6a09e667U;
    b = 0xbb67ae85U;
    c = 0x3c6ef372U;
    d = 0xa54ff53aU;
    e = 0x510e527fU;
    f = 0x9b05688cU;
    g = 0x1f83d9abU;
    h = 0x5be0cd19U;

    for (; i < 16; i++) m[i] = data[i];

    for (; i < 64; i++)
        m[i] = SIG1(m[i-2]) + m[i-7] + SIG0(m[i-15]) + m[i-16];

    for (i = 0; i < 64; ++i) {
        t1 = h + EP1(e) + CH(e,f,g) + k[i] + m[i];
        t2 = EP0(a) + MAJ(a,b,c);
        h = g;
        g = f;
        f = e;
        e = d + t1;
        d = c;
        c = b;
        b = a;
        a = t1 + t2;
    }

    midstate[0] = 0x6a09e667U + a;
    midstate[1] = 0xbb67ae85U + b;
    midstate[2] = 0x3c6ef372U + c;
    midstate[3] = 0xa54ff53aU + d;
    midstate[4] = 0x510e527fU + e;
    midstate[5] = 0x9b05688cU + f;
    midstate[6] = 0x1f83d9abU + g;
    midstate[7] = 0x5be0cd19U + h;

    // OPTIMIZATION: redundant rounds precalculation

    a = midstate[0];
    b = midstate[1];
    c = midstate[2];
    d = midstate[3];
    e = midstate[4];
    f = midstate[5];
    g = midstate[6];
    h = midstate[7];

    for (i = 0; i < 3; ++i) { // precalculate 3 rounds
        t1 = h + EP1(e) + CH(e,f,g) + k[i] + data[i+16];
        t2 = EP0(a) + MAJ(a,b,c);
        h = g;
        g = f;
        f = e;
        e = d + t1;
        d = c;
        c = b;
        b = a;
        a = t1 + t2;
    }

    midstate2[0] = a;
    midstate2[1] = b;
    midstate2[2] = c;
    midstate2[3] = d;
    midstate2[4] = e;
    midstate2[5] = f;
    midstate2[6] = g;
    midstate2[7] = h;

}


/*a = 0xcb78323aU;
b = 0x066693d3U;
c = 0xffeb12f9U;
d = 0x1354ff89U;
e = 0x129b0013U;
f = 0xed0afd1dU;
g = 0x9fbf88daU;
h = 0x2d2dbe11U;*/


uint sha256d(uint midstate[], uint midstate2[], uint data[]) {
    uint a,b,c,d,e,f,g,h,i,t1,t2,m[64];
    uint ee,eee,eeee;

    // Hash One

    // Init by preloading rounds 1-3.
    a = midstate2[0];
    b = midstate2[1];
    c = midstate2[2];
    d = midstate2[3];
    e = midstate2[4];
    f = midstate2[5];
    g = midstate2[6];
    h = midstate2[7];

    for (i = 0;  i < 16; i++) m[i] = data[i]; // data points to text1[16] in main().

    for (; i < 64; i++)
        m[i] = SIG1(m[i-2]) + m[i-7] + SIG0(m[i-15]) + m[i-16];

    for (i = 3; i < 64; i++) { // Late start. Rounds 1-3 are already calculated.
        t1 = h + EP1(e) + CH(e,f,g) + k[i] + m[i];
        t2 = EP0(a) + MAJ(a,b,c);
        h = g;
        g = f;
        f = e;
        e = d + t1;
        d = c;
        c = b;
        b = a;
        a = t1 + t2;

    }

    m[0] = midstate[0] + a;
    m[1] = midstate[1] + b;
    m[2] = midstate[2] + c;
    m[3] = midstate[3] + d;
    m[4] = midstate[4] + e;
    m[5] = midstate[5] + f;
    m[6] = midstate[6] + g;
    m[7] = midstate[7] + h;

    // Hash Two

    a = 0x6a09e667U;
    b = 0xbb67ae85U;
    c = 0x3c6ef372U;
    d = 0xa54ff53aU;
    e = 0x510e527fU;
    f = 0x9b05688cU;
    g = 0x1f83d9abU;
    h = 0x5be0cd19U;

    // Add padding string w/ length info
    m[8]  = 0x80000000U;
    m[9]  = 0x00U;
    m[10] = 0x00U;
    m[11] = 0x00U;
    m[12] = 0x00U;
    m[13] = 0x00U;
    m[14] = 0x00U;
    m[15] = 0x100U;

    for (i = 16; i < 64; i++)
        m[i] = SIG1(m[i-2]) + m[i-7] + SIG0(m[i-15]) + m[i-16];

    for (i = 0; i < 57; i++) {
        t1 = h + EP1(e) + CH(e,f,g) + k[i] + m[i];
        t2 = EP0(a) + MAJ(a,b,c);
        h = g;
        g = f;
        f = e;
        e = d + t1;
        d = c;
        c = b;
        b = a;
        a = t1 + t2;
    }

    // OPTIMIZATION: Early 2nd hash termination

    eeee = d + h + EP1(e) + CH(e,f,g) + 0x78a5636fU + m[57];
    eee = c + g + EP1(eeee) + CH(eeee,e,f) + 0x84c87814U + m[58];
    ee = b + f + EP1(eee) + CH(eee,eeee,e) + 0x8cc70208U + m[59];
    h = a + e + EP1(ee) + CH(ee,eee,eeee) + 0x90befffaU + m[60];

    return 0x5be0cd19U + h; // Unfortunately, only the last 32 bits are correct... Well, it's still a diff 1 share :)
}
Post
Topic
Board Mining software (miners)
Re: How fast/simple/short a CPU bitcoin mining core script can be?
by
jenga
on 05/09/2013, 22:40:27 UTC
Anybody has anything to point out?
Of course its nothing serious, just for fun and constructive learning.