0
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

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? – Bai Lee Nov 18 '18 at 4:55
  • To ensure there are enough other nodes ready and upgraded before the new fork kicks in. – jtgrassie Nov 18 '18 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. – Bai Lee Nov 18 '18 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 '18 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 '18 at 14:43

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.