Bitcoin Forum
December 12, 2024, 05:12:55 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Information about getwork? on: July 03, 2011, 01:26:31 AM
Okay as some of you might have noticed i'm developing a new pool backend: http://forum.bitcoin.org/index.php?topic=19149.0 however as it's widly known around pool operators json-RCP is highly inefficient, especially the currently single threaded implementation in the official client.
For that reason i figured it might be a good idea to implement the chain handling and getwork method directly into the pool software which already is mostly done: http://code.google.com/p/bitcoinsharp/ however it does not seem to have getwork implemented and as such i'm looking into what processing is involved in getting the different parts of the work data.
So far i've found very little about it, what i've found so far is from the client source code:
Code:
    if (params.size() == 0)
    {
        // Update block
        static unsigned int nTransactionsUpdatedLast;
        static CBlockIndex* pindexPrev;
        static int64 nStart;
        static CBlock* pblock;
        if (pindexPrev != pindexBest ||
            (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60))
        {
            if (pindexPrev != pindexBest)
            {
                // Deallocate old blocks since they're obsolete now
                mapNewBlock.clear();
                BOOST_FOREACH(CBlock* pblock, vNewBlock)
                    delete pblock;
                vNewBlock.clear();
            }
            nTransactionsUpdatedLast = nTransactionsUpdated;
            pindexPrev = pindexBest;
            nStart = GetTime();

            // Create new block
            pblock = CreateNewBlock(reservekey);
            if (!pblock)
                throw JSONRPCError(-7, "Out of memory");
            vNewBlock.push_back(pblock);
        }

        // Update nTime
        pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
        pblock->nNonce = 0;

        // Update nExtraNonce
        static unsigned int nExtraNonce = 0;
        static int64 nPrevTime = 0;
        IncrementExtraNonce(pblock, pindexPrev, nExtraNonce, nPrevTime);

        // Save
        mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, nExtraNonce);

        // Prebuild hash buffers
        char pmidstate[32];
        char pdata[128];
        char phash1[64];
        FormatHashBuffers(pblock, pmidstate, pdata, phash1);

        uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();

        Object result;
        result.push_back(Pair("midstate", HexStr(BEGIN(pmidstate), END(pmidstate))));
        result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata))));
        result.push_back(Pair("hash1", HexStr(BEGIN(phash1), END(phash1))));
        result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget))));
        return result;
    }
    else
    {
        // Parse parameters
        vector<unsigned char> vchData = ParseHex(params[0].get_str());
        if (vchData.size() != 128)
            throw JSONRPCError(-8, "Invalid parameter");
        CBlock* pdata = (CBlock*)&vchData[0];

        // Byte reverse
        for (int i = 0; i < 128/4; i++)
            ((unsigned int*)pdata)[i] = CryptoPP::ByteReverse(((unsigned int*)pdata)[i]);

        // Get saved block
        if (!mapNewBlock.count(pdata->hashMerkleRoot))
            return false;
        CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first;
        unsigned int nExtraNonce = mapNewBlock[pdata->hashMerkleRoot].second;

        pblock->nTime = pdata->nTime;
        pblock->nNonce = pdata->nNonce;
        pblock->vtx[0].vin[0].scriptSig = CScript() << pblock->nBits << CBigNum(nExtraNonce);
        pblock->hashMerkleRoot = pblock->BuildMerkleTree();

        return CheckWork(pblock, *pwalletMain, reservekey);
    }

I get why it's checking for the number of parameters however i have a very hard time following the rest of the code as it seems rather cluttered with other only indirectly related stuff, for example what does the deallocation of old blocks have to do with getting new work?

So all in all the process of getting work is still in the dark for me, would anyone mind sharing links or their own knowledge about this process? Smiley
2  Other / CPU/GPU Bitcoin mining hardware / Cooling solution on: June 19, 2011, 03:39:42 AM
I bring you one of the best possible easy to build DIY cooling solutions:



Proof of concept:



Took about 3 hours to create including figuring out meassurements and so on.

I'm currently using this and so far it have lowered my 5850's temps by at least 10 degrees and that's even with some shitty fans i had laying around, putting a propper pair of 100 CFM fans in it would probably work miracles Smiley

Google sketchup file: http://filebeam.com/4fe1a13065a08ff6fb7e65edc1090063 (zip file)


List of possible improvements:

      1) a lid with holes for power cables and possibly some way of mounting 1 or more PSU's on the lid
      2) ?!? (Come with your ideas fokes!)
3  Bitcoin / Project Development / Interrest for a new pool backend? on: June 18, 2011, 10:13:14 PM
Would anyone be interrested in a pool backend written in C# with support for proxying work so i both can act as a public pool and a private home pool for multiply rigs?

The reason i'm asking is because I used Flexible mining proxy for some time and i really like the concept but i don't like having 20% stales (im also a php noob so i can't help with the development) so i decided to make my own implementation in C# and i figured it wouldn't require too much extra work to add support the slightly different features a public pool would require as most of the difference lies in the frontend...

All of the needed functions would be exposed with both Json-rpc and MySQL to ease frontend development, hell i might even do some WCF and named pipes if a ASP.net dev wanted to make a frontend Smiley

However as i said before i go out and invest my summervacation in developing features i don't need I'd just like to hear if there's any interrest Smiley

oh yeah i plan to keep it opensource and mono compatible so it can run on a linux server Smiley


---edit---

now on github: https://github.com/Zagitta/Zetlon.Coinster
4  Other / CPU/GPU Bitcoin mining hardware / WARNING - 5850 Overclockers! on: June 12, 2011, 03:29:41 PM
As the topic title says this is a warning to all 5850 overclockers and potentially all 58xx overclockers!

Short version: CHECK YOUR VRM TEMPS!

Long version: Today while setting up my old server as a mining rig with a reference ASUS 5850 i bought recently i was playing around with overclocking and i got up on 1000 core, 900 memory (I'm on a headless linux so i can't downclock memory more than the stupid limit), my Vcore is on 1,21 and set with RadeonVolt...

Here's the issue: I don't know if radeonVolt's reading are accurate but with 100% fan and the core @ 71 degrees my VRMs were COOKING! i kid you not they were between 135 and 140 degrees!!!

This in itself isn't a huge problem as VRMs are build to deal with those temperatures however as far as i can see the VRM's on reference 5850 cards are uP6208 (datasheet: http://ceemic.pri.ee/hardware/datasheets/uP6208.pdf)
Take a look at page 19 and you'll see this: Operating Junction Temperature Range (Note 4): -40°C to +125°C and Junction Temperature: 150°C

So as you can see my card is above the supported operating temperature but still below the absolute max temperature of the VRM and my point is that when you do hefty OC's like this you most likely WILL shorten the boards life span, even with 100% fan and good core temperatures
5  Bitcoin / Bitcoin Technical Support / PCI to PCI-E problem on: June 08, 2011, 11:31:12 PM
As mentioned in this thread i have an old fujitsu siemens server with 2 xeon cpu's (the old ones based on P4) and a bunch of PCI-X slots...

In an attempt to utilize the hardware i bought a PCI to PCI-E adaptor:



This worked, somewhat... It's almost as if there's not enough bandwith to show a regular desktop! plus it looks like this: (notice the horisontal lines)



I've tried running a 1x cable between with the whitepixel pci-e 1x trick: thinking it might have been the gfx trying to run 16x but it didn't help...

So what exactly could be wrong? I don't think it's the power as the Asus reference 5850 is running on it's own 300w powersupply and the server is running on a 500w powersupply and i've also checked that the card works fine by putting it in my regular desktop...

Is a pci to pci-e adaptor simply too slow to run a gfx on?  Huh
6  Bitcoin / Bitcoin Technical Support / PCI-X to PCI Express on: May 29, 2011, 05:25:43 PM
Anyone know where I can buy such an adaptor for reasonable money? I've so far only been able to find this which is 200$ AKA shit expensive for a raiser: http://www.startech.com/product/PCIX1PEX4-PCI-X-to-x4-PCI-Express-Adapter-Card

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!