Forum Home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    [Dev] Kimoto gravity well integration - Feathercoind 0.8.5.1

    Technical Development
    12
    25
    9389
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      HopeStillFlies Regular Member last edited by

      Mooncoin has added it. FWIW.

      1 Reply Last reply Reply Quote 0
      • MrWyrm
        MrWyrm administrators last edited by

        Orbits.

        I am now starting to get a different picture of how the Kimoto Gravity well is suposed to work, and be understand weither the code actually does that.

        The block time can be seen as an orbit around its required 2.5 min timeing for Feathercoin. If all is well, a block will appear at -1.25 and +1.25 mins.

        The algorythm then loops back through a number of historical blocks to find the deviation of the orbit. The more deviation, the more gravity is applied.

        The main action of the gravity well will be to adgust the Retarget more often, and take acount of “sudden variations” in Hash rate.

        Thanks, that makes much more sense.

        Like what I do: 6uuy6isbrW1SBF191Bzgui1gWxPdNKx2PB

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User last edited by

          Just out of curiosity, aside from KGW (which is really popular right now, almost every new coin seems to be implementing it at the moment), what other ways could we protect against crazy difficulty traps?

          In regards to KGW, I echo chrisj’s thoughts.

          Is there any argument to make against?

          Keeping ftc ahead of the game is always a +1.

          So, are there any arguments against KGW?

          I don’t understand it thoroughly enough to try find anything wrong with it.

          1 Reply Last reply Reply Quote 0
          • Wellenreiter
            Wellenreiter Moderators last edited by

            At least it needs to be tuned and applied carefully.

            The blockchain is a control loop (I hope the term is correct, got it from leo.org)

            Basically it works like

            Measure block spacing-> blockspacing lower 2.5 mins?-> if yes increase difficulty
            -> if no decrease difficulty

            The KGW represents a fast reacting algorithm to adjust difficulty.
            Fast reacting control loop tend to oscillate and this could lead to unnecessary jumps in difficulty and make things worse.

            It may take some time to find the best parameter to be applied to KGW to get it working even with extreme jumps in hashrate.

            Also it will need more calculations to get the new difficulty as it recursively looks back to recent blocks.

            With a max block lookback of 10 it’s already 2939328000 calculations ( 1*2*3*4*5*6*7*8*9*10 ).

            Feathercoin development donation address: 6p8u3wtct7uxRGmvWr2xvPxqRzbpbcd82A
            Openpgp key: 0x385C34E77F0D74D7 (at keyserver.ubuntu.com)/fingerprint: C7B4 E9EA 17E1 3D12 07AB 1FDB 385C 34E7 7F0D 74D7

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User last edited by

              +1 Wellenreiter

              I understand KGW a lot better when you put it like that.

              1 Reply Last reply Reply Quote 0
              • surfguy72
                surfguy72 Regular Member last edited by

                Thanks for this discussion. I believe a change is needed, and you’re all the ones to make it happen. I’m trying to understand the tech part, but I do understand the results, and I believe a change is needed. I really appreciate this discussion, and will pop back in.

                Bona Fortuna

                1 Reply Last reply Reply Quote 0
                • S
                  SerenaBic Banned last edited by

                  The theme is interesting, I will take part in discussion.

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User last edited by

                    The theme is interesting, I will take part in discussion.

                    What do you think of KGW?

                    We could implement it, but there is talk that it is not perfect… What is your take on the matter SerenaBic?

                    1 Reply Last reply Reply Quote 0
                    • wrapper
                      wrapper Moderators last edited by

                      There are varying elements to consider when modifying a fundemental protocol element, like difficulty calculation. One of which is energy consumption.

                      Can any one help with their analysis of the code? main.cpp

                      Is the next difficulty change calculated by each miner, then submitted when you win? Or, does the winning miner get to calculate the next difficulty on winning the Block?

                      The the former then, energy use consideration might apply and would be usefull to understand.

                      1 Reply Last reply Reply Quote 0
                      • wrapper
                        wrapper Moderators last edited by

                        Re: Kimoto Gravity Well, may be susceptible to Time Warp attack. Peter sent me this…

                        Nite69 put a fix out for the time warp exploit in KGW, not seen it implemented in a coin yet.

                        https://bitcointalk…?topic=552895.0

                        1 Reply Last reply Reply Quote 0
                        • zerodrama
                          zerodrama Regular Member last edited by

                          Over at catcoin we implemented a PID algo, developed by someone who actually has done power management circuits for home power. We wanted something that was a more general purpose algorithm than KGW which was meant to respond to high hash multipool attacks. Yes, attacks. The Bitcoin Fundamentalists have said multipools were intended to kill altcoins.

                          We also guessed correctly that a single purpose highly sensitive algorithm would be more likely to contain surprises and have vulnerabilities. Too much focus on the method rather than the goal is a developer’s worst sin. God algorithms are as bad as God Classes in OOP.

                          We still have a couple tweaks to do, but we’re also looking to end hard forks by being able to push modifications to the protocol over the wire. But that’s a ways off.

                          I said I’d be back after catcoin got organized. I’m back. I have a few ideas I’ve been wanting to launch.

                          http://www.pacontrol.com/PID.html

                          1 Reply Last reply Reply Quote 0
                          • MrWyrm
                            MrWyrm administrators last edited by

                            Welcome back

                            Like what I do: 6uuy6isbrW1SBF191Bzgui1gWxPdNKx2PB

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post