Code Monkey home page Code Monkey logo

Comments (4)

ellaismer avatar ellaismer commented on June 1, 2024

@realcodywburns 0x0d is 13s, is that correct? Anyway, my mistake. I'll change all the documentations.

from parity-config.

ellaismer avatar ellaismer commented on June 1, 2024

So from my reading of EIP-2: if blocktime is 13s, excluding the difficulty bomb, the difficulty would decrease, and if blocktime is 12s, the difficulty would increase. So the avg blocktime is therefore 12.5s. @realcodywburns Can you confirm this calculation?

from parity-config.

ellaismer avatar ellaismer commented on June 1, 2024

No. @realcodywburns my previous comment was wrong, the blocktime for Ellaism is indeed 10s. The targeted block time is 10-19s.

Here's the start of the lines that calculate the target difficulty in Parity. Notice that durationLimit is only used when we are below Frontier hard-fork. In Ellaism we're always above that, so it comes to this line:

let diff_inc = (header.timestamp() - parent.timestamp()) / increment_divisor;

And increment_divisor is set from difficulty_increment_divisor which defaults to 10. So Ellaism's blocktime is indeed 10s. So when blocktime is 10-19s, 1 - diff_inc would be 0 and difficulty would not be changed. From EIP-2 you can also confirm this.

Anyway, thanks for noticing this. Although there's nothing wrong with blocktime, durationLimit is indeed a parameter that is not used. Closing this issue if no objections.

from parity-config.

ellaismer avatar ellaismer commented on June 1, 2024

I made a mistake in the above again. diff_inc would be 0 for all block times in range 10-19s, so the expected block time is a range, and average block time cannot be easily calculated.

So let's just use the real-world statistics data 14s for Ellaism average block time. I'll change all the documentations.

from parity-config.

Related Issues (5)

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.