Bitcoin Forum
May 04, 2024, 12:04:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: Kimoto Gravity Well simplier alternative  (Read 5401 times)
Nite69 (OP)
Sr. Member
****
Offline Offline

Activity: 477
Merit: 500


View Profile
May 14, 2014, 06:59:28 AM
 #41

Bump. Please move here comments you wrote at the other thread.

Sync: ShiSKnx4W6zrp69YEFQyWk5TkpnfKLA8wx
Bitcoin: 17gNvfoD2FDqTfESUxNEmTukGbGVAiJhXp
Litecoin: LhbDew4s9wbV8xeNkrdFcLK5u78APSGLrR
AuroraCoin: AXVoGgYtSVkPv96JLL7CiwcyVvPxXHXRK9
1714781071
Hero Member
*
Offline Offline

Posts: 1714781071

View Profile Personal Message (Offline)

Ignore
1714781071
Reply with quote  #2

1714781071
Report to moderator
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
IloveAnonCoin
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
May 14, 2014, 08:59:30 AM
 #42

From what it appears, the Dark Gravity Wave algorithm calculates an average difficulty and an average time between blocks for the previous 14 blocks.  It also performs a sum of the time for the last 140 blocks.  Once out of the loop, another average is taken that combines the previously found average and the found sum.  An actual time span is found from this number and the target spacing, and in the end, the difficulty is ultimately allowed to adjust 3X in either direction.  Please correct me if I am wrong on any of this.

Due to exploits found in KGW, I've implemented a new difficulty retargeting algorithm called DarkGravityWave.

What is DarkGravityWave? It uses multiple exponential moving averages and a simple moving average to smoothly adjust the difficulty. This implementation is far more simplistic and better suited to adjust difficulty than KGW and also fixes all known exploits.

Here's the commit if you're interested:

https://github.com/evan82/darkcoin/commit/07c99052edc617975cdcbe4482e02c52e2d1fbf5

But the problem is that KGW retargets every block, but allows timestamps backwards over more than 1 block. I don't see how this is fixed in DGW, can you explain?
I was looking at this too because I didn't see anything to deal with the really long block separation exploit, but then noticed he put a box around it at the end so it will only allow up to 3x adjustment in either direction.

I am genuinely curious as to how you have fixed the time warp exploit problem because I think that your algorithm is still susceptible.  Even though you don't include a negative time between blocks into your sum, you still count the block.  Further below this affects your 'smart average' slightly.  I don't think that this is the main issue, however.  With the Dark Gravity Wave I am still able to jump forward 5 blocks and then back in time 1 block.  I don't violate any of the timestamp rules by doing this, and I am able to achieve an actual timespan that is larger than the target timespan, thus lowering the difficulty.

Edit: I think you may have done yourself a disfavor by not including the negative time between blocks.  Doing so would bring down your average block spacing and calculated sum.  This drops your actual timespan and in essence punishes an attacker for jumping back in time.  I'm not saying this would fix anything.  Am I missing something here?


The simplest way to protect against the time warp exploit, in all its forms, is with a simple rule about blocks whose timestamp is before the previous block.

Just make an adjustment to the difficulty baseline so they don't get the benefit of difficulty adjustments made after their own timestamp.  

In other words,  if a new block is timestamped prior to the previous four, you proceed as if the base difficulty were the same as it was prior to those four blocks.

poof, every time warp exploit in the world becomes impossible.

I'm not sure, if this is enought. Hasn't he got those 4 blocks cheaper? He still can go far to the future and stay there generating cheap blocks, waiting real chain to catch in time.

There is a rule in DGW making it so it won't include the timestamp if that is the case, plus it uses a different strategy that is far more simplistic. The KGW exploit was done against Darkcoin in the mainchain, so I ran it against DGW and it seemed to work just fine.

A limit on the difficulty adjustment does not hinder me from exploiting the timestamps.  Remember, if I am working with my own private chain, I have all the time in the world to build a chain that is longer, abides by all the rules, but has a lower difficulty; the exploit gets easier as the difficulty gets lower.  

Could we get BCX in here to confirm that this is still exploitable?
Does it mean Dark Gravity Well still doesn't fixed anything ?
Pages: « 1 2 [3]  All
  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!