Author

Topic: Precise specifications (Read 735 times)

newbie
Activity: 28
Merit: 0
June 30, 2011, 02:07:07 PM
#5
Well, for such things as difficulty, there's not a lot of difference in how the code reads and just a verbal explanation. It's kind of just busy work to write it out. But if you have questions, go ahead and ask them.

Every 2016 blocks, look at the last 2016 blocks. IntervalLength=Last blocktime - first blocktime. Adjust the difficulty according to NewDifficulty=OldDifficulty*(2 weeks)/(IntervalLength). If the NewDifficulty is more than 4x or less than .25x, limit it.

There you go.
sr. member
Activity: 311
Merit: 250
June 30, 2011, 01:10:38 PM
#4

Thanks guys, but I wanted to avoid to look into the code.

I cannot believe that there is no layman description of what the algorithms are. The foundational Nakamoto's paper is really not precise about the procedures.

In particular, how it is determined the common computational power, and how the increase of difficulty is set.

Thanks in advance to those that can provide a link.
newbie
Activity: 28
Merit: 0
June 30, 2011, 09:40:12 AM
#3
The wiki has most of it, but the best place to look is the code.

Code:
    int64 nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
    printf("  nActualTimespan = %"PRI64d"  before bounds\n", nActualTimespan);
    if (nActualTimespan < nTargetTimespan/4)
        nActualTimespan = nTargetTimespan/4;
    if (nActualTimespan > nTargetTimespan*4)
        nActualTimespan = nTargetTimespan*4;

    // Retarget
    CBigNum bnNew;
    bnNew.SetCompact(pindexLast->nBits);
    bnNew *= nActualTimespan;
    bnNew /= nTargetTimespan;

    if (bnNew > bnProofOfWorkLimit)
        bnNew = bnProofOfWorkLimit;
hero member
Activity: 720
Merit: 528
June 30, 2011, 09:34:31 AM
#2
I believe this is the original paper: http://www.bitcoin.org/bitcoin.pdf

I haven't found a more in depth paper yet, but the wiki seems to have a lot of information: https://en.bitcoin.it/wiki/Main_Page
sr. member
Activity: 311
Merit: 250
June 30, 2011, 09:29:22 AM
#1
Sorry to open a thread about something that has surely been discussed before (this is the newbie section right?).

Where can I find the precise technical specifications and descriptions of the algorithms running the BTC community?

For example, what are the precise rules for the increase in difficulty?

It is easy to find general descriptions, but I haven't been able to find the technical papers.
Jump to: