Bitcoin Forum
April 26, 2024, 09:07:45 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does kimotos gravity work ?  (Read 481 times)
forzendiablo (OP)
Legendary
*
Offline Offline

Activity: 1526
Merit: 1000


the grandpa of cryptos


View Profile
February 15, 2014, 12:19:29 PM
 #1

I see its added to many scrypt coins.
Where can i read more about implementation and this alghoritm itself ?

yolo
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714122465
Hero Member
*
Offline Offline

Posts: 1714122465

View Profile Personal Message (Offline)

Ignore
1714122465
Reply with quote  #2

1714122465
Report to moderator
Exbuhe27
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
February 15, 2014, 01:04:57 PM
 #2

Hmmm, I read the MegaCoin forum post on it - but I can't seem to actually find the math they use for it. https://forum.megacoin.in/index.php?topic=893.0
It only explains the problem it's trying to solve.

If I had to guess, it probably is just an algorithm that adjust difficulty based on the last x blocks continuously instead of every 2016 blocks - so every block it looks at the last 2016 blocks and decides what the new difficulty should be.

They probably have it setup so that multiple running averages are taken - say the last 2016 blocks is weighted a bit, and then the last 1008 blocks, and the last 504 blocks, or something like that. You could even have this measure be more continuous, as in take the average from the last n blocks where n runs from 1 to 2016, and say that that calculated average contributes to the weighted average in a way proportional to how many blocks it takes into account.

The problem I see with this is that it gives you too much control over how quickly blocks are generated - I think I read somewhere that the lower the variance is in block generation time, the easier it is to fork the chain? Not sure on that, a quick google search didn't bring up any results.

Either way, I really would like to see what specific algorithm they used for it - I'll have to peek through the source a bit. They shouldn't design a new one from the ground up, because there are already really really good algorithms designed by engineers/physicists who work with signal-response feedback controlled systems, and any one of those could work really well I think. Things like Kalman Filters http://en.wikipedia.org/wiki/Kalman_filter

But still then, the worry I think is it being too good - though I think you could have a filter like this target a desired variance in block-time fairly well.
forzendiablo (OP)
Legendary
*
Offline Offline

Activity: 1526
Merit: 1000


the grandpa of cryptos


View Profile
February 15, 2014, 02:17:35 PM
 #3

thanx! ive also read KDC Klondike has it and something else [cant remember now] but i couldnt understand it. Seems its not as simple as i could expect Smiley Maybe someone will chime in to the thread to explain more

yolo
spartacusrex
Hero Member
*****
Offline Offline

Activity: 718
Merit: 545



View Profile
February 15, 2014, 04:29:29 PM
 #4

I agree with Exbuhe27, it is some kind of 'Simple Moving Average', to smooth out the HASH rate curve.

http://en.wikipedia.org/wiki/Moving_average

Whether it is a Simple, Cumulative, Weighted or Exponential average I'm not sure.

Looking at the algo, it seems similar to the Exponential Moving Average, since it has (1-a)^k which is 'like' the code he uses.. and seems to fit in with the whole 'Gravity Well' thing  Tongue

I have looked for the specific numbers he uses in the code,

https://github.com/megacoin/megacoin/blob/master/src/main.cpp#L1276
 
And the only place 0.7084 seems to appear is..

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.10.7822&rep=rep1&type=pdf

But no concrete answer as to why he chose those particular values..

Life is Code.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!