-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gnodev): time drifting in gnodev #1510
Conversation
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
f1da45b
to
45a2b5f
Compare
I'm putting in the review meeting to quickly assess whether this could have any unintended side effects we might want to guard against. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm suspecting this has to do with the moment at which the block proposer starts building the block (creates the VM context for the timestamp). The consensus protocol iterates through rounds until it is able to commit on a block, and move on to the next height. I'm guessing this setting forces the node to begin a new round with a fresh context instead of simply resetting the round (and keeping the old context with the old timestamp).
I'm not so sure this setting is part of the actual consensus (tendermint) specification, or just an in-code optimization (albeit buggy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with Milos to merge it, as it only impacts gnodev anyway and we can understand root causes with later anyway :) (probably Milos' job with the consensus engine refactor 😈)
fix gnolang#1507 It appears that using `TestConsensusConfig` as the default consensus configuration in gnodev causes time drift. This can be fixed by setting `cfg.Consensus.SkipTimeoutCommit` to `false`. However, I'm not certain about the exact reason why this setting actually corrects the time drifting issue. Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
fix #1507
It appears that using
TestConsensusConfig
as the default consensus configuration in gnodev causes time drift. This can be fixed by settingcfg.Consensus.SkipTimeoutCommit
tofalse
. However, I'm not certain about the exact reason why this setting actually corrects the time drifting issue.