static const struct {
  uint8_t version;
  uint64_t height;
  uint8_t threshold;
  time_t time;

It is easy to understand version and height, but it is hard to understand threshold and time. And how time is determine?

1 Answer 1


Explained in the Monero source code comments.

 * @param version the major block version for the fork
 * @param height The height the hardfork takes effect
 * @param threshold The threshold of votes needed for this fork (0-100)
 * @param time Approximate time of the hardfork (seconds since epoch)
  • It doesn't explain why.. why we need threshould?
    – user9076
    Nov 18, 2018 at 4:55
  • To ensure there are enough other nodes ready and upgraded before the new fork kicks in.
    – jtgrassie
    Nov 18, 2018 at 12:22
  • It seems currently these values are set to zero initially. Does this mean currently this check is not executed before upgrade? And how the time is predicted? And how the time parameter works? Thanks.
    – user9076
    Nov 18, 2018 at 12:31
  • "It seems currently these values are set to zero initially": No, they are setup on startup of the daemon. "And how the time is predicted?": It's an estimate based on the fact Monero has a target block time of 2 minutes.
    – jtgrassie
    Nov 18, 2018 at 14:38
  • Threshold has been set to zero previously as none of the forks so far have been optional (no consensus/voting - they are forced upgrades).
    – jtgrassie
    Nov 18, 2018 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.