Giter Club home page Giter Club logo

Comments (6)

khalahan avatar khalahan commented on July 20, 2024

I've made 2 pull requests (one for each branch #53, #54) to allow difficulty adjustment on current testnet.

I planned a testnet hard fork on 15/03/2014 (not a lot of users will be affected, so, I think this date is OK).

Please, review this code soon so we could do tests on testnet again :p

from namecoin-legacy.

indolering avatar indolering commented on July 20, 2024

This is GREAT timing!

from namecoin-legacy.

khalahan avatar khalahan commented on July 20, 2024

I've tested the patch with a past date and successfully generated the next block in some seconds (you can see it on the block explorer : 34715. As it has a time before 15 Mar, it is only valid for my modified node).

The block 34716 didn't generate in some seconds, as expected.

from namecoin-legacy.

dthorpe avatar dthorpe commented on July 20, 2024

Hurray! What's the recommended process to test? Just pull the branch code, build and run in namecoind -testnet?

from namecoin-legacy.

dthorpe avatar dthorpe commented on July 20, 2024

The new code has successfully broken the Feb 14 logjam on namecoin-testnet. However, the current difficulty still seems to be rather high. If the namecoin (testnet) block chain is supposed to have a target of one new block every 10 minutes, then we're still pretty far off of that goal.

Observed behavior with the latest difficulty adjustment fixes: If no new blocks have been generated in the past 20 minutes, then starting namecoind --testnet --gen=1 will generate a new block almost immediately (within 3 minutes, typically). After that initial block, though, it may be hours before the next block is generated. I can "force" a new block by stopping the hash generator (setgenerate false) and restarting the hash generator (setgenerate true). If I do this more than 20 minutes after the last block appeared on the blockchain, then it will spit out a new block almost immediately. Lather 20 minutes, Rinse, Repeat.

I have a 2nd machine running the same 0.3.73 build of namecoin on testnet that I leave running 24/7. It generates a new block roughly every 4 hours overnight.

Is the difficulty adjustment supposed to reduce difficulty until the network-wide block generation rate approaches the 10 minute goal? If so, it doesn't seem to be doing that. The difficulty adjustment only seems to apply when first starting the hash generator.

p.s. The rate of new blocks shown in http://testnet.explorer.namecoin.info/ is artificially elevated because I've been "forcing" new blocks every 20 minutes or so throughout the day to get enough confirmations through so I can get on with my product development experiments using namecoin testnet. 120 confirmations at 4 to 6 hours each means the testnet coins I mined last week won't be available for at least a month!

from namecoin-legacy.

khalahan avatar khalahan commented on July 20, 2024

The patch is supposed to allow a new block after 20mn, with the min difficulty.
.
From what you say, the rpc command "setgenerate true" (same as the command line option, but easier to enable/disable) doesn't seem to get the right difficulty after the first block... A minor bug which would require a new issue I guess.

If you do "setgenerate true" / [block generated] / "setgenerate false" / [wait 20mn] / "setgenerate true", you should have a second block.

from namecoin-legacy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.