Move FTC to factor four diff swing over 7 days
-
[quote name=“Bushstar” post=“26869” timestamp=“1377985988”]
Technically anything other than real time is not optimal. We want a difficulty patch that does not exclude profit miners and will not affect the market adversely. I am not convinced that your solution can cover those two points in the current crypto climate. I believe that you have a very technical focus but there are broader issues.[/quote]Making bet on profit miners is not good. That’s Terracoin way. They will not help us willingly if anything bad happens. Loyal miners will do. All miners don’t mind profits though. However, long term profits come from merchants and institutional investors, and merchants they don’t want large difficulty jumps influencing actual block target to unpredictable levels. It hurts business simply.
If we please loyal miners, we also please real world business people. Some of the coin hoppers will also come. My observation shows that we’ve lost a fairly large share of loyal miners recently. We have less than 15% of them vs. over than 85% of coin hoppers. That’s still 10 times more of what we’ve had in May.
[quote author=Bushstar link=topic=3447.msg26869#msg26869 date=1377985988]
The miners want a difficulty fix now and I do not have the time to test and implement your solution to the level I would like to in only a few weeks.[/quote]Of course they want a difficulty fix. On the other hand, you see 9%/126 doesn’t work well for Phenixcoin with their block target of 45 seconds, and Erk has pointed out that it’s going to be only worse with our block target of 2.5 minutes. Let’s concentrate our efforts on something better. I’m sure we can prepare a couple of models for testnet in just a few days. There are people who can help. If everything goes as planned, we can make a release in 2 weeks.
[quote author=Bushstar link=topic=3447.msg26869#msg26869 date=1377985988]
Is there any possible way that you could come to the Feathercoin meet in Oxford? It would be excellent to have you there. Let me know if you need help getting here.[/quote]I’m doing business currently on the other end of the EU. If I have a chance to get back to the UK some day, I’m sure to pay a visit to Oxford :)
-
erk, agreed, it has to be very fine grained to get us to 2.5 minutes. 252 blocks is too slow and 18% is too big.
Ghostlander, I remember the main concern with the time warp fix was that it would hard fork. Well, we now have a hard fork coming up.
9/126 was a popular idea in the community and I can see no danger in it. I can see this solution being very suitable for some time to come.
erk and Ghostlander are very keen for very fine adjustments. Zerodrama, groll and I see the benefit in a more conventional solution. The majority want to see the 41.4% swing reduced. We can at least please the later to.
I will implement and test the 9/126 code change and Ghostlander’s changes to make time warp attacks more costly and less effective.
-
Peter, would you keep 504 blocks averaging window at least? 126 blocks averaging is too small. We shall be experiencing many 9% swings with it.
-
[quote name=“ghostlander” post=“26917” timestamp=“1378040548”]
Peter, would you keep 504 blocks averaging window at least? 126 blocks averaging is too small. We shall be experiencing many 9% swings with it.
[/quote]Okay, so please help with this conventional solution. 41.4% is too wild but 9% seems agreeable to miners, but with current diff change/block ratio that works out at 9/126.
One of the questions I was getting at in this thread was, do we need to be able to adjust difficulty by 400% over 3.5 block days?
I was hoping that question might lead to a slower adjust that could perhaps be more frequent like 9/252. We cannot have 9/504 or we will be Bitcoin slow.
The question now is that considering the solution at hand, what values would you suggest knowing that 41.4% is too great?
-
41% is too wild if done in one increment over 504 blocks. There is absolutely no problem if we do 41% over the same range in many smaller increments. In fact, we’re unlikely to reach those 41% under regular conditions as coin hoppers will go elsewhere half way if not sooner.
My idea of those increments as small as 12 blocks doesn’t seem to to be accepted warmly. Alright, I can live with it. Let it be 126 blocks. That’s 10x coarser granularity, but still better than 504 blocks at once. I’m not asking for 9% over 504 blocks at once. I’m asking for 9% over 504 blocks every time we retarget at 126 blocks. To be correct, 9% over a moving average of the past 504 blocks. We still maintain factor 4 over 3.5 days.
By the way, 9% is 1.0905077 difficulty limiter with the closest integer pair of 494 and 453. The rest of the patch is a breeze.
[quote name=“erk” post=“26919” timestamp=“1378042506”]
We have already been down this path months ago with the net stats on this site being wildly inaccurate from the averaging being over way too many block. Bush ended up reducing it to 60.
[/quote]Reducing to 30 works even better for the net stats. They’re supposed to show current network hash rate and nothing more. Doing difficulty calculations on such small window is not good.
-
[quote name=“d2” post=“26930” timestamp=“1378049246”]
[b]The smaller the difficulty adjustments, the faster they need to be performed.[/b]
[/quote]Indeed. The question is what averaging window to choose. Small allow for difficulty spikes, large are too slow. 504 blocks linear seems to be a very good choice. Maybe 2K blocks EMA (exponential moving average) window is also good, it needs to be researched further and we’re out of time.
Here is a graph of our network hash rate and difficulty for the last 2 weeks. We’ve had about 1.7GH/s of loyal miners and 9GH/s (12GH/s peak) of coin hoppers. 15% vs. 85%
[attachment deleted by admin]
-
[quote name=“ghostlander” post=“26929” timestamp=“1378048450”]
By the way, 9% is 1.0905077 difficulty limiter with the closest integer pair of 494 and 453. The rest of the patch is a breeze.
[/quote]Excellent, thanks for that.
I will prepare the changes and post a link on the forum for review.
-
[quote name=“erk” post=“26977” timestamp=“1378068917”]From that graph, you can see the point I was making earlier, the hash rate does not take very many block to change either up or down. Less than 20 usually.
[/quote]We would hope to see more stick around overall as there will no longer be a 41.4% swing after the next patch. People need not be so quick to move after the next patch.
-
Good, we want the profit miners to clear off once in a while :) Not all miners use multipools or have automated scripts. Our miners are a really good bunch of people some of whom have to worry about ROI and need to pay the bills. Their point is that they cannot stick around for a large difficulty swing and it is not a huge effort to make the difficulty more agreeable to them before we start the move to the 0.8 codebase.
-
time wrap is link to retarget so i first talk about time wrap and after about the retarget.
I made a small analysis previously on the time wrap issues, and we had other discussion in many thread about ithttp://forum.feathercoin.com/index.php?topic=3077.msg23696#msg23696
the adjust time(now 35 min) need to be lower then the time window(now 2h) and the number of sampling for the median be the normal block rate for the time window -1(now 11 as it comes from bitcoins 2h is 12 block we have 48 should be 47)
Ghostlander proposed 30 min for time window so time adjust need to be change to let say 15 min and we can keep the 11 blocks (he proposed 49)
you need to know that higher the median number allow time wrap in the past for a greater period. 49 would means a block would be accept with a time of the 25 back block in normal condition a bit more then 1h, but would also result in a >4h with 10 minutes between block we sometimes get.
this number of block would be very very dangerous with a lower sampling range.with ACP in place i would also had the proposal i made in the post of taking upper of (the median or the previous block -2 time time window). so been unable to orphan blocks we are assure that every time a legit block is found a time wrap block can be added that is more than 1h back(2*30 min) so even a 51% can’t continuously make a time warp.
with 30min window we can go with anything > 75 as sampling in my view. with the actual 2h i would say 250 is the minimum. the big issue is not a one time used as it will just reset next retarget.(not funny but not too damaging) the bigger issue is when it can be used partially several times to change the retarget in a an opposite way so 2h/10.5h is 19%.
the interesting point from the grap was that we where nearly on target on 27 at 194 with some hoppers still in then down a bit at 186 and get all hopper to get us a 260 and now back at 186 and mosty at good point. so we overshoot too much in range in the retarget. on 27 194 to 192 would have done the job. now if we move more then 5% 1-2% would be enough to put us in correct place. moving a fraction of the time would help greatly and if we are way off we would get so off that the fraction would still hit the limiters like the 260 to 186 where we got ~300. hopper don’t switch on same formula so if we can get pretty stable around the middle of the hoppers group we will surf the wave.
so now we have 41.4 over 504
talk was about :
18 over 504
9 over 252
9 over 126 (linear to original that would be 4.5)i would say the shorter the smaller the limiter I would put. 41.4 over 504 is the max and seems to be more then enough. 18 can be a bit slow, not sure as chart over 7 and 14 days show very slow change of 5-7% per day max.
with the time warp corrected: I would say 7% over 126 with a .25 factor of actual the diff adjustment calculation. so actual >28% would becomes 7% and 8% becomes 2%. this would account for the hoopers movement after the diff change. as hash rate is not a constant in ALT case as it was for BTC.
-
Thanks for your time on this groll. With a hard fork coming up we can finally patch these fixes in.
I will send you, ghostlander and wrapper0feather a link so we can work on it together.
Can you explain the last part about using a .25 factor of the diff adjust?
[quote]with the time warp corrected: I would say 7% over 126 with a .25 factor of actual the diff adjustment calculation. so actual >28% would becomes 7% and 8% becomes 2%[/quote]
-
[quote name=“groll” post=“27000” timestamp=“1378094049”]
you need to know that higher the median number allow time wrap in the past for a greater period. 49 would means a block would be accept with a time of the 25 back block in normal condition a bit more then 1h, but would also result in a >4h with 10 minutes between block we sometimes get.
[/quote]Although we are unlikely to run into 10 minutes actual block targets often with more frequent retargetting every 126 blocks, we can keep median of 11 past blocks probably with 30 minutes future limit. On the other hand, larger past median makes it more difficult for the attackers to manipulate median time stamps as they have to maintain superior hash power over larger time frame. It is also interesting if a complex rule can be developed such as MAX(median of 11 last blocks, current time - 30 minutes) to make sure both ends are symmetric in the worst case as we are not likely to have actual block target above 30 minutes.
[quote author=groll link=topic=3447.msg27000#msg27000 date=1378094049]
this number of block would be very very dangerous with a lower sampling range.
[/quote]That’s why I suggest to keep 504 blocks averaging window as it reduces this effect much better than smaller 126 blocks one.
-
[quote]Can you explain the last part about using a .25 factor of the diff adjust?
Quote
with the time warp corrected: I would say 7% over 126 with a .25 factor of actual the diff adjustment calculation. so actual >28% would becomes 7% and 8% becomes 2%[/quote]
this is a reduction of the applied difficulty change. the actual calculation make what is the diff to get the 2.5minutes at current hash rate. the reality is it overshoot as hash rate increase or decrease also with the difficulty change as profitability change. we currently have 15% loyal and 85% hopper. So the ratio is in the range of 0.17.
the .25 is to take into account hoppers comming in as we have seen in the past if we are far we are very far, if near we overshoot and get all the train switch. the .25 (can be something else) is to make it less agressive so we count in the expected hashrate change that will occur fr the diff change.
it is important to note that for extreme it will go to max of the limiter also so way off adjustement is not change. when we are nearer the correct time we just change the diff more slowly.
in reality the hashrate * time =k*difficulty where k is around 4G for FTC. the actual adjustement link the diff to the time and take hashrate as constant. but we know change in diff means the hashrate will change and if we are near the target we just overshoot. so using 0.25 will make a smaller step and the hashrate change should compensate the rest. if not enough hashrate change we will change a bit again in next retarget, but we would be in 10% of the target so not a bad place to be.
edited: note: the price influence greatly the hash rate and vary by ±10% in a day so this change the equation for next retarget also. but price can’t be factor directly, but the hashrate already factor it.
-
[quote name=“d2” post=“27098” timestamp=“1378183323”]
Just like you can’t take the price into account, you also cannot assume that any additional hash rate will enter the network if the difficulty drops by X amount or to X.XX level as the profit miners only jump onto the coin if a profitability website says to do it.
[/quote]
it’s a possibility and next retarget will just put us more close to the correct value if nothing else change. But the actual formula assume no change in hashrate and this have been proven to be very wrong in change more then 1-2%. as we can see now passing from 228 to 211 just made a jump from 5G to 8G of hashrate. today at diff 228 I have made 6-7 checks at random interval with price mostly stable for some block (i discarded many range for non stable price on BTC-e) and price change from 0.00107 at 5Gh/s and 0.00113 at 7Gh/s. The funny part was that the hashrate for 30 blocks was mostly following the price so the 5% change in price was giving a 2Gh/s change in hashrate. Now we have retarget at 211 (8%) and price at 0.00108 and we hit 8.5Gh/s. so we overshoot if current condition continue we will retarget over 260(if full swing will be near 300 :( ) and be on a long run again overshooting the other way after.the 0.25 “damping” factor would just slow the change if we are not too far of stable value where we know we should have some variable hash power already mining. so it expect but not need hoppers to comes in or comes out we will adjust more slowly, possibly over some retarget for small change better then the actual full gaz/full break mode. if we are far from the target the max will be used anyway so we can follow in any direction as necessary as it reduce the impact not the range of the retarget limits.
I have notice in the past 5-6 weeks that going more then 5% over LTC gives us more than 2.5Gh/s over been under LTC and it slowly increase with bigger % (~5.5Gh/s with ~15%). this is true even if many coins are over us in the profitability. you can see the change in LTC hashrate mostly directly.
1-2Gh/s move constantly with the rest of the coin profitability. The resulting change on us are more or less important depending on the coin.
-
It’s being worked on as we speak Erk. Issue is that it requires a hard fork which should not be taken lightly. We need to ensure that we have everything we need in the new client and that we haven’t made any mistakes. We promise - it is coming.
Remember, we have many more wallets in the the wild than most other alts so a hard fork is a big step.
It would also appear that there’s a high percentage of clients that haven’t upgraded to the ACP wallet yet.
Btw. As I was reading through that thread, I noticed you used coinotrons pps? If you still want a pps pool, try ours. Same fee but higher share value. ;)
-
[quote name=“Nutnut” post=“27307” timestamp=“1378363382”]
It’s being worked on as we speak Erk. Issue is that it requires a hard fork which should not be taken lightly. We need to ensure that we have everything we need in the new client and that we haven’t made any mistakes. We promise - it is coming.Remember, we have many more wallets in the the wild than most other alts so a hard fork is a big step.
It would also appear that there’s a high percentage of clients that haven’t upgraded to the ACP wallet yet.
Btw. As I was reading through that thread, I noticed you used coinotrons pps? If you still want a pps pool, try ours. Same fee but higher share value. ;)
[/quote]Woot? did we make em lower their fees ;D love it!
-
9/126 has been implemented in the 0.6.4.4 branch of Feathercoin.
https://github.com/FeatherCoin/FeatherCoin/tree/0.6.4.4
We need to code in the specific changes to increase the cost of time warp.
If people want to contribute code, a commit or give explicit details of proposed code changes now is the time to come forward :)
-
I see you’ve implemented 9% over 126 blocks without large averaging window of 504 blocks or something like.
[code] - static const int64 nTargetTimespan = (7 * 24 * 60 * 60) / 8; // Feathercoin: 7/8 days
- static const int64 nTargetTimespan = (7 * 24 * 60 * 60) / 32; // Feathercoin: 7/32 days[/code]
In fact, this is the recent Phenixcoin patch with no block target/reward changed. It doesn’t work well for them and I see no reason why it’s going to work well for us. We have discussed so much and finished exactly where started.
See below what PXC has got with such patch. We shall have no better unfortunately.
[attachment deleted by admin]
-
I’ve said before that we cannot compare ourselves to PXC. They have no base hashrate and need to address that issue. We are an active healthy coin with a loyal miner base which we want to look after :)
However , I think that there is some misunderstanding between us.
Can you provide some code, psuedo code or an explicit explanation of what you think we need?
EDIT: I think I have it, a diff change every 126 blocks (max 9%) but sampling from 504 blocks ago?
Please PM me whatever IM details you have and we can make some quick progress to report here. Thanks.
-
[quote name=“Bushstar” post=“27756” timestamp=“1378840332”]
I’ve said before that we cannot compare ourselves to PXC. They have no base hashrate and need to address that issue. We are an active healthy coin with a loyal miner base which we want to look after :)
[/quote]Indeed we are much larger than PXC. Those who are after us are also much more serious. PXC is hunted by Multipool only, the others ignore it simply. Too small game for them. We are large enough to catch their attention, and our block target is 3.3x slower which is also good for them. Alright, let’s continue in private until we figure out something constructive.