Bitcoin Forum
January 18, 2018, 10:42:39 PM
 Home Help Search Donate Login Register
 Pages: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 ... 176
 Author Topic: Devcoin  (Read 410264 times)
Shattienator
Jr. Member

Offline

Activity: 57

 August 14, 2011, 10:18:46 AM

Because the devcoin difficulty is lower than the bitcoin difficulty, miners can switch in and out of the chain, which means the block generation rate varies wildly.  To fix this problem, the difficulty can be determined with a continous average rather a step function, and it can calculated over one day instead of two weeks.  This will lead to greater daily variation than bitcoin because it is being averaged over a small time; but it would be a much smaller variation than the current factor of more than two as a miner switches in and out.  The original code follows:

Code:
const int64 nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
const int64 nTargetSpacing = 10 * 60;
const int64 nInterval = nTargetTimespan / nTargetSpacing;

// Genesis block
if (pindexLast == NULL)
return bnProofOfWorkLimit.GetCompact();

// Only change once per interval
if ((pindexLast->nHeight+1) % nInterval != 0)
return pindexLast->nBits;

The new smooth average code, with a switch over at block 10,700 to give people time to download the new devcoin, follows:

Code:
// Genesis block
if (pindexLast == NULL)
return bnProofOfWorkLimit.GetCompact();

int64 nTargetTimespan = 24 * 60 * 60; // one day
const int nSmoothBlock = 10700;
if (pindexLast->nHeight < nSmoothBlock)
nTargetTimespan *= 14; // two weeks
const int64 nTargetSpacing = 10 * 60;
const int64 nInterval = nTargetTimespan / nTargetSpacing;

// Only change once per interval
if (((pindexLast->nHeight+1) % nInterval != 0) && (pindexLast->nHeight < nSmoothBlock))
return pindexLast->nBits;

While this would fix the step change difficulty problem, would this create another other problem in turn?

Bitcoin difficulty change is based on 2016 blocks generation rate. Two weeks - is just a milestone for averaging, but not an averaging interval.
But the diffuculty change for daily average (or 144 blocks as 144*14=2016) can be set up much smaller then bitcoins 25-400%. Say - 10% increase/decrease based on daily average. So in two weeks we can get 22%-379% difficulty change rate (approximatelly) which is close to bitcoin but much more flexible.
Namecoin have terrible difficulty problem due 2016 diffuculty averaging interval. Take a look at Namecoin next difficulty. Current generation rate is about 12% of required and next difficulty change is projected to early November. So namecoin have less then one block per hour! And this will last for several months.
1516315359
Hero Member

Offline

Posts: 1516315359

Ignore
 1516315359

1516315359
 Report to moderator
1516315359
Hero Member

Offline

Posts: 1516315359

Ignore
 1516315359

1516315359
 Report to moderator
1516315359
Hero Member

Offline

Posts: 1516315359

Ignore
 1516315359

1516315359
 Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1516315359
Hero Member

Offline

Posts: 1516315359

Ignore
 1516315359

1516315359
 Report to moderator
1516315359
Hero Member

Offline

Posts: 1516315359

Ignore
 1516315359

1516315359
 Report to moderator
1516315359
Hero Member

Offline

Posts: 1516315359

Ignore
 1516315359

1516315359
 Report to moderator
Unthinkingbit
Hero Member

Offline

Activity: 913

 August 15, 2011, 04:14:00 AM

Two weeks - is just a milestone for averaging, but not an averaging interval.

Looking at the following code:

Code:
// Go back by what we want to be 14 days worth of blocks
const CBlockIndex* pindexFirst = pindexLast;
for (int i = 0; pindexFirst && i < nInterval-1; i++)
pindexFirst = pindexFirst->pprev;

it does seem like it is averaging over nInterval, which is 2,016 or two weeks on average.

Quote
But the diffuculty change for daily average (or 144 blocks as 144*14=2016) can be set up much smaller then bitcoins 25-400%. Say - 10% increase/decrease based on daily average. So in two weeks we can get 22%-379% difficulty change rate (approximatelly) which is close to bitcoin but much more flexible.

I considered that, but it would mean further code changes, and I want to make the minimum amount of code changes so that there is the least possible chance of something unexpected happening.  I think the only time it ever ran into the factor of four change is at the very beginning intervals, once it's going the difficulty changes are smaller.  Also, with the code change the difficulty change is now smoothed, so there would only be a difficulty change of at most a few percent per block anyways.  The factor of four limit could actually be removed entirely, but I don't want to yet in order to minimize the code change.

Quote
Namecoin have terrible difficulty problem due 2016 diffuculty averaging interval. Take a look at Namecoin next difficulty. Current generation rate is about 12% of required and next difficulty change is projected to early November. So namecoin have less then one block per hour! And this will last for several months.

Indeed, that's why I'm making the change now.  If ever there is a spike in devcoin generation, after that we would have to wait months for the generation rate to normalize.  Once this code change is in place, spikes would be smoothed out within a few days.

markm
Legendary

Offline

Activity: 2030

 August 15, 2011, 08:35:45 AM

The value of a const cannot be derived from a variable, so here is how I actually coded it:

Code:
unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast)
{
const int nSmoothBlock = 10700;
const int64 nTargetSpacing = 10 * 60;
int64 nTargetTimespan = 24 * 60 * 60; // one day

if (pindexLast->nHeight < nSmoothBlock)
nTargetTimespan *= 14; // two weeks
int64 nInterval = nTargetTimespan / nTargetSpacing;

-MarkM-

Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
jackjack
Legendary

Offline

Activity: 1134

May Bitcoin be touched by his Noodly Appendage

 August 16, 2011, 02:50:29 AM

Abe is only at block 124k
I hope it will speed up because it's taking all the cpu thus it halves the hashrate of the gpu my friend put on his server

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Legendary

Offline

Activity: 1134

May Bitcoin be touched by his Noodly Appendage

 August 16, 2011, 03:33:13 PM

Good news:
Versions 0.4.1 and 0.5 released today.  0.4.1 contains mostly minor fixes since 0.4.  0.5 contains dramatic speed improvements, new back-ends, and more.

New in 0.5 - 2011-08-16
* Big load time improvement for SQLite: below 10 hours for the BTC chain.

So the block explorer should be back online in 10 hours

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Legendary

Offline

Activity: 1134

May Bitcoin be touched by his Noodly Appendage

 August 16, 2011, 10:00:54 PM

The Devcoin block explorer is back online: http://devcoinblockexplorer.dyndns.org/chain/Devcoin

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Unthinkingbit
Hero Member

Offline

Activity: 913

 August 17, 2011, 02:56:36 AM

The Devcoin block explorer is back online: http://devcoinblockexplorer.dyndns.org/chain/Devcoin

Thanks a lot for bringing it back.  So the purser payouts mentioned in the post:

The purser payouts for generation rounds 0 and 1 are done.
..

are all in Devcoin block 8320:
http://devcoinblockexplorer.dyndns.org/block/000000000171781a2331c71678d6c4cf0db1f5d4c560d2b46917292735bf3d02

Unthinkingbit
Hero Member

Offline

Activity: 913

 August 20, 2011, 08:00:02 PM

When the devcoin bounties were first posted, I made them similar in value to other bounties I've seen posted, which were small.  However, after getting used to devcoin, I realized that with 90% of generation going to bounties and developers, there's no need to be stingy anymore.

So I'm adding 1/5 of a share per 100,000 DVC bounty for bounties under one million.  For bounties over one million I'm adding one share per five million bounty.  I'm only adding one share per five million for the big bounties because if there are many large bounties that would drain the generation, if it turns out that few large bounties are being awarded the share for large bounties will be increased further.

To make the receiver file for these bounties, first an account file is made:
https://raw.github.com/Unthinkingbit/charity/master/account_3.csv

The account file has the name of the contributor, their share as a fraction, and a link to the post where either they posted the information or the bounty was awarded.  Then an accountant runs genereceiver.py:

On the account file, Mark and I are general administrators and get a share for that.  Jackjack is busy with other stuff and doesn't have much time to be an administrator, so he is only a file administrator, who posts the receiver file at a website, and gets 2/5 of a share for that.  Jackjack gets an additional one share bounty for making the devcoin block explorer.

I've also added informative bounties for people who post useful stuff (1/5 of a share) and for people who help develop devcoin in extra ways (2/5 of share).  Twobits posted that curl would be best for downloading from https sites, I tried that and it works well and has been added to devcoin (1/5 share).  Shattienator posted that namecoin is down to 12% of the required hash rate (1/5 share), and he made permanent devcoin nodes (2/5 share).

Edit: As of Aug 2012, there are enough permanent nodes, so there will not be bounties for any new permanent nodes.

Caston, Jackjack, Twobits and Shattienator also received the extra 1/5 per 100,000 DVC for the installation posts.

https://raw.github.com/Unthinkingbit/charity/master/account_3.csv

to see that your donation address is correct.  Once round 3 starts, at block 12,000, that donation address will start receiving lots of devcoins.  At the time of this writing, the minimum round 2 share is 6,660,000 DVC.  If more bounties are awarded or developers added that share will be smaller, so that is just a ballpark share value.

Shattienator
Jr. Member

Offline

Activity: 57

 August 21, 2011, 10:56:55 AM

https://raw.github.com/Unthinkingbit/charity/master/account_3.csv
Yes, the address in the account_3.csv is correct.
Unthinkingbit
Hero Member

Offline

Activity: 913

 August 22, 2011, 09:49:32 PM

The smooth difficulty change code is in the '22-Aug-2011' files at:
http://sourceforge.net/projects/galacticmilieu/files/

The switchover is at block 10,700.  Because this changes the network difficulty, everyone must update devcoin before then.  If someone does not, their client or miner will not work properly after that block.  At the time of this writing, the devcoin block is about 9,000, so there are roughly two weeks to go before the switchover.  Please update your client and/or miner as soon as possible, please don't wait until the last minute.

Unthinkingbit
Hero Member

Offline

Activity: 913

 August 31, 2011, 09:16:38 AM

Below is the devcoin development plan for the next several months.  When the block number is followed by a minus sign, that means that the task should be completed by then.  When the block number is followed by a plus sign, that means the task will probably be started after then.

Block 10,700: transition to smooth difficulty change.

Block 11,000-: purser payouts complete.

Block 12,000: test of fractional share distribution.

Block 13,000+: devcoin / bitcoin exchange.

Block 20,000+: merged mining.

Block 30,000+: share to miners starts decreasing.

Unthinkingbit
Hero Member

Offline

Activity: 913

 September 07, 2011, 05:22:42 AM

Thanks to Mark and Jackjack, the round 3 receiver file is posted at the sites:

The round 3 receiver file is generated from the account 3 file at:
https://raw.github.com/Unthinkingbit/charity/master/account_3.csv

Everyone on the account 3 file will get their share of devcoins starting at block 12,000 and ending at block 16,000.  There are 27 shares and 4,000 blocks, so each share is a minimum of 148 blocks each giving 45,000 devcoins to the receivers, for a minimum of 6,660,000 devcoins.  The fractional shares are worth a minimum of 6,660,000 devcoins devided by the number of receivers in that line.  So for example in the line:
1QFNbLgpFKwFYKLNc9XkYbzgCryd3XYfuX,1QFNbLgpFKwFYKLNc9XkYbzgCryd3XYfuX,1M1BzQBpb8sbCuNzBTaae9PBdvjLthVrbR,1M1BzQBpb8sbCuNzBTaae9PBdvjLthVrbR

the address 1QFN.. will get a minimum of 2 / 4 * 6,660,000 = 3,330,000 devcoins for that distribution line and address 1M1B.. will also get a minimum of 3,330,000 devcoins.  The reason it is divided four ways even though the award was two fifths of a share in the account file is that the genereceiver.py script fills the distribution lines as evenly as possible up to the share denominator (5 in this case).  In this case because there were 12 / 5 fractional shares to distribute, it divided them into 3 lines of 4.  In other words, when there is a fractional share bounty awarded, the bounty is at least the fractional share, it could be more and was in round 3.

The round 4 receiver file will be generated and posted at around block 13,000.  Any new bounties awarded between now and then will be in the round 4 file.

twobits
Sr. Member

Offline

Activity: 476

 September 07, 2011, 09:14:39 PM

Ah, I had said earlier I would provide a windows binary when/if the use of python for https was resolved.  That was done, and I did build the binary, but looks like I forgot to post about it here after I did so.

http://www.wuala.com/jbw9/pub/Bitcoin/devcoin/devcoin-2011-08-22-win32.7z/

 ▄▄▄▄▄▄▄▄                          ▄▄█▓▓▓▓▀▀▀▀▀▀▀▓▓▓█▄▄                  █▓▓▀                ▀▓▓█▄            ▄█▓▓            ▄▄▄▄      ▀▓▓▄         █▓▓            ▄▓▓ ▓▓▓       ▀▓▓▄      ▓▓▀             ▓▓▌             ▓▓▄    ▓▓▌           ▄█▓▓▓▓▓█▄           ▓▓   ▐▓▓          █▓▓▀ ▓▓▌ ▀▓           ▐▓▓  ▓▓▌         █▓▓   ▓▓▌               ▓▓  ▓▓▌         ▓▓▓   ▓▓▌               ▓▓  ▐▓▌          ▓▓█  ▓▓▌  ▄            ▓▓   ▓▓           ▀▓▓▓▓▓▓█▓▓▀          ▓▓▌    ▓▓             ▐▓▓▓             █▓▓      ▓▓▄       ▄██ ▐▓▓             █▓▓        ▀▓█▄      ▀▓█▓▀            █▓▓            ▀▓▓▄▄                 ▄█▓▓                 ▀▓▓██▄▄▄    ▄▄▄▄█▓▓▓                         ▀▀▓▓▓▓▓▓▀▀▀ CREDITS ● NEW FAST BLOCKCHAIN ● FOR FINANCIAL INDUSTRY [ Whitepaper ][ .● ICO PERIOD ●1 Feb. - 28 Feb., 2018 ]
Shattienator
Jr. Member

Offline

Activity: 57

 September 15, 2011, 08:41:27 PM

Something wrong with the smooth difficulty change:
Block 10698 - difficulty 33.62
Block 10701 - difficulty 134.49
Block 10702 - difficulty 537.97

(difficulty was taken from the getinfo stats).
Unthinkingbit
Hero Member

Offline

Activity: 913

 September 16, 2011, 03:28:46 AM

Something wrong with the smooth difficulty change:
Block 10698 - difficulty 33.62
Block 10701 - difficulty 134.49
Block 10702 - difficulty 537.97

(difficulty was taken from the getinfo stats).

Hi Shattienator,

Thanks for pointing out the difficulty problem.

The difficulty steps are starting because there was a power miner, and the oscillations will continue because the new difficulty is based off the last difficulty rather than the average difficulty.  I'll try to make a code change within a couple of days.

Unthinkingbit
Hero Member

Offline

Activity: 913

 September 16, 2011, 07:02:38 AM

Below is updated code for GetNextWorkRequired which uses average difficulty to avoid difficulty oscillations and the median time to resist the timestamp attack.  Please look it over and post if there are any errors.

Code:
const int nMedianBlock = 10800;

if (pindexLast->nHeight < 10)
return pindexLast->nBits;

// Change at each block after nSmoothBlock
if (pindexLast->nHeight < nSmoothBlock)
if ((pindexLast->nHeight+1) % nInterval != 0)
return pindexLast->nBits;

// Go back by what we want to be one day worth of blocks
const CBlockIndex* pindexFirst = pindexLast;
vector<int64> blockTimes;
CBigNum averageBits;
averageBits.SetCompact(0);

for (int i = 0; pindexFirst && i < nInterval; i++)
{
averageBits += CBigNum().SetCompact(pindexFirst->nBits);
blockTimes.push_back(pindexFirst->GetBlockTime());
pindexFirst = pindexFirst->pprev;
}

assert(pindexFirst);
int blockTimeEndIndex = blockTimes.size() - 6;
sort(blockTimes.begin(), blockTimes.end());
averageBits /= nInterval;

int64 nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
int64 nMedianTimespan = blockTimes[blockTimeEndIndex] - blockTimes[6];
nMedianTimespan *= nInterval / (int64)(blockTimeEndIndex - 6);

// Change nActualTimespan after nMedianBlock
if (pindexLast->nHeight > nMedianBlock)
{
nActualTimespan = nMedianTimespan;
}

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);

// Change bnNew after nMedianBlock
if (pindexLast->nHeight > nMedianBlock)
bnNew = averageBits;

If no errors are found within a day, it would be added to devcoin and everyone would have to download devcoin again.

Unthinkingbit
Hero Member

Offline

Activity: 913

 September 17, 2011, 06:56:15 AM

Because the smooth difficulty code I wrote is flawed and is causing the difficulty to vary wildly, it is necessary to update devcoin to the new median difficulty code in the '17-Sep-2011' files at:
http://sourceforge.net/projects/galacticmilieu/files/

The switchover is at block 10,800.  Because this changes the network difficulty, everyone must update devcoin before then.  If someone does not, their client or miner will not work properly after that block.  At the time of this writing, the devcoin block is 10,704, the difficulty is 7,203 and will decrease, so it is maybe several days to go before the switchover.  Please update your client and/or miner as soon as possible, please don't wait until the last minute.

Hopefully this will be the last quick necessary devcoin update.

Shattienator
Jr. Member

Offline

Activity: 57

 September 19, 2011, 07:09:45 AM

Devcoin block explorer mirror is up.
Please check availability (can take some time for DNS records to propagate).

http://devcoinblockexplorer.info:2750

or

http://107.20.193.62:2750
Unthinkingbit
Hero Member

Offline

Activity: 913

 September 20, 2011, 08:24:26 PM

Devcoin block explorer mirror is up.
Please check availability (can take some time for DNS records to propagate).

http://devcoinblockexplorer.info:2750

or

http://107.20.193.62:2750

Hi Shattienator,

Thanks for pointing out that devcoin block explorer is back up.

Because of the smooth block code incorrectly uses the last block difficulty, the difficulty ended up multiplying until it reached 7,203:
http://www.devcoinblockexplorer.info:2750/block/000000000001ce5c4ee497a4291dfa5c88c241b007f08af00b89618a598fcc4a

Now that the difficulty is so high that the interval is more than a day, the difficulty change will now reverse, decreasing exponentially, down to the starting minimum of one.  So block 10705 will take on average a few days to find, then block 10706 will take a day, then block 10707 will take six hours, and so on.  Because of the continuing exponential decrease, all the next hundred blocks until 10800 will take about three hours.

When I wrote the smooth block code, I didn't realize that because I was using the last block difficulty the system would go into an oscillation.  With the new code, because it's using the average difficulty, the system should narrow down onto the correct difficulty.

So if you have a GPU, if you haven't already please switch to the September 17 or later devcoin at:
http://sourceforge.net/projects/galacticmilieu/files/

please mine devcoins for the next few days, even though the 10705 block will take a few days to get.  After that, since the difficulty will drop quickly, the next blocks will be easier to get and you'll get a portion of the roughly ninety cheap blocks between 10710 and 10800.  Afterwards, the difficulty should narrow down and we can get on with using devcoin to fund open source developers and projects.

Unthinkingbit
Hero Member

Offline

Activity: 913

 September 22, 2011, 07:43:51 AM

Thank you to whoever mined the really difficult blocks 10705 through 10707.  To thank those miners, the miner of block 10705 will get 3/5 share of round 4, the miner of block 10706 will get 2/5 of a share and the miner of block 10707 will get 1/5 of a share.  The difficulty is now increasing and hopefully by around block 11400 the block interval will approach ten minutes.

Also, since no extra big bounties have been awarded, the big bounties can be enlarged, so 4 shares for what used to be a 5 million devcoin bounty.  So Jackjack will get a total of 4 shares for the devcoin block explorer, since he's already received two, he'll get two more in round 4.

Shattienator gets 1/5 of a share for each of his latest two informative posts.  Twobits gets 2/5 of a share for the windows devcoin version.

So the current bounty part of the future account 4 file is:

13TxNC3qaCk5v9TsoDRisVNcwEUzw5WAte,3/5-http://107.20.193.62:2750/block/000000000004f9668231db30d58097a68abd23dd09e53e83a282a2db8c82abbc
1NHFumXZMCjMvV5BU3Bgb6cpy8HgugwV7w,2/5-http://107.20.193.62:2750/block/00000000000b7026b41a6ff23ffc2f8af6749daa5a008b2672bea7f92c01681a
16irnhMJJufLdW5aL9cNA5tqbwiHyzm4P7,1/5-http://107.20.193.62:2750/block/00000000004db4ef3358168fa91dde15a3ee7e9c71c86a17380b886af83f98db
1M1BzQBpb8sbCuNzBTaae9PBdvjLthVrbR-Jackjack,2-https://bitcointalk.org/index.php?topic=24813.msg429585#msg429585
1Fhex5BvBGaChJqK75Z6MPxtK9muSsScKC-Shattienator,1/5-https://bitcointalk.org/index.php?topic=34586.msg527776#msg527776,1/5-https://bitcointalk.org/index.php?action=profile;u=22994
1QFNbLgpFKwFYKLNc9XkYbzgCryd3XYfuX-Twobits,2/5-https://bitcointalk.org/index.php?topic=34586.msg512933#msg512933

 Pages: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 ... 176
 « previous topic next topic »