Skip to content

Commit

Permalink
fix(gnodev): time drifting in gnodev (gnolang#1510)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gfanton committed Jan 18, 2024
1 parent 3c17766 commit a0b142b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contribs/gnodev/pkg/dev/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ func newNode(logger log.Logger, genesis gnoland.GnoGenesisState) (*node.Node, er

nodeConfig := gnoland.NewDefaultInMemoryNodeConfig(rootdir)
nodeConfig.SkipFailingGenesisTxs = true
nodeConfig.TMConfig.Consensus.SkipTimeoutCommit = false // avoid time drifting, see issue #1507

nodeConfig.Genesis.AppState = genesis
return gnoland.NewInMemoryNode(logger, nodeConfig)
}

0 comments on commit a0b142b

Please sign in to comment.