Kimoto's Gravity Well
-
Well, as Megacoin follower I can say, do it. It’s a damn good improvement for the regular hashers and it ensures the network just keeps on going. Back when it was implemented in Megacoin I, as a smalltime gpu miner, noticed a huge difference. Before the Gravitiy Well, multi pools and alike would come, skyrocket difficulty, and then go away again, leaving the difficulty to be resolved by the regular hashers. That would take a while, meaning that people like me with a simple gpu would barely make a difference anymore and see very little return. Also, such high difficulty means it takes more time for the network to toss about confirmations on transactions, right?! After the implementation of Kimoto’s Gravity Well the difficulty would spike just the same as soon as multi pools come rape harvesting, but as soon as they move one, the difficulty would adjust about instantly. It made mining worth while again.
With scrypt asics around the corner, will such code make a difference? I think it will. Hugely. In general, the more asics are hashing, the more the difficulty rises. The Gravity Well won’t make that go away. But what you do have to fear are the asics that will join multi pools, and perhaps even more such pools then there are now. Okay, it may be the same as now, except that the difficulty spikes would become two or three times more powerful. How much time will it take to solve that and bring the network back to a workable level with the current amount of regular miners?! It will take hours and hours to recover while the network struggles. It might even take days to recover. While that’s not likely since Feathercoin and Megacoin have strong networks, it will have a noticeable impact nonetheless. Coins with lesser networks should be very worried. In the past I’ve seen coins struggle for weeks even. In the long run that is lethal obviously.
So, yeah…
-
Essentially I think this is something the devs should take a good look at, either implement it straight out of the box, or do a similar take on it.
asic miners in general is not satan, but as MegaMike pointed out the ones joining multipools with asic miners very well could be.It’s a dog eat dog world out there, if we want to survive in the long run (mind you, we’re doing quite well today, but that can change fast) we need to adapt to our surroundings. We have a strong community that are willing to go very far protecting the coin, however make no misstake, if we become a viable target for multipools they will give us quite a challenge keeping the coin sane and safe.
Altcoins will die, and new ones will pop up, just as it is today. The ones that make it in the long run are the ones able to provide stability and protection against different kinds of threats against themselves :)
-
I am unable to find anything specific on “Kimoto’s Gravity Well”; logic and/or math behind it. Every single article/post Ive found just says it is OK, it is a “problem solver” etc. Id love to see how it approaches the problem. Anyone found a more specific description of this Gravity Well, other than that it re-adjusts diff on a single block basis.
In my opinion difficulty adjustment as it is implemented now works reasonably well.
Regarding the incoming ASICs. Perhaps someone should organize a group buy of asic boards so that we can counterweight the increased hash power of the multi pools.
-
[quote name=“Explicit” post=“56005” timestamp=“1391078378”]
I am unable to find anything specific on “Kimoto’s Gravity Well”; logic and/or math behind it. Every single article/post Ive found just says it is OK, it is a “problem solver” etc. Id love to see how it approaches the problem. Anyone found a more specific description of this Gravity Well, other than that it re-adjusts diff on a single block basis.In my opinion difficulty adjustment as it is implemented now works reasonably well.
Regarding the incoming ASICs. Perhaps someone should organize a group buy of asic boards so that we can counterweight the increased hash power of the multi pools.
[/quote]+1 on this one
Btw, a colleague mentioned another solution. Wouldn’t a faster retarget time solve the problem with multipoolers that ruin the network? Sure you get the burst, but when they leave things go back to normal pretty quickly.
Not sure if this would have any other backsides tho…
-
Wish I could show the links with good info on the Megacoin forum, but the forum and domains are being moved from left to right and I can’t reach the site anymore.
Shortest link to where and how to find more info is via this link: https://twitter.com/aantonop/status/428269040885190657
Check Alienwalkerx’s reply for links. If they lead anywhere…Also, this is what Kimoto posted on Bitcointalk.org:
[quote=Kimoto]
Kimoto Gravity Well difficulty algorithm this month grew from 2 to 12 coins.
Releasing a technical gravity guide shortly so all coins receive a fair chance at life
[/quote] -
Perception of value is only the Danger it is pegged to…
-
Thanks MegaMike. I checked the links on Twitter. The most informative, but not really insightful, I could find was http://forum.megacoin.in/index.php?topic=2791.msg9395#msg9395, which lists various Kimoto Grawity Well configurations. In case of MegaCoin it is:
[quote]
Megacoin
Date Added: September 13, 2013 (~3.5 months in)
http://megacoin.co.nz/
EventHorizonDeviation = 1 + (0.7084 * pow((double(PastBlocksMass)/double(144)), -1.228));
BlocksTargetSpacing = 2.5 * 60; // 2.5 minutes
PastSecondsMin = TimeDaySeconds * 0.25;
PastSecondsMax = TimeDaySeconds * 7;
[/quote]This leaves me clueless since there are no explanations of what PastBlockMass is, how it is calculated etc., what do the numbers in EventHorizonDeviation actually mean… I am not even convinced that I am looking at the real thing as it looks too simple to work as intended.
Briefly inspecting MegaCoin difficulty adjustments it can be concluded that it works OK. And so does the diff adjustment in the case of the Feathercoin, just in a bit less granular way.
http://www.coinwarz.com/difficulty-charts/megacoin-difficulty-chart
http://www.coinwarz.com/difficulty-charts/feathercoin-difficulty-chartI don’t think that at this point â€Å"a bit less granular way†of diff adjustment is a problem. On the other hand it may become a problem, even a major one, if multi-pools become very strong and hit us with terra hashes at one moment, and leave after the difficulty rises above certain level. With a substantial drop in hash rate even solving a single block could be a major headache.
Would I vote for implementing Kimotos’ Gravity Well? I’d like to understand how it works first, and see how it fits the pessimistic scenario of rapid and high-magnitude hash-rate changes.
Maybe we should be worried about the scrypt asic dominated future, and see if we can come up with a suitable algorithm on our own (not simply implementing what others have already done), perhaps designing an algorithm that is very sensitive to increased network hash rate (so that we only waste a couple of blocks when a multi-pool hits us with terra hashes), and on the other hand reacts super quickly when multi-pool terra hashes are gone (perhaps using a failsafe if a block is not solved within a certain time frame*)
* This could provide incentive to a powerful miner to try to solve a couple of blocks (or even e single block) after the failsafe kicks in. -
[quote name=“vizay” post=“56033” timestamp=“1391087617”]
Btw, a colleague mentioned another solution. Wouldn’t a faster retarget time solve the problem with multipoolers that ruin the network? Sure you get the burst, but when they leave things go back to normal pretty quickly.Not sure if this would have any other backsides tho…
[/quote]Yes and then you’ll have to do it again.
It never ends. You have to spank em.
-
[quote name=“zerodrama” post=“56284” timestamp=“1391180022”]
[quote author=vizay link=topic=7305.msg56033#msg56033 date=1391087617]
Btw, a colleague mentioned another solution. Wouldn’t a faster retarget time solve the problem with multipoolers that ruin the network? Sure you get the burst, but when they leave things go back to normal pretty quickly.Not sure if this would have any other backsides tho…
[/quote]Yes and then you’ll have to do it again.
It never ends. You have to spank em.
[/quote]You Spanker you. ;)
I bet you have a paddle under the bed. -
[quote name=“Explicit” post=“56268” timestamp=“1391174697”]
Thanks MegaMike. I checked the links on Twitter. The most informative, but not really insightful, I could find was http://forum.megacoin.in/index.php?topic=2791.msg9395#msg9395, which lists various Kimoto Grawity Well configurations. In case of MegaCoin it is:
[quote]
Megacoin
Date Added: September 13, 2013 (~3.5 months in)
http://megacoin.co.nz/
EventHorizonDeviation = 1 + (0.7084 * pow((double(PastBlocksMass)/double(144)), -1.228));
BlocksTargetSpacing = 2.5 * 60; // 2.5 minutes
PastSecondsMin = TimeDaySeconds * 0.25;
PastSecondsMax = TimeDaySeconds * 7;
[/quote]This leaves me clueless since there are no explanations of what PastBlockMass is, how it is calculated etc., what do the numbers in EventHorizonDeviation actually mean… I am not even convinced that I am looking at the real thing as it looks too simple to work as intended.
Briefly inspecting MegaCoin difficulty adjustments it can be concluded that it works OK. And so does the diff adjustment in the case of the Feathercoin, just in a bit less granular way.
http://www.coinwarz.com/difficulty-charts/megacoin-difficulty-chart
http://www.coinwarz.com/difficulty-charts/feathercoin-difficulty-chartI don’t think that at this point â€Å"a bit less granular way†of diff adjustment is a problem. On the other hand it may become a problem, even a major one, if multi-pools become very strong and hit us with terra hashes at one moment, and leave after the difficulty rises above certain level. With a substantial drop in hash rate even solving a single block could be a major headache.
Would I vote for implementing Kimotos’ Gravity Well? I’d like to understand how it works first, and see how it fits the pessimistic scenario of rapid and high-magnitude hash-rate changes.
Maybe we should be worried about the scrypt asic dominated future, and see if we can come up with a suitable algorithm on our own (not simply implementing what others have already done), perhaps designing an algorithm that is very sensitive to increased network hash rate (so that we only waste a couple of blocks when a multi-pool hits us with terra hashes), and on the other hand reacts super quickly when multi-pool terra hashes are gone (perhaps using a failsafe if a block is not solved within a certain time frame*)
* This could provide incentive to a powerful miner to try to solve a couple of blocks (or even e single block) after the failsafe kicks in.
[/quote]Sorry I can’t give you more information. Especially the technical details but hopefully Kimoto will release that soon. The Megacoin website is still a mess though. But I’ll keep an eye on it and let you know when and how the tech details are released.
The graphs are cool, by the way! Thanks for those.
I think if you look at one of the coins who recently added the Gravity Well, Franko, you can fairly easy see how it benefits them:
http://www.coinwarz.com/difficulty-charts/franko-difficulty-chart
The long periods of high difficulty are gone, and when a spike appears, it’s more vicious, basically meaning the time any multi pool hits will be shortened due to the fast and furious growth of the difficulty, effectively using their own massive power against them. Also more spikes, so yeah, there is a downside, but overall it certainly gives a real benefit, and that’s the way I’ve experienced it when it was implemented in Megacoin, no more mining for hours to work away somebody else’s difficulty :)Of course you need to think for yourself what would be best suited for Feathercoin.
[edit]Forum came just online, so here the direct links (minus the tech doc):
The Newbie’s Guide to Kimoto’s Gravity Well : https://forum.megacoin.in/index.php?topic=893.0
Kimoto Gravity Well Configurations : https://forum.megacoin.in/index.php?topic=2791.0 -
Its looks a good idea. It is similar to some things we are considering anyway.
-
[quote name=“wrapper” post=“56437” timestamp=“1391263527”]
Its looks a good idea. It is similar to some things we are considering anyway.
[/quote]I think it tries to address the wrong problem.
-
[quote name=“zerodrama” post=“56504” timestamp=“1391289676”]
[quote author=wrapper link=topic=7305.msg56437#msg56437 date=1391263527]
Its looks a good idea. It is similar to some things we are considering anyway.
[/quote]I think it tries to address the wrong problem.
[/quote]People are not going to spend these coins - any of them. Like an implanted memory of their own to coin Blade Runner the success of BTC is completely tied to a memory of it’s success at this point and we need to act accordingly. The Well addresses one of the issues, but perception is good old marketing. If FTC had a Super Bowl commercial would our value shoot up if not only for the reason of perception? The Original protocol for currency was a metal and a piece of paper. And people built off that and got creative…
-
[quote name=“Horizon” post=“56547” timestamp=“1391325396”]
[quote author=zerodrama link=topic=7305.msg56504#msg56504 date=1391289676]
[quote author=wrapper link=topic=7305.msg56437#msg56437 date=1391263527]
Its looks a good idea. It is similar to some things we are considering anyway.
[/quote]I think it tries to address the wrong problem.
[/quote]People are not going to spend these coins - any of them. Like an implanted memory of their own to coin Blade Runner the success of BTC is completely tied to a memory of it’s success at this point and we need to act accordingly. The Well addresses one of the issues, but perception is good old marketing. If FTC had a Super Bowl commercial would our value shoot up if not only for the reason of perception? The Original protocol for currency was a metal and a piece of paper. And people built off that and got creative…
[/quote]The community in the long run is the life of the coin. Every coin has proved this principle. The more black magic there is in the code, the less the community is able to adapt and participate. This effectively kills the coin or makes it the province of established owners of the old system. SEE New York City HEARINGS. They don’t understand it. They are afraid of it. They can’t even compromise because it is all technowizardry to them. And yeah they’re also trying to own it.
-
[quote name=“Horizon” post=“56547” timestamp=“1391325396”]
[quote author=zerodrama link=topic=7305.msg56504#msg56504 date=1391289676]
[quote author=wrapper link=topic=7305.msg56437#msg56437 date=1391263527]
Its looks a good idea. It is similar to some things we are considering anyway.
[/quote]I think it tries to address the wrong problem.
[/quote]People are not going to spend these coins - any of them. Like an implanted memory of their own to coin Blade Runner the success of BTC is completely tied to a memory of it’s success at this point and we need to act accordingly. The Well addresses one of the issues, but perception is good old marketing. If FTC had a Super Bowl commercial would our value shoot up if not only for the reason of perception? The Original protocol for currency was a metal and a piece of paper. And people built off that and got creative…
[/quote]This is a good thread discussion on Feathercoin network protection techniques, ie Kimoto gravity well. That is a diversion.
What is a “Super Bowl”, some American - Giant Kornflakes container? -
[quote name=“zerodrama” post=“56596” timestamp=“1391344444”]
Kimoto’s Gravity Well
I think it tries to address the wrong problem.
[/quote]I agree, community monitoring (condition based maintenance) will be an important factor, in preventing / detecting attacks.
Particularly in the future when a number of coins are established world currency.Untill then, it is obvious to me, if not the Bitcoin “head in the sands”, attacks on the altcoins will evolve / has lead / to successful attacks on Bitcoin and Litecoin.
We have a defence for many attacks they don’t, and they are relying on network dominance, mistake.
However, ACP has its own draw backs and we would like to continue to try ideas to replace that. Particularly as it will be lees necessary if we take alternate methods eg Kickstarter cheap ASICS for merchants. We need to concentrate on the attacks that are actually happening, eg. evil Multipools.
-
I think it would be a great IDEA to implement the Kimoto’s Gravity Well
-
If someone supplies a patch,Kimoto’s Gravity Well, we can set up a test.
-
[quote name=“wrapper” post=“56620” timestamp=“1391349307”]
If someone supplies a patch,Kimoto’s Gravity Well, we can set up a test.
[/quote]Problem is you can’t explain Kimoto to the average person. How are you going to explain it to regulators? It’s black magic for a problem caused by pools. Kimoto won’t kill an attack by zealots.
The more black magic we have, the less participation there is in the software, which means eventually the policies.
-
[quote name=“zerodrama” post=“56689” timestamp=“1391373448”]
[quote author=wrapper link=topic=7305.msg56620#msg56620 date=1391349307]
If someone supplies a patch,Kimoto’s Gravity Well, we can set up a test.
[/quote]The more black magic we have, the less participation there is in the software, which means eventually the policies.
[/quote]I’ve now looked into the Gravity Well quite a bit. It is very much fulfilling our requirement to re-targets based on the rate of change between the short and long block time averages. I actually think it is very brilliant.
A number of other coins are employing it specifically against multipool leaching, and don’t seem to have, forking or other validation issues which may have concerned us more (with a larger network and more miners to update).
The only point against is it is effectively retargeting at each block, so it might be worth trying that (easy solution) first.
It effectively damps the block difficulty changes, so our current granulated difficulty change may become superfluous.[quote]
unsigned int static KimotoGravityWell(const CBlockIndex* pindexLast, const CBlockHeader *pblock, uint64 TargetBlocksSpacingSeconds, uint64 PastBlocksMin, uint64 PastBlocksMax) {
/* current difficulty formula, megacoin - kimoto gravity well */
const CBlockIndex *BlockLastSolved = pindexLast;
const CBlockIndex *BlockReading = pindexLast;
const CBlockHeader *BlockCreating = pblock;
BlockCreating = BlockCreating;
uint64 PastBlocksMass = 0;
int64 PastRateActualSeconds = 0;
int64 PastRateTargetSeconds = 0;
double PastRateAdjustmentRatio = double(1);
CBigNum PastDifficultyAverage;
CBigNum PastDifficultyAveragePrev;
double EventHorizonDeviation;
double EventHorizonDeviationFast;
double EventHorizonDeviationSlow;if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || (uint64)BlockLastSolved->nHeight < PastBlocksMin) { return bnProofOfWorkLimit.GetCompact(); }
for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
if (PastBlocksMax > 0 && i > PastBlocksMax) { break; }
PastBlocksMass++;if (i == 1) { PastDifficultyAverage.SetCompact(BlockReading->nBits); }
else { PastDifficultyAverage = ((CBigNum().SetCompact(BlockReading->nBits) - PastDifficultyAveragePrev) / i) + PastDifficultyAveragePrev; }
PastDifficultyAveragePrev = PastDifficultyAverage;PastRateActualSeconds = BlockLastSolved->GetBlockTime() - BlockReading->GetBlockTime();
PastRateTargetSeconds = TargetBlocksSpacingSeconds * PastBlocksMass;
PastRateAdjustmentRatio = double(1);
if (PastRateActualSeconds < 0) { PastRateActualSeconds = 0; }
if (PastRateActualSeconds != 0 && PastRateTargetSeconds != 0) {
PastRateAdjustmentRatio = double(PastRateTargetSeconds) / double(PastRateActualSeconds);
}
EventHorizonDeviation = 1 + (0.7084 * pow((double(PastBlocksMass)/double(144)), -1.228));
EventHorizonDeviationFast = EventHorizonDeviation;
EventHorizonDeviationSlow = 1 / EventHorizonDeviation;if (PastBlocksMass >= PastBlocksMin) {
if ((PastRateAdjustmentRatio